0

I'm currently using the titlesec/titletoc combination to (re)define the way part title is displayed, both in ToC and in text.

I'm using the \chapter[short title]{long\\long title} command to obtain two distinct results into ToC and text. And it works. However, it does not seem to work for part names, with \part[short part]{long\\part name}.

Here is the MWE :

\documentclass[a4paper, twoside, 12pt]{book}

% GENERAL %

\usepackage[notlof, nottoc, notlot]{tocbibind}
\usepackage[sectionbib]{natbib}
\usepackage[french]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[sc]{mathpazo} % Font


\usepackage[raggedright, pagestyles, outermarks, toctitles, newparttoc]{titlesec}
\usepackage{titletoc}

\titlecontents{part}[0pt]{\centering\Large\scshape}{}{}{}%

\titleformat{\part}[display]
{\raggedleft\fontsize{45}{60}\selectfont\scshape}
{}
{0em}
{}[]% retirer la bande noire pour la suite


\begin{document}

\tableofcontents

\part[Short part title]{Long part\\title}
\chapter[Short title]{Long\\long title}

\end{document}

Which sadly renders ToC part title as Long part\\title instead of Short part title.

0

Remove titlesec's option toctitles.

toctitles (Package option)

2.6 Changes the behaviour of the optional argument in sectioning titles so that it sets only the running heads and not the TOC entries, which will be based on the full title.

That it applied to Parts only is presumably related to the usage of \titleformat only for \part.

  • Thank you very much. It seems that I have read the documentation too fast. Now I can't remember why I added this option. Anyway, it does not seem to produce unwanted side effects to remove it. – Valéry Benoit Oct 19 '17 at 15:04

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.