[Tex/LaTex] table of contents entries and formatting

formattingtable of contents

I am working on a thesis and I am having some problems with the table of contents. I have tried to make a minimal example and the LaTeX files are given at the end of this post.

The main tex file is main.tex. I have an introduction called intro.tex and an appended Paper A called paperA.tex. When you will compile and look at the resulting ps or pdf file, the first page shows the table of contents and you will note that I have used wide margins and so the text area becomes small.

The chapter names appear very big. This is so because for example I have the Introduction in the file intro.tex titled using

\chapter{\huge \bfseries Introduction}

(I want to have this big size on my first page in the introduction section).

My questions (ALL referring to the Table of contents):

  1. How can I make the size of the titles such as "Introduction" smaller without affecting the text size in the corresponding file (intro.tex for the introduction)

  2. I've added a \addtocounter{chapter}{-1}

in part preceding “\include{paper1}”. This is because my first chapter uses arabic numbering and the paper A that comes afterwards uses alphanumeric numbering. If I did not put the command the \addtocounter{chapter}{-1}, then Paper A would have had sections as B.1, B.2 etc. which would be wrong. My question is if using \addtocounter{chapter}{-1} is the right prcedure here.

  1. (should be question number 3) I have a page separation for the paper A on page 4 in the pdf file (page number is hidden on that page). How can I make this page through its title appear in the Table of Contents?

Here are the codes:

I. The main file main.tex

\documentclass[fleqn,a4paper,openany,twoside,12pt]{book}
\usepackage[top=5.5cm,left=45mm,right=45mm,bottom=5.5cm]{geometry}
\usepackage[latin1]{inputenx}
\usepackage[OT1]{fontenc}


\begin{document}
\newpage{\pagestyle{empty}}
\tableofcontents

\newpage
\pagenumbering{arabic}
\setcounter{page}{1}

\begingroup
\renewcommand\chaptername{Chapter}
\renewcommand{\thechapter}{\arabic{chapter}}
\renewcommand{\thesection}{\arabic{section}}%
\include{intro}
\endgroup

\newpage
\thispagestyle{empty}
\vspace*{\stretch{1}}
\begin{center}
\textsc{\LARGE Paper A}\\[10mm]
{\Huge \bf Duis tristique faucibus tincidunt. Duis ante mauris, vehicula   \\[5mm]}
\ \\
\label{PaperA}
\ \\
\end{center}
\vspace*{\stretch{2}}

\newpage
\begingroup
\addtocounter{chapter}{-1}
\renewcommand\chaptername{Paper}
\renewcommand{\thechapter}{\Alph{chapter}}
\renewcommand{\thesection}{\thechapter.\arabic{section}}%
\include{papera}
\endgroup
\end{document}

II. The file intro.tex for the introduction

\chapter{\huge \bfseries Introduction}

\section{first section}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. 

III. The file papera.tex for the first paper (Paper A)

\chapter{\huge \bfseries Lorem ipsum dolor sit amet, consectetur adipiscing elit}

\section{first section}
Maecenas dapibus arcu sit amet mauris porttitor lacinia. 

Thanks a lot…

Best Answer

  1. Don't use font commands in arguments to sectioning commands. It's better to redefine those commands once. For example, you could use titlesec and for the table of contents titletoc or tocloft. However, if you really would like to do it, use the optional argument for the table of contents entry, such as

    \chapter[Introduction]{\huge \bfseries Introduction}
    
  2. \setcounter{chapter}{0} would be better ensuring that the next one starts with A.

  3. Use \addcontentsline or \addtocontents to produce an entry in the table of contents.

Related Question