Awaiting Activation Deleted File  about 8 years ago

Commit id: 24ab45971f9892f26f7d2a92f20b4ac4da253fbd

deletions | additions      

         

%----------------------------------------------------------------------------------------  % Some checks to make things smoother  %----------------------------------------------------------------------------------------  \def\doctypearticle{article}  \def\doctypebook{book}  %----------------------------------------------------------------------------------------  % VARIOUS REQUIRED PACKAGES AND CONFIGURATIONS  %----------------------------------------------------------------------------------------  \usepackage[top=2.5cm,bottom=2.5cm,left=2.5cm,right=2.5cm,headsep=16pt,a4paper]{geometry} % Page margins  \usepackage{graphicx} % Required for including pictures  %\graphicspath{{./img/}} % Specifies the directory where pictures are stored  \usepackage{tikz} % Required for drawing custom shapes  \usepackage[utf8]{inputenc} % Required for including letters with accents  \usepackage{csquotes} % for babel  \usepackage[english]{babel} % English language/hyphenation  \usepackage{enumitem} % Customize lists  \setlist{nolistsep} % Reduce spacing between bullet points and numbered lists  \usepackage{booktabs} % Required for nicer horizontal rules in tables  \usepackage{titlesec} %required to be able to have formatiing in titles  %----------------------------------------------------------------------------------------  % FONTS  %----------------------------------------------------------------------------------------  %\usepackage{avant} % Use the Avantgarde font for headings  \usepackage[scaled=1.05]{helvet}% Helvetica, served as a model for arial  %\usepackage{helvet}% Helvetica, served as a model for arial  %\usepackage{times} % Use the Times font for headings  \usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Sym­bol, Chancery and Com­puter Modern fonts  \usepackage{microtype} % Slightly tweak font spacing for aesthetics  \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs  \usepackage{amsmath,amsfonts,amssymb,amsthm} % For math equations, theorems, symbols, etc  %----------------------------------------------------------------------------------------  % BIBLIOGRAPHY AND INDEX  %----------------------------------------------------------------------------------------  \usepackage[style=alphabetic,citestyle=numeric,sorting=nyt,sortcites=true,autopunct=true,autolang=hyphen,abbreviate=false,backend=biber]{biblatex}  \addbibresource{MILabsbib.bib} % BibTeX bibliography file  \defbibheading{bibempty}{}  \usepackage{calc} % For simpler calculation - used for spacing the index letter headings correctly  \usepackage{makeidx} % Required to make an index  \makeindex % Tells LaTeX to create the files required for indexing  %----------------------------------------------------------------------------------------  % MAIN TABLE OF CONTENTS  %----------------------------------------------------------------------------------------  \usepackage{titletoc} % Required for manipulating the table of contents  \contentsmargin{0cm} % Removes the default margin  %\renewcommand{\contentsname}{Whatever} %title of Table of Contents  % Part text styling  \titlecontents{part}[0cm]  {\addvspace{20pt}\centering\large\bfseries}  {}  {}  {}  \ifWI  %no chapters in Workinfo Docs  \else  % Chapter text styling  \titlecontents{chapter}[1.25cm] % Indentation  {\addvspace{12pt}\large\sffamily\bfseries} % Spacing and font options for chapters  {\color{chaptertoc!60}\contentslabel[\Large\thecontentslabel]{1.25cm}\color{chaptertoc}} % Chapter number  {\color{chaptertoc}}   {\color{chaptertoc!60}\normalsize\;\titlerule*[.5pc]{.}\;\thecontentspage} % Page number  \fi  \titlecontents{section}[1.25cm] % Indentation  {\addvspace{3pt}\sffamily\bfseries} % Spacing and font options for sections  {\color{sectiontoc}\contentslabel[\thecontentslabel]{1.25cm}} % Section number  {}  {\color{sectiontoc}\hfill\thecontentspage} % Page number  []  % Subsection text styling  \titlecontents{subsection}[1.25cm] % Indentation  {\addvspace{1pt}\sffamily\small} % Spacing and font options for subsections  {\color{sectiontoc}\contentslabel[\thecontentslabel]{1.25cm}} % Subsection number  {}  {\ \color{sectiontoc}\titlerule*[.5pc]{.}\;\thecontentspage} % Page number  []  % Subsubsection text styling  \titlecontents{subsubsection}[1.75cm] % Indentation  {\addvspace{1pt}\sffamily\small} % Spacing and font options for subsubsections  {\color{sectiontoc!75}\contentslabel[]{1.25cm}} % Subsubsection title without number  {}  {}%{\ \color{sectiontoc!60}\titlerule*[.5pc]{.}\;\thecontentspage} % Page number  []  % List of figures  \titlecontents{figure}[0em]  {\addvspace{-5pt}\sffamily}  {\thecontentslabel\hspace*{1em}}  {}  {\ \titlerule*[.5pc]{.}\;\thecontentspage}  []  % List of tables  \titlecontents{table}[0em]  {\addvspace{-5pt}\sffamily}  {\thecontentslabel\hspace*{1em}}  {}  {\ \titlerule*[.5pc]{.}\;\thecontentspage}  []  %----------------------------------------------------------------------------------------  % MINI TABLE OF CONTENTS IN PART HEADS  %----------------------------------------------------------------------------------------  \ifWI  %no chapters in Workinfo Docs  \else  % Chapter text styling  \titlecontents{lchapter}[0em] % Indenting  {\addvspace{15pt}\large\sffamily\bfseries} % Spacing and font options for chapters  {\color{chaptertoc}\contentslabel[\Large\thecontentslabel]{1.25cm}\color{chaptertoc}} % Chapter number  {}   {\color{chaptertoc}\normalsize\sffamily\bfseries\;\titlerule*[.5pc]{.}\;\thecontentspage} % Page number  \fi  % Section text styling  \titlecontents{lsection}[0em] % Indenting  {\color{sectiontoc}\sffamily\small} % Spacing and font options for sections  {\color{sectiontoc}\contentslabel[\thecontentslabel]{1.25cm}} % Section number  {}  {}  % Subsection text styling  \titlecontents{lsubsection}[.5em] % Indentation  {\color{sectiontoc}\sffamily\footnotesize\sffamily} % Font settings  {}  {}  {}  %----------------------------------------------------------------------------------------  % PAGE HEADERS  %----------------------------------------------------------------------------------------  \usepackage{fancyhdr} % Required for header and footer configuration  \usepackage{lastpage}  \pagestyle{fancy}  \ifWI  \fancyhf{} \fancyfoot[L]{\sffamily\normalsize\color{footercolor} Page~\thepage~of~\pageref{LastPage}} % Font setting for the page number in the footer  %\renewcommand{\sectionmark}[1]{\markright{\color{MILOrange}\sffamily\normalsize\thesection\hspace{5pt}{\color{MILBlue}\ #1}}{}} % Section text font settings  \fancyhead[L]{\vspace{-1cm} \includegraphics[width=5.5cm]{MILabslogo}} %   \fancyhead[R]{\sffamily\normalsize\color{headercolor} \vspace{-1cm} \WItile \\ \WInumber \\ \WIdate} % Print on the right side  \else  \fancyhf{} \fancyhead[LE,RO]{\sffamily\normalsize\color{headercolor}\thepage} % Font setting for the page number in the header  \renewcommand{\sectionmark}[1]{\markright{\color{headernr}\sffamily\normalsize\thesection\hspace{5pt}{\color{headertxt}\ #1}}{}} % Section text font settings  \renewcommand{\chaptermark}[1]{\markboth{\color{headernr}\sffamily\normalsize\bfseries\chaptername\ \thechapter.{\color{headertxt}\ #1}}{}} % Chapter text font settings  \fancyhead[LO]{\vspace{-1cm}\includegraphics[width=4cm]{MILabslogo}\hfill\newline\rightmark} % Print the nearest section name on the left side of odd pages  \fancyhead[RE]{\vspace{-1cm}\hfill\includegraphics[width=4cm]{MILabslogo}\newline\leftmark} % Print the current chapter name on the right side of even pages  \fi  \renewcommand{\headrulewidth}{0pt} % Width of the rule under the header  \addtolength{\headheight}{2.5pt} % Increase the spacing around the header slightly  \renewcommand{\footrulewidth}{0pt} % Removes the rule in the footer  \fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}} % Style for when a plain pagestyle is specified  % Removes the header from odd empty pages at the end of chapters  \makeatletter  \renewcommand{\cleardoublepage}{  \clearpage\ifodd\c@page\else  \hbox{}  \vspace*{\fill}  \thispagestyle{empty}  \newpage  \fi}  %----------------------------------------------------------------------------------------  % Warning Box  %----------------------------------------------------------------------------------------  \usepackage[framemethod=tikz]{mdframed} % Required for creating the theorem, definition, exercise and corollary boxes  \mdfdefinestyle{warnstyle}{  linecolor=red,  backgroundcolor=red!1,  linewidth=2pt,  leftmargin=1cm,  rightmargin=1cm,  innerleftmargin=10pt,  innerrightmargin=10pt,  innertopmargin=10pt,  innerbottommargin=10pt,  roundcorner=10pt}  %----------------------------------------------------------------------------------------  % DEFINITION OF COLORED BOXES  %----------------------------------------------------------------------------------------  %----------------------------------------------------------------------------------------  % REMARK ENVIRONMENT  %----------------------------------------------------------------------------------------  \newenvironment{remark}{\par\color{remarktxt}\vspace{10pt}\small % Vertical white space above the remark and smaller font size  \begin{list}{}{  \leftmargin=35pt % Indentation on the left  \rightmargin=25pt}\item\ignorespaces % Indentation on the right  \makebox[-2.5pt]{\begin{tikzpicture}[overlay]  \node[draw=remarkcolor!60,line width=1pt,circle,fill=remarkcolor!25,font=\sffamily\bfseries,inner sep=2pt,outer sep=0pt] at (-12pt,0pt){\textcolor{remarkcolor}{R}};\end{tikzpicture}} % Orange R in a circle  \advance\baselineskip -1pt}{\end{list}\vskip5pt} % Tighter line spacing and white space after remark  \newenvironment{remnote}{\par\color{notetxt}\vspace{10pt}\small % Vertical white space above the remark and smaller font size  \begin{list}{}{  \leftmargin=35pt % Indentation on the left  \rightmargin=25pt}\item\ignorespaces % Indentation on the right  \makebox[-2.5pt]{\begin{tikzpicture}[overlay]  \node[draw=notecolor!60,line width=1pt,circle,fill=notecolor!25,font=\sffamily\bfseries,inner sep=2pt,outer sep=0pt] at (-12pt,0pt){\textcolor{notecolor}{N}};\end{tikzpicture}} % Blue N in a circle  \advance\baselineskip -1pt}{\end{list}\vskip5pt} % Tighter line spacing and white space after remark  %----------------------------------------------------------------------------------------  % SECTION NUMBERING IN THE MARGIN  %----------------------------------------------------------------------------------------  \makeatletter  \renewcommand{\@seccntformat}[1]{\llap{\textcolor{sectionnr}{\csname the#1\endcsname}\hspace{1em}}}  \ifWI  \renewcommand{\section}{\@startsection{section}{1}{\z@}  {-3ex \@plus 0.1ex \@minus -0.3ex}  {2ex \@plus 3ex \@minus -0.3ex}  {\color{sectiontxt}\normalfont\large\sffamily\bfseries \noindent\underline{\hspace{\textwidth}}\vspace{-2.5ex} }} %underlined  \else  \renewcommand{\section}{\@startsection{section}{1}{\z@}  {-2ex \@plus -1ex \@minus -.4ex}  {1ex \@plus.2ex }  {\color{sectiontxt}\normalfont\large\sffamily\bfseries}}  \fi  \renewcommand{\subsection}{\@startsection {subsection}{2}{\z@}  {-3ex \@plus -0.1ex \@minus -.4ex}  {0.5ex \@plus.2ex }  {\color{sectiontxt}\normalfont\sffamily\bfseries}}  \renewcommand{\subsubsection}{\@startsection {subsubsection}{3}{\z@}  {-2ex \@plus -0.1ex \@minus -.2ex}  {.2ex \@plus.2ex }  {\color{sectiontxt}\normalfont\small\sffamily\bfseries}}     \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}  {-2ex \@plus-.2ex \@minus .2ex}  {.1ex}  {\color{sectiontxt}\normalfont\small\sffamily\bfseries}}  %----------------------------------------------------------------------------------------  % PART HEADINGS  %----------------------------------------------------------------------------------------  % numbered part in the table of contents  \newcommand{\@mypartnumtocformat}[2]{%  \setlength\fboxsep{0pt}%  \noindent\colorbox{parttocbg}{\strut\parbox[c][.7cm]{\ecart}{\color{parttocnr}\Large\sffamily\bfseries\centering#1}}\hskip\esp\colorbox{parttocbg}{\color{parttoctitle}\strut\parbox[c][.7cm]{\linewidth-\ecart-\esp}{\Large\sffamily\centering#2}}}%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  % unnumbered part in the table of contents  \newcommand{\@myparttocformat}[1]{%  \setlength\fboxsep{0pt}%  \noindent\colorbox{parttocbg}{\strut\parbox[c][.7cm]{\linewidth}{\Large\sffamily\centering#1}}}%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \newlength\esp  \setlength\esp{4pt}  \newlength\ecart  \setlength\ecart{1.2cm-\esp}  \newcommand{\thepartimage}{}%  \newcommand{\partimage}[1]{\renewcommand{\thepartimage}{#1}}%  \def\@part[#1]#2{%  \ifnum \c@secnumdepth >-2\relax%  \refstepcounter{part}%  \addcontentsline{toc}{part}{\texorpdfstring{\protect\@mypartnumtocformat{\thepart}{#1}}{\partname~\thepart\ ---\ #1}}  \else%  \addcontentsline{toc}{part}{\texorpdfstring{\protect\@myparttocformat{#1}}{#1}}%  \fi%  \startcontents%  \markboth{}{}%  {\thispagestyle{empty}%  \begin{tikzpicture}[remember picture,overlay]%  \node at (current page.north west){  \begin{tikzpicture}[remember picture,overlay]%   \fill[partbg](0cm,0cm) rectangle (\paperwidth,-\paperheight);  \node[anchor=north] at (4cm,-3.25cm){\color{partnr}\fontsize{220}{100}\sffamily\bfseries\@Roman\c@part};  \node[anchor=south east] at (\paperwidth-1cm,-\paperheight+1cm){\parbox[t][][t]{8.5cm}{\printcontents{l}{0}{\setcounter{tocdepth}{1}}%  }};  \node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{parttitle}\fontsize{30}{30}\sffamily\bfseries#2}};  \end{tikzpicture}};  \end{tikzpicture}}%  \@endpart}  \def\@spart#1{%  \startcontents%  \phantomsection  {\thispagestyle{empty}%  \begin{tikzpicture}[remember picture,overlay]%  \node at (current page.north west){  \begin{tikzpicture}[remember picture,overlay]%   \fill[partbg](0cm,0cm) rectangle (\paperwidth,-\paperheight);  \node[anchor=north east] at (\paperwidth-1.5cm,-3.25cm){\parbox[t][][t]{15cm}{\strut\raggedleft\color{parttitle}\fontsize{30}{30}\sffamily\bfseries#1}};  \end{tikzpicture}};  \end{tikzpicture}}  \addcontentsline{toc}{part}{\texorpdfstring{%  \setlength\fboxsep{0pt}%  \noindent\protect\colorbox{partnr}{\strut\protect\parbox[c][.7cm]{\linewidth}{\Large\sffamily\protect\centering #1\quad\mbox{}}}}{#1}}%  \@endpart}  \def\@endpart{\vfil\newpage  \if@twoside  \if@openright  \null  \thispagestyle{empty}%  \newpage  \fi  \fi  \if@tempswa  \twocolumn  \fi}  %----------------------------------------------------------------------------------------  % CHAPTER HEADINGS  %----------------------------------------------------------------------------------------  % A switch to conditionally include a picture, implemented by Christian Hupfer  \newif\ifusechapterimage  \usechapterimagetrue  \newcommand{\thechapterimage}{}%  \newcommand{\chapterimage}[1]{\ifusechapterimage\renewcommand{\thechapterimage}{#1}\fi}%  \def\@makechapterhead#1{%  {\parindent \z@ \raggedright \normalfont  \ifnum \c@secnumdepth >\m@ne  \if@mainmatter  \begin{tikzpicture}[remember picture,overlay]  \node at (current page.north west)  {\begin{tikzpicture}[remember picture,overlay]  \node[anchor=north west,inner sep=1pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};  \draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=0pt,rounded corners=0pt,fill=chapterbg,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};  \draw[anchor=west] (\Gm@lmargin+.3cm,-9.1cm) node {\huge\sffamily\bfseries\color{chaptertxt}\thechapter. #1\strut};  \end{tikzpicture}};  \end{tikzpicture}  \else  \begin{tikzpicture}[remember picture,overlay]  \node at (current page.north west)  {\begin{tikzpicture}[remember picture,overlay]  \node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};  \draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=0pt,rounded corners=0pt,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};  \draw[anchor=west] (\Gm@lmargin+.3cm,-9.1cm) node {\huge\sffamily\bfseries\color{black}#1\strut};  \end{tikzpicture}};  \end{tikzpicture}  \fi\fi\par\vspace*{270\p@}}}  %-------------------------------------------  \def\@makeschapterhead#1{%  \begin{tikzpicture}[remember picture,overlay]  \node at (current page.north west)  {\begin{tikzpicture}[remember picture,overlay]  \node[anchor=north west,inner sep=0pt] at (0,0) {\ifusechapterimage\includegraphics[width=\paperwidth]{\thechapterimage}\fi};  \draw[anchor=west] (\Gm@lmargin,-9cm) node [line width=0pt,rounded corners=0pt,fill=white,fill opacity=0.5,inner sep=15pt]{\strut\makebox[22cm]{}};  \draw[anchor=west] (\Gm@lmargin+.3cm,-9.1cm) node {\huge\sffamily\bfseries\color{black}#1\strut};  \end{tikzpicture}};  \end{tikzpicture}  \par\vspace*{270\p@}}  \makeatother  %----------------------------------------------------------------------------------------  % HYPERLINKS IN THE DOCUMENTS  %----------------------------------------------------------------------------------------  \usepackage[]{hyperref}  \hypersetup{hidelinks,backref=true,pagebackref=true,hyperindex=true,colorlinks=false,breaklinks=true,urlcolor=MILBlue,bookmarks=true,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}}  \usepackage{bookmark}  \bookmarksetup{  open,  numbered,  addtohook={%  \ifnum\bookmarkget{level}=0 % chapter  \bookmarksetup{bold}%  \fi  \ifnum\bookmarkget{level}=-1 % part  \bookmarksetup{color=MILBlue,bold}%  \fi  }  }