lamme2024-scientific-project/sty/cleanthesis-footer.sty

98 lines
2.6 KiB
TeX

\RequirePackage[manualmark]{scrlayer-scrpage}
\iffalse
\renewcommand*\chaptermark[1]{%
\markboth{\Ifnumbered{chapter}{\chaptermarkformat}{}}{#1}% <- outdated macro replaced
}
\AfterTOCHead[toc]{\markboth{}{\contentsname}}
\fi
\clearpairofpagestyles
\clubpenalty = 10000
\widowpenalty = 10000
\automark[section]{part}
\setlength{\footheight}{120pt} % avoids scrlayer-scrpage warning:
% footheight to low warning
\setlength{\footskip}{185pt} % BAD HACK that moves the foot downwards
\KOMAoption{footwidth}{foot:53pt} % BAD HACK that moves the foot towards
\setkomafont{pagefoot}{\normalfont\footnotesize}
\setkomafont{pagenumber}{\normalfont \fontfamily{\sfdefault}\selectfont \normalsize \bfseries\color{black}}
\renewcommand{\partmark}[1]{%
\markboth{%
% use \@chapapp instead of \chaptername to avoid
% 'Chapter A Appendix ...', thanks to @farbverlust (issue #47)
\fontfamily{\sfdefault}\selectfont
{\color{fgBlue}\textbf{\partname\ \thepart}}%
\quad%
\protect\begin{minipage}[t]{.65\textwidth}%
#1%
\protect\end{minipage}%
}{}%
}
\newlength{\lensectionnumber}
\renewcommand{\sectionmark}[1]{%
\markright{%
\normalsize\fontfamily{\sfdefault}\selectfont\bfseries
\setlength{\lensectionnumber}{0em}
\settowidth{\lensectionnumber}{\textbf{\thesection}\quad}
\protect\begin{minipage}[t]{.72\textwidth}%
{\ }% bad hack to prevent a wrong baseline for the minipage
\protect\raggedleft%
\hangindent=\lensectionnumber%
{\color{black}\textbf{\fontfamily{\sfdefault}\selectfont\thesection}}%
\quad%
#1%
\protect\end{minipage}%
}%
}
\newcommand{\ctfooterline}{%
\color{black}\rule[-90pt]{1.25pt}{100pt}%
}
% Page number for odd (right) pages
\newcommand{\ctfooterrightpagenumber}{%
\ctfooterline%
\hspace*{10pt}%
\begin{minipage}[b]{1.5cm}%
\pagemark\ %
\end{minipage}%
}
%% Page number for even (left) pages
\newcommand{\ctfooterleftpagenumber}{%
\begin{minipage}[b]{1.5cm}%
\raggedleft\pagemark%
\end{minipage}%
\hspace*{10pt}%
\ctfooterline%
}
%% Defines the content for header and footer
\lehead{}
\cehead{}
\rehead{}
\lohead{}
\cohead{}
\rohead{}
\lefoot[% > plain
\ctfooterleftpagenumber%
]{% > srcheadings
\ctfooterleftpagenumber%
\hspace*{0.75cm}%
%\headmark%
}
\cefoot{}
\refoot{}
\lofoot{}
\cofoot{}
\rofoot[% > plain
\ctfooterrightpagenumber%
]{% > srcheadings
%\headmark%
\hspace*{0.75cm}%
\ctfooterrightpagenumber%
}