4

I use Lyx 2.1, document class : report. I want the pages table of contents, list of figures and list of tables etc. be numbered with roman numerals. I put this tag before the table of Contents :

\pagenumbering{Roman}

and this tag before the general introduction :

\cleardoublepage\pagenumbering{arabic}

The problem for Roman numerals, only the 1st page Table of Contents is numbered. I want the other pages will be numbered as (the 2nd page table of contents and list of figures etc).

enter image description here enter image description here

\documentclass{report} 

\usepackage{setspace}
\begin{document}
\begin{onehalfspace}
\pagenumbering{roman}\tableofcontents{}

\listoffigures

\end{onehalfspace}

\listoftables


\pagenumbering{arabic}


\chapter*{\noun{Inroduction générale}\setcounter{page}{1}}

\end{document} % was missing
  • 1
    Roman or roman numerals? – Bernard Jun 22 '14 at 14:50
  • 2
    Writing \frontmatter before the table of contents and \mainmatter before the main text should do the trick (not sure for the report class. If it doesn't work (it does with the book class), you can locally change the page style. – Bernard Jun 22 '14 at 15:18
  • 1
    @Bernard \frontmatter and \mainmatter isn't defined in report. – Torbjørn T. Jun 22 '14 at 16:17
  • 1
    LyX has nothing to do with this – leo Jun 22 '14 at 16:57
  • 2
    Please edit your question to include new code like that, don't add it in comments. (And I really would appreciate complete examples, starting with \documentclass, ending with \end{document}. But remove most of the text of course, only the \chapter/\section headings is important here, I guess.) – Torbjørn T. Jun 23 '14 at 11:27
2

If the standard setup is applied, no empty second page of the ToC should appear, regardless whether \tableofcontents, \listoffigures etc. is used.

I have used a loop to generate dummy chapters, dummy figures and dummy tables just in order to fill up the corresponding list of something (;-)) and removed the \thispagestyle{empty} used directly after \tableofcontents by the OP.

Basically, Torbjorn T. changed already the code sample in the OP to a working one ;-)

**Edited version, with list of figures and list of tables also in the toc

\documentclass{report}

\usepackage{setspace}%

\usepackage[demo]{graphicx}%
\usepackage{forloop}  % Only for quick chapters ;-)

%\usepackage{hyperref}%

\newcounter{loopcounter}

\begin{document}

\pagenumbering{roman}%
\begin{onehalfspace}%
%\phantomsection% if hyperref is used, then \phantomsection
\addcontentsline{toc}{chapter}{\contentsname}%
\tableofcontents%
\cleardoublepage
%\phantomsection% if hyperref is used, then \phantomsection
\addcontentsline{toc}{chapter}{\listfigurename}%
\listoffigures%
\cleardoublepage
%\phantomsection% if hyperref is used, then \phantomsection
\addcontentsline{toc}{chapter}{\listtablename}%
\listoftables%

\end{onehalfspace}%
\clearpage

% Just a proof that `\pagenumbering{arabic}` resets the page counter
\setcounter{page}{100}

\pagenumbering{arabic}



\forloop{loopcounter}{1}{\number\value{loopcounter} < 21}{%

\chapter{Chapter \number\value{loopcounter}}

\begin{table}
\centering
\begin{tabular}{lll}
\hline
1  & 2 & 3 \tabularnewline
\hline
\end{tabular}
\caption{Dummy table}
\end{table}

\begin{figure}%
\centering
\includegraphics[width=5cm,height=4cm]{somefig}%
\caption{Dummy figure}
\end{figure}%

}



\end{document}

enter image description here

enter image description here

Editorial note I kept the screenshot, since nothing visually changed for that part of the document.

  • Thank you for your reply, but your solution did nothing. – GoldRay Jun 22 '14 at 18:25
  • 2
    @GoldRay: Well, that's sad but perhaps you should post a small document exactly reproducing your problem. Otherwise users here can only guess what goes wrong... Just a small MWE ;-) – user31729 Jun 22 '14 at 18:27
2

Define your own \frontmatter and \mainmatter in the preamble. For LyX Document->Preferences->Preamble:

\documentclass{report} 
\newcommand\frontmatter{\cleardoublepage\pagenumbering{roman}}
\newcommand\mainmatter{\cleardoublepage\pagenumbering{arabic}}
\usepackage{setspace}
\usepackage{blindtext}

\begin{document}
\onehalfspacing
\frontmatter
\tableofcontents
\cleardoublepage
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures

\cleardoublepage
\addcontentsline{toc}{chapter}{List of Tables}
\listoftables

\mainmatter
\singlespacing

\chapter*{Inroduction générale}
\Blinddocument
\begin{figure}
foo\caption{bar}
\end{figure}
\begin{table}
foo\caption{bar}
\end{table}
\end{document}

enter image description here

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.