GeneralCustomized Chapter Precis in ToC

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Customized Chapter Precis in ToC

Post by AleCes »

Hello everybody,

I wonder if it's possible to customize the settings of the \cftchapterprecistoc command by the tocloft package. What I get by default is an not indented italicized text flushed to the left, while what I want is an indented justified text. The manual, unfortunately, doesn't say anything about that.

Here's the minimal example.

Code: Select all

\documentclass{book}
\usepackage{tocloft}

\begin{document}
  \tableofcontents

  \chapter{Introduction}
  \cftchapterprecistoc{This is an introduction}

  \chapter{Conclusion}
  \cftchapterprecistoc{This is a conclusion}
\end{document}

Recommended reading 2024:

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

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Customized Chapter Precis in ToC

Post by Johannes_B »

Unfortunately I can't really help you with the problem. There seems to be no build-in solution, so one has to modify the source. I am not that experienced with the internals, and a solution might be tricky.

Your problem is described pretty good, the minimal example is great. Don't see that very often at a first post. I have one remark tough. If you have a ragged right text, no one will recognize the indent of the first line.

EDIT: Keeping calm and reading attentively goes for the helpers as well m-(
Compiling your minimal example (adding some dummy text) gives me a perfectly justified text.

Code: Select all

\documentclass{book}
\usepackage{tocloft}
\usepackage{blindtext}

\begin{document}
  \tableofcontents

  \chapter{Introduction}
  \cftchapterprecistoc{\hspace{1em}This is an introduction \blindtext}

  \chapter{Conclusion}
  \cftchapterprecistoc{This is a conclusion \blindtext}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Re: Customized Chapter Precis in ToC

Post by AleCes »

Thank you very much, Johannes_B, the workaround is you've suggested is so obvious :o, yet it'd never dawned on me! :oops:
Post Reply