11

I'm using the ClassicThesis by Miede for writing my thesis, the support package is Arsclassica.

It's a nice template, however I got a little problem with the Chapter name, some of them can be very long. As the result, LateX would produce very bad line breaking on chapter name.

I can use \newline command to choose when to start the new line, however the new line is not aligned. If you already use ClassicThesis, you'll see that it generate Chapter number, then a straight slash (|) to separate the number with the chapter's name. Is there any way to produce Chapter name, aligned on 2 lines?


Minimal example provided by Vladimir:

\documentclass{scrreprt}

\usepackage{classicthesis-ldpkg}
\usepackage{classicthesis}
\usepackage{arsclassica}

\begin{document}
\chapter{This is multi line chapter title}
See how the second line of the chapter title goes under the chapter number which looks bad.
\end{document}
  • 2
    give a complete example –  Dec 27 '10 at 09:53
  • 3
    Welcome to the TeX.StackExchange! Please add a minimal example that illustrates your problem. – Caramdir Dec 27 '10 at 12:45
  • (Converted from answer by a moderator) Maybe I can contribute to this since I have the same problem/issue. This would be the minimal example: (Moved to question by a moderator) I'm using ubuntu and all the packages are available in the repository. Thanks in advance – Vladimir Mar 31 '11 at 09:49
  • @Vladimir: Welcome to tex.sx! Your question won't be seen by many people here so it would be best to repost it as a fresh question. Follow-up questions like this are more than welcome! Please use the "Ask Question" link for your new question; there you can link to this question to provide the background. – lockstep Mar 31 '11 at 09:52
  • @Vladimir, @lockstep: we might add this minimal working example to the question (or make the question CW). The OP Jim Raynor wasn't here for quite a while. (No wonder, he has to fight the Zerg) – Martin Scharrer Mar 31 '11 at 10:45
  • @Martin: Normally, I wouldn't want to deprive the second questioner of the possibility to earn reputation for his question. In this case (first questioner provided problem description, second questioner added simple minimal example) it might be OK. – lockstep Mar 31 '11 at 11:04
  • @lockstep,@Martin: I'm kinda new here - this was my first post/answer, so I don't quite understand what should I do now: Post a new question with a link to this one, or just live this one as it is? Thanks – Vladimir Mar 31 '11 at 11:56
  • @Vladimir: I'd say let Martin merge your "answer" into the original question. BTW, I provided an answer. :-) – lockstep Mar 31 '11 at 12:15
  • @Vladimir: Thanks for the minimal example. However, only solutions should be provided in the answer section. I converted your post to a comment of the question and moved all the other comments below it as well. Note that because of a spam-protection new users are not allowed to post comments to other questions or their answers. Note that users can also suggest edits to other questions which can be used to add MWEs. – Martin Scharrer Mar 31 '11 at 13:25
  • @lockstep: I have moved the MWE to the question as well as the comments. – Martin Scharrer Mar 31 '11 at 13:25

2 Answers2

6

arsclassica loads titlesec, and the chapter title format is improved by replacing block with hang when using the \titleformat macro.

\documentclass{scrreprt}

\usepackage{arsclassica}

\titleformat{\chapter}[hang]% "hang" instead of "block"
    {\normalfont\Large\sffamily}%
    {{\color{halfgray}\chapterNumber\thechapter%
    \hspace{10pt}\vline}  }{10pt}%
    {\spacedallcaps}

\begin{document}
\chapter{This is multi lane chapter title}
See how the second line of the chapter title goes under the chapter number which looks bad.
\end{document}
lockstep
  • 250,273
5

it is the arsclassica which defines the chapter layout via the macro \formatchapter. Using a tabularx for the title makes sense here:

\documentclass{scrreprt}

\usepackage{classicthesis-ldpkg}
\usepackage{arsclassica,tabularx}

\renewcommand\formatchapter[1]{% 
  \begin{tabularx}{0.8\linewidth}{@{} l X @{}} 
       \chapterNumber & \spacedallcaps{#1}
  \end{tabularx}} 

\begin{document}
\chapter{This is a real multi line chapter title}
See how the second line of the chapter title goes under the chapter number which looks bad.
\end{document}

enter image description here