Better LaTeX setup
This commit is contained in:
106
config_extra.tex
106
config_extra.tex
@@ -17,6 +17,9 @@
|
||||
\RequirePackage{setspace}
|
||||
\onehalfspacing
|
||||
|
||||
\usepackage{tocloft}
|
||||
\setlength{\cftfignumwidth}{2.5em} % Adjust this value as needed
|
||||
|
||||
\usepackage{booktabs}
|
||||
\usepackage{multirow}
|
||||
\usepackage{tabularx}
|
||||
@@ -28,50 +31,12 @@
|
||||
\widowpenalty = 10000
|
||||
\displaywidowpenalty = 10000
|
||||
|
||||
\usepackage{scrlayer-scrpage}
|
||||
|
||||
\pagestyle{scrheadings}
|
||||
|
||||
\renewcommand{\partformat}{\huge\partname~\thepart\autodot}
|
||||
\renewcommand{\raggedpart}{\flushleft}
|
||||
|
||||
\setkomafont{part}{\normalfont\huge\scshape}
|
||||
|
||||
\setkomafont{sectioning}{\normalfont\scshape}
|
||||
\setkomafont{descriptionlabel}{\normalfont\bfseries}
|
||||
|
||||
\setkomafont{caption}{\small}
|
||||
\setkomafont{captionlabel}{\usekomafont{caption}}
|
||||
|
||||
\setcounter{secnumdepth}{\subsubsectionnumdepth}
|
||||
|
||||
\makeatletter
|
||||
\renewcommand*{\chapterformat}{ \mbox{\chapappifchapterprefix{\nobreakspace}{\color{BrickRed}\fontsize{40}{45}\selectfont\thechapter}\autodot\enskip}}
|
||||
% Section with color
|
||||
% \renewcommand\@seccntformat[1]{\color{BrickRed} {\csname the#1\endcsname}\hspace{0.3em}}
|
||||
\renewcommand\@seccntformat[1]{{\csname the#1\endcsname}\hspace{0.3em}}
|
||||
\makeatother
|
||||
|
||||
\renewcommand{\floatpagefraction}{.8}%
|
||||
|
||||
\usepackage{etoolbox}
|
||||
|
||||
\pretocmd{\section}{\clearpage}{}{}
|
||||
|
||||
\usepackage[ %
|
||||
colorlinks=true, %
|
||||
citecolor=BrickRed, %
|
||||
linkcolor=BrickRed, %
|
||||
urlcolor=BrickRed, %
|
||||
unicode %
|
||||
]{hyperref}
|
||||
|
||||
\usepackage{hypcap}
|
||||
|
||||
\usepackage{bookmark}
|
||||
|
||||
\bookmarksetup{depth=2}
|
||||
|
||||
\makeatletter
|
||||
\preto\Gin@extensions{png,}
|
||||
\DeclareGraphicsRule{.png}{pdf}{.pdf}{\noexpand\Gin@base.pdf}
|
||||
@@ -198,6 +163,9 @@
|
||||
|
||||
\AtEndEnvironment{listing}{\vspace{-16pt}}
|
||||
|
||||
\let\OldTexttt\texttt
|
||||
\renewcommand{\texttt}[1]{{\ttfamily\hl{\mbox{\,#1\,}}}}
|
||||
|
||||
\usepackage{scrhack}
|
||||
|
||||
\usepackage{float}
|
||||
@@ -207,5 +175,67 @@
|
||||
\usepackage{soul}
|
||||
\sethlcolor{my-pale-grey}
|
||||
|
||||
% \usepackage[headsepline]{scrlayer-scrpage}
|
||||
% \pagestyle{scrheadings}
|
||||
|
||||
\usepackage[autooneside=false,headsepline]{scrlayer-scrpage}
|
||||
% \pagestyle{scrheadings}
|
||||
% \automark[section]{chapter}
|
||||
|
||||
% Clear default header styles
|
||||
\clearpairofpagestyles
|
||||
\automark[section]{chapter}
|
||||
|
||||
% Set the header content
|
||||
\ihead{\headmark} % Chapter (or section on even pages) aligned to the left
|
||||
\ohead{\pagemark} % Page number aligned to the right
|
||||
|
||||
% Enable the page style
|
||||
\pagestyle{scrheadings}
|
||||
|
||||
\setkomafont{headsepline}{\color{black}} % Change color if desired
|
||||
\ModifyLayer[addvoffset=\dp\strutbox]{headsepline} % Fine-tune position
|
||||
|
||||
% \automark{section}
|
||||
% \renewhead*{headings}{
|
||||
% \ifstr{\headmark}{}{}{%
|
||||
% \headmark\hfill
|
||||
% }
|
||||
% }
|
||||
|
||||
\renewcommand{\partformat}{\huge\partname~\thepart\autodot}
|
||||
\renewcommand{\raggedpart}{\flushleft}
|
||||
|
||||
\setkomafont{part}{\normalfont\huge\scshape}
|
||||
|
||||
\setkomafont{sectioning}{\normalfont\scshape}
|
||||
\setkomafont{descriptionlabel}{\normalfont\bfseries}
|
||||
|
||||
\setkomafont{caption}{\small}
|
||||
\setkomafont{captionlabel}{\usekomafont{caption}}
|
||||
|
||||
\setcounter{secnumdepth}{\subsubsectionnumdepth}
|
||||
|
||||
\makeatletter
|
||||
\renewcommand*{\chapterformat}{ \mbox{\chapappifchapterprefix{\nobreakspace}{\color{BrickRed}\fontsize{40}{45}\selectfont\thechapter}\autodot\enskip}}
|
||||
% Section with color
|
||||
% \renewcommand\@seccntformat[1]{\color{BrickRed} {\csname the#1\endcsname}\hspace{0.3em}}
|
||||
\renewcommand\@seccntformat[1]{{\csname the#1\endcsname}\hspace{0.3em}}
|
||||
\makeatother
|
||||
|
||||
\usepackage[ %
|
||||
colorlinks=true, %
|
||||
citecolor=BrickRed, %
|
||||
linkcolor=BrickRed, %
|
||||
urlcolor=BrickRed, %
|
||||
unicode %
|
||||
]{hyperref}
|
||||
|
||||
\usepackage{hypcap}
|
||||
|
||||
\usepackage{bookmark}
|
||||
|
||||
\bookmarksetup{depth=2}
|
||||
|
||||
\makeindex
|
||||
\makeglossaries
|
||||
|
Reference in New Issue
Block a user