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...
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
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