From d0f1ab052b0abc70293a2fc77b795e4f45b50790 Mon Sep 17 00:00:00 2001 From: Dan Goldsmith Date: Thu, 20 Sep 2018 10:35:10 +0100 Subject: [PATCH 1/4] Removed Beamer Stuff from Template File --- Template/disso.latex | 125 ++++++++----------------------------------- 1 file changed, 21 insertions(+), 104 deletions(-) diff --git a/Template/disso.latex b/Template/disso.latex index 22f3094..039d3c6 100644 --- a/Template/disso.latex +++ b/Template/disso.latex @@ -5,15 +5,6 @@ $if(colorlinks)$ $endif$ % \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(papersize)$$papersize$paper,$endif$$if(beamer)$ignorenonframetext,$if(handout)$handout,$endif$$if(aspectratio)$aspectratio=$aspectratio$,$endif$$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} -% $if(beamer)$ -% \setbeamertemplate{caption}[numbered] -% \setbeamertemplate{caption label separator}{: } -% \setbeamercolor{caption name}{fg=normal text.fg} -% \beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ -% $endif$ -% $if(beamerarticle)$ -% \usepackage{beamerarticle} % needs to be loaded first -% $endif$ %DG - Remove font familty stuff $if(fontfamily)$ @@ -148,17 +139,9 @@ $highlighting-macros$ $endif$ $if(tables)$ \usepackage{longtable,booktabs} -$if(beamer)$ -\usepackage{caption} -% These lines are needed to make table captions work with longtable: -\makeatletter -\def\fnum@table{\tablename~\thetable} -\makeatother -$else$ % Fix footnotes in tables (requires footnote package) \IfFileExists{footnote.sty}{\usepackage{footnote}\makesavenoteenv{longtable}}{} $endif$ -$endif$ $if(graphics)$ \usepackage{graphicx,grffile} \makeatletter @@ -170,43 +153,6 @@ $if(graphics)$ % using explicit options in \includegraphics[width, height, ...]{} \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} $endif$ -%% $if(beamer)$ -%% % Prevent slide breaks in the middle of a paragraph: -%% \widowpenalties 1 10000 -%% \raggedbottom -%% $if(section-titles)$ -%% \setbeamertemplate{part page}{ -%% \centering -%% \begin{beamercolorbox}[sep=16pt,center]{part title} -%% \usebeamerfont{part title}\insertpart\par -%% \end{beamercolorbox} -%% } -%% \setbeamertemplate{section page}{ -%% \centering -%% \begin{beamercolorbox}[sep=12pt,center]{part title} -%% \usebeamerfont{section title}\insertsection\par -%% \end{beamercolorbox} -%% } -%% \setbeamertemplate{subsection page}{ -%% \centering -%% \begin{beamercolorbox}[sep=8pt,center]{part title} -%% \usebeamerfont{subsection title}\insertsubsection\par -%% \end{beamercolorbox} -%% } -%% \AtBeginPart{ -%% \frame{\partpage} -%% } -%% \AtBeginSection{ -%% \ifbibliography -%% \else -%% \frame{\sectionpage} -%% \fi -%% } -%% \AtBeginSubsection{ -%% \frame{\subsectionpage} -%% } -%% $endif$ -%% $endif$ $if(links-as-notes)$ % Make links footnotes instead of hotlinks: \DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} @@ -224,10 +170,7 @@ $if(numbersections)$ $else$ \setcounter{secnumdepth}{0} $endif$ -$if(beamer)$ -$else$ $if(subparagraph)$ -$else$ % Redefines (sub)paragraphs to behave more like sections \ifx\paragraph\undefined\else \let\oldparagraph\paragraph @@ -238,7 +181,6 @@ $else$ \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} \fi $endif$ -$endif$ $if(pagestyle)$ \pagestyle{$pagestyle$} $endif$ @@ -341,63 +283,45 @@ $if(institute)$ \institute{$for(institute)$$institute$$sep$ \and $endfor$} $endif$ \date{$date$} -$if(beamer)$ -$if(titlegraphic)$ -\titlegraphic{\includegraphics{$titlegraphic$}} -$endif$ -$if(logo)$ -\logo{\includegraphics{$logo$}} -$endif$ -$endif$ \begin{document} \frontmatter $if(title)$ - $if(beamer)$ - \frame{\titlepage} - $else$ - \maketitle - $endif$ +\maketitle $endif$ % - $if(PDF-ethics)$ - \includepdf[pages=-]{$PDF-ethics$} - $endif$ +$if(PDF-ethics)$ +\includepdf[pages=-]{$PDF-ethics$} +$endif$ % - $if(TEX-declaration)$ - %\input{"/tmp/02-Originallity_Statement.tex"} - \input{$TEX-declaration$} - $endif$ + +$if(TEX-declaration)$ +\input{$TEX-declaration$} +$endif$ % - $if(PDF-declaration)$ - \includepdf[pages=-]{$PDF-declaration$} - $endif$ +$if(PDF-declaration)$ +\includepdf[pages=-]{$PDF-declaration$} +$endif$ % - $if(abstract)$ - \begin{abstract} - $abstract$ - \end{abstract} - $endif$ +$if(abstract)$ +\begin{abstract} + $abstract$ +\end{abstract} +$endif$ % % $for(include-before)$ $include-before$ $endfor$ $if(toc)$ -$if(beamer)$ -\begin{frame} -\tableofcontents[hideallsubsections] -\end{frame} -$else$ { -$if(colorlinks)$ -\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} -$endif$ -\setcounter{tocdepth}{$toc-depth$} -\tableofcontents + $if(colorlinks)$ + \hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} + $endif$ + \setcounter{tocdepth}{$toc-depth$} + \tableofcontents } $endif$ -$endif$ $if(lot)$ \listoftables $endif$ @@ -419,14 +343,7 @@ $else$ \renewcommand\refname{$biblio-title$} $endif$ $endif$ -$if(beamer)$ -\begin{frame}[allowframebreaks]{$biblio-title$} -\bibliographytrue -$endif$ \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} -$if(beamer)$ -\end{frame} -$endif$ $endif$ $endif$ From 3a19218a1cecc097e72d4407434c1c4f3e166e2d Mon Sep 17 00:00:00 2001 From: Dan Goldsmith Date: Thu, 20 Sep 2018 10:44:51 +0100 Subject: [PATCH 2/4] Added option to hide Declaration and Ethics in output --- Dissertation.md | 3 +++ Template/disso.latex | 28 +++++++++++++++------------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Dissertation.md b/Dissertation.md index cd1b508..746fff1 100644 --- a/Dissertation.md +++ b/Dissertation.md @@ -8,6 +8,9 @@ keywords: Comma, Seperated, Keywords degreetitle: 'BSc: Ethical Hacking and cybersecurity' +#Hide the Declaration and Ethics Form +draft: True + #Ethics form, REPLACE THIS WITH YOUR ONE PDF-ethics: Supporting/ethics-certificate.pdf diff --git a/Template/disso.latex b/Template/disso.latex index 039d3c6..7829a46 100644 --- a/Template/disso.latex +++ b/Template/disso.latex @@ -290,19 +290,21 @@ $if(title)$ \maketitle $endif$ % -$if(PDF-ethics)$ -\includepdf[pages=-]{$PDF-ethics$} -$endif$ -% - -$if(TEX-declaration)$ -\input{$TEX-declaration$} -$endif$ -% -$if(PDF-declaration)$ -\includepdf[pages=-]{$PDF-declaration$} -$endif$ -% +$if(draft)$ + $else$ + $if(PDF-ethics)$ + \includepdf[pages=-]{$PDF-ethics$} + $endif$ + % + $if(TEX-declaration)$ + \input{$TEX-declaration$} + $endif$ + % + $if(PDF-declaration)$ + \includepdf[pages=-]{$PDF-declaration$} + $endif$ + % +$endif$ %Stop Hiding Stuff if not in draft mode $if(abstract)$ \begin{abstract} $abstract$ From 506e0f9965e6f077c6aa42f5c3ec59cc278128c9 Mon Sep 17 00:00:00 2001 From: Dan Goldsmith Date: Thu, 20 Sep 2018 10:45:51 +0100 Subject: [PATCH 3/4] Update header to use two sider printing --- Header.md | 2 +- SubHeader.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Header.md b/Header.md index 9b4719a..cf55685 100644 --- a/Header.md +++ b/Header.md @@ -6,7 +6,7 @@ classoption: - numbered - print - index - - oneside + - twoside toc: true toc-depth: 2 diff --git a/SubHeader.md b/SubHeader.md index 0641600..9b2d7dc 100644 --- a/SubHeader.md +++ b/SubHeader.md @@ -6,7 +6,7 @@ classoption: - numbered - print - index - - oneside + - twoside toc: true toc-depth: 2 From 987a56db66a57f39573ee3a646087a8f97982dc5 Mon Sep 17 00:00:00 2001 From: Dan Goldsmith Date: Thu, 20 Sep 2018 11:20:57 +0100 Subject: [PATCH 4/4] Added tudent Id to the Document Metadata --- Dissertation.md | 1 + Template/Classes/CUPhDThesis.cls | 18 ++++++++++++++++++ Template/disso.latex | 17 ++++++++--------- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/Dissertation.md b/Dissertation.md index 746fff1..1407a79 100644 --- a/Dissertation.md +++ b/Dissertation.md @@ -1,6 +1,7 @@ --- # ----- THINGS THAT YOU NEED TO CHANGE ---- author: "Your Name" +sid: 424242 title: "Project Title" # Keywords associated with your project diff --git a/Template/Classes/CUPhDThesis.cls b/Template/Classes/CUPhDThesis.cls index 53f858a..b2d2c0f 100644 --- a/Template/Classes/CUPhDThesis.cls +++ b/Template/Classes/CUPhDThesis.cls @@ -820,6 +820,10 @@ wish to left align your text} % These macros are used to declare arguments needed for the % construction of the title page and other preamble. +%DG: +\newcommand{\@stuid}{} +\newcommand{\stuid}[1]{\renewcommand{\@stuid}{#1}} + % Subtitle (optional) \newcommand{\@subtitle}{} \newcommand{\subtitle}[1]{\renewcommand{\@subtitle}{#1}} @@ -927,6 +931,9 @@ wish to left align your text} {\usebox{\PHD@author}} \vspace{.05\PHD@titlepagespacing} +{\usebox{\PHD@SID}} +\vspace{.05\PHD@titlepagespacing} + % Degree title on first submission) \if@finalsub \else @@ -1147,10 +1154,20 @@ wish to left align your text} \centering \Large {by} \par \vspace{0.5em} \centering \Large \bfseries{\@author} + \vspace{0.25em} + \end{minipage} +\end{lrbox} + +% DG: Student ID Box +\newsavebox{\PHD@SID} +\begin{lrbox}{\PHD@SID} + \begin{minipage}[c]{\textwidth} + \centering \Large {\@stuid} \vspace{0.5em} \end{minipage} \end{lrbox} + % Award Box \newsavebox{\PHD@award} \begin{lrbox}{\PHD@award} @@ -1255,6 +1272,7 @@ wish to left align your text} \setlength{\PHD@titlepagespacing}{ \textheight % - \totalheightof{\usebox{\PHD@Title}} - \totalheightof{\usebox{\PHD@author}} + - \totalheightof{\usebox{\PHD@SID}} - \totalheightof{\usebox{\PHD@supervisor}} - \totalheightof{\usebox{\PHD@advisor}} - \totalheightof{\usebox{\PHD@award}} diff --git a/Template/disso.latex b/Template/disso.latex index 7829a46..8c59221 100644 --- a/Template/disso.latex +++ b/Template/disso.latex @@ -240,27 +240,26 @@ $endif$ %Allow PDF to be included \usepackage{pdfpages} -%TITLE $if(title)$ -%EXISTS + \title{$title$$if(thanks)$\thanks{$thanks$}$endif$} $endif$ $if(subtitle)$ \providecommand{\subtitle}[1]{} \subtitle{$subtitle$} $endif$ -%TITEND - -%METTIT -$if(title-meta)$ -%MET EXISTS -$endif$ -%ENDMETTIT $if(author)$ \author{$for(author)$$author$$sep$ \and $endfor$} $endif$ + +%\stuid{42} + +$if(sid)$ +\stuid{$sid$} +$endif$ + $if(dept)$ \dept{$dept$} $endif$