Just a short question:
I want to renew the chapter command, so that I can manipulate the distance between the chapter number and the chapter title in my header, currently I have defined my header as:
\renewcommand{\chaptername}{}
\fancyhead[L]{\hspace{4mm}\textcolor{headercolor}{\leftmark}\\ \text{ }\textcolor{headercolor}{\hspace{0.4cm}\rightmark}\hfill\textcolor{headercolor}{}\hspace{2mm}}
\renewcommand{\headrule}{\vspace{-\headheight}\textcolor{headercolor}{\vrule height \headheight width 2pt\relax\rule{\textwidth}{2pt}\vrule height \headheight width 2pt\relax}}
now I want to change the chaptermark/chaptername, so that I can manipulate the distance between the number and the title.
E.g. currently it says 1. INTRODUCTION
but I want the space between 1. and INTRODUCTION to increase?
I know this is not a working example, but I hope you get it fast what I mean.
Best Answer
KOMA-Script
It is quite easy with the KOMA-Script classes. There macro
\chaptermarkformat
sets the chapter number in the headings and can be redefined, e.g.:(
\g@addto@macro{\cmd}{stuff}
appendsstuff
to parameterless macrocmd
).Package
fancyhdr
With package
fancyhdr
or the standard classes the distance is hardcoded in\chaptermark
that is defined in the page style command. Therefore it becomes uglier, because also the page style command needs to be redefined, e.g.:Now the distance between number and text in the headings can be controlled by the length
\marknumsep
. Also the example has removed the "Chapter"/"Appendix" prefix (\@chapapp
).