🎓 EduPathHub
📝 In-depth guide By EduPath Hub Team · 2026-07-26 · ~7 min read · 96 views

Fixing Roman Numeral Errors in Your LaTeX Thesis Template

Fixing Roman Numeral Errors in Your LaTeX Thesis Template

The frustration you're feeling is a rite of passage for almost every student using LaTeX for a thesis. You've spent weeks perfecting your arguments and polishing your data, only to find yourself fighting a battle against a page number that refuses to be a Roman numeral. The reason your preamble changes aren't working is that LaTeX handles page numbering as a global state that gets overwritten by specific document commands. When you hit a command like \chapter, the template often triggers a reset or a style change that wipes out whatever you set at the very beginning of the file.

To fix this, you have to stop thinking about the preamble as the place to control the numbering and start thinking about the document body as a series of zones. You need to tell LaTeX exactly where the "front matter" ends and where the "main matter" begins. If you try to force a style in the preamble, it's like trying to set the temperature of a room before the walls are even built; as soon as the \chapter command "builds" the first page of your actual text, it applies its own default settings, usually resetting the counter to 1 and the style to Arabic numerals.

The Manual Switch Method

The most direct way to handle this is by using the \pagenumbering command. This command does two things simultaneously: it changes the style of the number (e.g., from Arabic to Roman) and it resets the page counter to one. This is exactly why your numbers keep resetting—because the command that changes the style also resets the count.

For a standard thesis, you'll want to place \pagenumbering{roman} immediately after your \begin{document} tag. This ensures that your title page, abstract, and table of contents are numbered i, ii, iii, and so on. Then, right before your first actual chapter starts, you insert \pagenumbering{arabic}. This tells LaTeX, "Okay, the front matter is over. Start the real counting now, starting back at page 1."

Consider Sarah, a second-year Master's student in Sociology. She was using a university template that had a pre-defined \maketitle command. She kept putting \pagenumbering{roman} in her preamble, but her Table of Contents still started at page 1. The issue was that the template's \maketitle command was internally calling \pagenumbering{arabic}. Sarah fixed this by placing \pagenumbering{roman} after the \maketitle command and \pagenumbering{arabic} immediately before \chapter{Introduction}. By placing the commands in the body, she overrode the template's hidden defaults.

The Document Class Approach

If you are using a document class like \textit{book} or \textit{report} (or a university template based on them), there are built-in commands designed specifically for this workflow: \frontmatter, \mainmatter, and \backmatter. These are much cleaner than manual numbering because they handle the styling, the numbering, and even how chapters are titled all in one go.

When you use \frontmatter, LaTeX automatically switches to Roman numerals and suppresses chapter numbering (so you get "Abstract" instead of "Chapter 1: Abstract"). When you hit \mainmatter, it automatically switches back to Arabic numerals and restarts the count at 1. This is the "professional" way to do it because it reduces the amount of manual hacking you have to do in the body of your text.

Take the case of Marcus, a PhD candidate in Physics. His template was a nightmare of custom .cls files. He tried the manual \pagenumbering method, but it clashed with the template's header and footer settings, creating weird gaps in his margins. He discovered that the template actually supported the \frontmatter and \mainmatter commands, but the previous student who had shared the file had manually deleted them. Once Marcus restored those three commands, the numbering fixed itself, and his chapters started numbering correctly without him having to touch a single counter.

The Counter Manipulation Strategy

Sometimes, you don't want to reset the page number to 1. Perhaps your university requires the title page to be "counted" as page i, but not actually have a number printed on it, and then the abstract to start as page ii. In this scenario, \pagenumbering is too blunt a tool because it always resets the count to 1.

To solve this, you use a combination of \pagestyle{empty} (to hide the number) and the \setcounter command. By using \setcounter{page}{2}, you can force LaTeX to jump to a specific number without changing the style. This is a more surgical approach. You would use \pagenumbering{roman} at the start, then \thispagestyle{empty} on the title page, and then let the numbering continue naturally. If the template is still being stubborn and resetting the count, you can manually force the number you want right before the page break.

