Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

For the most part, the default formatting for the ToC, LoF, and LoT is fine. But I need to add an extra line (university's requirements for my thesis) between each numbered entry. In order to do this, I used the titletoc package and added the extra line with the following code:

\titlecontents{table}
[7.25em]
{\contentslabel[\thecontentslabel.]{4em}}
{\hspace*{-4pt}}
{}
{\titlerule*[0.5em]{.}\hspace*{0.0em}\contentspage}[\vspace{1em}]

However, when I do this the first line in the ToC, LoF, or LoT is slightly off. That is, the first line is either a little to the left (negative space) or a little to the right (positive space) of the other following lines in a multi-line caption. I would like the first line to be perfectly flush with the following lines like it was before I used titletoc. I tried adjusting the hspace but it is never just right.

Any ideas how I can get around this?

WARNING: I cannot use tocloft as it breaks my university's LaTeX template.

Thanks in advance.

share|improve this question
    
If I use the title option on the tocloft package I can avoid the conflicts I mentioned above. –  Brian Jun 7 '11 at 6:07

2 Answers 2

up vote 2 down vote accepted

Using the title option of the tocloft package does not break my university's template. This option uses the normal LaTeX mechanisms for creating the titles as is stated in the package's documentation. After finding/trying that, I was able to format my thesis to the exact specifications.

\setlength{\cftbeforefigskip}{1em}
\setlength{\cftbeforetabskip}{1em}
\renewcommand{\cftfigaftersnum}{.}
\renewcommand{\cfttabaftersnum}{.}
\setlength{\cftchapindent}{\cfttabindent}
\setlength{\cftsecindent}{2\cftchapindent}
\setlength{\cftsubsecindent}{2\cftchapindent}
\setlength{\cftsecnumwidth}{\cftsubsecnumwidth}
\renewcommand{\cftchapfont}{\normalfont}
\renewcommand{\cftchappagefont}{\normalfont}
share|improve this answer

In the standard document classes, you can use \addtocontents to put something extra in the table of contents. Maybe this will work with your thesis template as well.

\documentclass{article}
\begin{document}
\tableofcontents
\section{A section}
\addtocontents{toc}{\contentsline{section}{Put something extra in the toc!}{}}
\section{Another section}
\end{document}
share|improve this answer
    
Thanks, but I considered something like this before. I was trying to avoid it because I would need to do it after each table or figure, and I have quite a few of those. –  Brian Jun 7 '11 at 16:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.