LyXAdd Front Matter to TOC (Table of Contents) in a Thesis

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Ry J
Posts: 11
Joined: Fri Jan 22, 2010 6:21 pm

Add Front Matter to TOC (Table of Contents) in a Thesis

Post by Ry J »

I have been working with the "report" class for writing my masters thesis. There are are 3 small (Chapter*)'s for acknowledgments and and such before the first chapter that are numbered with roman numerals and do not show up in the TOC. I need to edit the TOC to include these and also to rename the title of my appendix. Any ideas ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Ry J
Posts: 11
Joined: Fri Jan 22, 2010 6:21 pm

Re: Add Front Matter to TOC (Table of Contents) in a Thesis

Post by Ry J »

I should also include that I need the List of Figures and List of Tables to appear in the table of contents as well.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Add Front Matter to TOC (Table of Contents) in a Thesis

Post by frabjous »

Try the \addcontentsline command.
Ry J
Posts: 11
Joined: Fri Jan 22, 2010 6:21 pm

Add Front Matter to TOC (Table of Contents) in a Thesis

Post by Ry J »

frabjous wrote:Try the \addcontentsline command.
Can you provide an example. I have been playing with this command for the last 5 minutes and can get a new entry but I can't get it to say, for example,

List of Tables______________________ v
Ry J
Posts: 11
Joined: Fri Jan 22, 2010 6:21 pm

Add Front Matter to TOC (Table of Contents) in a Thesis

Post by Ry J »

frabjous wrote:Try the \addcontentsline command.
I also keep getting this error.

LaTeX Error: Something's wrong--perhaps a missing \item.

Description:
... {chapter}{\numberline {1}Introduction }{1}

Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Add Front Matter to TOC (Table of Contents) in a Thesis

Post by frabjous »

It would probably make more sense for you to provide sample code that generates problems for you. I can't diagnose what's going wrong without seeing that.

However, perhaps the sample document below will provide some guidance.

Code: Select all

Code, edit and compile here:
\documentclass{report}
\usepackage[english]{babel}
\usepackage{blindtext} % for auto-generating text
%
\title{The Color Spectrum}
\author{Roy G. Biv}
\date{\today}
%
\begin{document}
\renewcommand{\thepage}{\roman{page}}
%
\maketitle
%
\clearpage
\addcontentsline{toc}{chapter}{Acknowledgements}
\chapter*{Acknowledgements}
Thanks Mom!
%
\clearpage
\addcontentsline{toc}{chapter}{Table of Contents}
\tableofcontents
%
\clearpage
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
%
\clearpage
\addcontentsline{toc}{chapter}{Preface}
\chapter*{Preface}
This document is silly.
%
\clearpage
\setcounter{page}{1}
\renewcommand{\thepage}{\arabic{page}}
\chapter{First Real Chapter}
\blindmathpaper % auto-generates text
This chapter ends with a figure.
\begin{figure}
A figure.
\caption{A figure.}
\end{figure}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Ry J
Posts: 11
Joined: Fri Jan 22, 2010 6:21 pm

Add Front Matter to TOC (Table of Contents) in a Thesis

Post by Ry J »

Ok. This is a bit of the code around the relevant parts from the source code generated by my lyx file. I hope this helps.

Code: Select all

Code, edit and compile here:
\begin{document}
\begin{doublespace}
\title{An Investigation and Application of the Finite Difference Time Domain
Method as a Tool for Solving Equalization Problems in Acoustics\\
~\\
by\\
Ryan J. Matheson}
\end{doublespace}
\date{A thesis\\
presented to the University of Waterloo\\
in fulfillment of the\\
thesis requirement for the degree of\\
Master of Science\\
in Physics\\
~\\
Waterloo, Ontario, Canada, 2010\\
~\\
© Ryan J. Matheson 2010}
\maketitle
\setcounter{page}{2}
I hereby declare that I am the sole author of this thesis. This is
a true copy of the thesis, including any required final revisions,
as accepted by my examiners. I understand that my thesis may be made
electronically available to the public.
\chapter*{{\large Abstract}}
This thesis investigates the issues in deriving the Finite Difference
Time Domain Method, including the derivation of a unique method for
exciting an FDTD system that is physically realistic in terms of acoustics.
It is also the goal of this thesis to use the FDTD method as a tool
for investigating various speaker placement configurations for use
in bass equalization. A demerit function is then developed in order
to assess how well a particular equalization method performs relative
to any others.
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
frabjous wrote:It would probably make more sense for you to provide sample code that generates problems for you. I can't diagnose what's going wrong without seeing that.

However, perhaps the sample document below will provide some guidance.

Code: Select all

Code, edit and compile here:
\documentclass{report}
\usepackage[english]{babel}
\usepackage{blindtext} % for auto-generating text
%
\title{The Color Spectrum}
\author{Roy G. Biv}
\date{\today}
%
\begin{document}
\renewcommand{\thepage}{\roman{page}}
%
\maketitle
%
\clearpage
\addcontentsline{toc}{chapter}{Acknowledgements}
\chapter*{Acknowledgements}
Thanks Mom!
%
\clearpage
\addcontentsline{toc}{chapter}{Table of Contents}
\tableofcontents
%
\clearpage
\addcontentsline{toc}{chapter}{List of Figures}
\listoffigures
%
\clearpage
\addcontentsline{toc}{chapter}{Preface}
\chapter*{Preface}
This document is silly.
%
\clearpage
\setcounter{page}{1}
\renewcommand{\thepage}{\arabic{page}}
\chapter{First Real Chapter}
\blindmathpaper % auto-generates text
This chapter ends with a figure.
\begin{figure}
A figure.
\caption{A figure.}
\end{figure}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Re: Add Front Matter to TOC (Table of Contents) in a Thesis

Post by frabjous »

Oops, I didn't notice this was the LyX subforum. (I have to start paying attention to that.) I don't know anything about Lyx. If it allows you to mark-up the LaTeX yourself, you just need to change:

\addcontentsline{toc}{lof}{list of figures}

to

\addcontentsline{toc}{chapter}{List of Figures}

and it needs to go on the same page as the List of Figures, which is easiest to do by placing it right after a \clearpage command and right before the \listoffigures command.

If this can't be done by editing the code directly in Lyx, then I don't know how to do it. I've never used LyX.
Ry J
Posts: 11
Joined: Fri Jan 22, 2010 6:21 pm

Re: Add Front Matter to TOC (Table of Contents) in a Thesis

Post by Ry J »

well the nice thing about it is that you can add in LaTeX code in a LyX file and at the same time observe the LaTeX source code change as it is generated by LyX. I will try your suggestion and let you know how it turns out.
Ry J
Posts: 11
Joined: Fri Jan 22, 2010 6:21 pm

Add Front Matter to TOC (Table of Contents) in a Thesis

Post by Ry J »

frabjous wrote:Oops, I didn't notice this was the LyX subforum. (I have to start paying attention to that.) I don't know anything about Lyx. If it allows you to mark-up the LaTeX yourself, you just need to change:

\addcontentsline{toc}{lof}{list of figures}

to

\addcontentsline{toc}{chapter}{List of Figures}

and it needs to go on the same page as the List of Figures, which is easiest to do by placing it right after a \clearpage command and right before the \listoffigures command.

If this can't be done by editing the code directly in Lyx, then I don't know how to do it. I've never used LyX.
One issue is that in the code I sent you you will notice that there are no \clearpage lines
Post Reply