Update on Overleaf.
This commit is contained in:
419
ruthesis.sty
419
ruthesis.sty
@@ -9,45 +9,16 @@
|
||||
%% Details at LICENSE.md
|
||||
%% --------------- Identification ----------------------------
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\typeout{Thesis package for Reykjavik University V3.0 <2022/05/2>, by Joseph Timothy Foley, foley at RU.IS}
|
||||
|
||||
%% ---------------- Critical packages -----------------------------
|
||||
\RequirePackage{etoolbox}% \newbool, \ifbool, etc.
|
||||
%% Toolbox of many many macros that make a lot of latex code smarter and more robust
|
||||
%% http://texdoc.net/texmf-dist/doc/latex/etoolbox/etoolbox.pdf
|
||||
|
||||
%% ---------------- Boolean switches -----------------------------
|
||||
%% Booleans make it easy to enable and disable parts of the template
|
||||
\newbool{debug}
|
||||
\newbool{draftbool}
|
||||
\newbool{proof}
|
||||
|
||||
%% ---------------- Declaration of Package Options--------------------
|
||||
%% Remember that we have \AtEndOfPackage{}
|
||||
%% \AtBeginDocument{}, \AtEndDocument{}
|
||||
%% If you want execution conditional on file existence
|
||||
%% \IfFileExists{filename}{true}{false}
|
||||
%% \InputIfFileExists{filename}{true}{false}
|
||||
%% For error reporting
|
||||
%% \PackageError{class-name}{error-text}{help-text}
|
||||
|
||||
% Generalized settings
|
||||
\DeclareOption{debug}{%
|
||||
\booltrue{debug}
|
||||
\typeout{ruthesis option: debug}%
|
||||
\typeout{DEBUG MODE ENABLED! PREPARE FOR VERBOSITY!}}
|
||||
|
||||
\DeclareOption{draft}{\booltrue{draftbool}}
|
||||
|
||||
\DeclareOption{IS}{\booltrue{IS}}
|
||||
|
||||
\ProvidesPackage{ruthesis}[2024/11/15 RU Thesis Formatting V3.2]
|
||||
%% --------------- Option Processing--------------------------
|
||||
%% The forcegraphics option renders graphics even in draft mode
|
||||
\DeclareOption{forcegraphics}{%
|
||||
\PassOptionsToPackage{final}{graphicx}
|
||||
\PassOptionsToPackage{final}{pdfpages}
|
||||
\PassOptionsToPackage{final}{hyperref}
|
||||
%% add any other elements that should be included in draft
|
||||
\finalifforcegraphics{graphicx}%We have to catch graphicx early
|
||||
\setbool{forcegraphics}{true}\typeout{ruthesis option: forcegraphics}%
|
||||
\typeout{ruthesis option: forcegraphics}%
|
||||
}%
|
||||
|
||||
%%% Memoir test: Memoir Manual 21.2 p.367
|
||||
@@ -62,24 +33,16 @@
|
||||
%% carefully before modifying any of the execution and previous section.
|
||||
%% ---------------- Package Loading -----------------------------
|
||||
|
||||
%% Now to print the status of all the booleans if debug boolean is set
|
||||
%% Any boolean testing must be after the \LoadClass otherwise the Option execution
|
||||
%% has not completed.
|
||||
\ifbool{debug}{%
|
||||
\ifbool{forcegraphics}{\typeout{ruthesis bool: forcegraphics}}{}
|
||||
\ifbool{proof}{\typeout{ruthesis bool: proof}}{}
|
||||
\ifbool{debug}{\typeout{ruthesis bool: debug}}{}
|
||||
}{}
|
||||
|
||||
%% ---------------- Internationalization -----------------------------
|
||||
% Font setup
|
||||
% Standardized STIX2 fonts that print well, display on
|
||||
% e-readers/screens clearly, and have compatible licensing
|
||||
% requirements
|
||||
\RequirePackage{stix2}
|
||||
% allows UTF encoding, needed for Icelandic and other accented characters
|
||||
\RequirePackage{fontspec}
|
||||
\RequirePackage{unicode-math}
|
||||
\RequirePackage{unicode-math}% loads STIX and math unicode characters
|
||||
|
||||
\setmathfont{STIX Two Math}
|
||||
\setmainfont{STIX Two Text}[
|
||||
Extension={.otf},
|
||||
@@ -87,16 +50,17 @@ UprightFont={*-Regular},
|
||||
BoldFont={*-Bold},
|
||||
ItalicFont={*-Italic},
|
||||
BoldItalicFont={*-BoldItalic}]
|
||||
|
||||
\usepackage[useregional]{datetime2}
|
||||
%% Smart manipulation of dates
|
||||
\renewcommand{\date}[3]{\newcommand{\thedate}{\DTMdisplaydate{#1}{#2}{#3}{-1}}}
|
||||
%% ---------------- Page and Margin Sizes -----------------------------
|
||||
\setxlvchars{}\setlxvchars{}
|
||||
\pageaiv{}
|
||||
\setlrmarginsandblock{25.4mm}{25.4mm}{*}
|
||||
\setulmarginsandblock{25.4mm}{25.4mm}{*}
|
||||
\setpagecc{\paperheight}{\paperwidth}{*}%page area on middle center for cutting
|
||||
\checkandfixthelayout% implement the margins if we weren't using canonic
|
||||
|
||||
%% ---------------- Graphics ------------------------------
|
||||
\RequirePackage{graphicx}
|
||||
%% GraphicsX converts and includes graphics intelligently
|
||||
|
||||
|
||||
%% GraphicsX converts and includes graphics intelligently which is needed for jpg, png, etc.
|
||||
|
||||
%% ---------------- URLs and Paths -----------------------------
|
||||
\PassOptionsToPackage{obeyspaces,spaces,hyphens,allowmove}{url}
|
||||
@@ -105,19 +69,6 @@ BoldItalicFont={*-BoldItalic}]
|
||||
%% Watch out that you leave a space after a last \ e.g. \path{C:\ }
|
||||
%% Warning: allowmove makes URLs not-fragile, so they can go in things that move
|
||||
%% If this breaks you will get very very weird errors
|
||||
%% ---------------- Miscellaneous Packages ----------------------
|
||||
%% ---------------- Fonts -----------------------------
|
||||
%% Important: The template has switched to STIX2 fonts and memoir defaults
|
||||
%% to massively simplify font selection. You should not need to mess with fonts.
|
||||
|
||||
% save the current font size
|
||||
\newlength{\normaltextsize}
|
||||
\setlength{\normaltextsize}{\f@size pt}
|
||||
|
||||
%%%%%%%%%%%%%%%%% Colors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
|
||||
\RequirePackage{xcolor}
|
||||
\definecolor{rugray}{rgb}{0.2,0.2,0.2}
|
||||
\definecolor{rured}{rgb}{0.84,0.10,0.13}
|
||||
|
||||
%% ---------------- Main Code -----------------------------
|
||||
%% Remember that we can declare commands (to make fragile things safe)
|
||||
@@ -127,8 +78,6 @@ BoldItalicFont={*-BoldItalic}]
|
||||
%% For checking if commands are redefined
|
||||
%% \CheckCommand{cmd}[num][default]{definition}
|
||||
|
||||
|
||||
|
||||
%% Comprehensive list of styles for memoir is in 7.2 (page 106)
|
||||
%% If you need to adjust the style on the chapters, modify chapter
|
||||
%% predefined styles:
|
||||
@@ -137,53 +86,125 @@ BoldItalicFont={*-BoldItalic}]
|
||||
%% simple: pagenum and marks on top outer edges
|
||||
%\makeoddhead{chapter}{}{}{} %to change only one side
|
||||
|
||||
%% Information about Institution, Author, Degree, and Program
|
||||
\newcommand{\thesubtitle}{\quad}
|
||||
\newcommand{\theInstitution}{Reykjav\'{\i}k University}%
|
||||
\newcommand{\theDocumentType}{Dissertation}
|
||||
\newcommand{\theDegreeAbbrv}{Ph.D.}
|
||||
\newcommand{\theDegreeLong}{Doctorate}
|
||||
\newcommand{\theProgram}{\LaTeX{} Magic}
|
||||
\newcommand{\theECTS}{30}
|
||||
\newcommand{\theSchool}{School of Awesomeness}
|
||||
\newcommand{\DocumentInfo}[6]{
|
||||
\renewcommand{\theDocumentType}{#1}
|
||||
\renewcommand{\theDegreeAbbrv}{#2}
|
||||
\renewcommand{\theDegreeLong}{#3}
|
||||
\renewcommand{\theProgram}{#4}
|
||||
\renewcommand{\theECTS}{#5}
|
||||
% ECTS Only applicable on BSc. and MSc.
|
||||
% Leave blank
|
||||
\renewcommand{\theSchool}{#6}
|
||||
}
|
||||
|
||||
\newcommand{\subtitle}[1]{\renewcommand{\thesubtitle}{#1}}
|
||||
\newcommand{\supervisors@ruthesis}{\item No Advisor}
|
||||
\newcommand{\Supervisors}[1]{\renewcommand{\supervisors@ruthesis}[1]{#1}}
|
||||
\newcommand{\supervisorheading@ruthesis}{Supervisor}
|
||||
\newcommand{\SupervisorHeading}[1]{\renewcommand{\supervisorheading@ruthesis}{#1}}
|
||||
|
||||
\newcommand{\examiners@ruthesis}{\item No Examiner}
|
||||
\newcommand{\Examiners}[1]{\renewcommand{\examiners@ruthesis}[1]{#1}}
|
||||
\newcommand{\examinerheading@ruthesis}{Examiner}
|
||||
\newcommand{\ExaminerHeading}[1]{\renewcommand{\examinerheading@ruthesis}{#1}}
|
||||
|
||||
\newcommand{\docdesc@ruthesis}{\theDocumentType{} of \theECTS{} ECTS credits
|
||||
submitted to the \theSchool{} at \theInstitution{} in partial fulfillment
|
||||
of the requirements for the degree of \theDegreeLong}
|
||||
\newcommand{\DocumentDescription}[1]{\renewcommand{\docdesc@ruthesis}{#1}}%nop for now
|
||||
\newcommand{\pubplaceyear@ruthesis}{Reykjavik, 2025}
|
||||
\newcommand{\publocation}[1]{\renewcommand{\pubplaceyear@ruthesis}{#1}}
|
||||
\newcommand{\logo@ruthesis}{graphics/smiley-logo}
|
||||
\newcommand{\logo}[1]{\renewcommand{\logo@ruthesis}{#1}}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%% TITLE PAGE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Memoir titlepage definition and info at p.64
|
||||
\renewcommand{\pretitle}{\begin{center}}%
|
||||
\renewcommand{\posttitle}{\par\end{center}}
|
||||
|
||||
% \renewcommand{\maketitlehookb}{\begin{center}\titletextfont{}by\end{center}\vspace{1mm}}
|
||||
% 1mm adjustment to center the "by". I've disabled it because I think the "by" looks unprofessional.
|
||||
|
||||
\renewcommand{\preauthor}{\begin{center}\large\par}
|
||||
\renewcommand{\postauthor}{\par\end{center}}
|
||||
\newcommand{\titledetails}[1]{\renewcommand{\maketitlehookc}{#1}}
|
||||
\renewcommand{\predate}{\begin{center}\large}
|
||||
\renewcommand{\postdate}{\par\end{center}}
|
||||
%% \title is ignoring formatting for reasons I don't understand
|
||||
\renewcommand{\maketitlehooka}{
|
||||
\begin{center}
|
||||
\includegraphics[width=0.3\textwidth]{\logo@ruthesis}
|
||||
\par\end{center}\vspace{0.7cm}
|
||||
}
|
||||
%% TODO: investigate why bold isn't working on the title
|
||||
%\droptitle{}% length moves the title position up and down
|
||||
\pretitle{\begin{center}\bfseries\Huge}
|
||||
\posttitle{\par\end{center}\vspace{1.55cm}}
|
||||
\preauthor{\begin{center}\Large}
|
||||
\postauthor{\par\end{center}\vfill}
|
||||
\renewcommand{\maketitlehookc}{\begin{center}\textbf{\Large \theDegreeAbbrv{} \theDocumentType{} in \theProgram}\par\end{center}\vspace{1cm}}
|
||||
\predate{\begin{center}\large Graduation }
|
||||
\postdate{\par\end{center}\vspace*{0.4cm}}
|
||||
\renewcommand{\maketitlehookd}{\begin{center}
|
||||
\textbf{{\Large \theSchool}}\par\end{center}
|
||||
}
|
||||
\aliaspagestyle{title}{empty}
|
||||
|
||||
\aliaspagestyle{titlinpage}{empty}
|
||||
%% ----- COPYRIGHT PAGE -----------------------------------------------------------------------
|
||||
\RequirePackage{ccicons}
|
||||
%% ----- Inside Cover is COPYRIGHT page-----------------------------------------------------------------------
|
||||
\RequirePackage{ccicons}% need for copyright \textcopyright{}
|
||||
\hyphenation{Non-Com-mercial}
|
||||
\newcommand{\copyrightpage}[1]{
|
||||
% actually in books, this is often on the left side
|
||||
\begin{coverleft}
|
||||
\begin{vplace}[1.0] % ratio of space above and below
|
||||
\begin{flushleft}
|
||||
#1
|
||||
Copyright \textcopyright{} \the\year{} \theauthor{} \ccbyncnd
|
||||
\end{flushleft}
|
||||
This work is licensed under the Creative Commons
|
||||
Attribution-NonCommercial-NoDerivatives 4.0 International License
|
||||
(\url{http://creativecommons.org/licenses/by-nc-nd/4.0/}). You may
|
||||
copy and redistribute the material in any medium or format, provide
|
||||
appropriate credit, link to the license and indicate what changes you made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. You may not use the material for commercial purposes. If you remix, transform or build upon the material, you may not distribute the modified material.
|
||||
The images or other third party material in this thesis are included in
|
||||
the book's Creative Commons license, unless indicated otherwise in a
|
||||
credit line to the material. If material is not included in the book's
|
||||
Creative Commons license and your intended use is not permitted by
|
||||
statutory regulation or exceeds the permitted use, you will need to
|
||||
obtain permission directly from the copyright holder. The use of
|
||||
general descriptive names, registered names, trademarks, service
|
||||
marks, etc. in this publication does not imply, even in the absence of
|
||||
a specific statement that such names are exempt from the relevant
|
||||
protective laws and regulations and therefore free for general use.
|
||||
\begin{coverleft}
|
||||
\begin{vplace}[1.0] % ratio of space above and below
|
||||
\setlength{\parskip}{\baselineskip}%without indents, we need blank line separators
|
||||
\raggedright{}
|
||||
{\Large \thetitle}\\\vspace{\baselineskip}
|
||||
% Subtitle add later
|
||||
\textbf{\supervisorheading@ruthesis:} \supervisors@ruthesis\par\\
|
||||
\textbf{\examinerheading@ruthesis:} \examiners@ruthesis\par\vspace*{1.5cm}
|
||||
|
||||
|
||||
Thesis of \theECTS{} ECTS credits submitted to the \theSchool{} at Reykjavik University
|
||||
in partial fulfilment of the requirements for the degree of \theDegreeAbbrv{} in \theProgram{}.\par\vspace*{1.5cm}
|
||||
|
||||
Copyright \textcopyright{} \the\year{} \theauthor{} \ccbyncnd{}\\
|
||||
This document is licensed under a Creative Commons Attribution 4.0 (CC BY-NC-SA) (\url{http://creativecommons.org/licenses/by-nc-nd/4.0/}) license.
|
||||
However, this license does not cover the Reykjavik University logo (word- and figurative mark).
|
||||
The Reykjavik University logo is a registered trademark and remains the intellectual property of Reykjavik University.
|
||||
Any reuse, redistribution, or modification of the Reykjavik University logo is strictly prohibited without explicit written permission from Reykjavik University.
|
||||
|
||||
You may copy and redistribute the material in any medium or format, provide appropriate credit, link to the license and indicate what changes you made.
|
||||
You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
|
||||
You may not use the material for commercial purposes.
|
||||
If you remix, transform or build upon the material, you may not distribute the modified material.
|
||||
|
||||
The images or other third party material in this thesis are included in the book's Creative Commons license, unless indicated otherwise in a credit line to the material.
|
||||
If material is not included in the book's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
|
||||
The use of general descriptive names, registered names, trademarks, service marks, etc.
|
||||
in this publication does not imply, even in the absence of a specific statement that such names are exempt from the relevant protective laws and regulations and therefore free for general use.\par
|
||||
|
||||
\pubplaceyear@ruthesis
|
||||
\end{vplace}
|
||||
\end{coverleft}
|
||||
\clearpage
|
||||
}
|
||||
|
||||
% %% names moved to inside cover
|
||||
% % change \personinfo to make the entries needed
|
||||
% % Because this is inside a command, we escape the #1 as ##1
|
||||
% \renewcommand{\personinfo}[5]{\item[] ##1, ##2\\##3, ##4, ##5}
|
||||
% % \setlength{\pltopsep}{0.5\baselineskip} % first/top space
|
||||
% % \setlength{\plparsep}{0.5\baselineskip} % space between entries
|
||||
% % \setlength{\plitemsep}{0.5\baselineskip} % space between lines
|
||||
% \begin{itemize}[label={}]
|
||||
% \item \supervisorheading@ruthesis{}:
|
||||
% \begin{itemize}[label={}]\setlength\itemsep{\baselineskip}
|
||||
% \supervisors@ruthesis{}
|
||||
% \end{itemize}
|
||||
% \end{itemize}
|
||||
% }\vfill}
|
||||
|
||||
|
||||
%% ---------- Page Styles --------------------------------------------------------------
|
||||
%% ---------------------------------------------------------------------------------------------
|
||||
%% Setup the formatting at the beginning of the document (Front material)
|
||||
@@ -201,9 +222,9 @@ BoldItalicFont={*-BoldItalic}]
|
||||
}
|
||||
|
||||
%% Disable clearforchapter on formats that do not need blank pages
|
||||
\ifbool{draftbool}{\renewcommand{\clearforchapter}{\newpage}}
|
||||
% waste less blank pages in draft mode
|
||||
% see p123 http://ctan.uib.no/macros/latex/contrib/memoir/memman.pdf
|
||||
%\renewcommand{\clearforchapter}{\newpage}
|
||||
% waste less blank pages in draft mode
|
||||
% see p123 http://ctan.uib.no/macros/latex/contrib/memoir/memman.pdf
|
||||
|
||||
\newenvironment{cover}% commonalities for the cover material
|
||||
{ \clearforchapter%
|
||||
@@ -220,12 +241,12 @@ BoldItalicFont={*-BoldItalic}]
|
||||
\disableindents%
|
||||
\SingleSpacing}%
|
||||
{\enableindents{}}%
|
||||
\newenvironment{coveranyside}%This is material that can start on even or odd
|
||||
{ \clearpage%
|
||||
\thispagestyle{cover}%
|
||||
\disableindents%
|
||||
\SingleSpacing}%
|
||||
{\enableindents{}}%
|
||||
% \newenvironment{coveranyside}%This is material that can start on even or odd
|
||||
% { \clearpage%
|
||||
% \thispagestyle{cover}%
|
||||
% \disableindents%
|
||||
% \SingleSpacing}%
|
||||
% {\enableindents{}}%
|
||||
|
||||
|
||||
|
||||
@@ -234,29 +255,12 @@ BoldItalicFont={*-BoldItalic}]
|
||||
\begin{center}\em}
|
||||
{\end{center}\normalfont\end{vplace}\end{cover}}
|
||||
|
||||
%%%%%%%%%%%% DRAFT AND PROOF MARKS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\newcommand{\draftmark}{}
|
||||
\newcommand{\draftbigmark}{}
|
||||
|
||||
\ifbool{proof}{\renewcommand{\draftmark}{{\color{blue}\textsc{Proof}}}%
|
||||
\renewcommand{\draftbigmark}{{\color{blue}\warningfont{}*** \draftmark{} *** \\PLEASE DO NOT DISTRIBUTE\\}}}{}
|
||||
\ifbool{draftbool}{\renewcommand{\draftmark}{{\color{red}\textsc{Draft}}}%
|
||||
\renewcommand{\draftbigmark}{{\color{red}\warningfont{}*** \draftmark{} *** \\PLEASE DO NOT DISTRIBUTE\\}}}{}%
|
||||
%%% Page styles Memoir Manual ch7.2 p109
|
||||
\aliaspagestyle{book}{simple}
|
||||
\aliaspagestyle{chapter}{plain}%At the beginning we want page numbers on chapters
|
||||
\aliaspagestyle{cleared}{simple}
|
||||
\aliaspagestyle{part}{empty}
|
||||
|
||||
% \ifboolexpr{bool {draftbool} or bool {proof}}{
|
||||
% \makeoddfoot{cover}{}{\thepage}{\draftmark}
|
||||
% \makeevenfoot{cover}{\draftmark}{\thepage}{}
|
||||
% %\makeoddfoot{plain}{}{\thepage}{\draftmark}
|
||||
% %\makeevenfoot{plain}{\draftmark}{\thepage}{}
|
||||
% \makeoddfoot{simple}{}{}{\draftmark}
|
||||
% \makeevenfoot{simple}{\draftmark}{}{}
|
||||
% }{}
|
||||
|
||||
\makepagestyle{plain}% Just page numbers in corners
|
||||
\makeevenhead{plain}{\thepage}{}{}
|
||||
\makeoddhead{plain}{}{}{\thepage}
|
||||
@@ -279,26 +283,20 @@ BoldItalicFont={*-BoldItalic}]
|
||||
%%% Section numbering and the Table of Contents
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%55
|
||||
\maxsecnumdepth{subsubsection} % default by \mainmatter in preamble
|
||||
%\setsecnumdepth{subsubsection} % can be changed later
|
||||
\maxtocdepth{subsubsection} % default by \mainmatter in preamble
|
||||
%\settocdepth{subsubsection} % can be changed later
|
||||
|
||||
%%% Code to include files if they exist
|
||||
\newcommand{\InputIfExists}[1]{\IfFileExists{#1}{\input{#1}}{}}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% TWEAKS
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%
|
||||
%% Some adjustments to float placement
|
||||
\setcounter{topnumber}{5} \def\topfraction{1} \setcounter{bottomnumber}{4}
|
||||
\def\bottomfraction{1} \setcounter{totalnumber}{10} \def\textfraction{0}
|
||||
\def\floatpagefraction{.5}
|
||||
|
||||
%\def\@makefnmark{\rlap{\@textsuperscript{\@thefnmark}}}
|
||||
%% Not sure why there was a footnote adjustment on the cover
|
||||
%% Disabling for now.
|
||||
|
||||
%% Penalties for various text placement issues
|
||||
%% They can cause strange paragraph spacing on some pages
|
||||
%% Disabling for now --foley
|
||||
@@ -312,59 +310,6 @@ BoldItalicFont={*-BoldItalic}]
|
||||
%% Allowing ragged bottoms keeps the spacing consistent between paragraphs
|
||||
%% Alternatively: \setlength{\parskip}{0pt}
|
||||
|
||||
%\newcommand{\draftnote}[1]{\ifdraft{{\color{gray}#1}}}
|
||||
|
||||
%% We need the paralist and dashrule package in order to format the signature pages
|
||||
\RequirePackage{paralist}
|
||||
\RequirePackage{dashrule}
|
||||
|
||||
%% Information about Institution, Author, Degree, and Program
|
||||
\newcommand{\theInstitution}{Reykjav\'{\i}k University}%
|
||||
\newcommand{\theInstitutionAddress}{Menntavegur 1\\102 Reykjavík, Iceland}
|
||||
\newcommand{\theInstitutionPhone}{+354 599 6200}
|
||||
\newcommand{\theInstitutionURL}{www.ru.is}%
|
||||
|
||||
\newcommand{\theDocumentType}{Dissertation}
|
||||
\newcommand{\theDegreeAbbrv}{Ph.D.}
|
||||
\newcommand{\theDegreeLong}{Doctorate}
|
||||
\newcommand{\theProgram}{\LaTeX{} Magic}
|
||||
\newcommand{\theECTS}{30}
|
||||
\newcommand{\theSchool}{School of Awesomeness}
|
||||
\newcommand{\DocumentInfo}[6]{
|
||||
\renewcommand{\theDocumentType}{#1}
|
||||
\renewcommand{\theDegreeAbbrv}{#2}
|
||||
\renewcommand{\theDegreeLong}{#3}
|
||||
\renewcommand{\theProgram}{#4}
|
||||
\renewcommand{\theECTS}{#5}
|
||||
% ECTS Only applicable on BSc. and MSc.
|
||||
% Leave blank
|
||||
\renewcommand{\theSchool}{#6}
|
||||
}
|
||||
\newcommand{\theDegreeAndDepartment}{\theDegreeLong (\theDegreeAbbrv) in \theProgram{}}
|
||||
|
||||
|
||||
|
||||
\newcommand{\supervisors@ruthesis}{\item No Advisor}
|
||||
\newcommand{\Supervisors}[1]{\renewcommand{\supervisors@ruthesis}[1]{#1}}
|
||||
\newcommand{\supervisorheading@ruthesis}{Supervisor}
|
||||
\newcommand{\SupervisorHeading}[1]{\renewcommand{\supervisorheading@ruthesis}{#1}}
|
||||
|
||||
\newcommand{\examiners@ruthesis}{\item No Examiner}
|
||||
\newcommand{\Examiners}[1]{\renewcommand{\examiners@ruthesis}[1]{#1}}
|
||||
\newcommand{\examinerheading@ruthesis}{Examiner}
|
||||
\newcommand{\ExaminerHeading}[1]{\renewcommand{\examinerheading@ruthesis}{#1}}
|
||||
|
||||
\newcommand{\personinfo}[5]{
|
||||
\item[] #1, #2\\#3, #4, #5 %Stub to be customized later
|
||||
}
|
||||
|
||||
\newenvironment{peoplelist}
|
||||
{\begin{compactitem}[\hspace{10mm}]}
|
||||
{\end{compactitem}}
|
||||
|
||||
\newenvironment{rolelist}
|
||||
{\begin{compactitem}[\hspace{10mm}]}
|
||||
{\end{compactitem}}
|
||||
|
||||
|
||||
%% Clean up some formatting for the text
|
||||
@@ -375,96 +320,11 @@ BoldItalicFont={*-BoldItalic}]
|
||||
%\renewcommand{\thefootnote}{\scriptsize\arabic{footnote}} %to fix large footnote text errors in some documents
|
||||
|
||||
\renewcommand{\bibname}{Bibliography} %Renaming the bibliography section (if omitted it will be named "references")
|
||||
|
||||
|
||||
%% ----- PRINTED FRONT COVER (PHD) ----------------------------------------------------------
|
||||
%% This cover will be on the outside (not with window)
|
||||
%% Needs textpos package!
|
||||
\RequirePackage{calc}%arithmetic on lengths
|
||||
|
||||
\RequirePackage{printlen}% display lengths in arbitrary units
|
||||
\ifbool{debug}{\PassOptionsToPackage{showboxes}{textpos}}
|
||||
\RequirePackage[absolute, verbose]{textpos}%
|
||||
|
||||
%% These commands set the units in \begin{textblock} when not
|
||||
%% directly specified
|
||||
%% We set them to the page sizes so we can align from them
|
||||
\setlength{\TPHorizModule}{\paperwidth}
|
||||
\setlength{\TPVertModule}{\paperheight}
|
||||
\setlength{\TPMargin}{2mm}%% margins inside the textblock*
|
||||
\textblockorigin{0mm}{0mm}% start everything near the top-left corner
|
||||
\newlength{\pagecenterx}%
|
||||
\setlength{\pagecenterx}{0.5\stockwidth}
|
||||
\newlength{\pagecentery}
|
||||
\setlength{\pagecentery}{0.5\stockheight}
|
||||
|
||||
%% ----- INTERNAL TITLE PAGE WITH COMMITTEE ---------------------------------------------------
|
||||
%% TODO: make counter for supervisors in the very rare case that there
|
||||
%% is only one supervisor
|
||||
\newcommand{\DocumentDescription}[1]{\renewcommand{\maketitlehookc}{{\begin{center}#1\par\end{center}}}}
|
||||
|
||||
%% maketitlehookd is after the date
|
||||
\renewcommand{\maketitlehookd}{{%
|
||||
\vspace{2\baselineskip}
|
||||
% change \personinfo to make the entries needed
|
||||
% Because this is inside a command, we escape the #1 as ##1
|
||||
\renewcommand{\personinfo}[5]{\item[] ##1, ##2\\##3, ##4, ##5}
|
||||
\setlength{\pltopsep}{0.5\baselineskip} % first/top space
|
||||
\setlength{\plparsep}{0.5\baselineskip} % space between entries
|
||||
\setlength{\plitemsep}{0.5\baselineskip} % space between lines
|
||||
\begin{rolelist}
|
||||
\item \supervisorheading@ruthesis{}:
|
||||
\begin{peoplelist}
|
||||
\supervisors@ruthesis{}
|
||||
\end{peoplelist}
|
||||
\end{rolelist}
|
||||
}\vfill}
|
||||
|
||||
|
||||
%% ----- SIGNATURE PAGE, ONLY THESIS -----------------------------------------------------
|
||||
\newlength{\signaturey}
|
||||
\setlength{\signaturey}{8mm}
|
||||
\newlength{\signaturex}
|
||||
\setlength{\signaturex}{100mm}
|
||||
|
||||
\newcommand{\signaturepage}{
|
||||
\begin{cover}
|
||||
The undersigned hereby certify that they recommend to the
|
||||
\theSchool{} at \theInstitution{} for acceptance this
|
||||
\theDocumentType{} entitled \textbf{\thetitle}
|
||||
submitted by \textbf{\theauthor} in partial fulfillment
|
||||
of the requirements for the degree of \textbf{\theDegreeAndDepartment}%
|
||||
\vspace*{2\baselineskip}
|
||||
|
||||
\newcommand{\signline}[2]{\item \hdashrule{##2}{1pt}{1pt}\\##1}
|
||||
\renewcommand{\personinfo}[5]{\item\hdashrule{\signaturex}{1pt}{1pt}\\##1, ##2\\##3, ##4, ##5\\\vspace{\signaturey}\\}
|
||||
\setlength{\pltopsep}{2\baselineskip} % first/top space
|
||||
\setlength{\plparsep}{2\baselineskip} % space between entries
|
||||
\setlength{\plitemsep}{0.5\baselineskip} % space between lines
|
||||
{%\sigtextfont%
|
||||
% change \personinfo to make the entries needed
|
||||
% Because this is inside a command, we escape the #1 as ##1
|
||||
\renewcommand{\personinfo}[5]{&\hdashrule{\signaturex}{1pt}{1pt}\\&##1\\\vspace{\signaturey}\\}
|
||||
\begin{compactitem}[]
|
||||
\signline{date}{50mm}
|
||||
\end{compactitem}
|
||||
\begin{tabular}{lll}
|
||||
Student:\\
|
||||
\personinfo{\theauthor}{}{}{}{}\\
|
||||
\supervisorheading@ruthesis:\\
|
||||
\supervisors@ruthesis{}\\
|
||||
%\examinerheading@ruthesis:\\%% MSc old template
|
||||
%\examiners@ruthesis{}
|
||||
\end{tabular}
|
||||
}% end sigtextfont
|
||||
\end{cover}
|
||||
}
|
||||
|
||||
|
||||
|
||||
\renewenvironment{abstract}
|
||||
{\begin{cover}{\centering%
|
||||
{{\Large \thetitle}\\}%%
|
||||
{{\Large \@title}\\}%%
|
||||
\vspace{\baselineskip}
|
||||
\theauthor\\%
|
||||
\vspace{\baselineskip}
|
||||
@@ -475,11 +335,18 @@ BoldItalicFont={*-BoldItalic}]
|
||||
{\par\end{cover}\newpage}
|
||||
|
||||
|
||||
%%% from the old cs template, if so desired
|
||||
%\makepagestyle{oldstyle}
|
||||
%\makeoddhead{oldstyle}{\footnotesize{\authorHeader@ruthesis}}{}{\footnotesize{\thepage}}
|
||||
%\makeevenhead{oldstyle}{\footnotesize{\thepage}}{}{\footnotesize{\thetitle}}
|
||||
|
||||
%%%%%%%%%% Metadata for pdf file %%%%%%%%%%%%%%%%%%%%%%
|
||||
\AddToHook{beforedocument/before}{%
|
||||
%% package hyperref needs to be last, so we use a hook
|
||||
\PassOptionsToPackage{hidelinks}{hyperref}%disable boxes around links
|
||||
\RequirePackage{hyperref}
|
||||
\hypersetup{
|
||||
pdfauthor = {\theauthor{}},
|
||||
pdftitle = {\thetitle},
|
||||
%pdfsubject = {Templates},
|
||||
%pdfkeywords = {\theInstitution{}, Template, Thesis}
|
||||
}
|
||||
}
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "main"
|
||||
|
||||
Reference in New Issue
Block a user