3

I want to align the second line of long names in a list of schemes like in the second screenshot below.

Current situation:

enter image description here

I want it like this:

enter image description here

  • 1
    Hi erkunt, welcome to TeX.sx. I've inserted the pictures into your question and also tried to edit the question to make it clearer what you're asking. I hope that's okay for you. It would be great if you could edit your question to include a minimal working example so people can see how you generate your indices. This will make it easier for others to help you. – Jake Sep 14 '11 at 7:09
  • Let me add the following: it would be helpful if you provided information about the documentclass you're using (article, report, book, etc), the value of the \textwidth variable, how the "scheme" environment is defined (as a floating object, say), and how schemes are numbered (per section, per chapter). – Mico Sep 14 '11 at 8:04
1

I can manage this problem by using \hangindent.

my .def file was

\def\@myschemedottedtocline#1#2#3#4#5{%
\vskip \z@ \@plus.2\p@
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent #2\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima #3\relax
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{Scheme #4}\nobreak
\leaders\hbox{$\m@th
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep
mu$}\hfill
\nobreak
\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
\par}%
}

I added \hangindent=3.5pc below \parindent #2\relax\@afterindenttrue and that solves my problem.

\def\@myschemedottedtocline#1#2#3#4#5{%
\vskip \z@ \@plus.2\p@
{\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
\parindent #2\relax\@afterindenttrue
\hangindent=3.5pc
\interlinepenalty\@M
\leavevmode
\@tempdima #3\relax
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{Scheme #4}\nobreak
\leaders\hbox{$\m@th
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep
mu$}\hfill
\nobreak
\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}%
\par}%
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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