Replace titlesec and fancyhdr with koma specific settings
This commit is contained in:
parent
461b8cd7cc
commit
f4868fbbb1
1 changed files with 43 additions and 26 deletions
|
@ -3,12 +3,11 @@
|
||||||
% Base packages
|
% Base packages
|
||||||
\usepackage{fontspec}
|
\usepackage{fontspec}
|
||||||
\usepackage{geometry}
|
\usepackage{geometry}
|
||||||
\usepackage{scrlayer-scrpage}
|
\usepackage{scrlayer-scrpage} % Already included, will be used instead of fancyhdr
|
||||||
\usepackage{titlesec}
|
|
||||||
\usepackage{enumitem}
|
\usepackage{enumitem}
|
||||||
\usepackage{caption}
|
\usepackage{caption}
|
||||||
\usepackage{fancyhdr}
|
|
||||||
\usepackage[expansion,protrusion=true]{microtype}
|
\usepackage[expansion,protrusion=true]{microtype}
|
||||||
|
\usepackage{polyglossia}
|
||||||
\usepackage{biblatex}
|
\usepackage{biblatex}
|
||||||
\usepackage{float}
|
\usepackage{float}
|
||||||
\usepackage{xcolor}
|
\usepackage{xcolor}
|
||||||
|
@ -22,14 +21,10 @@
|
||||||
\usepackage{capt-of}
|
\usepackage{capt-of}
|
||||||
\usepackage{hyperref}
|
\usepackage{hyperref}
|
||||||
\usepackage{booktabs}
|
\usepackage{booktabs}
|
||||||
\usepackage{polyglossia}
|
|
||||||
\usepackage{grffile}
|
\usepackage{grffile}
|
||||||
\usepackage{unicode-math}
|
\usepackage{unicode-math}
|
||||||
\usepackage[Export]{adjustbox}
|
\usepackage[Export]{adjustbox}
|
||||||
\usepackage{graphicx} % Added for including images
|
\usepackage{graphicx}
|
||||||
% \addbibresource{yourbibliography.bib}
|
|
||||||
|
|
||||||
\documentclass[a4paper,10pt,captions=tableheading,twoside=false]{scrartcl}
|
|
||||||
|
|
||||||
\setdefaultlanguage{english}
|
\setdefaultlanguage{english}
|
||||||
\setotherlanguages{german}
|
\setotherlanguages{german}
|
||||||
|
@ -48,20 +43,47 @@
|
||||||
% Geometry settings
|
% Geometry settings
|
||||||
\geometry{a4paper, left=2cm, right=2cm, top=2cm, bottom=2cm}
|
\geometry{a4paper, left=2cm, right=2cm, top=2cm, bottom=2cm}
|
||||||
|
|
||||||
% Header and footer settings with fancyhdr
|
% Header and footer settings with scrlayer-scrpage instead of fancyhdr
|
||||||
\pagestyle{fancy}
|
\pagestyle{scrheadings}
|
||||||
\fancyhf{}
|
\clearpairofpagestyles
|
||||||
\fancyhead[L]{\nouppercase{\leftmark}}
|
\automark[section]{section}
|
||||||
\fancyhead[R]{\thepage}
|
\ohead{\pagemark}
|
||||||
|
\ihead{\leftmark}
|
||||||
|
\setkomafont{pageheadfoot}{\normalfont}
|
||||||
|
\setkomafont{pagehead}{\normalfont}
|
||||||
|
|
||||||
% Section formatting with titlesec
|
% Section formatting with KOMA-Script features instead of titlesec
|
||||||
\titleformat{\section}{\Large\bfseries\sffamily}{\thesection}{1em}{}
|
\setkomafont{section}{\Large\bfseries\sffamily}
|
||||||
\titleformat{\subsection}{\large\bfseries\sffamily}{\thesubsection}{1em}{}
|
\setkomafont{subsection}{\large\bfseries\sffamily}
|
||||||
\titleformat{\subsubsection}{\normalsize\bfseries\sffamily}{\thesubsubsection}{1em}{}
|
\setkomafont{subsubsection}{\normalsize\bfseries\sffamily}
|
||||||
|
|
||||||
% List formatting with enumitem
|
\RedeclareSectionCommand[
|
||||||
\setlist[itemize]{noitemsep, topsep=0pt}
|
beforeskip=\baselineskip,
|
||||||
\setlist[enumerate]{noitemsep, topsep=0pt}
|
afterskip=0.5\baselineskip
|
||||||
|
]{section}
|
||||||
|
|
||||||
|
\RedeclareSectionCommand[
|
||||||
|
beforeskip=\baselineskip,
|
||||||
|
afterskip=0.5\baselineskip
|
||||||
|
]{subsection}
|
||||||
|
|
||||||
|
\RedeclareSectionCommand[
|
||||||
|
beforeskip=\baselineskip,
|
||||||
|
afterskip=0.5\baselineskip
|
||||||
|
]{subsubsection}
|
||||||
|
|
||||||
|
% Define the spacing between section number and title
|
||||||
|
\renewcommand{\sectionformat}{%
|
||||||
|
\thesection\hspace{1em}%
|
||||||
|
}
|
||||||
|
|
||||||
|
\renewcommand{\subsectionformat}{%
|
||||||
|
\thesubsection\hspace{1em}%
|
||||||
|
}
|
||||||
|
|
||||||
|
\renewcommand{\subsubsectionformat}{%
|
||||||
|
\thesubsubsection\hspace{1em}%
|
||||||
|
}
|
||||||
|
|
||||||
% Caption settings
|
% Caption settings
|
||||||
\captionsetup{font=small, labelfont=bf}
|
\captionsetup{font=small, labelfont=bf}
|
||||||
|
@ -88,11 +110,6 @@
|
||||||
\end{titlepage}
|
\end{titlepage}
|
||||||
}
|
}
|
||||||
|
|
||||||
% List items
|
|
||||||
\setlist[itemize]{wide=0pt, leftmargin=*, nosep}
|
|
||||||
\setlist[itemize,2]{label=\textbullet}
|
|
||||||
\setlist[itemize,3]{label=$\circ$}
|
|
||||||
|
|
||||||
% Global listing settings
|
% Global listing settings
|
||||||
\lstset{
|
\lstset{
|
||||||
basicstyle={\ttfamily\color[rgb]{0.30, 0.34, 0.42}},
|
basicstyle={\ttfamily\color[rgb]{0.30, 0.34, 0.42}},
|
||||||
|
@ -112,4 +129,4 @@
|
||||||
breakatwhitespace=false,
|
breakatwhitespace=false,
|
||||||
tabsize=2,
|
tabsize=2,
|
||||||
columns=fullflexible
|
columns=fullflexible
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue