GeneralSpecial format of chapter and problem with line pitch

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
MeinsMeins
Posts: 3
Joined: Thu Feb 18, 2010 2:30 pm

Special format of chapter and problem with line pitch

Post by MeinsMeins »

Hey there,

I am actually writing on my Master's Thesis with Latex.

Now I got two problems:

------------
1. Title
\textbf{\Huge{Text in Line 1\\Text in Line 2\\Text in Line 3}}\\

Problem:
The line pitch between "Text in Line 1" and "Text in Line 2" is correct in the pdf. But the line pitch between "Text in Line 2" and "Text in Line 3" is much smaller?
Do you know, what will be the reason for this? If you need more information, please tell me.

------------
2. Contents and Chapternames
I would like to have the following:
Content
1. Chaptername
1.1. Sectionname
1.1.1 ...
2. Chaptername
2.1. Sektionname
2.1.1....

The difficulty lies in the text itself, because this should look like this:

1. Chapter
_______________
Chaptername
_______________
1.1. Sectionname

So in the first place there should be written 1. Chapter, 2. Chapter ... But this shall not be in the content. After this the chaptername shall be written together with two lines in the top and buttom of it. the chaptername itself shall not contain any chapternumber in this position - but in the content there must be the chapternumber.

Has anybody an idea how to code this?

Best regards.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Special format of chapter and problem with line pitch

Post by gmedina »

Hi,

you could use the titlesec/titletoc packages. However, these packages don't cooperate with the AMS document classes. If you are using one of those classes, let us know and we will suggest another option.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
MeinsMeins
Posts: 3
Joined: Thu Feb 18, 2010 2:30 pm

Re: Special format of chapter and problem with line pitch

Post by MeinsMeins »

hey, thanks for the fast reply. I am pretty new to latex, that's why I would like you to ask, if you probably have any example on my specific problem regarding titlesec? ;-)
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Special format of chapter and problem with line pitch

Post by gmedina »

MeinsMeins wrote:...if you probably have any example on my specific problem regarding titlesec?..
The package documentation contains examples that you could easily adapt according to your needs. Take a look at the following simple code:

Code: Select all

\documentclass{book} 
\usepackage{titlesec}

\renewcommand\thechapter{\arabic{chapter}.}
\renewcommand\thesection{\thechapter\arabic{section}.}
\titleformat{\chapter}[display]
  {\bfseries\LARGE}{\Huge\thechapter\ \LARGE\chaptertitlename }
  {1ex}{\titlerule\vspace{1ex}\filright}[\vspace{1ex}\titlerule]
\titlespacing*{\chapter}
  {0pt}{30pt}{20pt}

\begin{document} 

\chapter{Test chapter}
\section{Test section}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
MeinsMeins
Posts: 3
Joined: Thu Feb 18, 2010 2:30 pm

Re: Special format of chapter and problem with line pitch

Post by MeinsMeins »

Awesome, that's it. Thanks a lot!
Post Reply