Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom part name to header using kaobook template in LaTeX #269

Open
DanielWicz opened this issue Apr 2, 2023 · 0 comments
Open

Add custom part name to header using kaobook template in LaTeX #269

DanielWicz opened this issue Apr 2, 2023 · 0 comments

Comments

@DanielWicz
Copy link

I am using the kaobook template for my document in LaTeX, and I would like to add the custom part name to the header. By default, the header only shows the chapter name. How can I modify the kaobook template to include the part name in the header, and how can I update it when using the \addpart command ?

I see that kaobook defines headers in the kao.sty as:

% Header style with chapter number, chapter title, and page in the header (used throughout the document)
\renewpagestyle{scrheadings}{%
	{\smash{\hspace{-\headmarginparwidth}\hspace{-\headmarginparsep}\makebox[\headtotal][l]{%
		\makebox[7\hscale][r]{\thepage}%
		\makebox[3\hscale]{}\rule[-1mm]{0.5pt}{19\vscale-1mm}\makebox[3\hscale]{}%
		\makebox[\headtextwidth][l]{\leftmark}}}}%
	{\smash{\makebox[0pt][l]{\makebox[\headtotal][r]{%
		\makebox[\headtextwidth][r]{\hfill\rightmark}%
		\makebox[3\hscale]{}\rule[-1mm]{0.5pt}{19\vscale-1mm}\makebox[3\hscale]{}%
		\makebox[7\hscale][l]{\thepage}}}}}%
	{\smash{\makebox[0pt][l]{\makebox[\headtotal][r]{%
		\makebox[\headtextwidth][r]{\hfill\rightmark}%
		\makebox[3\hscale]{}\rule[-1mm]{0.5pt}{19\vscale-1mm}\makebox[3\hscale]{}%
		\makebox[7\hscale][l]{\thepage}}}}}%
}{%
	{}%
	{}%
	{}%
}

How to modify it, so that part can be displayed in the header ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant