Commit c6073b1b authored by Edward Longman's avatar Edward Longman
Browse files

ReDo headers to improve info and the chapter page numbers

parent ff24716e
......@@ -317,10 +317,18 @@
%
% \begin{macrocode}
\usepackage{fancyhdr}
\lhead[\rm\thepage]{\fancyplain{}{\sl{\rightmark}}}
\rhead[\fancyplain{}{\sl{\leftmark}}]{\rm\thepage}
% Help from https://texblog.org/2007/11/07/headerfooter-in-latex-with-fancyhdr/#comment-4783
\fancyhead[LE]{\textrm\thepage}
\fancyhead[LO]{\fancyplain{}{\textsl{\rightmark}}}
\fancyhead[RE]{\fancyplain{}{\textsl{\leftmark}}}
\fancyhead[RO]{\textrm\thepage}
\chead{}\lfoot{}\rfoot{}\cfoot{}
\pagestyle{fancy}
\fancypagestyle{plain}{
\fancyhf{}
\fancyhead[OR]{\thepage}
\renewcommand{\headrulewidth}{0pt}
}
% \end{macrocode}
%
% \begin{macro}{\chaptermark}
......@@ -330,14 +338,18 @@
% Redefine \texttt{chaptermark} and \texttt{sectionmark} to set up the correct header name and produce a
% banner on the output making the location of messages simpler.
%
% The \textbackslash btypeout command is for console logging where chapters start
%
% \textbackslash chapapp expands to "Chapter" or "Appendix"
%
% \begin{macrocode}
%<*thesis|minithesis|progress|project|report|gdp>
\renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}
\renewcommand{\sectionmark}[1]{}
\renewcommand{\chaptermark}[1]{\btypeout{\thechapter.\space #1}\markboth{\chaptername\ \thechapter.\hspace{1em}#1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection.\hspace{1em}#1}}
\renewcommand{\subsectionmark}[1]{}
%</thesis|minithesis|progress|project|report|gdp>
%<*article>
\renewcommand{\sectionmark}[1]{\btypeout{\thesection\space #1}}
\renewcommand{\sectionmark}[1]{\btypeout{\thesection\hspace{1em}#1}}
\renewcommand{\subsectionmark}[1]{}
\renewcommand{\subsubsectionmark}[1]{}
%</article>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment