4

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...

4
  • Please try to post your reduced code here instead of placing it externally. Later people may come here and don't see your code, perhaps just a link which is dead then. Furthermore, please don't ask 3 question in one, better post single questions and link to each other.
    – Stefan Kottwitz
    Commented Jul 11, 2011 at 8:50
  • I understand this issue of a dead link which is unpleasant. However, you see that my minimal code is quite long. But it is possible to trim it further down and I shall post it here later on. Commented Jul 11, 2011 at 9:12
  • As for the issue of three questions instead of one, I felt that it would be convenient to have them in one place as these three questions can be quite straightforward for LaTeX experts to answer. But if these questions were more involved, then I would have made separate posts. Thanks again for your comments. Commented Jul 11, 2011 at 9:14
  • @Stefan I have placed my codes here as requested. Thanks again for the answers. Commented Jul 12, 2011 at 8:08

1 Answer 1

4
  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.

3
  • 1
    (@yCalleecharan) Just in addition to Stefan’s answer: If you’re using a KOMA-Script class you can change the font with a KOMA-font-element (e. g. \addtokomafont{dispositon}{\itshape} to make all hedline in the text become italic) or with a class option headings=big/normal/small to change the default sizes of headlines. Everything without affecting the TOC.
    – Tobi
    Commented Jul 11, 2011 at 8:56
  • @Stefan Thank you very much indeed. 1 vote up also. For no 3, I have used: \addcontentsline{toc}{chapter}{Appended Papers} which seems to give better result. Commented Jul 11, 2011 at 9:10
  • @Tobi I don't work with the KOMA-Script but your information may be useful to others. Thanks. Commented Jul 11, 2011 at 9:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .