Commit c86f66ba authored by Lukas Janek Körfer's avatar Lukas Janek Körfer
Browse files

Added wzl-thesis.sty

parent 3114ac43
\ProvidesPackage{wzl-thesis}[2018/09/21]
% Encoding
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
% Geometry
\RequirePackage{geometry}
\geometry{
paper=a4paper,
left=25mm,
right=25mm,
top=25mm,
bottom=20mm
}
% Font
\RequirePackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\RequirePackage{setspace}
\setstretch{1.3}
% Language
\RequirePackage[ngerman]{babel}
\RequirePackage{lmodern}
% Captions
\RequirePackage{caption}
\captionsetup{
justification=raggedright,
singlelinecheck=false,
font={small,bf}
}
% Referencing
\RequirePackage{url}
\RequirePackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=black,
citecolor=black,
urlcolor=blue,
hypertexnames=false
}
% Segments
% Define frontmatter segment
\newcommand{\frontmatter}{
\clearpage
\pagestyle{meta}
\setcounter{page}{0}
\pagenumbering{roman}
\setcounter{chapter}{0}
\renewcommand{\thechapter}{\Roman{chapter}}
}
% Define mainmatter segment
\newcommand{\mainmatter}{
\clearpage
\pagestyle{content}
\setcounter{page}{0}
\pagenumbering{arabic}
\newcounter{metachapter}
\setcounter{metachapter}{\value{chapter}}
\setcounter{chapter}{0}
\renewcommand{\thechapter}{\arabic{chapter}}
}
% Define backmatter segment
\newcommand{\backmatter}{
\clearpage
\pagestyle{meta}
\setcounter{chapter}{\value{metachapter}}
\renewcommand{\thechapter}{\Roman{chapter}}
}
% Headers
\RequirePackage{etoolbox}
\RequirePackage{fancyhdr}
% Patch chapter definition
\patchcmd{\chapter}{\thispagestyle{plain}}{}{}{}
% Add header line
\renewcommand{\headrulewidth}{1pt}
% Define header for meta segments
\fancypagestyle{meta}{
\fancyhf{}
\fancyhead[OL,ER]{\thechapter}
\fancyhead[OR,EL]{\thepage}
}
% Define header for content segments
\fancypagestyle{content}{
\fancyhf{}
\fancyhead[OL,ER]{\thepage}
\fancyhead[OR]{}
\fancyhead[EL]{}
}
% TOCs
\RequirePackage{tocbibind}
\RequirePackage[titles]{tocloft}
% Add TOCs into table of contents
\renewcommand\tableofcontents{
\chapter{\contentsname}
\@mkboth{\MakeUppercase\contentsname}
{\MakeUppercase\contentsname}
\@starttoc{toc}
}
\renewcommand\listoffigures{
\chapter{\listfigurename}
\@mkboth{\MakeUppercase\listfigurename}
{\MakeUppercase\listfigurename}
\@starttoc{lof}
}
\renewcommand\listoftables{
\chapter{\listtablename}
\@mkboth{\MakeUppercase\listtablename}
{\MakeUppercase\listtablename}
\@starttoc{lot}
}
% Table of contents
\renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}
% List of figures
\setlength{\cftfigindent}{0pt}
\renewcommand{\cftfigpresnum}{\figurename\enspace}
\renewcommand{\cftfigaftersnum}{:\enspace}
\newlength{\figlen}
\settowidth{\figlen}{\bfseries\cftfigpresnum\cftfigaftersnum}
\addtolength{\cftfignumwidth}{\figlen}
% List of tables
\setlength{\cfttabindent}{0pt}
\renewcommand{\cfttabpresnum}{\tablename\enspace}
\renewcommand{\cfttabaftersnum}{:\enspace}
\newlength{\tablen}
\settowidth{\tablen}{\cfttabpresnum\cfttabaftersnum}
\addtolength{\cfttabnumwidth}{\tablen}
% Titles
\RequirePackage{titlesec}
% Chapter title
\titleformat{\chapter}[hang]
{\normalfont\LARGE\bfseries}
{\thechapter}{1cm}{}
\titlespacing*{\chapter}{0pt}{-22pt}{8pt}
% Section title
\titleformat{\section}[hang]
{\normalfont\Large\bfseries}
{\thesection}{1cm}{}
\titlespacing*{\section}{0pt}{18pt}{8pt}
% Subsection title
\titleformat{\subsection}[hang]
{\normalfont\large\bfseries}
{\thesubsection}{1.5cm}{}
\titlespacing*{\subsection}{0pt}{16pt}{6pt}
\endinput
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment