main.tex.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. \documentclass[paper=a4,fontsize=11pt,twoside,titlepage,parskip=half-,openright]{scrbook}
  2. \usepackage[paperwidth=15.5cm,
  3. paperheight=23.5cm,
  4. lmargin = 2.1cm,
  5. rmargin = 1.2cm,
  6. top = 2.2cm,
  7. headsep = 0.6cm,
  8. textheight = 19.3cm,
  9. footskip = 1.0cm]{geometry}
  10. \usepackage{tugraz_defaults}
  11. \usepackage{moresize}
  12. \usepackage{pdfpages}
  13. \usepackage{enumitem}
  14. \usepackage{mdframed}
  15. \usepackage{import}
  16. \usepackage[breakable, theorems, skins]{tcolorbox}
  17. \usepackage[backend=biber,
  18. url=true,
  19. style=numeric,
  20. giveninits=false,
  21. maxnames=32,
  22. minnames=32,
  23. maxcitenames=2,
  24. mincitenames=1,
  25. backref=true, %
  26. ]{biblatex}
  27. \addbibresource{main.bib}
  28. <?php
  29. foreach ($bibresources as $br => $bib)
  30. {
  31. echo '\addbibresource{'.$bib.'}
  32. ';
  33. }
  34. if (isset($options["--cv"]))
  35. echo '\addbibresource{cv.bib}
  36. ';
  37. ?>
  38. \DeclareFieldFormat*{title}{#1}
  39. \DeclareFieldFormat*{booktitle}{#1}
  40. \DeclareFieldFormat*{journaltitle}{#1}
  41. \newcommand{\itemcite}[1]{\begin{itemize}\item \fullcite{#1}\end{itemize}}
  42. \renewcommand{\bf}{\bfseries}
  43. \renewcommand{\and}{,\xspace}
  44. \newcommand{\keywords}[1]{Keywords:\ #1.}
  45. \usepackage{graphicx}
  46. \usepackage[openbib,NoDate]{currvita}
  47. \preto\fullcite{\AtNextCite{\defcounter{maxnames}{99}}}
  48. \usepackage{scrhack}
  49. \usepackage{quotchap} %
  50. \DefineBibliographyStrings{english}{%
  51. backrefpage = {p.},%
  52. backrefpages = {pp.},%
  53. }
  54. \usepackage[titles]{tocloft}
  55. \renewcommand\cftchapaftersnum{.}
  56. \setlength{\cftchapnumwidth}{2em}
  57. \makeatletter
  58. \frenchspacing
  59. \widowpenalty=10000
  60. \clubpenalty=10000
  61. \setcounter{tocdepth}{1}
  62. \renewenvironment{table}
  63. {\setlength\abovecaptionskip{0\p@}%
  64. \setlength\belowcaptionskip{10\p@}%
  65. \@float{table}}
  66. {\end@float}
  67. \makeatother
  68. \makeatletter
  69. \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  70. \hbox{} \vspace*{\fill}
  71. \begin{center}
  72. \end{center}
  73. \vspace{\fill} \thispagestyle{empty}
  74. \newpage
  75. \if@twocolumn\hbox{}\newpage\fi\fi\fi}
  76. \makeatother
  77. \usepackage{titling}
  78. \usepackage[english]{babel}
  79. \addto{\captionsenglish}{\renewcommand*{\appendixname}{Appendix}}
  80. \renewcommand{\algorithmautorefname}{Algorithm}
  81. \renewcommand\itemautorefname{Step}
  82. \renewcommand\chapterautorefname{Chapter}
  83. \renewcommand\sectionautorefname{Section}
  84. \renewcommand\subsectionautorefname{Section}
  85. \renewcommand\subsubsectionautorefname{Section}
  86. \usepgfplotslibrary{dateplot}
  87. \usepgfplotslibrary{fillbetween}
  88. \hyphenation{}
  89. \usepackage{chngcntr}
  90. \addtokomafont{disposition}{\rmfamily}
  91. \usepackage{mypreamble}
  92. \begin{document}
  93. %\includepdf[pages=-]{front.pdf}
  94. \frontmatter
  95. %\counterwithin{lstlisting}{section}
  96. \counterwithin{listing}{section}
  97. \title{<?php echo $thesis_title ?>}
  98. \author{<?php echo $thesis_author ?>}
  99. \date{<?php echo $thesis_date ?>}
  100. %\pagenumbering{gobble}
  101. \newcommand{\tugsq}{\raisebox{0.5ex}{\tikzset{external/export next=false}\tikz{\fill (0,0) rectangle (0.5ex,0.5ex);}}}
  102. \sodef\so{}{0.45em}{1.4em}{0em}
  103. \begin{titlepage}%
  104. \pagestyle{empty}
  105. \tikzset{external/export next=false}
  106. \begin{tikzpicture}[remember picture,overlay]
  107. \node at (current page.south west){
  108. \tikzset{external/export next=false}
  109. \begin{tikzpicture}[remember picture, overlay]
  110. \fill[white] (0,0) rectangle (\paperwidth,\paperheight);
  111. \shade[shading=axis,bottom color=black!35,top color=white]
  112. (0,0) rectangle (\paperwidth,0.92\paperheight);
  113. \node[anchor=south west,inner sep=0pt] at (-2.8,1) {\includegraphics[width=152.5mm]{figures/background.png}};
  114. \end{tikzpicture}};
  115. \node at (current page.south east){
  116. \tikzset{external/export next=false}
  117. \begin{tikzpicture}[remember picture, overlay]
  118. \node[anchor=north east] at ($({\paperwidth-19cm},1)$) {
  119. \color{black}\fontsize{9}{9}\selectfont\so{\sffamily SCIENCE \tugsq{} PASSION \tugsq{} TECHNOLOGY}
  120. };
  121. \node [anchor=north east] at ($({\paperwidth-16cm},1.4)$) {\resizebox{1in}{!}{
  122. \includegraphics{figures/TU_Graz_Logo}
  123. }};
  124. \end{tikzpicture}};
  125. \node at (current page.east){
  126. \begin{tikzpicture}[remember picture, overlay]
  127. \node[anchor=east,xshift=-1.075cm,yshift=-3.6cm] (inst) {
  128. \color{black}\sffamily <?php echo $thesis_institute ?>
  129. };
  130. \node[below=of inst.east,anchor=east,yshift=0.4cm] {\sffamily Graz University of Technology};
  131. \end{tikzpicture}};
  132. \end{tikzpicture}
  133. \vspace{1cm}
  134. {\sffamily\large\noindent
  135. \theauthor}
  136. \vspace{0.15cm}
  137. \hrule
  138. \vspace{0.3cm}
  139. {\sffamily\huge\noindent \thetitle}
  140. \vspace{0.2cm}
  141. \hrule
  142. \vspace{2cm}
  143. {\sffamily\Large\noindent <?php echo $thesis_type ?>}\\[0.2cm]
  144. {\sffamily\noindent Assessors: <?php echo $thesis_assessors ?>}\\[0.2cm]
  145. {\sffamily\noindent <?php echo $thesis_date ?>}\\[0.2cm]
  146. \vspace{6cm}
  147. \end{titlepage}%
  148. %\pagenumbering{arabic}
  149. \cleardoublepage
  150. \addtocontents{toc}{\vspace*{\baselineskip}}
  151. \addtocontents{toc}{\vspace*{\baselineskip}}
  152. \tikzset{external/export next=true}
  153. \input{abstract}
  154. \cleardoublepage
  155. \tableofcontents
  156. \addcontentsline{toc}{chapter}{Contents}
  157. \cleardoublepage
  158. \mainmatter
  159. \addtocontents{toc}{\vspace*{\baselineskip}}
  160. \part[<?php echo $thesis_part1_title ?>]{<?php echo $thesis_part1_title ?>}
  161. \bgroup
  162. \begin{refsection}
  163. \input{intro}
  164. <?php echo $sloppy_begin; ?>
  165. \printbibliography[title={References}, heading=bibintoc]
  166. <?php echo $sloppy_end; ?>
  167. \end{refsection}
  168. \egroup
  169. \addtocontents{toc}{\vspace*{\baselineskip}}
  170. \cleardoublepage
  171. \part{Publications}
  172. \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
  173. \renewcommand*\thesection{\arabic{section}}
  174. \bgroup
  175. \begin{refsection}
  176. \chapter*{List of Publications}
  177. \label{sec:publicationlist}
  178. \addcontentsline{toc}{chapter}{List of Publications}
  179. During my thesis, I contributed to <?php echo $num_publications ?> publications in conference proceedings, <?php echo $num_publications_in_thesis ?> of which are included in this thesis as shown below.
  180. \newrefcontext[sorting=ydnt]
  181. \nocite{CV:*}
  182. <?php echo $sloppy_begin; ?>
  183. \printbibliography[title={Publications in this Thesis}, type=inproceedings, heading=subbibliography, keyword={mine}]
  184. \printbibliography[title={Other Contributions}, type=inproceedings, heading=subbibliography, keyword={mine_other}]
  185. <?php echo $sloppy_end; ?>
  186. \end{refsection}
  187. \egroup
  188. <?php
  189. foreach ($papers as $p => $f)
  190. {
  191. echo '
  192. \bgroup
  193. \begin{refsection}
  194. \pgfplotsset{
  195. table/search path={'.$p.'/},
  196. }
  197. \newcommand{\thesisGenIncludePath}{'.$p.'}
  198. \subimport{'.$p.'/}{'.$f.'}
  199. \end{refsection}
  200. \egroup
  201. \newpage
  202. ';
  203. }
  204. ?>
  205. <?php
  206. if (isset($options['--cv']))
  207. {
  208. echo <<<'END'
  209. \cleardoublepage
  210. \appendix
  211. \part*{Appendix}
  212. \addcontentsline{toc}{part}{Appendix}
  213. \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
  214. \renewcommand*\thesection{\arabic{section}}
  215. \addtocontents{toc}{\vspace*{\baselineskip}}
  216. \chapter*{Curriculum Vitae}
  217. \bgroup
  218. \begin{refsection}
  219. \input{cv}
  220. \end{refsection}
  221. \egroup
  222. \cleardoublepage
  223. \chapter*{Academic Field ``Applied Computer Science''}
  224. \bgroup
  225. \begin{refsection}
  226. \input{academicfield}
  227. \end{refsection}
  228. \egroup
  229. \cleardoublepage
  230. END;
  231. }
  232. ?>
  233. <?php
  234. if (!isset($options['--no-statutory-declaration']))
  235. {
  236. echo <<<'END'
  237. \chapter*{Statutory Declaration}
  238. I declare that I have authored this thesis independently, that I have not used other than the declared sources / resources, and that I have explicitly marked all material which has been quoted either literally or by content from the used sources.
  239. END;
  240. }
  241. ?>
  242. \end{document}