Skip to content

Instantly share code, notes, and snippets.

@hetsch
Created January 2, 2016 13:28
Show Gist options
  • Save hetsch/74b1e19c45970f4be5f0 to your computer and use it in GitHub Desktop.
Save hetsch/74b1e19c45970f4be5f0 to your computer and use it in GitHub Desktop.
Chapter Formatting
\KOMAoption{chapterprefix}{true}
\renewcommand*\raggedchapter{\centering}
\RedeclareSectionCommand[
beforeskip=0pt,
innerskip=-.3\baselineskip,
%afterskip=8\baselineskip,
font=\Huge\sffamily,
prefixfont=\normalfont\large\scshape
]{chapter}
\renewcommand*{\chapterformat}{%
\chapappifchapterprefix{\nobreakspace}\thechapter\autodot%
\IfUsePrefixLine{%
\par\nobreak\vspace*{-\parskip}\vspace*{-.6\baselineskip}%
\rule{0.9\textwidth}{.5pt}%
}{\enskip}%
}
\renewcommand\chapterlineswithprefixformat[3]{%
\ifstr{#2}{}{%
% For unnumbered chapters (aronyms and bibliography): flush chapter titles to the left
\flushleft#2#3%
}{%
% For numbered chapters (introduction, main, conclusion, aso.): make the chapter titles uppercase and add some bottom margin
#2\MakeUppercase{\textls[120]{#3}}%
\vspace*{50pt}%
}%
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment