I am currently writing my PhD thesis, and I have trouble defining a common style for my global TOC and the partial TOCs generated by titletoc.
Basically if you check the following MWE, I like the general style of the global TOC, in particular the fact that hyperref links include the labels. However, I find that the dotted lines in the global TOC are not dense enough, and prefer those of the partial TOCs.
\documentclass[12pt,a4paper]{book}
\usepackage{caption}
\usepackage{titletoc}
\usepackage[colorlinks]{hyperref}
\usepackage{lipsum}
\renewcommand{\cleardoublepage}{\clearpage}
\newcommand{\PartialToc}{\vspace*{0.5pc}\vbox{\bf\large\noindent Chapter contents}\vspace*{0.3pc}\startcontents[chapters]\vspace*{0.3pc}\printcontents[chapters]{p}{1}{}\vspace*{0.3pc}}
\begin{document}
% Custom style for partial TOCs
\titlecontents{psection}[3.6em]{\small\bfseries}{\contentslabel{1.8em}}{}{\mdseries\titlerule*[0.25pc]{.}\contentspage\hspace*{1.8em}}{}
\titlecontents{psubsection}[6.0em]{\small}{\contentslabel{2.4em}}{}{\titlerule*[0.25pc]{.}\contentspage\hspace*{1.8em}}{}
\tableofcontents
\listoffigures
\listoftables
\chapter{Chapter 1}
\vfill
\lipsum[1-2]
\vfill\PartialToc\clearpage
\section{Section 1}
\lipsum[1]
\begin{figure}[t]
\caption{Figure 1}
\end{figure}
\section{Section 2}
\lipsum[1]
\subsection{Subsection 2.1}
\lipsum[1]
\subsection{Subsection 2.1}
\lipsum[1]
\section{Section 3}
\lipsum[1]
\begin{table}[t]
\caption{Table 1}
\end{table}
\end{document}
Therefore, I tried to increase the density of the dotted lines in the global TOC, by adding the following titletoc style declarations after \begin{document}:
\titlecontents{section}[3.8em]{}{\contentslabel{2.3em}}{\hspace*{-2.3em}}{\titlerule*[0.25pc]{.}\contentspage}{}
\titlecontents{subsection}[6.2em]{}{\contentslabel{2.9em}}{}{\titlerule*[0.25pc]{.}\contentspage}{}
However, in this case, the hyperref links are changed, which I would like to avoid (no I am not a maniac...). Is there a way to achieve this ? And can this also be used to make the hyperref links in the partial TOCs include the labels ?
And as a subsidiary question, how do I assign the same style to entries in the List of Figures and List of Tables ?
Thank you for your help
listofalgorithms, which is unexpected, as it does not for thelistoffiguresandlistoftables. I looked in the .lof and .lot files to look for the problem, and in those files the label format is different :figure.caption.<number>andtable.caption.<number>. The problem is that this<number>is unrelated with the actual label of the figure or table. Any idea to have this solution work for thelistoffiguresandlistoftablesas well ? – BConic Mar 01 '13 at 12:48caption. I updated my MWE accordingly. – BConic Mar 01 '13 at 13:52captionchanges the entry labels in the LOF and LOT files, but in vain for now... I tried using packagetocloftas suggested, however it creates problems when used with packagetitletoc, which I need for the partial TOCs and to fix something in the page headers. – BConic Mar 04 '13 at 15:12caption, too. Do you need anything else? – mafp Mar 04 '13 at 15:53tocloftpackage just for this is kind of an overkill. There must be a way to extend your solution to make it work with the LOF & LOT, if we find a way to retrieve thecaptioncounter. I'll try to figure that out on my own, thanks for your help. – BConic Mar 04 '13 at 16:59