From b441d29ba85623914ef3b2a700c31fc9afcfeb0e Mon Sep 17 00:00:00 2001 From: Samuel Ortion Date: Thu, 18 Apr 2024 16:33:38 +0200 Subject: [PATCH] feat: Add llap for heading number --- media/dummy.png | Bin 546 -> 0 bytes report.org | 53 +++++++++------- report.pdf | 4 +- sty/cleanthesis-footer.sty | 97 ++++++++++++++++++++++++++++ sty/lamme2024.sty | 123 ++---------------------------------- sty/scr-legrand-heading.sty | 7 ++ 6 files changed, 141 insertions(+), 143 deletions(-) delete mode 100644 media/dummy.png create mode 100644 sty/cleanthesis-footer.sty create mode 100644 sty/scr-legrand-heading.sty diff --git a/media/dummy.png b/media/dummy.png deleted file mode 100644 index e723f8f3255d9d055e229f30dbdbaef1eaad387b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 546 zcmV+-0^R+IP)EX>4Tx04R}tkv&MmKpe$i(@Iq;B6bjQ2vVKwq9Ts93Pq?8YK2xEOfLO`CJjl7 zi=*ILaPVWX>fqw6tAnc`2!4P#J2)x2NQwVT3N2ziIPS;0dyl(!fKV?p%?iW-O}EWd zA}(gKt77mK0rX%1qY!0g8FP}9M91-U44LCuqO|IySV+-+yn}z(^-JVZ$W;O( z#{w$QAiI9>Klt6Pm7kjQl0tEy>&0~1(5N}i_p#$NP5}QiaHY5Wl{zr{NqViN zMUH^}ZQ$a%r73&B plain + \ctfooterleftpagenumber% +]{% > srcheadings + \ctfooterleftpagenumber% + \hspace*{0.75cm}% + %\headmark% +} +\cefoot{} +\refoot{} +\lofoot{} +\cofoot{} +\rofoot[% > plain + \ctfooterrightpagenumber% +]{% > srcheadings + %\headmark% + \hspace*{0.75cm}% + \ctfooterrightpagenumber% +} diff --git a/sty/lamme2024.sty b/sty/lamme2024.sty index b865a8e..b71fe23 100644 --- a/sty/lamme2024.sty +++ b/sty/lamme2024.sty @@ -1,4 +1,4 @@ - +\RequirePackage{lettrine} % Font \usepackage{fontspec} @@ -137,122 +137,7 @@ \fi } - \usepackage{scrhack} -% From S. Ivanov hdr preamble -\iffalse -\titleformat{\chapter}[frame] -{\itshape\color{primary}} -{\filright - \normalsize - \enspace Chapter \thechapter\enspace} -{10mm} -{\fontsize{35}{20}\selectfont\normalfont\bfseries\filright\hspace{1ex}} -\titleformat{\section}{\Large\normalfont\bfseries\color{primary}}{\thesection \hspace{1ex}}{1ex}{} -\titleformat{\subsection}{\large\normalfont\bfseries\color{primary}}{\thesubsection \hspace{1ex}}{1ex}{} -\titleformat{\subsubsection}{\normalsize\normalfont\bfseries\color{primary}}{}{1ex}{} +\usepackage{scrhack} -\newcommand{\changelocaltocdepth}[1]{% - \addtocontents{toc}{\protect\setcounter{tocdepth}{#1}}% - \setcounter{tocdepth}{#1}% -} -\fi - -% - -% \usepackage{sty/cleanthesis-extracts} - -\RequirePackage[manualmark]{scrlayer-scrpage} -\renewcommand*\chaptermark[1]{% - \markboth{\Ifnumbered{chapter}{\chaptermarkformat}{}}{#1}% <- outdated macro replaced -} -\AfterTOCHead[toc]{\markboth{}{\contentsname}} - -\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% -} +\usepackage{sty/cleanthesis-footer} +\usepackage{sty/scr-legrand-heading} diff --git a/sty/scr-legrand-heading.sty b/sty/scr-legrand-heading.sty new file mode 100644 index 0000000..0bd4100 --- /dev/null +++ b/sty/scr-legrand-heading.sty @@ -0,0 +1,7 @@ +\colorlet{headingcolor}{black} + +\renewcommand*{\sectionformat}{\llap{\textcolor{headingcolor}{\thesection}\hspace{1em}}} + +\renewcommand*{\chapterformat}{\llap{\textcolor{headingcolor}{\thechapter}\hspace{1em}}} + +\renewcommand*{\subsectionformat}{\llap{\textcolor{headingcolor}{\thesubsection}\hspace{1em}}}