MT/config/pageheading.tex

37 lines
984 B
TeX
Raw Normal View History

2020-08-20 17:39:46 +02:00
%define header in a nice way using fancy header get info here
%http://www.ctan.org/tex-archive/macros/latex/contrib/fancyhdr/fancyhdr.pdf
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\headheight}{16pt}
%\renewcommand{\chaptermark}[1]{%
%\markboth{\thechapter.\ #1}{}}
%\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
%\pagestyle{empty}
%define style for all \pagestyle(fancy} pages
\fancyhead{}
\fancyhead[L]{}
\fancyhead[R]{\nouppercase{\rightmark}}
%\fancyhead[L]{\bfseries \rightmark}
\fancyfoot{} % clear all footer fields
\fancyfoot[C]{\thepage}
%\fancyfoot[LE,RO]{\thepage}
%\fancyfoot[LO,CE]{}
%\fancyfoot[CO,RE]{}
\renewcommand{\headrulewidth}{0.1pt}
\renewcommand{\footrulewidth}{0.1pt}
%chapter sites default to plain page style
%so we overwrite plain with the desired style
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[c]{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0.1pt}}