main.tex.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  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{\CopyrightYear}{}
  45. \newcommand{\setcopyright}{}
  46. \newcommand{\conferenceinfo}{}
  47. \newcommand{\isbn}{}
  48. \newcommand{\doi}{}
  49. \newcommand{\printccsdesc}{}
  50. \newcommand{\numberofauthors}{}
  51. \newcommand{\alignauthor}{}
  52. \newcommand{\affaddr}{}
  53. \newcommand{\ccsdesc}[1]{}
  54. \newcommand{\acmPrice}{}
  55. \newcommand{\keywords}[1]{Keywords:\ #1.}
  56. \usepackage{graphicx}
  57. \usepackage[openbib,NoDate]{currvita}
  58. \preto\fullcite{\AtNextCite{\defcounter{maxnames}{99}}}
  59. \usepackage{quotchap} %
  60. \DefineBibliographyStrings{english}{%
  61. backrefpage = {p.},%
  62. backrefpages = {pp.},%
  63. }
  64. \usepackage[titles]{tocloft}
  65. \renewcommand\cftchapaftersnum{.}
  66. \setlength{\cftchapnumwidth}{2em}
  67. \usepackage{verbatim}
  68. \makeatletter
  69. \frenchspacing
  70. \widowpenalty=10000
  71. \clubpenalty=10000
  72. \setcounter{tocdepth}{1}
  73. \renewenvironment{table}
  74. {\setlength\abovecaptionskip{0\p@}%
  75. \setlength\belowcaptionskip{10\p@}%
  76. \@float{table}}
  77. {\end@float}
  78. \newenvironment{CCSXML}
  79. {\comment}
  80. {\endcomment}
  81. \makeatother
  82. \makeatletter
  83. \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else
  84. \hbox{} \vspace*{\fill}
  85. \begin{center}
  86. \end{center}
  87. \vspace{\fill} \thispagestyle{empty}
  88. \newpage
  89. \if@twocolumn\hbox{}\newpage\fi\fi\fi}
  90. \makeatother
  91. \usepackage{titling}
  92. \usepackage[english]{babel}
  93. \addto{\captionsenglish}{\renewcommand*{\appendixname}{Appendix}}
  94. \renewcommand{\algorithmautorefname}{Algorithm}
  95. \renewcommand\itemautorefname{Step}
  96. \renewcommand\chapterautorefname{Chapter}
  97. \renewcommand\sectionautorefname{Section}
  98. \renewcommand\subsectionautorefname{Section}
  99. \renewcommand\subsubsectionautorefname{Section}
  100. \usepgfplotslibrary{dateplot}
  101. \usepgfplotslibrary{fillbetween}
  102. \hyphenation{}
  103. \usepackage{chngcntr}
  104. \addtokomafont{disposition}{\rmfamily}
  105. \usepackage{mypreamble}
  106. \usepackage{scrhack}
  107. \begin{document}
  108. %\includepdf[pages=-]{front.pdf}
  109. \frontmatter
  110. %\counterwithin{lstlisting}{section}
  111. \counterwithin{listing}{section}
  112. \title{<?php echo $thesis_title ?>}
  113. \author{<?php echo $thesis_author ?>}
  114. \date{<?php echo $thesis_date ?>}
  115. %\pagenumbering{gobble}
  116. \newcommand{\tugsq}{\raisebox{0.5ex}{\tikzset{external/export next=false}\tikz{\fill (0,0) rectangle (0.5ex,0.5ex);}}}
  117. \sodef\so{}{0.45em}{1.4em}{0em}
  118. \begin{titlepage}%
  119. \pagestyle{empty}
  120. \tikzset{external/export next=false}
  121. \begin{tikzpicture}[remember picture,overlay]
  122. \node at (current page.south west){
  123. \tikzset{external/export next=false}
  124. \begin{tikzpicture}[remember picture, overlay]
  125. \fill[white] (0,0) rectangle (\paperwidth,\paperheight);
  126. \shade[shading=axis,bottom color=black!35,top color=white]
  127. (0,0) rectangle (\paperwidth,0.92\paperheight);
  128. \node[anchor=south west,inner sep=0pt] at (-2.8,1) {\includegraphics[width=152.5mm]{figures/background.png}};
  129. \end{tikzpicture}};
  130. \node at (current page.south east){
  131. \tikzset{external/export next=false}
  132. \begin{tikzpicture}[remember picture, overlay]
  133. \node[anchor=north east] at ($({\paperwidth-19cm},1)$) {
  134. \color{black}\fontsize{9}{9}\selectfont\so{\sffamily SCIENCE \tugsq{} PASSION \tugsq{} TECHNOLOGY}
  135. };
  136. \node [anchor=north east] at ($({\paperwidth-16cm},1.4)$) {\resizebox{1in}{!}{
  137. \includegraphics{figures/TU_Graz_Logo}
  138. }};
  139. \end{tikzpicture}};
  140. \node at (current page.east){
  141. \begin{tikzpicture}[remember picture, overlay]
  142. \node[anchor=east,xshift=-1.075cm,yshift=-3.6cm] (inst) {
  143. \color{black}\sffamily <?php echo $thesis_institute ?>
  144. };
  145. \node[below=of inst.east,anchor=east,yshift=0.4cm] {\sffamily Graz University of Technology};
  146. \end{tikzpicture}};
  147. \end{tikzpicture}
  148. \vspace{1cm}
  149. {\sffamily\large\noindent
  150. \theauthor}
  151. \vspace{0.15cm}
  152. \hrule
  153. \vspace{0.3cm}
  154. {\sffamily\huge\noindent \thetitle}
  155. \vspace{0.2cm}
  156. \hrule
  157. \vspace{2cm}
  158. {\sffamily\Large\noindent <?php echo $thesis_type ?>}\\[0.2cm]
  159. {\sffamily\noindent Assessors: <?php echo $thesis_assessors ?>}\\[0.2cm]
  160. {\sffamily\noindent <?php echo $thesis_date ?>}\\[0.2cm]
  161. \vspace{6cm}
  162. \end{titlepage}%
  163. %\pagenumbering{arabic}
  164. \cleardoublepage
  165. \addtocontents{toc}{\vspace*{\baselineskip}}
  166. \addtocontents{toc}{\vspace*{\baselineskip}}
  167. \tikzset{external/export next=true}
  168. \input{abstract}
  169. \cleardoublepage
  170. \tableofcontents
  171. \addcontentsline{toc}{chapter}{Contents}
  172. \cleardoublepage
  173. \mainmatter
  174. \addtocontents{toc}{\vspace*{\baselineskip}}
  175. \part[<?php echo $thesis_part1_title ?>]{<?php echo $thesis_part1_title ?>}
  176. \bgroup
  177. \begin{refsection}
  178. \input{intro}
  179. <?php echo $sloppy_begin; ?>
  180. \printbibliography[title={References}, heading=bibintoc]
  181. <?php echo $sloppy_end; ?>
  182. \end{refsection}
  183. \egroup
  184. \addtocontents{toc}{\vspace*{\baselineskip}}
  185. \cleardoublepage
  186. \part{Publications}
  187. \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
  188. \renewcommand*\thesection{\arabic{section}}
  189. \bgroup
  190. \begin{refsection}
  191. \chapter*{List of Publications}
  192. \label{sec:publicationlist}
  193. \addcontentsline{toc}{chapter}{List of Publications}
  194. 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.
  195. \newrefcontext[sorting=ydnt]
  196. \nocite{CV:*}
  197. <?php echo $sloppy_begin; ?>
  198. \printbibliography[title={Publications in this Thesis}, type=inproceedings, heading=subbibliography, keyword={mine}]
  199. \printbibliography[title={Other Contributions}, type=inproceedings, heading=subbibliography, keyword={mine_other}]
  200. <?php echo $sloppy_end; ?>
  201. \end{refsection}
  202. \egroup
  203. <?php
  204. foreach ($papers as $p => $f)
  205. {
  206. echo '
  207. \bgroup
  208. \begin{refsection}
  209. \pgfplotsset{
  210. table/search path={'.$p.'/},
  211. }
  212. \newcommand{\thesisGenIncludePath}{'.$p.'}
  213. \subimport*{'.$p.'/}{'.$f.'}
  214. \graphicspath{}
  215. \end{refsection}
  216. \egroup
  217. \newpage
  218. ';
  219. }
  220. ?>
  221. <?php
  222. if (isset($options['--cv']))
  223. {
  224. echo <<<'END'
  225. \cleardoublepage
  226. \appendix
  227. \part*{Appendix}
  228. \addcontentsline{toc}{part}{Appendix}
  229. \addtocontents{toc}{\protect\setcounter{tocdepth}{0}}
  230. \renewcommand*\thesection{\arabic{section}}
  231. \addtocontents{toc}{\vspace*{\baselineskip}}
  232. \chapter*{Curriculum Vitae}
  233. \bgroup
  234. \begin{refsection}
  235. \input{cv}
  236. \end{refsection}
  237. \egroup
  238. \cleardoublepage
  239. \chapter*{Academic Field ``Applied Computer Science''}
  240. \bgroup
  241. \begin{refsection}
  242. \input{academicfield}
  243. \end{refsection}
  244. \egroup
  245. \cleardoublepage
  246. END;
  247. }
  248. ?>
  249. <?php
  250. if (!isset($options['--no-statutory-declaration']))
  251. {
  252. echo <<<'END'
  253. \chapter*{Statutory Declaration}
  254. 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.
  255. END;
  256. }
  257. ?>
  258. \end{document}