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