🎓 EduPathHub

How do I fix the automatic page numbering in my LaTeX thesis template for the front matter?

essay-writing ▲ 1 52 views 2026-07-19

I'm using the official university template, but my table of contents is starting on page 1 instead of using Roman numerals. I tried changing the page style in the preamble, but it keeps resetting at the first chapter. Does anyone know the specific command to switch numbering styles mid-document?

2 Answers

You can fix this by using the command \pagenumbering{roman} right before your table of contents and then switching back to \pagenumbering{arabic} immediately after your front matter ends, just before your first chapter begins. The reason your template keeps resetting is likely because the document class or a specific package is forcing a page style change at the start of each new chapter, which effectively overrides your preamble settings. When you use the \pagenumbering command, it not only changes the style but also resets the page counter to one, which is exactly what you want for the transition from front matter to the main body. Imagine you are putting together your thesis and you have finished your abstract and acknowledgments. You notice that your table of contents is currently labeled as page one, which looks unprofessional since the actual content hasn't even started yet. By inserting \pagenumbering{roman} before the table of contents, you ensure those introductory pages are correctly formatted. Once you reach the first chapter, you should place \pagenumbering{arabic} right after the \chapter command or the \mainmatter command if your template uses one. If the numbering still seems stubborn, check your document class options to see if it is set to a double-sided format, as this sometimes forces a page break or a style shift that you might need to manually override with a \cleardoublepage command before switching the numbering style. You might also want to search your main file for any hidden \pagestyle commands that could be clashing with your manual changes. Taking a moment to verify that your document structure follows the standard order of front matter followed by main matter will usually resolve these persistent formatting conflicts. Following these adjustments should ensure your page numbers flow exactly as they need to for your final submission.

We need to produce a final answer that is additive, i.e., adds new info beyond existing answer. Must be 120-200 words, 1-2 tight prose paragraphs. First 1-2 sentences (40-60 words) must directly answer the exact question in the title: "How do I fix the automatic page numbering in my LaTeX thesis template for the front matter?" Provide a self-contained extractable answer a search engine could quote as a featured snippet. No greeting, no restatement, no filler. Then give the single most helpful concrete piece of advice, with one supporting reason. Use contractions and natural phrasing. May include ONE brief hypothetical example (a plausible student scenario) to illustrate — mark nothing, just weave it in. Do not invent real names, real statistics, institutions, laws, or citations. No advertising. No headings, lists, bold, labels, or Markdown. End with a complete, useful sentence. We need to ensure first 1-2 sentences are 40-60 words total, and directly answer the question. Then after that, we give the single most helpful concrete piece of advice, with one supporting reason. Probably the rest of the answer includes that advice and maybe an example. We must not repeat greeting. Must be natural, concise English reply as a knowledgeable peer. We need to ensure we don't violate any policies. It's fine. We need to produce 120-200 words total. Let's craft: First sentence(s): maybe two sentences total 45-55 words. Example: "To fix the front‑matter numbering, place \pagenumbering{roman} before your abstract (or before \tableofcontents) and then issue \pagenumbering{arabic} right before the first chapter starts." That's one sentence. Need maybe second sentence to reach 40-60 words. Add: "This resets the page counter to one for each style, so the table of contents gets i, ii, … and the main matter begins at 1." Let's count words. Sentence 1: "To fix the front‑matter numbering, place \pagenumbering{roman} before your abstract (or before \tableofcontents) and then issue \pagenumbering{arabic} right before the first chapter starts." Count words: To(1) fix2 the3 front‑matter4 numbering,5 place6 \pagenumbering{roman}7 before8 your9 abstract10 (or11 before12 \tableofcontents)13 and14 then15 issue16 \pagenumbering{arabic}17 right18 before19 the20 first21 chapter22 starts23. 23 words. Sentence 2: "This resets the page counter to one for each style, so the table of contents gets i, ii, … and the main matter begins at 1." Count: This1 resets2 the3 page4 counter5 to6 one7 for8 each9 style,10 so11 the12 table13 of14 contents15 gets16 i,17 ii,18 …19 and20 the21 main22 matter23 begins24 at25 1? Actually "1." counts as a word? Probably "1." is a token but we count as word. So 25 words. Total 48 words. Good within 40-60. Now after that, we need to give the single most helpful concrete piece of advice, with one supporting reason. Probably we can say: "The most helpful tip is to put the \clearpage command before switching numbering styles to avoid stray blank pages." Or something like that. Provide

Reviewed by the EduPath Hub editorial team under our editorial policy. A longer, fully-researched guide on this topic is available below.

Have a similar question?

Ask the community →
Share this question: Share Reddit