Text & Formatting
Text Formatting in LaTeX
Master text formatting in LaTeX including font sizes, styles, colors, alignment, and special formatting techniques.
Beyond the basics of bold and italic, LaTeX offers extensive text formatting capabilities. This guide covers font sizes, families, shapes, colors, and advanced formatting options.
Quick tip: LaTeX separates content from presentation. Define your formatting once and apply it consistently throughout your document.
Related topics: Font selection | Paragraph formatting | Mathematics formatting | Document classes
Font Sizes
LaTeX provides ten standard font size commands:
Using Font Sizes
Font Families
LaTeX has three main font families:
Setting Default Font Family
Font Shapes and Series
Font Shapes
Font Series (Weight)
Color Text
Color Models
Text Alignment
Special Text Effects
Underline Variations
Text Decorations
Text Boxes and Frames
Advanced Formatting
Rotating Text
Scaling Text
Custom Commands for Consistent Formatting
Multilingual Text
Best Practices
Formatting guidelines:
- Semantic markup: Use
\emph{}
for emphasis, not just\textit{}
- Consistency: Define custom commands for repeated formatting
- Avoid hardcoding: Use relative sizes (em, ex) not absolute (pt)
- Color sparingly: Too many colors reduce professionalism
- Test output: Check how formatting appears in final PDF
Common Pitfalls
Avoid these mistakes:
- Over-formatting: Don’t use too many different styles
- Manual spacing: Let LaTeX handle spacing automatically
- Absolute sizes: Use relative sizes for better scaling
- Direct formatting: Define styles once, reuse throughout
- Poor contrast: Ensure colored text is readable
Quick Reference
Command | Purpose | Example |
---|---|---|
\large | Larger text | {\large Big} |
\textbf{} | Bold | \textbf{Bold} |
\textit{} | Italic | \textit{Italic} |
\texttt{} | Monospace | \texttt{Code} |
\textsc{} | Small caps | \textsc{Name} |
\textcolor{}{} | Colored text | \textcolor{red}{Red} |
\colorbox{}{} | Background | \colorbox{yellow}{Hi} |
\underline{} | Underline | \underline{Text} |
Next: Learn about Paragraph spacing to control the layout and flow of your documents.