## LaTeX forum ⇒ Theses, Books, Title pages ⇒ more space for chapter title Topic is solved

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

### more space for chapter title

Hello all,

I thank the community for providing usefull support for this great template.

I have one problem:
Some of my chapter titles are rather long. As a consequence they are cut off after 5 to 7 words.
Now my question:
Is it possible to extend the chapter title over several rows and to adopt the size of the orange box accordingly?

Best regards

Tags:

Vel
Site Moderator
Posts: 454
Joined: Fri Jun 29, 2012 1:20 am

You can deal with this problem in a few different ways. The first is to decrease the font size of all chapter titles, but this is probably not the best since then you need to adjust the size of the rounded box they are in. The alternative is to use 2 titles for the longer chapters - one shorter one that appears in the chapter header at the beginning of the chapter and a longer one that appears in the table of contents and in the header of each page in that chapter.

An example of this is: \chapter[Text Chapter: A Careful Inspection]{Text Chapter}

The chapter header will now display "1 - Text Chapter" for this chapter but the table of contents and the headers on each page will display the longer version "Text Chapter: A Careful Inspection".

Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com

MaverickVG
Posts: 4
Joined: Thu Sep 29, 2016 5:03 pm
Hey!

is it possible to have 2 lines for the chapter title at the beginning of each chapter? This would help me a lot!

Thanks,

Sebastian

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
The template has inefficient and restricting definitions of \@makechapterhead (numbered chapters) and \@makeschapterhead (unnumbered chapters). Here are improved versions which allow multiline chapter titles:


Adding this to the preamble and using

\chapterimage{chapter_head_2.pdf}\chapter{Text Chapter so long that it spans two lines. Indeed so long that it   spans two lines.}

gives

lob1.png (187.44 KiB) Viewed 2858 times

More lines are also possible:

lob2.png (187.96 KiB) Viewed 2858 times

BTW: this code in the template

\newpage~\vfill\thispagestyle{empty} \noindent Copyright \copyright\ 2013 John Smith\\ % Copyright notice \noindent \textsc{Published by Publisher}\\ % Publisher \noindent \textsc{book-website.com}\\ % URL \noindent Licensed under the Creative Commons Attribution-NonCommercial 3.0Unported License (the License''). You may not use this file except incompliance with the License. You may obtain a copy of the License at\url{http://creativecommons.org/licenses/by-nc/3.0}. Unless required byapplicable law or agreed to in writing, software distributed under the Licenseis distributed on an \textsc{as is'' basis, without warranties or conditions   of any kind}, either express or implied. See the License for the specificlanguage governing permissions and limitations under theLicense.\\ \noindent \textit{First printing, March 2013}

is against quite a few best practices in LaTeX: paragraph spacing by ending a paragraph with \\ – one should never do that. One of the consequences is a number of underfull hboxes; multiple \noindents is also not very nice; ~\vfill is just wrong. Better:

\newpage\thispagestyle{empty}\vspace*{\fill}\begingroup   \setlength\parskip{\baselineskip}   \setlength\parindent{0pt}   Copyright \copyright\ 2013 John Smith    \textsc{Published by Publisher}    \textsc{book-website.com}    Licensed under the Creative Commons Attribution-NonCommercial 3.0 Unported   License (the License''). You may not use this file except in compliance   with the License. You may obtain a copy of the License at   \url{http://creativecommons.org/licenses/by-nc/3.0}. Unless required by   applicable law or agreed to in writing, software distributed under the   License is distributed on an \textsc{as is'' basis, without warranties or     conditions of any kind}, either express or implied. See the License for   the specific language governing permissions and limitations under the   License.    \textit{First printing, March 2013}\endgroup

There may be further places for improvement but I haven't checked

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

MaverickVG
Posts: 4
Joined: Thu Sep 29, 2016 5:03 pm
Thank you very much! This helped a lot.

One more question: with the new code the text also has a opacity of 0.5. How to get the text back at 1.0? If I change the value than the white background is also set to 1.0 and is not transparent anymore.

Thanks!

Edit: I found it by myself, just add text opacity = 1.0 to the definition and it works!

cgnieder
Site Moderator
Posts: 1988
Joined: Sat Apr 16, 2011 7:27 pm
Add text opacity = 1 to the style definition..
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim