Fonts & Character Sets ⇒ Setting up a New document - Layout
Setting up a New document - Layout
plainheadsepline
But actually thee is no need to have an different layout when there is a new chapter so I think ist the better solution to renew the \chapterpagestyle comand...
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Setting up a New document - Layout
I started with the Example an page 530, Chapter 21:
It took me quite a time to find out that I have a heading without prefix (--> \chapterlinesformat)
from that it was a long way to find out that i have to load the "xcolor" package (as described on page 529...)
I´m still not shure why I need the \makeatletter and the \makeatother - I just know I need it because of the "\@hangfrom"
Code: Select all
\usepackage{xcolor}
\setlength{\fboxsep}{10pt}
\makeatletter
\renewcommand{\chapterlinesformat}[3]{%
\colorbox{lightgray}{%
\framebox{
\parbox{\dimexpr\linewidth-5
\fboxrule-2\fboxsep}{%
\@hangfrom{#2}#3%
}%
}%
}}
\makeatother
Furthermore I´d like to have a point at the headings number and the heading should use uppercase letters:
"1. ALLGEMEINES"
But these are my targets for tomorrow...
Setting up a New document - Layout
And by using the fcolorbox the outer margin of the box is at the same distance as the rest of the text and headers!
Ohhh WOW!!!
So there are only the point after the number and the uppercase letter missing to get the chapter heading done! Great!
Code: Select all
\usepackage{xcolor}
\setlength{\fboxsep}{10pt}
\makeatletter
\renewcommand{\chapterlinesformat}[3]{%
\fcolorbox{black}{lightgray}{%
% \framebox{
\parbox{\dimexpr\linewidth-5
\fboxrule-2\fboxsep}{%
\@hangfrom{#2}#3%
}%
}%
}%}
\makeatother
Setting up a New document - Layout
I´ve got an idea now of what´s the \makeatletter and \makeatother is doing and what it´s needed for.
AND I´ve made a new topic now:
https://latex.org/forum/viewtopic.php?f=48&t=34799