Skip to content
Snippets Groups Projects
Commit ca548212 authored by Tobias Hamann's avatar Tobias Hamann
Browse files

Template working and complete. Now we need some cleanup

parent 7007f64f
Branches
No related tags found
1 merge request!3Cleanup, merge different versions, magic
......@@ -101,13 +101,13 @@
%% 'sans' option
\DeclareOption{sans}{
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\familydefault}{\sfdefault}
}
%% 'de' option
\DeclareOption{de}{
\newcommand{\longlang}{ngerman}
\newcommand{\shortlang}{de}
\newcommand{\longlang}{ngerman}
\newcommand{\shortlang}{de}
\newcommand{\tmpacronymname}{Abkürzungsverzeichnis}
\newcommand{\tmpreferencename}{Literaturverzeichnis}
\newcommand{\tmpsymbolname}{Symbolverzeichnis}
......@@ -119,8 +119,8 @@
%% 'en' option
\DeclareOption{en}{
\newcommand{\longlang}{english}
\newcommand{\shortlang}{en}
\newcommand{\longlang}{english}
\newcommand{\shortlang}{en}
\newcommand{\tmpacronymname}{Table of Acronyms}
\newcommand{\tmpreferencename}{References}
\newcommand{\tmpsymbolname}{List of Symbols}
......@@ -149,7 +149,7 @@
\DeclareOption{a4paper}{\def\papersize{4}}
%% Pass all unrecognized options to the base class
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{extreport}}
% Process all given options
\ProcessOptions\relax
......@@ -160,7 +160,7 @@
% Declares the document as a twosided report document
% The WZL Template is based on the report document template
\LoadClass[twoside]{report}
\LoadClass{extreport}
% Choose spell check language based on language option
\RequirePackage[\longlang]{babel}
......@@ -182,7 +182,7 @@
left=2cm,
right=2cm,
top=2cm,
bottom=2cm
bottom=2cm
]
{geometry}
\else
......@@ -192,9 +192,9 @@
left=2.5cm,
right=2.5cm,
top=2.5cm,
bottom=2cm
]
{geometry}
bottom=2cm
]
{geometry}
\fi
\RequirePackage{xcolor}
......@@ -206,6 +206,7 @@
\RequirePackage[intlimits]{amsmath}
\RequirePackage{amsfonts}
\RequirePackage{amssymb}
\RequirePackage{enumitem}
%% Enable bold font within math environments
\RequirePackage{bm}
......@@ -214,7 +215,8 @@
\RequirePackage{enumerate}
%% Adjust line spacing
\linespread{1.5}
% TODO: \linespread{1.5}
\linespread{1.0} %% Adjust line spacing
%% Header configurations:
%% Odd pages:
......@@ -225,6 +227,7 @@
%% is placed on even pages as well with markboth{}
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\fancyheadinit{\normalsize\color{\chaptercolor}}
\fancyhf{}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter\ #1}{\thechapter\ #1}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
......@@ -235,92 +238,88 @@
%% To overwrite plain style evoked by chapter to get headers on pages where chapters start
\RequirePackage{etoolbox}
\patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{}
% TODO: \patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{}
\fancypagestyle{plain}{%
\renewcommand{\headrulewidth}{0pt}%
\fancyhf{}%
\fancyhead[L]{\thepage}%
}
%% Adjust spacings and formats of titles, sections, etc:
%% \titlespacing*{<command>}{<left>}{<before>}{<after>}[<right>]
\RequirePackage[bf]{titlesec}
\titlespacing*{\chapter}{0pt}{-30pt}{0pt}
% TODO: \titlespacing*{\chapter}{0pt}{-30pt}{0pt}
\titlespacing*{\chapter}{0pt}{-20pt}{10pt}
\titlespacing*{\section}{0pt}{11pt}{0pt}
\titlespacing*{\subsection}{0pt}{6pt}{0pt}
\titleformat{\paragraph}{\normalfont\normalsize\bfseries}{\theparagraph}{0em}{}
\titlespacing*{\paragraph}{0pt}{11pt}{0pt}
\titleformat{\chapter}{\normalfont\huge\bfseries\raggedright}{\thechapter}{1em}{}
\newcommand\HUGEE{\@setfontsize\Huge{40}{40}}
\titleformat{\chapter}[display]{
\HUGEE\bfseries}{
\raggedleft\vspace{-3cm}\colorbox{\chaptercolor}{\color{white}\rule[-0.2\baselineskip]{0pt}{3\baselineskip}\hspace{5pt}\thechapter\hspace{5pt}}}{20pt}{\Huge}
%% Avoid inserting blank pages for making sure that a new chapter starts on an odd page
\renewcommand{\cleardoublepage}{\clearpage}
%% TODO: Avoid inserting blank pages for making sure that a new chapter starts on an odd page
% \renewcommand{\cleardoublepage}{\clearpage}
%% Set distance after paragraph
\setlength{\parskip}{8pt}
%% Remove indentation of footnotes
\usepackage[
hang,
flushmargin,
]{footmisc}
\usepackage[hang,flushmargin,]{footmisc} %% Remove indentation of footnotes
\usepackage{mfirstuc}
\RequirePackage[titles]{tocloft} % Placement of table of contents, list of figures and list of tables
\cftsetindents{figure}{0em}{3.5em}
\cftsetindents{table}{0em}{3.5em}
\setlength{\cftsecnumwidth}{3em}
\setlength{\cftsubsecnumwidth}{4em}
\setlength{\cftsubsubsecnumwidth}{4em}
\setlength{\cftbeforechapskip}{3pt}
\setlength{\cftbeforesecskip}{3pt}
\setlength{\cftbeforesubsubsecskip}{2pt}
%% Make links, cites, toc, etc. clickable
%% Adjust colors if desired
\RequirePackage[colorlinks=false,
linkcolor=black,
citecolor=black
]{hyperref}\RequirePackage{hyperref}
\renewcommand{\theHchapter}{\arabic{chapter}\thechapter}
%% Add acronyms
%TODO comment nolist
\RequirePackage[
printonlyused,
withpage,
% smaller,
% nohyperlinks,
% nolist
]{acronym}
%%----IMPORT USEFULL PACKAGES----
%% Required for including any kind of graphical images
\usepackage[
automake=immediate,
symbols,
section=chapter,
]
{glossaries-extra}
% Define a custom dotfill for glossaries
\def\Dotfill{\leavevmode\xleaders\hbox to .8em{\hss.\hss}\hfill\kern0pt}
\makeglossaries
\input{format/symbols}
\RequirePackage{graphicx}
\renewcommand{\textfraction}{0.10}
\renewcommand{\floatpagefraction}{0.90}
%% For absolute placement of figures and creation of vector graphics
\RequirePackage{tikz}
\usetikzlibrary{calc}
% TODO \RequirePackage{ulem} Probleme ohne [normalem]
%% Strict placement of figures, tables, etc. referring to the tex source code
%% Usage: \begin{figure}[H]
\RequirePackage{float}
\RequirePackage{wrapfig}
%% Alternative style of tables
\RequirePackage{booktabs}
\RequirePackage{tabularray}
%% Advanced table package for use-defined width definitions
\RequirePackage{tabularx}
%% Defines a \FloatBarrier command, beyond which floats may not pass; useful, for example, to ensure all floats for a section appear before the next \section command.
\RequirePackage[section]{placeins}
%% Placing captions within figure or table environments
%% Usage: \caption{Place your caption here.}
\RequirePackage{caption}
\RequirePackage{subcaption}
% Setting up cations for figures
\captionsetup[figure]{
labelfont=bf,
justification=raggedright,
singlelinecheck=false
labelfont=bf,
% TODO justification=raggedright,
justification=justified,
singlelinecheck=false
}
%TODO
%TODO \captionsetup[table]{labelfont=bf}
% Setting up cations for tables
\captionsetup[table]{
labelfont=bf,
......@@ -345,6 +344,13 @@ citecolor=black
\usepackage{blindtext}
%% TODO ----SET UP Unused packages----
%% Remove indentation of footnotes
\usepackage[
hang,
flushmargin,
]{footmisc}
%%----SET UP CUSTOM COLORS----
......@@ -353,27 +359,24 @@ citecolor=black
%%----SET UP TODO COMMANDS----
%% Use \todo{} for inline-todo notes
\RequirePackage[textwidth=20mm]{todonotes}
% \RequirePackage{regexpatch} % PROBLEM
\RequirePackage[color=RWTHBlau25]{todonotes} %% Use \todo{} for inline-todo notes
\RequirePackage{regexpatch}
\makeatletter
%\regexpatchcmd{\@todo}{\setkeys{todonotes}{#1}}{\setkeys{todonotes}{inline,#1}}{}{} % PROBLEM
\xpatchcmd{\@todo}{\setkeys{todonotes}{#1}}{\setkeys{todonotes}{inline,#1}}{}{}
\makeatother
%%----SET UP TABLE OF CONTENTS----
%% Placement of table of contents, list of figures and list of tables
\RequirePackage[titles]{tocloft}
\renewcommand{\cfttoctitlefont}{}
%% Style for tableofcontents
\setlength{\cftbeforesecskip}{5pt}
\makeatletter
% \pretocmd{\l@subsubsection}{\vspace{5pt}}{}{} % Increase space after subsubsections
\makeatother
%%----SET UP BIBLIOGRAPHY----
%% bibliography for defining macros in .tex-documents
%% processing backend: bibtex
%% processing backend: biber
%% further explanations: https://tex.stackexchange.com/a/299286
\RequirePackage[
backend=biber,
......@@ -391,33 +394,39 @@ citecolor=black
%% WZL citation style: 4 capital letters & short year
\DeclareLabelalphaTemplate{
\labelelement{
\field[final]{shorthand}
\field{label}
\field[strwidth=4,strside=left,uppercase=true]{labelname}
}
\labelelement{
\field[strwidth=2,strside=right]{year}
}
\labelelement{
\field[final]{shorthand}
\field{label}
\field[strwidth=4,strside=left,uppercase=true]{labelname}
}
\labelelement{
\field[strwidth=2,strside=right]{year}
}
}
\setlength{\biblabelsep}{2pt}
% \RequirePackage{pdfcomment}
% % Redefine \cite to include tooltips
% \let\oldcite\cite
% \renewcommand{\cite}[1]{
% \pdftooltip{\oldcite{#1}}{\fullcite{#1}}
% % \oldcite{#1}
% }
%% Bibliograph tweak: remove "+"-sign as an abbrevation for et. al
\renewcommand*{\labelalphaothers}{}
\renewcommand*{\labelalphaothers}{}
%% Avoid overfull hbox in bibliography
\emergencystretch=1em
\emergencystretch=1em
%% No identation when a new paragraph starts
\setlength{\parindent}{0pt}
%% Sans serif font (comparable with Arial)
%\renewcommand{\familydefault}{\sfdefault}
%% @deprecated (reason=idx files not used)
% \makeindex
\setlength{\parindent}{0pt}
\setlength{\skip\footins}{1cm} % footnote margin
\renewcommand{\footnoterule}
{{\color{\chaptercolor}
\noindent\rule[3pt]{\textwidth}{0.4pt}
}
}
%%----SET UP TABLE OF CONTENTS----
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment