Page LayoutDots in contents

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Dots in contents

Post by Juanjo »

Try this, between \makeatletter and \makeatother ;) :

Code: Select all

\def\l@figure#1#2{\@tocline{0}{3pt plus2pt}{0pt}{1.5pc}{}{Figure #1}{#2}}
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

tdc
Posts: 34
Joined: Fri Sep 12, 2008 1:52 am

Dots in contents

Post by tdc »

Ok, so i'm digging up a very old topic however it is because everything that is in here gives the basis to my problem.

I've using amsbook (so cannot use tocloft/titletoc without issues) and am having issues modifying the list of figures for captions that run onto multiple lines.

Is there a way to indent the second (and beyond) lines of a caption in list of figures so that they are all at the same level..

Currently I am getting something along the lines of

Code: Select all

Figure 3.2   stuff that goes on
       line continues here...............................5


and I would like

Code: Select all

Figure 3.2   stuff that goes on
             line continues here.........................5
Thank you!
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Dots in contents

Post by Johannes_B »

Hi, can you give us a minimal working example of your basic setup?

BTW: Why do you have such long descriptions in the lof? It is just used for orientation.
You can give caption an optional argument, just for the lof.

Code: Select all

\caption[lof entry]{normal entry}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
tdc
Posts: 34
Joined: Fri Sep 12, 2008 1:52 am

Dots in contents

Post by tdc »

Sorry, i'd thought the previous posts gave a full working example, ah well.

As to why they are long, a combination of lots of very similar figure names (and so a need to differentiate them by adding in more details) and page size constraints don't help either.

Code: Select all

\documentclass[a4paper,12pt,reqno,oneside]{amsbook}

\makeatletter
\def\@lofline#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 Figure #6\nobreak\relax
%   \hfil\hbox to\@pnumwidth{\@tocpagenum{#7}}\par --- original line in ams def
% -- New line puts dots between everything in contents bar Parts
    \ifnum#1<0\hfill\else\dotfill\fi\hbox to\@pnumwidth{\@tocpagenum{#7}}\par
    \nobreak
    \endgroup
  \fi}
\makeatother

\makeatletter
\renewcommand\l@figure{\@lofline{0}{3pt plus2pt}{0pt}{3.3em}{}}
\makeatother


\begin{document}
\listoffigures

\chapter{Boxes}
\section{title}
\begin{figure}
bits
 \caption{one really long caption that will end up going across mulitple lines in the list of figures}
\end{figure}

\end{document}
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Dots in contents

Post by Johannes_B »

Sorry for the late reply, i am far from being an expert
concerning those inner things. I thought somebody
else would jump in, but nobody did.

I tried to find a solution but sadly i didn't. I don't have
the time to try further.
Truly Sorry.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
tdc
Posts: 34
Joined: Fri Sep 12, 2008 1:52 am

Re: Dots in contents

Post by tdc »

That's okay, thanks for the help anyway.... If anyone else has an Idea it would be greatly appreciated!
Post Reply