LaTeX forum ⇒ Theses, Books, Title pagesHow 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

Postby templateuser » Thu Mar 12, 2015 9:52 am

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:

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

Postby Vel » Thu Mar 12, 2015 9:52 am

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:

  1. \chapterimage{chapter_head_2.pdf}
  2. \chapter{Preface}
  3. \section{Paragraphs of Text}\index{Paragraphs of Text}
  4. \lipsum[1-7]
  5. \cleardoublepage
  6. \chapterimage{chapter_head_1.pdf}
  7. \pagestyle{empty}
  8. \tableofcontents
  9. \cleardoublepage
  10. \pagestyle{fancy}


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

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

Postby templateuser » Thu Mar 12, 2015 9:52 am

Hi Vel,

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

  1. ! LaTeX Error: Something’s wrong–perhaps a missing \item.
  2.  
  3. See the LaTeX manual or LaTeX Companion for explanation.
  4. Type H for immediate help.
  5.  
  6. l.149 \chapter{Introduction}
  7.  
  8. ?
  9. ! Emergency stop.
  10.  
  11. l.149 \chapter{Introduction}
  12.  
  13. ! ==> Fatal error occurred, no output PDF file produced!
  14. Transcript written on main.log.



Chapter Introduction is the first chapter I have immediately after the table of contents.

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}

just before the comments:

%—————————————————————————————-
% 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

Postby templateuser » Thu Mar 12, 2015 9:53 am

Solved! The command \chapter just needed an asterisk to suppress the chapter number. Therefore, the command should be written as:

\chapter*{Preface}

Is it possible to make appear the Preface listed in the Table of Contents and to assign lowercase roman numbers to the pages before the Table of Contents itself?

Thanks
Lorenzo

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

Postby Vel » Thu Mar 12, 2015 9:53 am

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


Return to “Theses, Books, Title pages”

Who is online

Users browsing this forum: No registered users and 1 guest