Approach Pros Cons Best Fit Scenario
Manual \pagenumbering Simple, works in almost every class Resets counter to 1 every time Short theses or simple report classes
\frontmatter / \mainmatter Clean, handles chapter numbering too Only works in book/report classes Official university templates based on \textit{book}
\setcounter{page}{x} Total control over the exact number Tedious to maintain if you add pages Strict requirements for "invisible" pages

How to Pick the Right Approach

Choosing the right method depends entirely on how your specific university template is built. First, check your \documentclass line at the very top of your main .tex file. If it says \textit{book} or is a custom class that behaves like a book, try the \frontmatter and \mainmatter commands first. They are the most stable and least likely to break your formatting later on.

If those commands return an "Undefined control sequence" error, it means your template is likely based on the \textit{article} or \textit{report} class, which doesn't support those high-level switches. In that case, move to the manual \pagenumbering method. Place \pagenumbering{roman} after your title page and \pagenumbering{arabic} before your first chapter. This is the "universal" fix that solves 90% of numbering issues.

Only use the \setcounter method if you have a very specific, non-standard requirement—like a title page that counts as page 1 but must remain blank, followed by a table of contents that must start on page 2. If you find yourself using \setcounter more than twice in your document, you're probably fighting the system rather than working with it; at that point, go back and see if a \pagenumbering switch can do the work for you.

Nuance Alert: What Most Guides Miss

There is a hidden trap in LaTeX that catches almost everyone: the interaction between page numbering and the Table of Contents (ToC). When you change the page numbering style, the ToC doesn't always update immediately. You will often see the correct numbers on the bottom of your pages, but the ToC will still show the old, incorrect numbers. This is because the ToC is generated from an auxiliary file (.aux) that is only updated when the document is compiled.

You must compile your document at least twice—and sometimes three times—whenever you change numbering styles. The first pass tells LaTeX where the pages are; the second pass writes those page numbers into the .aux file; the third pass reads that file and prints the correct numbers into your Table of Contents. If you only compile once, you'll think your fix didn't work, when in reality, you're just looking at a cached version of your layout.

Another common edge case is the \chapter command. In many templates, \chapter automatically calls \thispagestyle{plain}, which forces a page number to appear at the bottom center, regardless of what you set in the preamble. If you want your first chapter page to have no number at all, you cannot put \thispagestyle{empty} before the \chapter command. You must put it immediately after the \chapter command. If you put it before, the \chapter command will simply overwrite it a millisecond later.

Pro tip: If your page numbers are still acting erratic, look for any \clearpage or \cleardoublepage commands. These commands force LaTeX to finish the current page and start a new one, and they often trigger the "reset" behavior of the template's internal page style. Always place your \pagenumbering commands immediately after a \clearpage to ensure they take effect on the very next sheet of paper.

Goal Command to Use Placement
Switch to Roman (i, ii, iii) \pagenumbering{roman} After \maketitle
Switch to Arabic (1, 2, 3) \pagenumbering{arabic} Before first \chapter
Hide number on one page \thispagestyle{empty} Immediately after \chapter
Force a specific page number \setcounter{page}{X} Right before the target page
Handle book-style sections \frontmatter / \mainmatter At the start of each major section
EH
EduPath Hub Editorial Team
Student Success & Academic Writing Specialists
This guide was researched and reviewed by the EduPath Hub editorial team. Information is based on the original community question and may not reflect the most current developments. See our About page for details.

Related articles

Academic Writing topic hubYour Strategy for Finishing That 12-Page Sociology PaperFrom Generic to Official: How to Tailor Your LaTeX ThesisFixing Roman Numeral Errors in Your LaTeX Thesis TemplateWhat happens if a math PhD student fails to find a proof that is the main objective of their thesis topic?What to do when your student is convinced that he will be the next Einstein?Ending a Chapter on Purpose: Crafting the Perfect Narrative Pause

Have a question about college or student life?

Ask the community →
This guide was researched and reviewed by the EduPath Hub editorial team. Information is based on the original community question and may not reflect the most current developments. See our About page for details.