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.

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}
share|improve this question
2  
give a complete example –  Herbert Dec 27 '10 at 9: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 9: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 9: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
show 5 more comments

2 Answers

up vote 4 down vote accepted

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

share|improve this answer
add comment

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}
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.