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 now writing a second chapter in my report document. The title of the second chapter is a little bit long so it's touching the edge of the paper. How can I move part of it to a new line? Here is my code:

\documentclass[10pt]{report} 
\usepackage[utf8]{inputenc}
\usepackage{titlesec}
\usepackage[left=35mm,right=35mm,top=35mm,bottom=35mm]{geometry} 
\titleformat{\section}{\Huge\bfseries}{\thesection}{1em}{}
\titleformat{\chapter}{\huge\bfseries}{\thesection}{1em}{}
\titlespacing*{\section} {0pt}{3.5ex plus 1ex minus .2ex}{8.3ex plus .2ex}
\titlespacing*{\chapter}{0pt}{3.5cm}{2cm}
\linespread{1.8}
\setlength\parindent{0pt}
\begin{document} 
\chapter*{Kapitel 1} 
\section*{Einleitung} 
\subsection*{1.1 Motivation}  
\begin{large}
bla bla bla 
\end{large}  
\chapter*{Kapitel 2} 
\section*{Begriffsdefinitionen und Wissenschaftliche Grundlagen} 
\subsection*{2.1 Nickelbasiswerkstoffe: Historische Entwicklung}  
\begin{large} 
bla bla bla
\end{large}
\end{document}

Can you please help?Screenshot of my document

share|improve this question
1  
\\ should work, you might also want to put a shorter version in a [...] argument for the table of contents and the page head. –  David Carlisle May 12 '13 at 20:15
    
@DavidCarlisle thank you David it worked. One more question. Can I also edit for example the spacing or font of the second title without changing anything in the first? I need to reduce the spacing between Kapitel 2 and the title of the chapter. –  abdu May 12 '13 at 20:25
    
It's normally considered bad style to change the heading layout for different chapters it's possible of course as you are using titkesec you'll need to look at the length parameters that uses and just change them then change them back. –  David Carlisle May 12 '13 at 20:29

1 Answer 1

up vote 2 down vote accepted

I think you're taking a wrong approach. You don't need to use \chapter*{Kapitel 1} in order to get that header, just use babel with the ngerman option, which will also give you correct hyphenation. Using \large for getting a larger text font is better substituted by passing the 12pt option to the document class.

\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}

\usepackage[a4paper,left=35mm,right=35mm,top=35mm,bottom=35mm]{geometry}

\linespread{1.8}
\setlength\parindent{0pt}

\begin{document}
\chapter{Einleitung}
\section{Motivation}
bla bla bla

\chapter{Begriffsdefinitionen und Wissenschaftliche Grundlagen}
\section{Nickelbasiswerkstoffe: Historische Entwicklung}
bla bla bla
\end{document}

enter image description here

You may want to change the last section title to

\section[Nickelbasiswerkstoffe: Historische Entwicklung]
{Nickelbasiswerkstoffe: Historische\\ Entwicklung}

to avoid the bad line break. Or use \titlesec and specify \raggedright for sections, for instance

\usepackage{titlesec}
\titleformat{\section}[block]
  {\Large\bfseries}
  {\thesection}
  {1em}
  {\raggedright}

enter image description here

This would free you from the need of specifying twice the title.

share|improve this answer
    
Ok, but if I need to change the font and spacings of the section titles I'll need to use the titlesec package, right? Because I want to reduce the spacing above Einleitung 1 on the first page for example. I used the command \titlespacing*{\section} {0pt}{3.5ex plus 1ex minus .2ex}{8.3ex plus .2ex} but I still don't understand what these numbers are. How can I move the Einleitung one unit upwards? –  abdu May 12 '13 at 20:49
    
@abdu "Einleitung" is the chapter title; you use \titleformat{\chapter} command to modify it. With \titlespacing you act on the spaces before and after the chapter/section title. The manual of titletoc has many examples. –  egreg May 12 '13 at 20:51
    
Einleitung is the section. The chapter in my case is Kapitel 1 =) –  abdu May 12 '13 at 21:05
    
@abdu I don't think so. Why should it be? With \chapter{Einleitung} the words "Kapitel 1" are automatically added. –  egreg May 12 '13 at 21:37

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.