How do I fix the automatic page numbering in my LaTeX thesis template for the front matter?
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?
1 Answer
I totally get your frustration with LaTeX's page numbering. Since you're using the university template, it's likely that it's set up to use the 'scrbook' class, which is great for its flexibility, but can be a bit finicky with page numbering. To fix the issue, you need to manually switch the page numbering style from Roman numerals to Arabic numerals at the beginning of the main matter. You can do this by adding the following command before your first chapter: \setcounter{page}{1} \renewcommand{\thepage}{\arabic{page}} However, to make this change automatic, you can use the '\frontmatter' and '\mainmatter' commands provided by the 'scrbook' class. Place these commands before and after your front matter, respectively: \frontmatter ... your front matter content here ... \mainmatter ... your main matter content here ... This should automatically switch the page numbering style for you. Make sure to include a '\cleardoublepage' command before '\mainmatter' to ensure that the page switch happens on a clear page. This should do the trick!
In-depth guide available
Fixing Roman Numeral Errors in Your LaTeX Thesis Template →Have a similar question?
Ask the community →