0

I was wondering how I could change the .sty file in order to break the part name's line into two lines, since I find it too long. Writing \\ in the middle of the part's name doesn't compile. Below is a screen shot of what I get. I'd like it to be, e.g., "Generalidades de" \\ "procesos continuos".

The code to modify is the following:

\ifthenelse{\boolean{ct@parts}}%
{%
    \newcommand{\ctparttext}[1]{\renewcommand{\ctparttext@keep}{#1}}
    \def\ctparttext@keep{} % Thanks to Ivo
    \def\ctparttext@print{\ctparttext@keep \gdef\ctparttext@keep{}}
    \titleformat{\part}[display]
    {\normalfont\ct@altfont\centering\large}%
    {\thispagestyle{empty}\partname~\MakeTextUppercase{\thepart}}{1em}%
    {\color{CTtitle}\spacedallcaps}[\bigskip\normalfont\normalsize\color{Black}
    \begin{quote}\ctparttext@print\end{quote}]
}{\relax}

Thank you in advance.

enter image description here

2

The problem is that \\ behaves badly inside \MakeTextUppercase unless protected.

\documentclass[a4paper]{book}
\usepackage{classicthesis}

\DeclareRobustCommand{\titlebreak}{\texorpdfstring{\\}{}}

\begin{document}

\tableofcontents

\part[Generalidades de procesos continuos]
     {Generalidades de \titlebreak procesos continuos}

\end{document}

You need to add the optional argument in order that the title is not broken in the table of contents.

enter image description here

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.