Add headers
This commit is contained in:
@@ -20,3 +20,17 @@
|
|||||||
|
|
||||||
% Headers
|
% Headers
|
||||||
\usepackage{emptypage} % Remove headers and footers on empty pages
|
\usepackage{emptypage} % Remove headers and footers on empty pages
|
||||||
|
\usepackage{etoolbox} % Patching commands
|
||||||
|
\usepackage{fancyhdr} % Headers and footers
|
||||||
|
|
||||||
|
\pagestyle{fancy} % Use fancy headers and footers
|
||||||
|
\fancyhf{} % Clear headers and footers
|
||||||
|
\fancyhead[LO, RE]{\small\leftmark} % Chapter in the left on odd pages and right on even pages
|
||||||
|
\fancyfoot[C]{\thepage} % Page number in the center
|
||||||
|
|
||||||
|
\appto\mainmatter{
|
||||||
|
\renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}
|
||||||
|
\renewcommand{\chaptermark}[1]{\markboth{\chaptername~\thechapter~--\ #1}{}}
|
||||||
|
\fancyhead[RE]{\small\rightmark}
|
||||||
|
\fancyhead[LO]{\small\leftmark}
|
||||||
|
}
|
||||||
|
|||||||
6
main.tex
6
main.tex
@@ -1,3 +1,9 @@
|
|||||||
|
% Set PDF version to 1.7 (https://tex.stackexchange.com/a/638196)
|
||||||
|
\ExplSyntaxOn
|
||||||
|
\sys_ensure_backend:
|
||||||
|
\pdf_version_gset:n{1.7}
|
||||||
|
\ExplSyntaxOff
|
||||||
|
|
||||||
% Template
|
% Template
|
||||||
\documentclass[twoside, a4paper, 12pt]{book}
|
\documentclass[twoside, a4paper, 12pt]{book}
|
||||||
\input{config/template}
|
\input{config/template}
|
||||||
|
|||||||
Reference in New Issue
Block a user