comp.sty 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. %%%% IDENTIFICATION
  3. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  4. \ProvidesPackage{comp}
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6. %%%%% SETUP MACROS AND SWITCHES
  7. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  8. \def\@title{}
  9. \def\@author{}
  10. \def\titlepageblurb#1{\gdef\@titlepageblurb{#1}}
  11. \def\principaladviser#1{\gdef\@principaladviser{#1}}
  12. \def\@principaladviser{*}
  13. \def\coprincipaladviser#1{\gdef\@coprincipaladviser{#1}}
  14. \def\@coprincipaladviser{*}
  15. \def\assistantadviser#1{\gdef\@assistantadviser{#1}}
  16. \def\@assistantadviser{*}
  17. \def\submitdate#1{\gdef\@submitdate{#1}}
  18. \def\copyrightyear#1{\gdef\@copyrightyear{#1}}
  19. \def\@copyrightyear{\number\the\year}
  20. \def\reportnumber#1{\gdef\@reportnumber{#1}}
  21. %\def\tocdepthvalue#1{\gdef\@tocdepthvalue{#1}}
  22. %\def\secnumdepthvalue#1{\gdef\@secnumdepthvalue{#1}}
  23. \def\@tocdepthvalue{}
  24. \def\@secnumdepthvalue{}
  25. \def\bibfile#1{\gdef\@bibfile{#1}}
  26. \newif\ifw@ntsignature
  27. \newif\ifw@ntcopyright
  28. \newif\ifw@nttableofcontents
  29. \newif\ifw@ntlistoffigures
  30. \newif\ifw@ntlistoftables
  31. \newif\ifw@ntbibliography
  32. \newif\ifw@ntindex
  33. \newif\ifw@ntnumbers
  34. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  35. %%%% OPTION DECLARATION PART
  36. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  37. %-------------------
  38. %%%% ENGLISH OPTION
  39. %-------------------
  40. \DeclareOption{english}{%
  41. \PassOptionsToPackage{english}{babel}
  42. %
  43. \def\@submitdate{%
  44. \ifcase\the\month\or
  45. January\or February\or March\or April\or May\or June\or
  46. July\or August\or September\or October\or November\or December\fi
  47. \space \number\the\year
  48. }
  49. %
  50. \def\@phddegree{Doctor}
  51. %
  52. \def\@masterdegree{Master}
  53. %
  54. \def\@bachelordegree{Bachelor}
  55. %
  56. \def\@advisername{Principal Adviser}
  57. %
  58. \def\@coadvisername{Principal Co-Adviser}
  59. %
  60. \def\@assistantadvisername{Assistant Adviser}
  61. %
  62. \def\@dissertationblurb{
  63. Dissertation Submitted in \@submitdate\ to the\\
  64. Department of Mathematics and Computer Science\\
  65. of the Faculty of Sciences, University of Antwerp,\\
  66. in Partial Fulfillment of the Requirements\\
  67. for the Degree of \@thesisdegree\ of Science.
  68. }
  69. %
  70. \def\@techreportblurb{
  71. Technical Report \@reportnumber , submitted \@submitdate . \\
  72. Department of Mathematics and Computer Science\\
  73. of the Faculty of Sciences, University of Antwerp.
  74. }
  75. %
  76. \def\@advisersblurb{%
  77. \if*\@principaladviser \else
  78. {\@advisername: \@principaladviser} \\
  79. \fi
  80. \if*\@coprincipaladviser \else
  81. {\@coadvisername : \@coprincipaladviser}\\
  82. \fi
  83. \if*\@assistantadviser \else
  84. {\@assistantadvisername : \@assistantadviser}\\
  85. \fi
  86. }
  87. %
  88. \def\@courseblurb{
  89. \@coursedegree\ of Computer Science curriculum,\\
  90. Faculty of Sciences, University of Antwerp.\\
  91. Course notes for academic year \@submitdate.
  92. }
  93. %
  94. \def\@researchgroupblurb{%
  95. }
  96. %
  97. \def\@signatureblurb{%
  98. I certify that I have read this dissertation and that,
  99. in my opinion, it is fully adequate in scope and quality as a
  100. dissertation for the degree of \@thesisdegree.
  101. }
  102. %
  103. \def\@copyrightblurb{%
  104. All rights reserved.
  105. }
  106. }
  107. %-----------------
  108. %%%% DUTCH OPTION
  109. %-----------------
  110. \DeclareOption{dutch}{%
  111. \PassOptionsToPackage{dutch}{babel}
  112. %
  113. \def\@submitdate{%
  114. \ifcase\the\month\or
  115. Januari\or Februari\or Maart\or April\or Mei\or Juni\or
  116. Juli\or Augustus\or September\or Oktober\or November\or December\fi
  117. \space \number\the\year
  118. }
  119. %
  120. \def\@phddegree{Doctor}
  121. %
  122. \def\@masterdegree{Master}
  123. %
  124. \def\@bachelordegree{Bachelor}
  125. %
  126. \def\@advisername{Promotor}
  127. %
  128. \def\@coadvisername{Co-Promotor}
  129. %
  130. \def\@assistantadvisername{Begeleider}
  131. %
  132. \def\@dissertationblurb{
  133. Thesis ingediend in \@submitdate\ bij het\\
  134. Departement Wiskunde en Informatica van de\\
  135. Faculteit Wetenschappen, Universiteit Antwerpen,\\
  136. ter vervulling van de vereisten voor het bekomen\\
  137. van het Diploma van \@thesisdegree\ in de Wetenschappen.
  138. \newline
  139. }
  140. %
  141. \def\@advisersblurb{%
  142. \if*\@principaladviser \else
  143. {\@advisername: \@principaladviser} \\
  144. \fi
  145. \if*\@coprincipaladviser \else
  146. {\@coadvisername : \@coprincipaladviser}\\
  147. \fi
  148. \if*\@assistantadviser \else
  149. {\@assistantadvisername : \@assistantadviser}\\
  150. \fi
  151. }
  152. %
  153. \def\@courseblurb{
  154. Opleiding \@coursedegree\ of Science in Informatica, van de\\
  155. Faculteit Wetenschappen, Universiteit Antwerpen.\\
  156. Nota's bij de cursus voor academiejaar \@submitdate.
  157. \newline
  158. }
  159. %
  160. \def\@researchgroupblurb{%
  161. }
  162. %
  163. \def\@signatureblurb{%
  164. Ik verklaar dat ik deze thesis heb gelezen en dat, naar mijn
  165. mening, het werk in draagwijdte en kwaliteit beantwoordt
  166. aan de vereisten voor een thesis voor het diploma van
  167. \@thesisdegree.
  168. }
  169. %
  170. \def\@copyrightblurb{%
  171. Alle rechten voorbehouden.
  172. }
  173. }
  174. %---------------------
  175. %%%% PHDTHESIS OPTION
  176. %---------------------
  177. \DeclareOption{phdthesis}{%
  178. \def\@thesisdegree{\@phddegree}
  179. \def\@titlepageblurb{\@dissertationblurb}
  180. \w@ntcopyrighttrue
  181. \w@ntsignaturetrue
  182. \w@nttableofcontentstrue
  183. \def\@tocdepthvalue{2}
  184. \w@nttableofcontentstrue
  185. \w@ntlistoffigurestrue
  186. \w@ntlistoftablestrue
  187. %
  188. \def\@secnumdepthvalue{2}
  189. %
  190. \w@ntbibliographytrue
  191. \w@ntindextrue
  192. }
  193. %------------------------
  194. %%%% MASTERTHESIS OPTION
  195. %------------------------
  196. \DeclareOption{masterthesis}{%
  197. \def\@thesisdegree{\@masterdegree}
  198. \def\@titlepageblurb{\@dissertationblurb}
  199. \w@ntcopyrightfalse
  200. \w@ntsignaturefalse
  201. \w@nttableofcontentstrue
  202. \def\@tocdepthvalue{2}
  203. \w@ntlistoffigurestrue
  204. \w@ntlistoftablestrue
  205. %
  206. \def\@secnumdepthvalue{2}
  207. %
  208. \w@ntbibliographytrue
  209. \w@ntindexfalse
  210. }
  211. %--------------------------
  212. %%%% BACHELORTHESIS OPTION
  213. %--------------------------
  214. \DeclareOption{bachelorthesis}{%
  215. \def\@thesisdegree{\@bachelordegree}
  216. \def\@titlepageblurb{\@dissertationblurb}
  217. \w@ntsopyrightfalse
  218. \w@ntsignaturefalse
  219. \w@nttableofcontentstrue
  220. \def\@tocdepthvalue{1}
  221. \w@ntlistoffiguresfalse
  222. \w@ntlistofoablesfalse
  223. %
  224. \def\@secnumdepthvalue{2}
  225. %
  226. \w@ntbibliographytrue
  227. \w@ntindexfalse
  228. }
  229. %------------------------
  230. %%%% MASTERCOURSE OPTION
  231. %------------------------
  232. \DeclareOption{mastercourse}{%
  233. \def\@coursedegree{\@masterdegree}
  234. \def\@titlepageblurb{\@courseblurb}
  235. \w@ntcopyrightfalse
  236. \w@ntsignaturefalse
  237. \w@nttableofcontentstrue
  238. \def\@tocdepthvalue{1}
  239. \w@ntlistoffiguresfalse
  240. \w@ntlistoftablesfalse
  241. %
  242. \def\@secnumdepthvalue{2}
  243. %
  244. \w@ntbibliographytrue
  245. \w@ntindexfalse
  246. }
  247. %--------------------------
  248. %%%% BACHELORCOURSE OPTION
  249. %--------------------------
  250. \DeclareOption{bachelorcourse}{%
  251. \def\@coursedegree{\@bachelordegree}
  252. \def\@titlepageblurb{\@courseblurb}
  253. \w@nttableofcontentstrue
  254. \w@ntcopyrightfalse
  255. \w@ntsignaturefalse
  256. \def\@tocdepthvalue{1}
  257. \w@ntlistoffiguresfalse
  258. \w@ntlistoftablesfalse
  259. %
  260. \def\@secnumdepthvalue{2}
  261. %
  262. \w@ntbibliographytrue
  263. \w@ntindexfalse
  264. }
  265. %----------------------
  266. %%%% TECHREPORT OPTION
  267. %----------------------
  268. \DeclareOption{techreport}{%
  269. \def\@titlepageblurb{\@techreportblurb}
  270. \w@nttableofcontentstrue
  271. \w@ntcopyrightfalse
  272. \w@ntsignaturefalse
  273. \def\@tocdepthvalue{1}
  274. \w@ntlistoffiguresfalse
  275. \w@ntlistoftablesfalse
  276. %
  277. \def\@secnumdepthvalue{2}
  278. %
  279. \w@ntbibliographytrue
  280. \w@ntindexfalse
  281. }
  282. %-------------------
  283. %%%% GENERIC OPTION
  284. %-------------------
  285. \DeclareOption{generic}{%
  286. \def\@titlepageblurb{}
  287. \w@nttableofcontentsfalse
  288. \w@ntcopyrightfalse
  289. \w@ntsignaturefalse
  290. \def\@tocdepthvalue{1}
  291. \w@ntlistoffiguresfalse
  292. \w@ntlistoftablesfalse
  293. %
  294. \def\@secnumdepthvalue{2}
  295. %
  296. \w@ntbibliographytrue
  297. \w@ntindexfalse
  298. }
  299. %---------------------------------
  300. %%%% COPYRIGHT/NOCOPYRIGHT OPTION
  301. %---------------------------------
  302. \DeclareOption{copyright}{%
  303. \w@ntcopyrighttrue
  304. }
  305. \DeclareOption{nocopyright}{%
  306. \w@ntcopyrightfalse
  307. }
  308. %---------------------------------
  309. %%%% SIGNATURE/NOSIGNATURE OPTION
  310. %---------------------------------
  311. \DeclareOption{signature}{%
  312. \w@ntsignaturetrue
  313. }
  314. \DeclareOption{nosignature}{%
  315. \w@ntsignaturefalse
  316. }
  317. %---------------------------------
  318. %%%% TABLEOFCONTENTS/NOTABLEOFCONTENTS OPTION
  319. %---------------------------------
  320. \DeclareOption{tableofcontents}{%
  321. \w@nttableofcontentstrue
  322. }
  323. \DeclareOption{notableofcontents}{%
  324. \w@nttableofcontentsfalse
  325. }
  326. %-----------------------------------------
  327. %%%% LISTOFFIGURES/NOLISTOFFIGURES OPTION
  328. %-----------------------------------------
  329. \DeclareOption{listoffigures}{%
  330. \w@ntlistoffigurestrue
  331. }
  332. \DeclareOption{nolistoffigures}{%
  333. \w@ntlistoffiguresfalse
  334. }
  335. %---------------------------------------
  336. %%%% LISTOFTABLES/NOLISTOFTABLES OPTION
  337. %---------------------------------------
  338. \DeclareOption{listoftables}{%
  339. \w@ntlistoftablestrue
  340. }
  341. \DeclareOption{nolistoftables}{%
  342. \w@ntlistoftablesfalse
  343. }
  344. %---------------------------------------
  345. %%%% BIBLIOGRAPHY/NOBIBLIOGRAPHY OPTION
  346. %---------------------------------------
  347. \DeclareOption{bibliograpy}{%
  348. \w@ntbibliographytrue
  349. }
  350. \DeclareOption{nobibliography}{%
  351. \w@ntbibliographyfalse
  352. }
  353. %-------------------------
  354. %%%% INDEX/NOINDEX OPTION
  355. %-------------------------
  356. \DeclareOption{index}{%
  357. \makeindex
  358. \w@ntindextrue
  359. }
  360. \DeclareOption{noindex}{%
  361. \w@ntindexfalse
  362. }
  363. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  364. %%%% EXECUTION OF OPTIONS PART
  365. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  366. \ExecuteOptions{phdthesis,english}
  367. \ProcessOptions
  368. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  369. %%%% PACKAGE LOADING PART
  370. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  371. %\RequirePackage{graphicx}
  372. \RequirePackage[dvips,dvipdf,pdftex]{graphicx}
  373. %\DeclareGraphicsRule{*}{mps}{*}{}
  374. %\DeclareGraphicsExtensions{.jpg,.mps,.pdf,.png,.ps}
  375. \DeclareGraphicsRule{*}{eps}{*}{}
  376. \RequirePackage[Sonny]{fncychap}
  377. \RequirePackage[noindentafter,calcwidth]{titlesec}
  378. \RequirePackage{fancyhdr}
  379. \RequirePackage{paralist}
  380. \RequirePackage{listings,color}
  381. \RequirePackage[toc,page,title,titletoc]{appendix}
  382. \RequirePackage[round]{natbib}
  383. \RequirePackage{url}
  384. \RequirePackage{babel}
  385. \RequirePackage{ifthen}
  386. \RequirePackage{picinpar}
  387. \RequirePackage{colortbl}
  388. \RequirePackage{shadow}
  389. \RequirePackage{lineno}
  390. \RequirePackage{algorithm2e}
  391. \RequirePackage{epsfig}
  392. \RequirePackage{hyperref}
  393. % make sure to link CORRECTLY to images and tables, and not to the caption
  394. % needs to be loaded AFTER the hyperref package
  395. %
  396. \ifw@ntindex
  397. \RequirePackage{makeidx}
  398. \fi
  399. %
  400. \ifcase\pdfoutput
  401. \else
  402. \RequirePackage{pdfpages}
  403. \fi
  404. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  405. %%%% MAIN CODE PART: TEXTPAGE FORMATTING
  406. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  407. %---------------
  408. %%%% PAGE LAYOUT
  409. %---------------
  410. \oddsidemargin=0cm
  411. \textwidth=16cm
  412. \setlength{\voffset}{-10mm}
  413. \setlength{\textheight}{215mm}
  414. \setlength{\headheight}{14pt}
  415. %\setlength{\parindent}{0.0mm}
  416. %\addtolength{\parskip}{0.3\baselineskip}
  417. %--------------
  418. %%%% PAGE STYLE
  419. %--------------
  420. \fancypagestyle{compP@geStyle}{%
  421. \fancyhf{}
  422. \rhead{\thepage}
  423. \lhead{\rightmark}
  424. \renewcommand{\headrulewidth}{0.5pt}
  425. \renewcommand{\footrulewidth}{0pt}
  426. \addtolength{\headheight}{0.5pt}
  427. }
  428. \fancypagestyle{plain}{%
  429. \fancyhead{}
  430. \renewcommand{\headrulewidth}{0pt}
  431. }
  432. %------------------
  433. %%%% SECTION TITLES
  434. %------------------
  435. \newenvironment{unnumbered}
  436. { \setcounter{secnumdepth}{0}%
  437. \addtocontents{toc}{\protect\setcounter{tocdepth}{0}\ignorespaces}%
  438. \w@ntnumbersfalse
  439. }
  440. { \setcounter{secnumdepth}{2}%
  441. \addtocontents{toc}{\protect\setcounter{tocdepth}{2}\ignorespaces}%
  442. \w@ntnumberstrue
  443. }
  444. \AtBeginDocument{
  445. \w@ntnumberstrue
  446. \setcounter{secnumdepth}{\@secnumdepthvalue}
  447. \titleformat{\section}[block]
  448. {\Large\sffamily\bfseries}
  449. {}{0ex}
  450. {\titleline*[l]{\titlerule[1pt]}\vspace{4pt} \thesection\quad}
  451. [{\titleline*[l]{\vspace{18pt}\titlerule[1pt]}}]
  452. \titlespacing*{\section}{0pc}{*3}{*2}
  453. %
  454. \titleformat{\subsection}[block]
  455. {\large\sffamily\bfseries}
  456. {}{0ex}
  457. %{\ifthenelse{\@secnumdepthvalue<2}{}{\thesubsection\quad}}
  458. {\ifw@ntnumbers \thesubsection\quad \else \quad \fi}
  459. %[]
  460. \titlespacing*{\subsection}{0pc}{*2}{*1}
  461. %
  462. \titleformat{\subsubsection}[block]
  463. {\large\sffamily\bfseries}
  464. {}{0ex}
  465. {\ifthenelse{\@secnumdepthvalue<3}{}{\thesubsubsection\quad}}
  466. []
  467. \titlespacing*{\subsubsection}{0pc}{*1}{*0}
  468. %
  469. %
  470. % \myCppCodeFormat
  471. % \myJavaCodeFormat
  472. \myShabox
  473. }
  474. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  475. %%%% MAIN CODE PART : MAKING THE FRONT PAGES
  476. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  477. %--------------
  478. %%%% TITLE PAGE
  479. %--------------
  480. \newcommand{\makeTitlePage}{%
  481. \begin{titlepage}
  482. \null
  483. \hbox{
  484. \ifcase\pdfoutput
  485. %\includegraphics[scale=0.2]{UA-LogoText.eps}
  486. \includegraphics[5cm,7.2cm][9cm,8.5cm]{images/UA-LogoText.png}
  487. \else
  488. %\includegraphics[width=50mm, height=10mm, keepaspectratio]{UA-LogoText.jpg}
  489. \includegraphics[scale=0.2]{images/UA-LogoText.png}
  490. %\includegraphics[5cm,7.2cm][9cm,8.5cm]{UA-LogoText.jpg}
  491. \fi
  492. }
  493. \hbox{
  494. \vrule depth 0.87\textheight%
  495. \mbox{\hspace{2pt}}
  496. \vtop{%
  497. \vskip 70\p@
  498. \raisebox{0mm}[5ex][0ex]{
  499. \parbox{12cm}{ {\huge \bfseries \@title \par} }
  500. }
  501. \vskip 120\p@
  502. \mbox{\hspace{2pt} \bfseries \@author \par}
  503. \vskip 120\p@
  504. \mbox{\hspace{2pt} \@advisername :\quad \@principaladviser \par}
  505. \vskip 5\p@
  506. \mbox{\hspace{2pt} \@assistantadvisername :\quad \@assistantadviser \par}
  507. \vskip 45\p@
  508. \raisebox{0mm}[6ex][0ex]{
  509. \parbox{10cm}{{\@titlepageblurb} }
  510. }
  511. \vskip 50\p@
  512. \mbox{
  513. \ifcase\pdfoutput
  514. %\includegraphics[scale=0.5]{CoMP-logo-embedfont.eps}
  515. \includegraphics[bb = 7cm 7.8cm 9.5cm 8.8cm, keepaspectratio]{images/ansymo_logo.pdf}
  516. \else
  517. %\includegraphics[width=25mm, height=8mm, keepaspectratio]{CoMP-logo-embedfont.jpg}
  518. \includegraphics[scale=0.5]{images/ansymo_logo.pdf}
  519. %\includegraphics[7cm,7cm][9cm,8cm]{CoMP-logo-embedfont.jpg}
  520. \fi
  521. }
  522. \raisebox{4mm}{
  523. \resizebox{!}{0.37cm}{
  524. \parbox{8cm}{ \scshape \@researchgroupblurb }
  525. }
  526. }
  527. }
  528. }
  529. \vfill
  530. \end{titlepage}
  531. }
  532. %-------------------
  533. %%%%% COPYRIGHT PAGE
  534. %-------------------
  535. \newcommand{\makeCopyrightPage}{%
  536. \begin{titlepage}
  537. \null
  538. \vfill
  539. \begin{center}
  540. \large
  541. Copyright\ \copyright\ \@copyrightyear\ \@author\\
  542. \@copyrightblurb
  543. \end{center}
  544. \vfill
  545. \end{titlepage}
  546. }
  547. %-------------------
  548. %%%%% SIGNATURE PAGE
  549. %-------------------
  550. \newcommand{\signature}[1]{%
  551. \vspace{1.0in}
  552. \hbox to 5in{\hfil\begin{tabular}{@{}l@{}}
  553. \vrule width 4in height 0.4pt depth 0pt\\ #1\end{tabular}}
  554. }
  555. \newcommand{\makeSignaturePage}{%
  556. \begin{titlepage}
  557. \begin{flushright}
  558. \begin{minipage}{5in}
  559. \vspace{7cm}
  560. \@signatureblurb
  561. \par
  562. % pricipal adviser
  563. \signature{\@advisername ,\quad \@principaladviser}
  564. \vfill
  565. % if second principal advisor
  566. \if*\@coprincipaladviser \else
  567. \signature{\@coadvisername ,\quad \@coprincipaladviser}
  568. \vfill\fi
  569. \if*\@assistantadviser \else
  570. \signature{\@assistantadvisername ,\quad \@assistantadviser}
  571. \vfill\fi
  572. \end{minipage}
  573. \end{flushright}
  574. \end{titlepage}
  575. }
  576. %---------------------------
  577. %%%%% TABLE OF CONTENTS PAGE
  578. %---------------------------
  579. \AtBeginDocument{
  580. \setcounter{tocdepth}{\@tocdepthvalue}
  581. }
  582. \newcommand{\makeTableOfContentsPage}{%
  583. {\sffamily \tableofcontents}
  584. }
  585. %-------------------------
  586. %%%%% LIST OF FIGURES PAGE
  587. %-------------------------
  588. \newcommand{\makeListOfFiguresPage}{%
  589. \clearpage
  590. \phantomsection
  591. \addcontentsline{toc}{chapter}{\listfigurename}
  592. \listoffigures
  593. }
  594. %------------------------
  595. %%%%% LIST OF TABLES PAGE
  596. %------------------------
  597. \newcommand{\makeListOfTablesPage}{%
  598. \clearpage
  599. \phantomsection
  600. \addcontentsline{toc}{chapter}{\listtablename}
  601. \listoftables
  602. }
  603. %------------------------
  604. %%%%% LIST OF LISTINGS PAGE
  605. %------------------------
  606. \newcommand{\makeListOfListingsPage}{%
  607. \renewcommand{\lstlistlistingname}{List of Listings}
  608. \clearpage
  609. \phantomsection
  610. \addcontentsline{toc}{chapter}{\lstlistlistingname}
  611. \lstlistoflistings%
  612. }
  613. %---------------
  614. %%%% FRONT PAGES
  615. %---------------
  616. \newcommand{\frontpages}{%
  617. \pagenumbering{roman}
  618. \pagestyle{plain}
  619. \makeTitlePage
  620. \ifw@ntcopyright \makeCopyrightPage \fi
  621. \ifw@ntsignature \makeSignaturePage \fi
  622. \ifw@nttableofcontents \makeTableOfContentsPage \fi
  623. \ifw@ntlistoffigures \makeListOfFiguresPage \fi
  624. \ifw@ntlistoftables \makeListOfTablesPage \fi
  625. %\makeListOfListingsPage
  626. }
  627. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  628. %%%% MAIN CODE PART : MAKING THE MAIN BODY PAGES
  629. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  630. %-------------------
  631. %%%% MAIN BODY PAGES
  632. %-------------------
  633. \newcommand{\mainbodypages}{%
  634. \clearpage
  635. \pagestyle{compP@geStyle}
  636. \pagenumbering{arabic}
  637. %\setlength{\parindent}{0.0mm}
  638. %\addtolength{\parskip}{0.5\baselineskip}
  639. }
  640. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  641. %%%% MAIN CODE PART : MAKING THE BACK PAGES
  642. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  643. %----------------------
  644. %%%%% BIBLIOGRAPHY PAGE
  645. %----------------------
  646. \newcommand{\makeBibliographyPage}{%
  647. \bibliographystyle{plain}
  648. \clearpage
  649. \phantomsection
  650. \addcontentsline{toc}{chapter}{Bibliography}
  651. \bibliography{\@bibfile}
  652. }
  653. %---------------------
  654. %%%%% THE INDEX PAGE
  655. %---------------------
  656. \newcommand{\makeIndexPage}{%
  657. \addcontentsline{toc}{chapter}{Index}
  658. \printindex
  659. }
  660. %--------------
  661. %%%% BACK PAGES
  662. %--------------
  663. \newcommand{\backpages}{%
  664. \pagestyle{plain}
  665. \ifw@ntbibliography
  666. \makeBibliographyPage
  667. \fi
  668. \ifw@ntindex
  669. \makeIndexPage
  670. \fi
  671. }
  672. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  673. %%%% MISCELLANEOUS COMMANDS TO BE USED IN THE MAIN BODY
  674. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  675. %---------
  676. %%%% myDef
  677. %---------
  678. \newcommand{\myDef}[2]{
  679. \begin{flushright}
  680. \parbox{3.3cm}{
  681. \begin{flushleft}
  682. {\emph Definitie:\\ \vspace{1mm}}{\bf #1 }
  683. \end{flushleft}
  684. }
  685. \parbox{10.5cm}{ #2 }
  686. \end{flushright}
  687. }
  688. %---------
  689. %%%% myTxt
  690. %---------
  691. \newcommand{\myTxt}[2]{
  692. \begin{flushright}
  693. \parbox{3.3cm}{
  694. \begin{flushleft}
  695. {\bf #1 }
  696. \end{flushleft}
  697. }
  698. \parbox{10.5cm}{ #2 }
  699. \end{flushright}
  700. }
  701. %------------
  702. %%%% myMarTxt
  703. %------------
  704. \newcommand{\myMarTxt}[1]{
  705. \reversemarginpar
  706. \setlength{\marginparwidth}{5cm}
  707. \marginpar[\ \\ \begin{minipage}{5cm}{\begin{flushright} { #1 } \end{flushright}}\end{minipage}]{}
  708. }
  709. %-------------
  710. % mySidebarTxt
  711. %-------------
  712. \newcommand{\mySidebarTxt}[1]{%
  713. \newlength{\temptabcolsep}
  714. \setlength{\temptabcolsep}{\tabcolsep}%
  715. \setlength{\tabcolsep}{0pt}%
  716. \begin{tabular}{r|>{\columncolor[gray]{0.75}}cr}%
  717. \begin{minipage}{4cm}%
  718. \begin{flushright}
  719. #1%
  720. \end{flushright}
  721. \end{minipage}%
  722. \hspace*{0.15cm} &%
  723. \hspace*{0.15cm} &%
  724. \end{tabular}%
  725. \setlength{\tabcolsep}{\temptabcolsep}%
  726. }
  727. %---------------------
  728. % myShadedParagraphTxt
  729. %---------------------
  730. \newcommand{\shadedparagraph}[1]{%
  731. \begin{tabular}{>{\columncolor[gray]{.75}}l}%
  732. \begin{minipage}{0.96\textwidth}%
  733. \vspace*{0.2cm}%
  734. #1%
  735. \vspace*{0.2cm}%
  736. \end{minipage}%
  737. \end{tabular}%
  738. }
  739. %-----------
  740. % myBoxedTxt
  741. %-----------
  742. \newcommand{\framedparagraph}[1]{
  743. \setlength{\fboxsep}{0.5cm}
  744. \begin{center}
  745. \framebox { \parbox{13cm}{#1}}
  746. \end{center}
  747. }
  748. %----------------
  749. % myCppCodeFormat
  750. %----------------
  751. \newcommand{\myCppCodeFormat}{%
  752. \lstloadlanguages{C++}
  753. \lstset{language=C++,commentstyle=\scriptsize\color{green}, identifierstyle=\color{red},tabsize=4, xleftmargin=2ex,captionpos=b}
  754. }
  755. %-----------------
  756. % myJavaCodeFormat
  757. %-----------------
  758. \newcommand{\myJavaCodeFormat}{%
  759. \lstloadlanguages{Java}
  760. \lstset{language=Java,commentstyle=\scriptsize,identifierstyle=\color{red},tabsize=4, xleftmargin=2ex,captionpos=b}
  761. }
  762. %-----------------
  763. % myShabox
  764. %-----------------
  765. \newcommand{\myShabox}{%
  766. \setlength{\sdim}{6pt}
  767. }
  768. % graphviz.tex
  769. % originally written by Derek Rayside, November 2003
  770. % following an idea that Daniel Jackson implemented in his Tagger program
  771. %
  772. % parameters to \digraph:
  773. % 1 - parameters for \includegraphics (optional; default value is "scale=1")
  774. % 2 - name of the digraph
  775. % 3 - body of the digraph
  776. \newcommand{\digraph}[3][scale=1]{
  777. \newwrite\dotfile
  778. \immediate\openout\dotfile=#2.dot
  779. \immediate\write\dotfile{digraph #2 {\string#3}}
  780. \immediate\closeout\dotfile
  781. \IfFileExists{#2.ps}
  782. % the postscript exists: include it
  783. { \includegraphics[#1]{#2} }
  784. % the postscript doesn't exist: tell the user how to create it
  785. { \fbox{ \begin{tabular}{l}
  786. The file \texttt{#2.ps} hasn't been created from
  787. \texttt{#2.dot} yet. \\
  788. Run `\texttt{dot -Tps -o #2.ps #2.dot}' to create it. \\
  789. Here is a \textsf{bash} loop to process all \textsf{dot} files
  790. in the current directory: \\
  791. \texttt{
  792. for f in *.dot do ;
  793. dot -Tps -o \$\{f\%dot\}ps \$f ;
  794. done
  795. }
  796. \end{tabular}}
  797. }
  798. }
  799. % BoxedGraph
  800. %
  801. % 1 - parameters for \includegraphics (optional; default value is "scale=1")
  802. % 2 - name of the digraph
  803. \newcommand{\psgraphboxed}[4][scale=1]
  804. {
  805. \begin{figure}[h]
  806. \begin{center}
  807. %\fbox{
  808. \includegraphics[#1]{#2}
  809. \caption{#3}
  810. \label{#4}
  811. %}
  812. \end{center}
  813. \end{figure}
  814. }