Skip to main content
LaTeX adds page numbers automatically, but you can change the numbering style, restart the counter, hide numbers on selected pages, or show Page X of Y when you need a more formal layout.
Quick answer:
Use \pagenumbering{...} to change style and \setcounter{page}{...} to restart numbering.Most common jobs: switch front matter to roman numerals, restart page 1 for the main document, hide numbers on title pages, and show Page X of Y with fancyhdr and lastpage.Related topics: Headers and footers | Document classes | Cross-referencing

Common Page Numbering Tasks

Most page-numbering questions fall into one of these patterns:
  • Start with arabic page numbers like 1, 2, 3
  • Use roman numerals like i, ii, iii for front matter
  • Restart numbering after the title page or table of contents
  • Hide the page number on one page with \thispagestyle{empty}
  • Show Page X of Y in the footer
  • Move the number into a custom header or footer with fancyhdr

Basic Page Numbering

Default Numbering

LaTeX automatically numbers pages starting from 1. The page number appears in different locations depending on the document class and page style.

Changing Page Number Style

Setting Page Number

Page Number Positioning

If you only want to move the page number, keep the numbering logic simple here and move to Headers and footers when you need a custom header/footer layout.

Using Page Styles

Custom Positioning with fancyhdr

Advanced Page Numbering

Different Styles for Different Sections

Page Ranges and Prefixes

Two-Sided Documents

Different Numbering for Odd/Even Pages

Blank Pages in Two-Sided Documents

Special Page Numbering Schemes

Chapter-Based Numbering

Section-Based Numbering

Total Page Count

Conditional Page Numbering

Hide Numbers on Specific Pages

Different Formats by Page Range

Multi-Volume Documents

Volume and Page Numbering

Customizing Number Appearance

Styling Page Numbers

Custom Number Commands

Troubleshooting Page Numbering

Common Issues and Solutions

Best Practices

Page numbering guidelines:
  1. Be consistent - Use the same style throughout similar sections
  2. Consider your audience - Academic papers often use different schemes than business documents
  3. Plan ahead - Design your numbering scheme before starting
  4. Test thoroughly - Check numbering across all document sections
  5. Use automation - Let LaTeX handle numbering rather than manual placement
  6. Follow conventions - Front matter typically uses roman numerals, main content uses arabic

Professional Examples

Quick Reference

Page Numbering Commands

Numbering Styles

Position Codes (with fancyhdr)


Next: Learn about Single-sided vs double-sided documents for layout considerations, or explore Headers and footers for complementary page design.