## LaTeX forum ⇒ Theses, Books, Title pages ⇒ How do I add a preface section prior to the table of content Topic is solved

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

### How do I add a preface section prior to the table of content

Hi,

how can I add a Preface before the Contents in this style? Although the template is very beautiful I miss the possibility of adding some important pages before the actual matter of the book starts. It would be great if you could show a short example. Many thanks.

Lorenzo

Tags:

Vel
Site Moderator
Posts: 451
Joined: Fri Jun 29, 2012 1:20 am
Location: Sydney, Australia
Contact:
Hi Lorenzo,

All you have to do is include a chapter before the table of contents section is start it in the same way as Chapter 1 but before where the table of contents appears in the document. For example:

\chapterimage{chapter_head_2.pdf}\chapter{Preface}\section{Paragraphs of Text}\index{Paragraphs of Text}\lipsum[1-7]\cleardoublepage\chapterimage{chapter_head_1.pdf}\pagestyle{empty}\tableofcontents\cleardoublepage\pagestyle{fancy}

Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com

templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm
Hi Vel,

many thanks for your reply. Unfortunately I have tried your suggestion and it game me an error when executing pdflatex main:

! LaTeX Error: Something’s wrong–perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation.Type H for immediate help.… l.149 \chapter{Introduction} ?! Emergency stop.… l.149 \chapter{Introduction} ! ==> Fatal error occurred, no output PDF file produced!Transcript written on main.log.

Of course, before adding the lines you suggested the file compiled without errors and a very nice PDF was produced.

I tried the simplest modification possible as well, that is, just adding the line

\chapter{Preface}

%—————————————————————————————-% TABLE OF CONTENTS%—————————————————————————————-

but even this simple modification produced the error reported above.

Thanks once again,
Lorenzo

templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm
Solved! The command \chapter just needed an asterisk to suppress the chapter number. Therefore, the command should be written as:

\chapter*{Preface}

Thanks
Lorenzo

Vel
Site Moderator
Posts: 451
Joined: Fri Jun 29, 2012 1:20 am
Location: Sydney, Australia
Contact:
Hey Lorenzo,

I had that error come up too (“LaTeX Error: Something’s wrong–perhaps a missing \item.“), but if I skip it when it first comes up it doesn’t come up again.

Regarding roman numbers prior to the table of contents, have a look at the Masters/Doctoral Thesis template for an example of how to do that.

Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com