diff --git a/format/WZLTemplate.cls b/format/WZLTemplate.cls index f04edcbca0949c9e6500f84eda0c9a35361d62ba..4a87fddde725b2dcf6c76885ed80a21ff2294c94 100644 --- a/format/WZLTemplate.cls +++ b/format/WZLTemplate.cls @@ -131,7 +131,6 @@ \newcommand{\Autoref}[1]{\capitalisewords{\autoref{#1}}} } - %%----PROCESSING OPTIONS---- %% Declare, where language specific documents can be found, such as frontmatter etc. The path corresponds to the short name of the language choosen via the language option. @@ -151,100 +150,12 @@ \ProcessOptions\relax - %%----SET DOCUMENT PROPERTIES---- +\input{format/WZLTemplate_files/SET_DocumentProperties.tex} -% Declares the document as a twosided report document -% The WZL Template is based on the report document template -\LoadClass{extreport} - -% Choose spell check language based on language option -\RequirePackage[\longlang]{babel} - -%% Input encoding (enabling special characters) -\RequirePackage[utf8]{inputenc} - -%% Font encoding (specifically for fonts), makes umlauts (yes this is a real english word) searchable in the final PDF file -\RequirePackage[T1]{fontenc} - -%% Font type: Latin modern -\RequirePackage{lmodern} - -%% Set page geometry -\ifnum\papersize=5 - \RequirePackage[ - % showframe, - a5paper, - left=2cm, - right=2cm, - top=2cm, - bottom=2cm - ] - {geometry} - %% Adjust line spacing - \linespread{1.0} -\else - \RequirePackage[ - % showframe, - a4paper, - left=2.5cm, - right=2.5cm, - top=2.5cm, - bottom=2cm - ] - {geometry} - %% Adjust line spacing - \linespread{1.5} -\fi -%% Header configurations: -%% Odd pages: -%% left chapter name; right page number -%% Even pages: -%% left page number; right section name -%% If no section is defined, the chapter name -%% 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}} -\addtolength{\headheight}{\baselineskip} - -\lhead[\fancyplain{}{\bfseries\thepage}]{\fancyplain{}{\bfseries\nouppercase\leftmark}} -\rhead[\fancyplain{}{\bfseries\nouppercase\rightmark}]{\fancyplain{}{\bfseries\thepage}} - -%% To overwrite plain style evoked by chapter to get headers on pages where chapters start -\RequirePackage{etoolbox} - -% 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} -% 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} -\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} - -%% 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} \usepackage[hang,flushmargin,]{footmisc} %% Remove indentation of footnotes \usepackage{mfirstuc} diff --git a/format/WZLTemplate_files/SET_DocumentProperties.tex b/format/WZLTemplate_files/SET_DocumentProperties.tex new file mode 100644 index 0000000000000000000000000000000000000000..2579e6d2444b7d592e7e25fcc9c0f0bce7439262 --- /dev/null +++ b/format/WZLTemplate_files/SET_DocumentProperties.tex @@ -0,0 +1,95 @@ + +% Declares the document as a twosided report document +% The WZL Template is based on the report document template +\LoadClass{extreport} + +% Choose spell check language based on language option +\RequirePackage[\longlang]{babel} + +%% Input encoding (enabling special characters) +\RequirePackage[utf8]{inputenc} + +%% Font encoding (specifically for fonts), makes umlauts (yes this is a real english word) searchable in the final PDF file +\RequirePackage[T1]{fontenc} + +%% Font type: Latin modern +\RequirePackage{lmodern} + +%% Set page geometry +\ifnum\papersize=5 + \RequirePackage[ + % showframe, + a5paper, + left=2cm, + right=2cm, + top=2cm, + bottom=2cm + ] + {geometry} + %% Adjust line spacing + \linespread{1.0} +\else + \RequirePackage[ + % showframe, + a4paper, + left=2.5cm, + right=2.5cm, + top=2.5cm, + bottom=2cm + ] + {geometry} + %% Adjust line spacing + \linespread{1.5} +\fi + + +%% Header configurations: +%% Odd pages: +%% left chapter name; right page number +%% Even pages: +%% left page number; right section name +%% If no section is defined, the chapter name +%% 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}} +\addtolength{\headheight}{\baselineskip} + +\lhead[\fancyplain{}{\bfseries\thepage}]{\fancyplain{}{\bfseries\nouppercase\leftmark}} +\rhead[\fancyplain{}{\bfseries\nouppercase\rightmark}]{\fancyplain{}{\bfseries\thepage}} + +%% To overwrite plain style evoked by chapter to get headers on pages where chapters start +\RequirePackage{etoolbox} + + + + + +% 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} +% 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} +\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} + +%% 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} \ No newline at end of file diff --git a/format/WZLTemplate_files/SET_UsefulPackages.tex b/format/WZLTemplate_files/SET_UsefulPackages.tex new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391