diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/uantwerpendocs/uantwerpenbamathesis.cls')
-rw-r--r-- | Master/texmf-dist/tex/latex/uantwerpendocs/uantwerpenbamathesis.cls | 378 |
1 files changed, 276 insertions, 102 deletions
diff --git a/Master/texmf-dist/tex/latex/uantwerpendocs/uantwerpenbamathesis.cls b/Master/texmf-dist/tex/latex/uantwerpendocs/uantwerpenbamathesis.cls index 4a7a5523694..841534140a8 100644 --- a/Master/texmf-dist/tex/latex/uantwerpendocs/uantwerpenbamathesis.cls +++ b/Master/texmf-dist/tex/latex/uantwerpendocs/uantwerpenbamathesis.cls @@ -26,20 +26,18 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesClass{uantwerpenbamathesis} - [2021/08/03 v4.1 .dtx skeleton file] -\def\fileversion{4.1} -\def\filedate{2021/08/03} + [2021/10/04 v4.2 .dtx skeleton file] \newif\if@filled \DeclareOption{filled}{\@filledtrue} \input{uantwerpencommonoptions.clo} \ExecuteOptions{a4paper,11pt,final,oneside,openright} \ProcessOptions\relax -\LoadClassWithOptions{book} +\LoadClassWithOptions{scrbook} \setlength{\parindent}{0pt} \addtolength{\parskip}{0.75\baselineskip} \setcounter{secnumdepth}{3} -\RequirePackage[top=2.5cm, bottom=2.5cm, left=2.5cm, right=2.5cm]{geometry} -\RequirePackage{expl3} +\RequirePackage[top=2.6cm, bottom=2.5cm, left=3.5cm, right=1.6cm]{geometry} +\RequirePackage[check-declarations]{expl3} % I use this during debug phase \RequirePackage{xparse} \RequirePackage{iftex} \RequirePackage{xstring} @@ -48,23 +46,52 @@ \IfFileExists{shellesc.sty}{\RequirePackage{shellesc}}{} \newcommand{\@emptymacro}{} \RequirePackage{graphicx} +\RequirePackage{soul} \RequirePackage[export]{adjustbox} \RequirePackage{color} \RequirePackage{tikz} -\usetikzlibrary{positioning} +\usetikzlibrary{positioning,calc} \RequirePackage{eso-pic} \RequirePackage{uantwerpencolorlogoscheme} \RequirePackage{fancyhdr} -\definecolor{uacorpbord}{cmyk} {0.00,1.00,0.60,0.37} -\definecolor{uacorpblue}{cmyk} {1.00,0.25,0.00,0.50} -\definecolor{uacorplightblue}{cmyk}{1.00,0.00,0.08,0.13} -\definecolor{uacorporange}{cmyk} {0.00,0.32,1.00,0.09} -\definecolor{uaftifresh}{cmyk} {0.34,1.00,0.00,0.00} -\definecolor{uaftisober}{cmyk} {0.10,1.00,0.00,0.49} \definecolor{lightgray}{cmyk} {0.00,0.00,0.00,0.05} \definecolor{darkgray}{cmyk} {0.00,0.00,0.00,0.80} \definecolor{watermark}{cmyk} {0.00,0.00,0.00,0.05} +\newcommand\@uantwerpendocshl[1]{\begin{lrbox}{\@tempboxa}#1\end{lrbox}\@uantwerpendocshlbox{\@tempboxa}} +\newcommand{\@uantwerpendocshlbox}[1]{% + \tikz{% + \pgfpathrectangle{\pgfpoint{1pt}{0pt}}{\pgfpoint{\wd #1}{\ht #1}}% + \pgfusepath{use as bounding box}% + \node[anchor=base + west,align=center,fill=maincolor,text=white,outer sep=0pt,inner + xsep=5pt, inner ysep=0pt,minimum height=\ht\strutbox+1pt]{\raisebox{1pt}{\strut}\strut\usebox{#1}}; + }% +} +\newcommand\insettext[1]{ + \textcolor{basecolor}{ + \begin{tabular}{@{\hskip3ex\textcolor{maincolor}{\vrule width 2.5pt}\hskip3ex\large\bfseries}p{0.88\textwidth}} + \strut #1 + \end{tabular} + } +} +\newcommand\insetquote[1]{ + \insettext{ + \begin{tikzpicture}[scale=0.65] + \fill[green!60!black] (0.4,0) -- (0.5,0) -- (0.75,-0.15) -- (0.75,0) -- + (0.9,0) arc(-90:0:0.1) -- (1,0.65) arc(0:90:0.1) -- (0.1,0.75) arc + (90:180:0.1) -- (0,0.1) arc(-180:-90:0.1) -- cycle; + \foreach \x in {0.35,0.7} { + \begin{scope}[shift={(\x,0.425)},scale=0.25] + \fill[white] (0,0) circle[radius=0.5]; + \fill[white] (0.5,0) arc(0:-90:1) -- + (-0.5,-0.725) arc(-90:0:0.725) -- cycle; + \end{scope} + } + \end{tikzpicture}\\ + #1 + } +} \ExplSyntaxOn \prop_new:N \g__uantwerpendocs_data_prop \NewDocumentCommand{\uantwerpendocsprop}{m}{ @@ -111,9 +138,68 @@ } } {} + \uantwerpendocspropread{degree} + \uantwerpendocspropread{doctype} \makeatletter } - +\ExplSyntaxOn +\cs_generate_variant:Nn \prop_item:Nn{ Nx } +\NewDocumentCommand{\uantwerpendocsdoctype}{m}{ + \prop_item:Nx \g__uantwerpendocs_data_prop { #1 } +} +\ExplSyntaxOff +\newcommand\disclaimer[1]{ + Disclaimer #1\newline\newline + This document is an examination document that has not been + corrected for any errors identified. Without prior written + permission of both the supervisor(s) and the author(s), any copying, + copying, using or realizing this publication or parts thereof + is prohibited. For requests for information regarding the copying + and/or use and/or realisation of parts of this publication, please + contact to the university at which the author is registered. + \newline\newline + Prior written permission from the supervisor(s) is also + required for the use for industrial or commercial utility of the + (original) methods, products, circuits and programs described in this + thesis, and for the submission of this publication for participation + in scientific prizes or competitions. + \newline\newline + This document is in accordance with the master thesis regulations and the + Code of Conduct. It has been reviewed by the supervisor and the attendant. +} +\AtBeginDocument{ + \makeatother + \@ifpackageloaded{babel}{ + \addto\captionsdutch{% + \renewcommand\disclaimer[1]{ + Disclaimer #1\newline\newline + Dit document is een examendocument dat niet werd gecorrigeerd voor + eventueel vastgestelde fouten. Zonder voorafgaande schriftelijke + toestemming van zowel de promotor(en) als de auteur(s) is overnemen, + kopiƫren, gebruiken of realiseren van deze uitgave of gedeelten ervan + verboden. Voor aanvragen tot of informatie i.v.m. het overnemen en/of + gebruik en/of realisatie van gedeelten uit deze publicatie, wendt u + tot de universiteit waaraan de auteur is ingeschreven. + \newline\newline + Voorafgaande schriftelijke toestemming van de promotor(en) is eveneens + vereist voor het aanwenden van de in dit afstudeerwerk beschreven + (originele) methoden, producten, schakelingen en programma's voor + industrieel of commercieel nut en voor de inzending van deze + publicatie ter deelname aan wetenschappelijke prijzen of wedstrijden. + \newline\newline + Dit document is in overeenstemming met het masterproefreglement en de + gedragscode en nagekeken door promotor en begeleider. + } + } + }{} + \makeatletter +} +\ExplSyntaxOn +\NewDocumentCommand{\uantwerpendocsdegree}{m}{ + \typeout{#1} + \prop_item:Nx \g__uantwerpendocs_data_prop { #1 } +} +\ExplSyntaxOff \newcommand*{\facultyacronym}[1]{ \PackageError{uantwerpendocs} {The '\protect\facultyacronym{}' macro is no longer available. Use @@ -121,17 +207,9 @@ {The interface of uantwerpendocs 4.0 has been changed. See the uantwerpendocs manual under section '5.2 The class options explained'} } +\newcommand*{\@companylogo}{} +\newcommand*{\companylogo}[1]{\renewcommand*{\@companylogo}{#1}} \ExplSyntaxOn -\NewDocumentCommand{\@subtitle}{m}{ - \tl_new:N \l__uantwerpendocs_degree - \tl_set:Nx \l__uantwerpendocs_degree { \tl_head:N \@degree } - \tl_if_eq:NnTF \l__uantwerpendocs_degree { B } {\uantwerpendocsprop{bthesisname}} { - \tl_if_eq:NnTF \l__uantwerpendocs_degree { M } {\uantwerpendocsprop{mthesisname}} - {\uantwerpendocsprop{thesisname}}} -} -\ExplSyntaxOff -\ExplSyntaxOn - \seq_new:N \g__uantwerpendocs_supervisors \seq_new:N \g__uantwerpendocs_supervisorswithaffiliation \cs_new:Nn \__uantwerpendocs_addsupervisor:nn { @@ -141,25 +219,85 @@ \NewDocumentCommand{\supervisor}{mm}{ \__uantwerpendocs_addsupervisor:nn { #1 } { #2 } } -\NewDocumentCommand{\jointsupervisors}{m}{ - \seq_use:Nn \g__uantwerpendocs_supervisors { #1 } +\NewDocumentCommand{\jointsupervisors}{mm}{ + \seq_use:Nnnn \g__uantwerpendocs_supervisors { #2 } { #1 } { #2 } } -\NewDocumentCommand{\jointsupervisorswithaffiliation}{m}{ - \seq_use:Nn \g__uantwerpendocs_supervisorswithaffiliation { #1 } +\NewDocumentCommand{\jointsupervisorswithaffiliation}{mm}{ + \seq_use:Nnnn \g__uantwerpendocs_supervisorswithaffiliation { #2 } { #1 } { #2 } } -\NewDocumentCommand{\supervisorsname}{}{ - \if_int_compare:w \seq_count:N \g__uantwerpendocs_supervisors > 1 - \uantwerpendocsprop{supervisorsname} +\NewDocumentCommand{\supervisorsname}{m}{ + \if_int_compare:w \seq_count:N \g__uantwerpendocs_supervisors > 2 + \uantwerpendocsprop{supervisorsname} #1 \else: - \if_int_compare:w \seq_count:N \g__uantwerpendocs_supervisors = 1 - \uantwerpendocsprop{supervisorname} + \if_int_compare:w \seq_count:N \g__uantwerpendocs_supervisors = 2 + \uantwerpendocsprop{supervisorname} #1 + \else: + \fi: + \fi: +} +\seq_new:N \g__uantwerpendocs_cosupervisors +\seq_new:N \g__uantwerpendocs_cosupervisorswithaffiliation +\cs_new:Nn \__uantwerpendocs_addcosupervisor:nn { + \seq_gpush:Nn \g__uantwerpendocs_cosupervisors { #1 } + \seq_gpush:Nn \g__uantwerpendocs_cosupervisorswithaffiliation { #1,~#2 } +} +\NewDocumentCommand{\cosupervisor}{mm}{ + \__uantwerpendocs_addcosupervisor:nn { #1 } { #2 } +} +\NewDocumentCommand{\jointcosupervisors}{mm}{ + \seq_use:Nnnn \g__uantwerpendocs_cosupervisors { #2 } { #1 } { #2 } +} +\NewDocumentCommand{\jointcosupervisorswithaffiliation}{mm}{ + \seq_use:Nnnn \g__uantwerpendocs_cosupervisorswithaffiliation { #2 } { #1 } { #2 } +} +\NewDocumentCommand{\cosupervisorsname}{m}{ + \if_int_compare:w \seq_count:N \g__uantwerpendocs_cosupervisors > 2 + \uantwerpendocsprop{cosupervisorsname} #1 + \else: + \if_int_compare:w \seq_count:N \g__uantwerpendocs_cosupervisors = 2 + \uantwerpendocsprop{cosupervisorname} #1 + \else: + \fi: + \fi: +} +\seq_new:N \g__uantwerpendocs_extsupervisors +\seq_new:N \g__uantwerpendocs_extsupervisorswithaffiliation +\cs_new:Nn \__uantwerpendocs_addextsupervisor:nn { + \seq_gpush:Nn \g__uantwerpendocs_extsupervisors { #1 } + \seq_gpush:Nn \g__uantwerpendocs_extsupervisorswithaffiliation { #1,~#2 } +} +\NewDocumentCommand{\extsupervisor}{mm}{ + \__uantwerpendocs_addextsupervisor:nn { #1 } { #2 } +} +\NewDocumentCommand{\jointextsupervisors}{mm}{ + \seq_use:Nnnn \g__uantwerpendocs_extsupervisors { #2 } { #1 } { #2 } +} +\NewDocumentCommand{\jointextsupervisorswithaffiliation}{mm}{ + \seq_use:Nnnn \g__uantwerpendocs_extsupervisorswithaffiliation { #2 } { #1 } { #2 } +} +\NewDocumentCommand{\extsupervisorsname}{m}{ + \if_int_compare:w \seq_count:N \g__uantwerpendocs_extsupervisors > 2 + \uantwerpendocsprop{extsupervisorsname} #1 + \else: + \if_int_compare:w \seq_count:N \g__uantwerpendocs_extsupervisors = 2 + \uantwerpendocsprop{extsupervisorname} #1 \else: \fi: \fi: } \AtBeginDocument{ + \seq_gpush:Nn \g__uantwerpendocs_supervisors {} \seq_greverse:N \g__uantwerpendocs_supervisors + \seq_gpush:Nn \g__uantwerpendocs_supervisorswithaffiliation {} \seq_greverse:N \g__uantwerpendocs_supervisorswithaffiliation + \seq_gpush:Nn \g__uantwerpendocs_cosupervisors {} + \seq_greverse:N \g__uantwerpendocs_cosupervisors + \seq_gpush:Nn \g__uantwerpendocs_cosupervisorswithaffiliation {} + \seq_greverse:N \g__uantwerpendocs_cosupervisorswithaffiliation + \seq_gpush:Nn \g__uantwerpendocs_extsupervisors {} + \seq_greverse:N \g__uantwerpendocs_extsupervisors + \seq_gpush:Nn \g__uantwerpendocs_extsupervisorswithaffiliation {} + \seq_greverse:N \g__uantwerpendocs_extsupervisorswithaffiliation } \ExplSyntaxOff \newcommand*\@degree{ @@ -169,6 +307,27 @@ {See the uantwerpendocs manual} } \newcommand*\degree[1]{\renewcommand*\@degree{#1}} +\newcommand*\@bamadoctype{ + \PackageError{uantwerpendocs} + {Please, specify the offical document type, either using + the '\protect\bamadoctype{}' macro or the '\protect\bamadegree{}' + macro in the preamble of your document.} + {See the uantwerpendocs manual}} +\newcommand*\bamadoctype[1]{ + \renewcommand*\@bamadoctype{\uantwerpendocsdoctype{#1}} +} +\ExplSyntaxOn +\NewDocumentCommand{\bamadegree}{m}{ + \seq_new:N \l__uantwerpendocs_degreechunks + \regex_extract_all:nnN { [^-]+ } { #1 } \l__uantwerpendocs_degreechunks + \bamadoctype{\seq_item:Nn\l__uantwerpendocs_degreechunks {2} - \seq_item:Nn\l__uantwerpendocs_degreechunks {3}} + \degree{\uantwerpendocsdegree{ + \seq_item:Nn\l__uantwerpendocs_degreechunks {1} - + \seq_item:Nn\l__uantwerpendocs_degreechunks {2} - + \seq_item:Nn\l__uantwerpendocs_degreechunks {3} - + \seq_item:Nn\l__uantwerpendocs_degreechunks {4} }} +} +\ExplSyntaxOff \newcommand*{\diploma}[1]{ \PackageError{uantwerpendocs} {The '\protect\diploma{}' macro is no longer available. Use @@ -177,28 +336,52 @@ '\protect\degree' macro to specify your degree in full text (see the uantwerpendocs manual)'} } -\newcommand*\@defensedate{ERROR} -\newcommand*{\defensedate}[1]{\renewcommand*\@defensedate{#1}} -\newcommand*\@defenselocation{Antwerpen} -\newcommand*{\defenselocation}[1]{\renewcommand*\@defenselocation{#1}} \newcommand*{\@academicyear}{XXX-YYYY} \newcommand*{\academicyear}[1]{\renewcommand*{\@academicyear}{#1}} -\if@twoside - \lhead[\thepage]{\slshape\rightmark} +\newcommand{\@copyrightnotices}{\disclaimer{\@bamadoctype}} +\ExplSyntaxOn +\seq_new:N \l_title_seq +\cs_generate_variant:Nn \seq_set_split:Nnn { Nnf } +\cs_new_nopar:Npn \__uantwerpendocs_reversevideo:f #1 +{ + \seq_set_split:Nnf \l_title_seq {~} { #1 } + \seq_set_map:NNn \l_title_seq \l_title_seq {\@uantwerpendocshl{##1}} + \seq_use:Nnnn \l_title_seq { ~ } { ~ } { ~ } +} +\NewDocumentCommand{\reversevideo}{m}{ + \__uantwerpendocs_reversevideo:f { #1 } +} +\ExplSyntaxOff +\AtBeginDocument{ + \setlength{\headheight}{13.7pt} + \renewcommand*{\headrulewidth}{0pt} + \renewcommand*{\footrulewidth}{0pt} + \newsavebox\smallogo + \savebox\smallogo{\raisebox{-1ex}{\includegraphics[width=2.5cm]{\logopos}}} + \if@twoside + \lhead[]{\footnotesize\slshape\rightmark} \chead[]{} - \rhead[\slshape\leftmark]{\thepage} - \lfoot[]{} - \cfoot[]{} - \rfoot[]{} -\else - \lhead[]{\leftmark} + \rhead[\footnotesize\slshape\leftmark]{} + \lfoot[\footnotesize\thepage~\textcolor{maincolor}{\textbf{|}}]{\usebox\smallogo} + \cfoot[\footnotesize\@bamadoctype]{\footnotesize\@bamadoctype} + \rfoot[\usebox\smallogo]{\footnotesize\textcolor{maincolor}{\textbf{|}}~\thepage} + \else + \lhead[]{\footnotesize\slshape\leftmark} \chead[]{} - \rhead[]{\thepage} - \lfoot[]{} - \cfoot[]{} - \rfoot[]{} -\fi + \rhead[]{} + \lfoot[]{\usebox\smallogo} + \cfoot[]{\footnotesize\@bamadoctype} + \rfoot[]{\footnotesize\textcolor{maincolor}{\textbf{|}}~\thepage} + \fi + \fancypagestyle{plain}{\pagestyle{fancy}} + % \patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{} +} +\newcommand{\@crnotice}{ + \@copyrightnotices +} +\addtokomafont{section}{\color{basecolor}} +\addtokomafont{chapter}{\color{basecolor}} \renewcommand\maketitle{% \pagestyle{empty} \begin{titlepage} @@ -206,61 +389,65 @@ \put(0,0){% \begin{tikzpicture}[inner sep=0pt,outer sep=0pt] \clip (0,0) rectangle(\paperwidth,\paperheight); - \fill[lightgray] - (2.125,{\paperheight-7.5cm}) rectangle (\paperwidth,6); - \node - [anchor=west,text width={\paperwidth-5cm},align=left,font=\Huge,uauaside] - at (2.125,{\paperheight-3cm}) - { - \textsf{\textbf{\@title}} + [anchor=north east,align=right] + at (\paperwidth-1.6cm,\paperheight-2.6cm) + {\bfseries\large + \uantwerpendocsprop{acyearname}\\[.75ex]\Large\@academicyear}; + \node (title) + [anchor=north west,align=left, + text width={\paperwidth-5.1cm},font=\Huge,text=white, + xshift=1pt] + at (3.5cm,\paperheight-6.4cm) + {\sethlcolor{maincolor}% + \textsf{\textbf{\reversevideo{\@title}}}\\ + \textsf{\reversevideo{\@subtitle}}}; + \node + [anchor=north west,font=\LARGE,yshift=-1cm,xshift=-1pt] + at (title.south west) + {% + \textsf{\textbf{\@author}} }; \node - [anchor=west,text width={\paperwidth-5cm},align=left,font=\Large,uauaside] - at (2.125,{\paperheight-5cm}) - { - \textsf{\textbf{\@subtitle}} + [anchor=west,align=left, + text width={\paperwidth-5.1cm},font=\normalsize] + at (3.5cm,12cm) + {\textsf{\@bamadoctype}\\% + \textsf{\textbf{\@degree}} }; \node - [anchor=base west,uauamain, - text width={\paperwidth-5cm},align=left,font=\LARGE] - at (2.125,{\paperheight-6.5cm}) - {\textsf{\textbf{\@author}}}; - - \fill[gray] (2.125,6) - -- (\paperwidth,6) - -- (\paperwidth,2.625) - -- (2.55,2.625) - arc (-90:-180:0.425) - -- cycle; - - \node[white,anchor=west,align=left,font=\large] - (SN) at (2.55,4.9) - { - \begin{tabular}{@{}l@{~\,}p{14.5cm}} - \textsf{\supervisorsname} - & \textsf{\textbf{\jointsupervisors{ | }}} - \end{tabular} + [anchor=west,align=left, + text width={\paperwidth-5.1cm},font=\normalsize] + at (3.5cm,7.5cm) + {\supervisorsname{\\} + \textbf{\jointsupervisorswithaffiliation{\\}{~\\~\\}}% + \cosupervisorsname{\\} + \textbf{\jointcosupervisorswithaffiliation{\\}{~\\~\\}}% + \extsupervisorsname{\\} + \textbf{\jointextsupervisorswithaffiliation{\\}{}} }; - \node[white,anchor=west,text width=17.5cm,align=left,font=\small] - at (2.55,3.7) - {\textsf{\uantwerpendocsprop{bmthesisname} - \@degree{}}\\ - \textsf{\textbf{\@faculty{} - | \@defenselocation, \@defensedate}}}; + \ifx\@companylogo\@empty + \else + \node[anchor=south east] at + (\pagewidth-1.6cm,1.5cm) + {\@companylogo}; + \fi - \node[anchor=west] at - (2.125,1.313) - {\includegraphics[width=4.75cm]{\logoposua}}; + \node[anchor=south west] at + (1.6cm,1.5cm) + {\includegraphics[width=6.2cm]{\logopos}}; \end{tikzpicture} } } \end{titlepage}% ~\par\relax \clearpage + \vspace*{\stretch{1}} + \@crnotice + \clearpage \setcounter{footnote}{0}% \global\let\thanks\relax \global\let\maketitle\relax @@ -273,19 +460,6 @@ \thispagestyle{empty} } \newcommand\makefinalpage{ - \cleardoublepage - \thispagestyle{empty} - ~% intentionally blank page - \clearpage - \thispagestyle{empty} - \begin{tikzpicture}[remember picture,overlay] - \node at (current page.center) { - \begin{tikzpicture}[inner sep=0pt] - \clip (0,0) rectangle(\paperwidth,\paperheight); - \fill[lightgray] (0,0) rectangle (2.125cm,2.625cm); - \end{tikzpicture} - }; - \end{tikzpicture} } \AtBeginDocument{ \@ifpackageloaded{hyperref}{ |