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
How to Write Ordinals Like 1st, 2nd and 3rd
Type the suffix as normal text —21st March — for ordinary prose. LaTeX needs no
special command, and plain text is what most style guides expect.
For a raised suffix, \textsuperscript{} does the job: 2\textsuperscript{nd}
renders the “nd” above the baseline. Do not use maths mode ($2^{nd}$) for this;
it sets the suffix in a maths italic font, which is wrong for text and spaces badly.
If your document uses many ordinals, define a command once so the style stays
consistent:
\newcommand{\ordinal}[2]{#1\textsuperscript{#2}}
then write \ordinal{2}{nd}. Note that superscripted ordinals are a typographic
convention rather than a rule — most modern style guides prefer plain “2nd”.
Best Practices
Common Pitfalls
Quick Reference
Related Formatting Guides
Headers & Footers
Customize page headers and footers
Page Numbering
Control page number styles and placement
Multiple Columns
Create multi-column layouts
Lengths & Units
Master LaTeX measurement units
Counters & Numbering
Customize automatic numbering
Code Listings
Format source code with syntax highlighting
Next: Learn about Paragraph spacing to control the layout and flow of your documents.
