1

I'm trying to do proper paging for my thesis as per my university format. According to that, Roman numbers should start from the Acknowledgment page till TOC and after that Arabic numbering. Acknowledgment and pages after that should be in TOC. I have done that but somehow it gives the same "I" for 3 pages before TOC. I am sharing the initial code and packages of my document.

 \documentclass[preprint,authoryear,12pt]{report}
    \usepackage[final]{pdfpages}
    \newenvironment{Acknowledgements}
    {\renewcommand\abstractname{\LARGE{\textit{Acknowledgements}}}\begin{abstract}} {\end{abstract}}

\makeatletter
\newcommand\frontmatter{%
    \cleardoublepage
  %\@mainmatterfalse
  \pagenumbering{Roman}}
\newcommand\mainmatter{%
    \cleardoublepage
 % \@mainmattertrue
  \pagenumbering{arabic}}
\makeatother
    %%%%-----------Thesis starts here--------------------------------%%%%%%%


     \begin{document}
     \frontmatter{
    \addcontentsline{toc}{chapter}{Acknowledgements}
    \begin{Acknowledgements}
    \thispagestyle{plain}
    \begin{quote}
    \small{{ I acknowledge who ever answers my question}}
    \end{quote}
    \end{Acknowledgements}
    \clearpage
    %%%%%%This is where i start counter for number%%%%%%
    \newpage
    \addcontentsline{toc}{chapter}{Abstract}
    \begin{abstract}
    \thispagestyle{plain}
    Its abstract
    \end{abstract}
    %%%%---Abstract Urdu starts here%%%
    \addcontentsline{toc}{chapter}{Abstract in Urdu}
    \includepdf[pages=-,pagecommand={},width=\textwidth]{UrduAbstract.pdf}
    %%%%Till this page I get "I" on my pdf%%%%
    \cleardoublepage
    \tableofcontents
    \pagebreak
    \addcontentsline{toc}{chapter}{List of Figures}
    \listoffigures
    \pagebreak
    \addcontentsline{toc}{chapter}{List of Tables}
    \listoftables
}
   \mainmatte{}
    \end{document}
2
  • 2
    Welcome to TeX.SX and thank you for posting a working example! At the same time, much of your code does not seem to be relevant to the question you're asking here. Please limit the example to only the code required for your issue to appear. You can have a look at this guide for how to prune your code for this purpose. Jan 15 '20 at 13:27
  • actually I have posted all the packages and initial form of my latex code just to know if any of the packages or format of the thesis causes the problem I have. On my acknowledgment, Abstract, and the one where i have uploaded a pdf pages, latex generates roman "I". I don't understand why? why doesn't it change after the acknowledgment page? Jan 15 '20 at 13:46
2

In documentclass book it is possible, using \frontmatter and \mainmatter. The pages after \frontmatter by default will be numbered with small roman numbers, the rest with arabic.

\documentclass{book}
\usepackage{lipsum}
\begin{document}
    \frontmatter
    \pagenumbering{Roman} %Add this if you want I,II,III... instead of i,ii,iii...
    \chapter*{Preliminaries}
    \lipsum[1]
    \clearpage
    \lipsum[2]
    \clearpage
    \lipsum[3]
    \mainmatter
    \chapter*{Main Content}
    \lipsum[1]
    \clearpage
    \lipsum[2]
    \clearpage
\end{document}
6
  • Thanks. But I have used report class and my thesis is in its complete form except for this issue. I don't know if I change the class at this point how many more changes I have to do :(. Jan 15 '20 at 14:04
  • I would refer to this question: tex.stackexchange.com/a/154666/81639 Here @DavidCarlisle says that there is no essential difference between report and book, but you can also define \frontmatter and \mainmatter in the preliminaries.
    – bmv
    Jan 15 '20 at 14:10
  • Okay, ill try that too. But how to add this in preliminaries? I'm sorry not very good at Latex. I also want to know what's wrong in my code? Jan 15 '20 at 14:25
  • @ConscientiousMominate Your code is too long to check. You should the example to only the code required for your issue to appear. You can have a look at this guide: tex.meta.stackexchange.com/a/3225/81639 (cf. Philip Imhof's comment). From DavidCarlisle's answer you can copy the definitions for \frontmatter and \mainmatter and paste before \begin{document}
    – bmv
    Jan 15 '20 at 14:34
  • I have used this technique you mentioned but the problem persists it still gives I I I till TOC. Which I think is due to my Acknowledgement and Abstract because I use abstract environment for them and they don't have page numbers un till I use '\thispagestyle{plain}'. Can this be a reason? I'm editing my code so you can check. Jan 16 '20 at 7:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.