Use cleanthesis pretty page numbering
This commit is contained in:
parent
1bcb211e40
commit
e28102591d
|
@ -2,7 +2,7 @@
|
|||
#+author: Samuel Ortion
|
||||
#+date: 2023-2024
|
||||
#+LATEX_CLASS: lamme2024
|
||||
#+LATEX_CLASS_OPTIONS: [twoside=false]
|
||||
#+LATEX_CLASS_OPTIONS: [twoside=true]
|
||||
#+LATEX_HEADER: \usepackage{sty/lamme2024}
|
||||
|
||||
#+bibliography: references.bib
|
||||
|
@ -227,3 +227,4 @@ Principle: construct vertex communities based on where an agent would get stuck
|
|||
# Local Variables:
|
||||
# eval: (progn (org-babel-goto-named-src-block "startup") (org-babel-execute-src-block) (outline-hide-sublevels 1))
|
||||
# End:
|
||||
*
|
||||
|
|
BIN
report.pdf (Stored with Git LFS)
BIN
report.pdf (Stored with Git LFS)
Binary file not shown.
|
@ -6,6 +6,9 @@ Let's say I want this emacs-lisp code to be run at startup when I open my org fi
|
|||
(setq lamme2024 "org powered")
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: org powered
|
||||
|
||||
To do so, add the following somewhere in your =report.org= file:
|
||||
#+begin_src org
|
||||
#+name: startup
|
||||
|
@ -50,7 +53,7 @@ See: [[https://emacs.stackexchange.com/a/41456/41374]]
|
|||
|
||||
* Add latex: link for custom latex macro text wrapping
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(org-add-link-type
|
||||
"latex" nil
|
||||
(lambda (path desc format)
|
||||
|
@ -61,6 +64,9 @@ See: [[https://emacs.stackexchange.com/a/41456/41374]]
|
|||
(format "\\%s{%s}" path desc)))))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: Created latex link.
|
||||
|
||||
#+begin_src emacs-lisp :tangle yes
|
||||
(org-add-link-type
|
||||
"latex" nil
|
||||
|
|
|
@ -14,6 +14,16 @@
|
|||
\RequirePackage{subcaption}
|
||||
\RequirePackage{csquotes}
|
||||
\RequirePackage[english]{babel}
|
||||
%% Caption
|
||||
\captionsetup{
|
||||
labelfont={color=black, bf},
|
||||
figurename=Figure,
|
||||
tablename=Table,
|
||||
font={sf},
|
||||
labelsep=period,
|
||||
justification=raggedright,
|
||||
singlelinecheck=false
|
||||
}
|
||||
|
||||
% Colors
|
||||
\RequirePackage{xcolor}
|
||||
|
@ -134,19 +144,104 @@
|
|||
\addtocontents{toc}{\protect\setcounter{tocdepth}{#1}}%
|
||||
\setcounter{tocdepth}{#1}%
|
||||
}
|
||||
% Adapted to KOMA-Script (and to my preferences):
|
||||
\renewcommand*{\sectionformat}{\thesection\filright\hspace{1ex}}
|
||||
\addtokomafont{subsection}{\color{primary}}
|
||||
\fi
|
||||
|
||||
\usepackage{titlesec}
|
||||
\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{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%
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue