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.

I'm using the hyperref package and am unable to load tocloft. I've tried everything including a voodoo ritual involving a rubber chicken to get the two to shake hands.

Is there a work around to get dots in the table of contents, list of figures/tables? Also, in my list of figures/tables I have the depth set to section, so I see an overlap-spacing problem with the numbering and the caption title. Is there a simple way to correct this spacing?

 \documentclass[psamsfonts,10pt,reqno,letterpaper]{amsbook}

\usepackage{chngcntr}
\counterwithin{section}{chapter}
\counterwithin{figure}{chapter}
\counterwithin{table}{chapter}

 \usepackage[Lenny]{fncychap}
\ChRuleWidth{1.618pt}
\ChTitleVar{\raggedright  \huge }
\ChNameVar{\raggedleft  \Huge }

\usepackage[bookmarksdepth=subsection,plainpages=false]{hyperref}

\usepackage[english]{babel}
\usepackage{blindtext}

\begin{document}

 \listoftables

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}


\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}

\begin{table}
\begin{tabular}{c}
stuff
\end{tabular}
\caption{stuff}
\end{table}


\end{document}     
share|improve this question
3  
Please add a minimal working example (MWE) that illustrates your problem. –  lockstep Jul 2 '11 at 20:01
1  
This really doesn't deserve a downvote. Here on TeX.sx, it is generally expected that downvotes are reserved for things that are actually wrong and/or bad. This question is fine by that standard. –  Jake Jul 11 '11 at 6:01
add comment

2 Answers 2

up vote 4 down vote accepted

With the following setting chapters have their dots and hyperref doesn't complain.

\documentclass[a4paper]{book}

\usepackage{tocloft}
\renewcommand{\cftdot}{\normalfont.} % don't inherit the \bfseries attribute
\renewcommand{\cftchapdotsep}{4.5}   % same spacing as for sections

\usepackage{hyperref}
share|improve this answer
    
I just added a minimal example. I still get errors even with your work-around. ;( –  user02138 Jul 11 '11 at 4:24
1  
Sorry, tocloft is not compatible with amsbook, which never uses dots in the table of contents and similar places. Use the normal book class. –  egreg Jul 11 '11 at 9:17
add comment

This seems to work immediately after \usepackage{amsbook}

\makeatletter
\def\@tocline#1#2#3#4#5#6#7{\relax
\ifnum #1>\c@tocdepth % then omit
\else
\par \addpenalty\@secpenalty\addvspace{#2}%
\begingroup \hyphenpenalty\@M
\@ifempty{#4}{%
  \@tempdima\csname r@tocindent\number#1\endcsname\relax
}{%
  \@tempdima#4\relax
}%
\parindent\z@ \leftskip#3\relax \advance\leftskip\@tempdima\relax
\rightskip\@pnumwidth plus4em \parfillskip-\@pnumwidth
#5\leavevmode\hskip-\@tempdima #6\nobreak\relax
\ifnum#1<0\hfill\else\dotfill\fi\hbox to\@pnumwidth{\@tocpagenum{#7}}\par
\nobreak
\endgroup
\fi}
\makeatother
share|improve this answer
add comment

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.