
The best Latex editor ▋
LaTeX Tutorial — Lesson 4
Formatting and Styling in LaTeX
Lesson 4: Formatting and Styling in LaTeX
So far, you’ve learned how to write content and structure your LaTeX document. In this lesson, we’ll explore how to style your text, adjust formatting, and include images — all while keeping your document clean, professional, and consistent using only what works with pdfLaTeX (Crixet's default compiler).
Text Styling
LaTeX gives you precise control over how text appears. Here are some essential styling commands:
Style | Command |
---|---|
Bold |
|
Italic |
|
Underlined |
|
Monospace |
|
Small caps |
|
Tip: Use
\emph{}
when you mean emphasis — LaTeX can adjust it contextually.
Font Sizes
You can change font size globally or locally:
Global Font Size
Set in the document class:
Local Font Size
Use size commands wrapped in braces:
Available sizes (smallest to largest):
Text Alignment
Change alignment using environments:
LaTeX fully justifies text by default (aligned left and right). Use the above environments for overrides — especially helpful for quotes, poems, or signature blocks.
Footnotes
Add notes with \footnote{...}
:
LaTeX will number and place the note automatically at the bottom of the page. Keep footnotes out of section titles or captions for best results.
Including Images
Images are added using the graphicx
package (usually enabled by default in Crixet).
In the Preamble
Insert an Image
How It Works
\includegraphics{...}
includes the image file.width=0.5\textwidth
scales it to half the text width.\caption{...}
and \label{...}
allow you to refer to it:
Accepted formats for pdfLaTeX:
.png
,.jpg
,.eps
(not supported by pdfLaTeX).
Colors
To use colors, include the xcolor
package:
Then color text like this:
Predefined colors include: red
, blue
, green
, gray
, etc. Use sparingly in formal documents.
Page Layout and Margins
To adjust page margins, include the geometry
package:
You can fine-tune:
Keep it simple. Crixet supports basic margin adjustments — perfect for reports or school submissions.
Line and Paragraph Spacing
By default, LaTeX indents paragraphs and does not add vertical spacing between them. If you want extra spacing or no indent, you can use the parskip
package:
This disables indentation and adds vertical space between paragraphs.
To double-space text (e.g., for academic submissions), use the setspace
package:
Only use this when required — LaTeX spacing is usually well-balanced by default.
Horizontal Rules
Use horizontal lines for breaks or separation:
Great for visual breaks, signature lines, or document aesthetics.
Style Consistency
LaTeX promotes consistency:
Use structural commands like
\section{}
and\emph{}
instead of manually styling headings or emphasis.Reuse styles with commands like:
This creates \important{...}
to apply bold red styling consistently.
Recap
In this lesson, you’ve learned how to:
Style text (bold, italics, underline, typewriter, small caps)
Adjust font size and alignment
Add footnotes
Insert images with captions
Use color
Customize spacing and margins
Try combining these features into your existing document. Add a title image, color for highlights, or adjust your spacing. Experiment with formatting — but let LaTeX handle consistency.
What’s Next?
In Lesson 5, we’ll wrap up this course by learning how to extend LaTeX with packages and how to use templates to build full documents more efficiently. You'll learn how to create professional documents quickly and reuse your favorite setups.
Ready for the final step? Let’s go!