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.

Using the KOMA-Script class I'ld like to add chapter descriptions to the table of contents to provide a short description of this chapter right in the TOC.

I've already found the "memoir" document class with the \chapterprecis{...} command, but this would make it impossible to use KOMA-Script, as it is a class, too.

The "tocloft" package provides a similar command, but forces to print the precis under the chapter title in the text with a quite bad positioning.

Is there any package around that works with KOMA-Script or a solution in the KOMA-Script class itself to provide this behaviour?

share|improve this question
2  
Does this question help? –  lockstep Aug 31 '11 at 11:23
1  
Have a look at this thread, it's the same questions, and the answers only requite the etoolbox or tocloft packages –  Tom Bombadil Aug 31 '11 at 11:24
    
Thanks Tom (I've heard that name before g), the example was helpful! I skipped the command "\cftchapterprecistoc" when evaluating the tocloft package, only found "\cftchapterprecis". –  Christoph Jüngling Aug 31 '11 at 11:37
2  
@Christoph Jüngling: You are a German so I think you will understand the post of Markus Kohm. He has a pacakge screxperimental which allows you to set the toc separately. The code is insert in KOMA-Script v3.10. here the link: komascript.de/node/1231 –  Marco Daniel Aug 31 '11 at 12:05
1  
"Some kind of function" -- that's a new one. :-) –  lockstep Aug 31 '11 at 14:29
show 1 more comment

2 Answers

Something like

\newcommand{\chapterprecis}[1]{\addtocontents{toc}{%
  \unexpanded{\unexpanded{{\small#1\par}}}}}

should work. One has to customize the appearance of the precis and, perhaps, make sure that there's no page break between the chapter and the precis:

\chapter{A title}
\chapterprecis{A precis}
share|improve this answer
add comment
up vote 2 down vote accepted

I now use the "tocloft" package with its command \cftchapterprecistoc{text}.

Additionally I found a recommendation to create a similar command \cftsectionprecistoc{text}:

\makeatletter
\newcommand{\cftsectionprecistoc}[1]{\addtocontents{toc}{%
  {\leftskip \cftsecindent\relax
   \advance\leftskip \cftsecnumwidth\relax
   \rightskip \@tocrmarg\relax
   \textit{#1}\protect\par}}}
\makeatother

This now works fine even that \cftchapterprecis{text} (without "toc" at the end!), which additionally writes the precis under the chapter heading itself, doesn't consider the correct distance between the lines.

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.