liuthesis.cls 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075
  1. %%% liuthesis.cls ---
  2. %%
  3. %% Filename: liuthesis.cls
  4. %% Description:
  5. %% Author: Ola Leifler
  6. %% Maintainer:
  7. %% Created: Fri Mar 20 08:25:23 2009 (CET)
  8. %% Version:
  9. %% Last-Updated: Mon Apr 16 15:04:30 2018 (+0200)
  10. %% By: Ola Leifler
  11. %% Update #: 1560
  12. %% URL:
  13. %% Keywords:
  14. %% Compatibility:
  15. %%
  16. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  17. %%
  18. %%% Commentary:
  19. %%
  20. %% Read the README instead...
  21. %%
  22. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  23. %%
  24. %%% Change log:
  25. %%
  26. %%
  27. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  28. %%
  29. %% This program is free software; you can redistribute it and/or
  30. %% modify it under the terms of the GNU General Public License as
  31. %% published by the Free Software Foundation; either version 3, or
  32. %% (at your option) any later version.
  33. %%
  34. %% This program is distributed in the hope that it will be useful,
  35. %% but WITHOUT ANY WARRANTY; without even the implied warranty of
  36. %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  37. %% General Public License for more details.
  38. %%
  39. %% You should have received a copy of the GNU General Public License
  40. %% along with this program; see the file COPYING. If not, write to
  41. %% the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  42. %% Floor, Boston, MA 02110-1301, USA.
  43. %%
  44. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  45. %%
  46. %%% Code:
  47. \NeedsTeXFormat{LaTeX2e}
  48. \ProvidesClass{liuthesis} [2017/04/20 Thesis class for LiU]
  49. \typeout{Undergraduate and graduate thesis class for LiU by Ola Leifler - v 1.1}
  50. \def\createvariable#1{%
  51. \expandafter\def\csname #1\endcsname{\expandafter\gdef\csname @#1\endcsname}
  52. \csname #1\endcsname{\texttt{\textbackslash #1}}
  53. }
  54. % \def\createconditionalvariable#1{
  55. % \expandafter\newif\csname if#1\endcsname
  56. % \csname #1 false\endcsname
  57. % \def\csname#1\endcsname
  58. % }
  59. \RequirePackage{xkeyval}
  60. \RequirePackage{ifxetex}
  61. \ifxetex
  62. \else
  63. \RequirePackage[utf8]{inputenc}
  64. \fi
  65. \RequirePackage[absolute]{textpos}
  66. % For conditionally including lists of tables and figures
  67. \RequirePackage[figure,table]{totalcount}
  68. \createvariable{edition}
  69. \createvariable{presentationroom}
  70. \createvariable{presentationbuilding}
  71. \createvariable{presentationcampus}
  72. \createvariable{presentationdate}
  73. \createvariable{presentationdateenglish}
  74. \createvariable{presentationtime}
  75. \createvariable{thesislanguage}
  76. \createvariable{faculty}
  77. \createvariable{issn}
  78. \createvariable{degreeprefix}
  79. \createvariable{degreesuffix}
  80. \createvariable{exhibittext}
  81. \createvariable{exhibittextswedish}
  82. \createvariable{opponenttitle}
  83. \createvariable{opponentname}
  84. \createvariable{opponentuniversity}
  85. \createvariable{opponentcountry}
  86. \createvariable{thesisnumber}
  87. \createvariable{subseries}
  88. \createvariable{subseriesnumber}
  89. \newif\ifsubseries
  90. \subseriesfalse
  91. \createvariable{currentyearthesisnumber}
  92. \createvariable{supportedby}
  93. \createvariable{publicationyear}
  94. \createvariable{publicationmonth}
  95. \createvariable{isbn}
  96. \createvariable{supervisor}
  97. \createvariable{examiner}
  98. \createvariable{titleenglish}
  99. \createvariable{titleswedish}
  100. \createvariable{keywords}
  101. \createvariable{keywordsswedish}
  102. \createvariable{department}
  103. \createvariable{departmentenglish}
  104. \createvariable{departmentshort}
  105. \createvariable{division}
  106. \createvariable{divisionshort}
  107. \createvariable{dateofpublication}
  108. \createvariable{publicationseries}
  109. % Undergrad specific
  110. \createvariable{area}
  111. \createvariable{level}
  112. \createvariable{thesistypenameswedish}
  113. \createvariable{thesistypenameenglish}
  114. \createvariable{thesiscredits}
  115. \createvariable{thesissubject}
  116. \createvariable{thesissubjectenglish}
  117. \newif\ifsubtitleswedish
  118. \subtitleswedishfalse
  119. \def\subtitleswedish#1{\subtitleswedishtrue\gdef\@subtitleswedish{#1}}
  120. \newif\ifsubtitleenglish
  121. \subtitleenglishfalse
  122. \def\subtitleenglish#1{\subtitleenglishtrue\gdef\@subtitleenglish{#1}}
  123. \newif\ifdedication
  124. \dedicationfalse
  125. \def\dedication#1{\dedicationtrue\gdef\@dedication{#1}}
  126. \newif\ifexternalsupervisor
  127. \externalsupervisorfalse
  128. \def\externalsupervisor#1{\externalsupervisortrue\gdef\@externalsupervisor{#1}}
  129. \createvariable{divanumber}
  130. % Include the abstract
  131. \gdef\@abstract{\input{abstract}}
  132. \gdef\@sammanfattning{\input{sammanfattning.tex}}
  133. \gdef\@acknowledgments{\input{acknowledgments.tex}}
  134. \newif\iflith
  135. \lithtrue
  136. \newif\ifhu
  137. \newif\iffilfak
  138. \newif\ifphd
  139. % \phdtrue
  140. \newif\iflic
  141. \licfalse
  142. \newif\ifstudent
  143. \studenttrue
  144. \newif\ifprinterfriendly
  145. \printerfriendlyfalse
  146. \DeclareOption{hu}{%
  147. \hutrue
  148. \lithfalse
  149. \filfakfalse
  150. \faculty{Faculty of Health Sciences}
  151. \gdef\@facultyshort{HU}
  152. \gdef\@facultyshortlogo{hu}
  153. \publicationseries{Linköping University Medical Dissertations}
  154. \degreeprefix{medicine}
  155. }
  156. \DeclareOption{lith}{%
  157. \lithtrue
  158. \hufalse
  159. \filfakfalse
  160. \faculty{Institute of Technology}
  161. \publicationseries{Linköping Studies in Science and Technology}
  162. \degreeprefix{teknologie}
  163. \gdef\@facultyshort{Tek}
  164. \gdef\@facultyshortlogo{lith}
  165. \gdef\@area{LITH}
  166. }
  167. \DeclareOption{filfak}{%
  168. \filfaktrue
  169. \lithfalse
  170. \hufalse
  171. \faculty{Philosophical faculty}
  172. \gdef\@facultyshort{FilFak}
  173. \gdef\@facultyshortlogo{filfak}
  174. \publicationseries{Linköping Studies in Arts and Sciences}
  175. \degreeprefix{filosofie}
  176. % \gdef\@area{FFK-UP}
  177. }
  178. \DeclareOption{msc}{%
  179. \studenttrue
  180. \phdfalse
  181. \licfalse
  182. \level{A}
  183. \gdef\@thesistypenameenglish{Master's}
  184. \gdef\@thesistypenameswedish{avancerad nivå}
  185. \thesiscredits{30}
  186. \PassOptionsToClass{oneside}{memoir}
  187. }
  188. \DeclareOption{bachelor}{%
  189. \studenttrue
  190. \phdfalse
  191. \licfalse
  192. \level{ET}
  193. \gdef\@thesistypenameenglish{Bachelor's}
  194. \gdef\@thesistypenameswedish{grundnivå}
  195. \thesiscredits{16}
  196. \PassOptionsToClass{oneside}{memoir}
  197. }
  198. \DeclareOption{lic}{%
  199. \lictrue
  200. \phdfalse
  201. \studentfalse
  202. }
  203. \DeclareOption{phd}{%
  204. \licfalse
  205. \studentfalse
  206. \phdtrue
  207. }
  208. \DeclareOption{printerfriendly}{%
  209. \printerfriendlytrue
  210. }
  211. \DeclareOption{swedish}{%
  212. \thesislanguage{swedish}
  213. }
  214. \DeclareOption{english}{%
  215. \thesislanguage{english}
  216. }
  217. \newif\ifexhibitpage
  218. \exhibitpagefalse
  219. \DeclareOption{exhibitpage}{%
  220. \exhibitpagetrue
  221. \PassOptionsToClass{oneside}{memoir}
  222. }
  223. % % % Add the necessary biblatex options to the class options
  224. % \DeclareOptionX{biblatexoptions}{%
  225. % \gdef\@biblatexoptions{#1}
  226. % \PassOptionsToPackage{\@biblatexoptions}{biblatex}
  227. % }
  228. % \DeclareOptionX{memoiroptions}{%
  229. % \PassOptionsToClass{#1}{memoir}
  230. % }
  231. \DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
  232. \ExecuteOptions{english,phd,lith,a4paper}
  233. \ProcessOptions*
  234. %% There is a special exception to the rule that publication series
  235. %% are defined by the faculty, and that is the philosophical faculty
  236. %% that uses a special series for licentiate theses
  237. \iflic
  238. \iffilfak
  239. \publicationseries{Faculty of Arts and Sciences}
  240. \fi
  241. \fi
  242. \LoadClass{memoir}
  243. \RequirePackage{color}
  244. \RequirePackage[svgnames]{xcolor}
  245. \RequirePackage{pdfpages}
  246. \RequirePackage{tikz}
  247. \RequirePackage{pbox}
  248. \RequirePackage{ifthen}
  249. \RequirePackage{geometry}
  250. \RequirePackage[pdfusetitle]{hyperref}
  251. \RequirePackage{amssymb}
  252. \RequirePackage{amsmath}
  253. \RequirePackage{etoolbox}
  254. % Set up input encoding and font handling
  255. \ifxetex
  256. \RequirePackage[MnSymbol]{mathspec}
  257. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  258. % Some versions of latex have issues with mathspec, see
  259. % https://tex.stackexchange.com/questions/85696/what-causes-this-strange-interaction-between-glossaries-and-amsmath
  260. \let\RequirePackage\original@RequirePackage
  261. \let\usepackage\RequirePackage
  262. % End workaround
  263. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  264. \RequirePackage{xltxtra}
  265. \defaultfontfeatures{Mapping=tex-text}
  266. \else
  267. \RequirePackage{graphicx}
  268. \RequirePackage{palatino}
  269. \RequirePackage{mathabx}
  270. \RequirePackage{mathpazo}
  271. \RequirePackage[T1]{fontenc}
  272. \fi
  273. \ifphd
  274. \gdef\@degreetype{\@degreeprefix {} doktorsexamen}
  275. \gdef\@degreetypeenglish{Doctor of \@degreesuffix}
  276. \else
  277. \iflic
  278. \gdef\@degreetype{\@degreeprefix {} licentiatexamen}
  279. \gdef\@degreetypeenglish{Licentiate degree in \@degreesuffix}
  280. \fi
  281. \fi
  282. \iflith
  283. \iflic
  284. \issn{0280-7971}
  285. \fi
  286. \ifphd
  287. \issn{0345-7524}
  288. \fi
  289. \fi
  290. % We use the same series for lic and PhD at Filfak/HU
  291. \ifhu
  292. % \ifphd
  293. \issn{0345-0082}
  294. % \fi
  295. % \iflic
  296. % \typeout{Please define the ISSN by issuing a \textbackslash issn command}
  297. % \issn{\textbackslash\texttt{issn}}
  298. % \fi
  299. \fi
  300. \iffilfak
  301. % \ifphd
  302. \issn{0282-9800}
  303. % \fi
  304. % \iflic
  305. % \typeout{Please define the ISSN by issuing a \textbackslash issn command}
  306. % \issn{\textbackslash\texttt{issn}}
  307. % \fi
  308. \fi
  309. \newcommand{\swedishenglish}[2]{
  310. \ifthenelse{\equal{\@thesislanguage}{swedish}}{#1}{#2}
  311. }
  312. \RequirePackage{csquotes}
  313. \ifxetex
  314. \RequirePackage{polyglossia}
  315. \swedishenglish{
  316. \setmainlanguage{swedish}
  317. \setotherlanguages{english}
  318. }{
  319. \setmainlanguage{english}
  320. \setotherlanguages{swedish}
  321. }
  322. \else
  323. \swedishenglish{
  324. \RequirePackage[swedish]{babel}
  325. }{
  326. \RequirePackage[english]{babel}
  327. }
  328. \fi
  329. %% Include articles
  330. \RequirePackage{calc}
  331. \RequirePackage{ragged2e}
  332. \definecolor{nicered}{rgb}{.647,.129,.149}
  333. \newsavebox{\feline@article}
  334. \newcommand\feline@article@marker[1][4cm]{%
  335. \sbox\feline@article{%
  336. \resizebox{!}{#1}{\fboxsep=1pt%
  337. \colorbox{nicered}{\color{white}\bfseries\thearticle\phantom{.}}%
  338. }}%
  339. \rotatebox{90}{%
  340. \resizebox{%
  341. \heightof{\usebox{\feline@article}}+\depthof{\usebox{\feline@article}}}%
  342. {!}{{\scshape \MakeUppercase Paper}}}\quad%
  343. \raisebox{\depthof{\usebox{\feline@article}}}{\usebox{\feline@article}}%
  344. }
  345. \newcommand\feline@chm[1][4cm]{%
  346. \sbox\feline@article{\feline@article@marker[#1]}%
  347. \makebox[0pt][l]{% aka \rlap
  348. \makebox[\spinemargin][r]{
  349. \usebox\feline@article
  350. }
  351. }
  352. }
  353. \newcounter{article}
  354. \setcounter{article}{0}
  355. \renewcommand{\thearticle}{\Roman{article}}
  356. \includepdfset{pages=-}
  357. \setlength{\TPVertModule}{2cm}
  358. \setlength{\TPHorizModule}{\paperwidth - 4.3cm}
  359. \newcommand{\papermark}{Paper \thearticle}
  360. \newcommand{\includearticle}[2][pages=-]{%
  361. \@twosidetrue
  362. \refstepcounter{article}%
  363. \cleartorecto%
  364. \thispagestyle{empty}
  365. \mbox{}%
  366. \vspace*{\fill}
  367. \begin{center}%
  368. {\hfill \feline@chm[2.5cm]\\[2\baselineskip]}
  369. {\fullcite{#2}}
  370. \end{center}%
  371. \vspace*{\fill}%
  372. \cleartorecto%
  373. \label{art:#2}%
  374. \addcontentsline{toc}{chapter}{\papermark}%
  375. \includepdf[#1]{#2}%
  376. }
  377. \newenvironment{papers}{
  378. \makeevenhead{ruled}{\papermark}{}{}
  379. \renewcommand*{\thechapter}{\thearticle}
  380. \newlength{\numberheight}
  381. \makechapterstyle{paperstyle}{%
  382. \setlength{\afterchapskip}{40pt}
  383. \setlength{\numberheight}{10mm}
  384. \renewcommand*{\chapterheadstart}{\vspace*{40pt}}
  385. \renewcommand*{\afterchapternum}{\par\nobreak\vskip 25pt}
  386. \renewcommand*{\chapnamefont}{\normalfont\LARGE\flushright}
  387. \renewcommand*{\chapnumfont}{\normalfont\HUGE}
  388. \renewcommand*{\chaptitlefont}{\normalfont\Huge\bfseries\flushright}
  389. \renewcommand*{\printchaptername}{%
  390. }
  391. \renewcommand*{\chapternamenum}{}
  392. \renewcommand*{\printchapternum}{%
  393. }%
  394. \makeoddfoot{plain}{}{}{\thepage}}
  395. \renewcommand{\@chapapp}{\papermark}
  396. \chapterstyle{paperstyle}
  397. }{}
  398. \newcommand{\includearticletex}[1]{%
  399. \stepcounter{article}%
  400. \cleartorecto%
  401. \thispagestyle{empty}
  402. \mbox{}%
  403. \vspace*{\fill}
  404. \begin{center}%
  405. {\hfill \feline@chm[2.5cm]\\[2\baselineskip]}
  406. {\fullcite{#1}}
  407. \end{center}%
  408. \vspace*{\fill}%
  409. \clearpage{}
  410. \chapter[\papermark][\papermark]{\citetitle{#1}}
  411. \label{art:#1}
  412. \input{papers/#1}%
  413. }
  414. \ifx\pdfoutput\undefined
  415. \else
  416. \pdfoutput=1
  417. \DeclareGraphicsExtensions{.pdf,.jpg,.png}
  418. \fi
  419. \graphicspath{{figures/}}
  420. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  421. % %
  422. % font selection, based on availability %
  423. % %
  424. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  425. \ifxetex
  426. \newcommand*{\@makefont}[2]{
  427. \ClassInfo{liuthesis}{Searching font candidates for \string#1}
  428. \forcsvlist{\listadd\@args}{#2}
  429. \edef\@restore{
  430. \suppressfontnotfounderror=\the\suppressfontnotfounderror\relax
  431. \interactionmode=\the\interactionmode\relax
  432. }
  433. \renewcommand*{\do}[1]{ % Loop body
  434. \ifdefmacro{##1}{
  435. \ifdefvoid{##1}{}{ % else
  436. \let#1##1
  437. \ClassInfo{liuthesis}{\string##1 selected}
  438. \listbreak
  439. }
  440. }{
  441. \batchmode
  442. \suppressfontnotfounderror=1
  443. \ifdef{\IfFontExistsTF}{
  444. \IfFontExistsTF{##1}{
  445. \@restore
  446. \newfontfamily{#1}{##1}
  447. \ClassInfo{liuthesis}{Font ##1 selected}
  448. \listbreak
  449. }{
  450. \@restore
  451. \ClassWarning{liuthesis}{Font ##1 not available}
  452. }
  453. }{
  454. \font\bodyfont="##1"\space at 10pt
  455. \@restore
  456. \ifdefequal{\bodyfont}{\nullfont}{
  457. \ClassWarning{liuthesis}{Font ##1 not available}
  458. }{
  459. \newfontfamily{#1}{##1}
  460. \ClassInfo{liuthesis}{Font ##1 selected}
  461. \listbreak
  462. }
  463. }
  464. }
  465. }
  466. \dolistloop{\@args} % Execute loop
  467. \let\@args\undefined % Clear list
  468. \ifundef{#1}{
  469. \ClassError{liuthesis}{Font for \string#1 not found}{}
  470. \newcommand*{#1}{} % Avoid undefined control sequence errors
  471. }{}
  472. }
  473. \AtBeginDocument{
  474. \@makefont{\@calibri}{Calibri,Carlito}
  475. \ifexhibitpage\iflith\relax\else
  476. \@makefont{\@korolev}{KorolevLiU,\@calibri}
  477. \fi\fi
  478. }
  479. \else
  480. \ClassWarning{liuthesis}{Please use XeTeX and install Calibri for correct typesetting}
  481. \AtBeginDocument{
  482. \IfFileExists{carlito.sty}{
  483. \let\old@sf\sfdefault
  484. \RequirePackage{carlito} % Changes \sfdefault to \carlito
  485. \let\sfdefault\old@sf
  486. \newcommand*{\@calibri}{\carlito}
  487. }{
  488. \ClassWarning{liuthesis}{Package "carlito" not found}
  489. \newcommand*{\@calibri}{}
  490. }
  491. \ifexhibitpage\iflith\relax\else
  492. \let\@korolev\@calibri
  493. \fi\fi
  494. }
  495. \fi % end ifxetex
  496. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  497. % %
  498. % The exhibit page %
  499. % %
  500. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  501. \newcommand{\exhibitpagelith}{%
  502. \@calibri
  503. \copypagestyle{exhibitpagestyle}{plain}
  504. \makeevenfoot{exhibitpagestyle}{ISBN \@isbn}{}{ISSN \@issn}
  505. \makeoddfoot{exhibitpagestyle}{ISBN \@isbn}{}{ISSN \@issn}
  506. \thispagestyle{exhibitpagestyle}
  507. \begin{center}
  508. {\footnotesize \@publicationseries}\\
  509. {\footnotesize \ifphd Dissertations,\else Licentiate Thesis\fi {} No. \@thesisnumber}\\[15mm]
  510. {\Large\bfseries\swedishenglish{\@titleswedish}{\@titleenglish}}\\[5mm]
  511. by\\[5mm]
  512. {\Large\bfseries\@author}
  513. \vfill
  514. {\small\textbf{Akademisk avhandling}\\
  515. som för framläggande av \@degreetype{} i \@thesissubject{}
  516. vid Linköpings universitet kommer att offentligt försvaras i sal
  517. \@presentationroom, hus \@presentationbuilding, universitetsområde
  518. \@presentationcampus, \@presentationdate{} kl. \@presentationtime}\\[2\baselineskip]
  519. \textbf{Fakultetsopponent}\\
  520. \@opponenttitle{} \@opponentname\\
  521. \@opponentuniversity\\
  522. \@opponentcountry
  523. \\[15mm]
  524. \vfill
  525. \includegraphics[width=35mm]{liu_primary_black_en}
  526. \\[15mm]
  527. Linköping University\\
  528. \@departmentenglish\\
  529. \@division\\
  530. SE--581 83 Linköping\\[5mm]
  531. Linköping \@publicationyear\\
  532. \vspace*{1mm}
  533. \end{center}
  534. \clearpage{}
  535. \@calibri
  536. \small \textbf{Abstract}\\
  537. \@abstract
  538. \vfill
  539. \footnotesize
  540. \begin{flushleft}
  541. Keywords: \@keywords\\[3mm]
  542. \@supportedby\mbox{}\\[3mm]
  543. URL: \texttt{http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-\@divanumber}\\[3mm]
  544. \end{flushleft}
  545. }
  546. \newcommand{\exhibitpagefilfak}{%
  547. \begin{center}
  548. \@korolev
  549. \@publicationseries{} No. \@thesisnumber
  550. \ifsubseries
  551. \\\@subseries{} No. \@subseriesnumber
  552. \fi
  553. \\[3\baselineskip]
  554. {\Large\@titleswedish\\
  555. \@subtitleswedish}\\[5mm]\fi
  556. \small
  557. {\bfseries\@author}\\[5mm]
  558. {\bfseries Akademisk avhandling}\\
  559. som för framläggande av \@degreetype{} i \@thesissubject{}
  560. vid Filosofiska fakulteten kommer att offentligt försvaras i sal
  561. \@presentationroom, hus \@presentationbuilding, universitetsområde
  562. \@presentationcampus, \@presentationdate{} kl. \@presentationtime\\[2\baselineskip]
  563. {\bfseries Sammanfattning}\\
  564. \@exhibittextswedish\\[6mm]
  565. \vfill
  566. \begin{flushleft}
  567. Nyckelord: \@keywordsswedish\\[3mm]
  568. URL: \texttt{http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-\@divanumber}
  569. \end{flushleft}
  570. \includegraphics[width=35mm]{liu_primary_black_sv}\\
  571. \@department\\
  572. Linköpings universitet, 581 83 Linköping\\[5mm]
  573. ISBN \@isbn{} ISSN \@issn
  574. \clearpage{}
  575. \normalsize
  576. {\@publicationseries{} No. \@thesisnumber
  577. \ifsubseries
  578. \\\@subseries{} No. \@subseriesnumber
  579. \fi}
  580. \\[3\baselineskip]
  581. {\Large\@titleenglish\\
  582. \@subtitleenglish}\\[5mm]
  583. \small
  584. {\bfseries\@author}\\[5mm]
  585. {\textbf{Academic dissertation}\\
  586. Academic dissertation for the Degree of \@degreetypeenglish{} in \@thesissubjectenglish{}
  587. at the Faculty of Arts and Sciences to be publicly defended on
  588. \@presentationdateenglish{} at \@presentationtime{} in room
  589. \@presentationroom, building \@presentationbuilding, campus
  590. \@presentationcampus{} by \@author}
  591. \\[2\baselineskip]
  592. {\bfseries Abstract}\\
  593. \@abstract
  594. \vfill
  595. \begin{flushleft}
  596. Keywords: \@keywords\\[3mm]
  597. URL: \texttt{http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-\@divanumber}
  598. \end{flushleft}
  599. \includegraphics[width=35mm]{liu_primary_black_en} \\
  600. \@departmentenglish\\
  601. Linköping University, SE--581 83 Linköping\\[5mm]
  602. ISBN \@isbn{} ISSN \@issn
  603. \end{center}
  604. \clearpage{}
  605. }
  606. \newcommand{\gettitle}{\swedishenglish{\@titleswedish}{\@titleenglish}}
  607. \iflic
  608. \newcommand{\isrn}{LIU-\@facultyshort{}-Lic-{}-\@publicationyear:\@currentyearthesisnumber}
  609. \fi
  610. \ifstudent
  611. \newcommand{\isrn}{LIU-\@departmentshort{}/\@area{}-EX-\@level{}-{}-\@publicationyear/\@currentyearthesisnumber-{}-SE}
  612. \fi
  613. \newcommand\makeundergraduatetitle{%
  614. {\@calibri
  615. {\raggedleft%
  616. \sffamily%
  617. \swedishenglish{%
  618. \begin{large}%
  619. Linköpings universitet | \@department\par
  620. Examensarbete på \@thesistypenameswedish, \@thesiscredits hp | \@thesissubject\par%
  621. 20\@publicationyear\ | \isrn\par%
  622. \end{large}%
  623. }{%
  624. \begin{large}%
  625. Linköping University | \@departmentenglish\par
  626. \@thesistypenameenglish{} thesis, \@thesiscredits{} ECTS | \@thesissubject\par%
  627. 20\@publicationyear\ | \isrn\par%
  628. \end{large}%
  629. }%
  630. }%
  631. \vspace*{50mm}%
  632. \swedishenglish{%
  633. \hspace*{36mm}%
  634. }{%
  635. \hspace*{38mm}%
  636. }%
  637. \newlength{\thesiswidth}%
  638. \swedishenglish{%
  639. \setlength{\thesiswidth}{\paperwidth-86mm}%
  640. }{%
  641. \setlength{\thesiswidth}{\paperwidth-88mm}%
  642. }%
  643. \begin{minipage}[t]{\thesiswidth}
  644. {\fontsize{25pt}{30pt}\selectfont\swedishenglish{\@titleswedish}{\@titleenglish}\par}%
  645. \swedishenglish{\ifsubtitleswedish}{\ifsubtitleenglish} -- {\fontsize{13pt}{15pt}\selectfont\swedishenglish{\@subtitleswedish}{\@subtitleenglish}\par}\fi%
  646. \hrulefill{}
  647. \\{}
  648. {\@calibri{%
  649. \fontsize{13pt}{15pt}\selectfont%
  650. \textit{\swedishenglish{\@titleenglish}{\@titleswedish}}\par}%
  651. \swedishenglish{\ifsubtitleenglish}{\ifsubtitleswedish}--
  652. {\fontsize{13pt}{15pt}\textit{\selectfont\swedishenglish{\@subtitleenglish}{\@subtitleswedish}}\par}
  653. \fi}%
  654. \vspace*{10mm}%
  655. {\@calibri\fontsize{12pt}{13pt}\selectfont\textbf{\@author}\par
  656. }%
  657. \vspace*{10mm}%
  658. {\@calibri\fontsize{10pt}{11pt}\selectfont
  659. \parbox{\textwidth}{\swedishenglish{Handledare}{Supervisor}: \@supervisor\\
  660. \swedishenglish{Examinator}{Examiner}: \@examiner\\[2\baselineskip]
  661. \ifexternalsupervisor \swedishenglish{Extern
  662. handledare}{External supervisor}: \@externalsupervisor\fi}}%
  663. \end{minipage}
  664. \vfill{}
  665. \begin{textblock*}{\textwidth}(2cm,\paperheight-4cm)
  666. \swedishenglish{\gdef\@langlogo{sv}}{\gdef\@langlogo{en}}
  667. \parbox{0.4\textwidth}{\includegraphics[width=85mm]{liu_primary_black_\@langlogo}}%
  668. \hspace*{32mm}
  669. \parbox{0.5\textwidth}{\raggedleft%
  670. \vspace*{4mm}
  671. Linköpings universitet\\
  672. SE--581 83 Linköping\\
  673. \swedishenglish{013-28 10 00}{+46 13 28 10 00}, \href{http://www.liu.se}{www.liu.se}}
  674. \end{textblock*}
  675. }
  676. }
  677. \newcommand{\makegraduatetitle}{
  678. \@calibri
  679. {\center
  680. {\footnotesize\centerline\@publicationseries{}%\\
  681. \ifphd
  682. Dissertations,
  683. \else
  684. Licentiate Thesis
  685. \fi No. \@thesisnumber
  686. \ifsubseries
  687. \\\@subseries{} No. \@subseriesnumber
  688. \fi}
  689. \\[25mm]
  690. {\LARGE\bfseries\gettitle}\\[20mm]
  691. {\Large\bfseries\@author}\\
  692. \vfill
  693. \swedishenglish{\gdef\@langlogo{sv}}{\gdef\@langlogo{en}}
  694. \includegraphics[width=60mm]{liu_primary_black_\@langlogo}
  695. \\[12mm]
  696. {\footnotesize
  697. \swedishenglish{%
  698. \iflic
  699. Framlagd vid \@faculty{} vid Linköpings universitet som del av fordringarna för \@degreetype\\[6mm]
  700. \fi
  701. \@department \\
  702. Linköping universitet\\
  703. 581 83 Linköping
  704. }{%
  705. Linköping University\\
  706. \@departmentenglish\\
  707. \@division\\
  708. SE-581 83 Linköping, Sweden\\
  709. }
  710. \vspace*{5mm}
  711. Linköping \@publicationyear\\
  712. }
  713. }
  714. }
  715. \ifstudent
  716. \renewcommand{\maketitle}{\makeundergraduatetitle}
  717. \else
  718. \renewcommand{\maketitle}{\makegraduatetitle}
  719. \fi
  720. \newcommand{\abstractpages}{%
  721. \ifphd
  722. \vspace*{6mm}
  723. \ifxetex
  724. \begin{swedish}
  725. \else
  726. \selectlanguage{swedish}
  727. \fi
  728. \setlength{\parindent}{0mm}
  729. \setlength\parskip{8pt}\centerline{POPULÄRVETENSKAPLIG SAMMANFATTNING}
  730. \vspace{3mm}
  731. \footnotesize{\@sammanfattning}
  732. \ifxetex
  733. \end{swedish}
  734. \else
  735. \swedishenglish
  736. {
  737. }
  738. {
  739. \selectlanguage{english}
  740. }
  741. \fi
  742. \fi
  743. \newpage
  744. \vspace*{6mm}
  745. { \setlength{\parindent}{0mm}
  746. \setlength\parskip{8pt}\centerline{ABSTRACT}
  747. \vspace{3mm}
  748. \footnotesize{\@abstract}
  749. }
  750. }
  751. \newcommand{\makepermissionpage}{
  752. \mbox{}
  753. \iffilfak
  754. \ifphd
  755. \hspace{-\parindent}
  756. At the Faculty of Arts and Sciences at Linköping University,
  757. research and doctoral studies are carried out within broad problem
  758. areas. Research is organized in interdisciplinary research
  759. environments and doctoral studies mainly in graduate
  760. schools. Jointly, they publish the series Linköping Studies in Arts
  761. and Sciences. This thesis comes from \@division{} at the \@departmentenglish.
  762. \fi
  763. \fi
  764. \iflic
  765. \vfill
  766. \begin{center}
  767. {\footnotesize
  768. This is a Swedish Licentiate’s Thesis\\[0.8\baselineskip]
  769. Swedish postgraduate education leads to a doctor’s degree and/or a
  770. licentiate’s degree.\\
  771. A doctor’s degree comprises 240 ECTS credits
  772. (4 years of full-time studies).\\
  773. \vspace{-0.3\baselineskip}
  774. A licentiate’s degree comprises 120 ECTS credits.}
  775. \end{center}
  776. \fi
  777. \vfill
  778. \begin{flushleft}
  779. Edition \@edition\\[5mm]
  780. \copyright{} \@author, \@publicationyear\\
  781. ISBN \@isbn\\
  782. ISSN \@issn\\
  783. {\footnotesize URL \texttt{http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-\@divanumber}}\\[1cm]
  784. Published articles have been reprinted with permission from the
  785. respective
  786. copyright holder.\\
  787. % Paper III \copyright{} XXX\\
  788. Typeset using \ifxetex\XeTeX\else\LaTeX\fi\\[1cm]
  789. Printed by LiU-Tryck, Linköping \@publicationyear
  790. \end{flushleft}
  791. \clearpage}
  792. % Intro page for MSC theses
  793. \newcommand{\makeinsidepage}{
  794. \thispagestyle{empty}
  795. {\@calibri\selectfont
  796. \vspace*{2cm}
  797. \section*{Upphovsrätt}
  798. \label{sec:upphovsratt}
  799. Detta dokument hålls tillgängligt på Internet - eller dess framtida ersättare
  800. - under 25 år från publiceringsdatum under förutsättning att inga extraordinära
  801. omständigheter uppstår.
  802. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner,
  803. skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för
  804. ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid
  805. en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av
  806. dokumentet kräver upphovsmannens medgivande. För att garantera äktheten,
  807. säkerheten och tillgängligheten finns lösningar av teknisk och administrativ
  808. art.
  809. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den
  810. omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna
  811. sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i
  812. sådant sammanhang som är kränkande för upphovsmannens litterära eller
  813. konstnärliga anseende eller egenart.
  814. För ytterligare information om Linköping University Electronic Press se
  815. förlagets hemsida
  816. \href{http://www.ep.liu.se/}{\texttt{http://www.ep.liu.se/}}.
  817. \vspace*{2cm}
  818. \section*{Copyright}
  819. \label{sec:copyright}
  820. The publishers will keep this document online on the Internet - or its possible
  821. replacement - for a period of 25 years starting from the date of publication
  822. barring exceptional circumstances.
  823. The online availability of the document implies permanent permission for anyone
  824. to read, to download, or to print out single copies for his/hers own use and to
  825. use it unchanged for non-commercial research and educational purpose. Subsequent
  826. transfers of copyright cannot revoke this permission. All other uses of the
  827. document are conditional upon the consent of the copyright owner. The publisher
  828. has taken technical and administrative measures to assure authenticity, security
  829. and accessibility.
  830. According to intellectual property law the author has the right to be mentioned
  831. when his/her work is accessed as described above and to be protected against
  832. infringement.
  833. For additional information about the Linköping University Electronic Press and
  834. its procedures for publication and for assurance of document integrity, please
  835. refer to its www home page:
  836. \href{http://www.ep.liu.se/}{\texttt{http://www.ep.liu.se/}}.
  837. \vfill{}
  838. \copyright{} \@author
  839. \vfill{}
  840. }
  841. }
  842. \newcommand{\makededicationpage}{
  843. \mbox{}
  844. \vfill
  845. \begin{center}
  846. \@dedication\\
  847. \end{center}
  848. \vfill
  849. }
  850. %%%%%%%%%%%%%%%%%
  851. %
  852. % Page size and layout
  853. %
  854. %%%%%%%%%%%%%%%%%
  855. \clubpenalty=10000
  856. \widowpenalty=10000
  857. \raggedbottom
  858. \midsloppy
  859. \newlength{\mylen} % a length
  860. \newcommand{\alphabet}{abcdefghijklmnopqrstuvwxyzåäö} % the lowercase
  861. % alphabet
  862. \begingroup
  863. % keep font change local
  864. % font specification e.g.,
  865. % \Large\sffamily
  866. \settowidth{\mylen}{\alphabet}
  867. % The length of this alphabet is
  868. % \the\mylen.
  869. \typeout{The length of the alphabet is \the\mylen}
  870. % put in log file
  871. % end the grouping
  872. \endgroup
  873. % Tryckmaterialets storlek
  874. \setstocksize{297mm}{210mm}
  875. %
  876. \ifstudent
  877. \settrimmedsize{290mm}{205mm}{*}
  878. \settypeblocksize{*}{34pc}{1.618} % golden ratio
  879. \else
  880. % LiU-specific definition of the S5 format
  881. \settrimmedsize {240mm}{165mm}{*}
  882. \settypeblocksize{*}{28pc}{1.618}
  883. \fi
  884. \newcommand{\resetlayout}{
  885. \setlength{\trimtop}{\stockheight} % \trimtop = \stockheight - \paperheight
  886. \addtolength{\trimtop}{-\paperheight} %
  887. \setlength{\trimedge}{\stockwidth} % \trimedge = \stockwidth - \paperwidth
  888. \addtolength{\trimedge}{-\paperwidth} %
  889. % Beskär endast höger- och nederkanten på respektive papper
  890. % \settrims{0pt}{0pt}
  891. % Beskär runt om: Centrera tryckytan på pappret
  892. \settrims{0.5\trimtop}{0.5\trimedge}
  893. % Inner margin 2cm
  894. \ifprinterfriendly
  895. \renewcommand{\clearforchapter}{\cleartooddpage}
  896. \fi
  897. \ifstudent
  898. \setlrmargins{*}{*}{1}
  899. \else
  900. \setlrmargins{*}{*}{1.5}
  901. \fi
  902. % Övre marginal 2cm, den undre automatiskt beräknad
  903. \setulmargins{2cm}{*}{*}
  904. }
  905. %
  906. % Common layout settings
  907. % Variables and page layout
  908. \linespread{1.05}
  909. \typeout{******** LiU thesis layout ********}
  910. \typeoutlayout
  911. \typeout{******** Standard memoir layout ********}
  912. \typeoutstandardlayout
  913. %% Load user settings from the file settings.tex
  914. \AtBeginDocument{%
  915. \resetlayout
  916. \checkandfixthelayout
  917. \pagestyle{empty}
  918. \ifexhibitpage
  919. \iflith
  920. \exhibitpagelith
  921. \else
  922. \exhibitpagefilfak
  923. \fi
  924. \end{document}%
  925. \endinput%
  926. \fi
  927. \pagenumbering{roman}
  928. \begin{adjustwidth}{-1cm}{-1cm}
  929. \maketitle
  930. \newpage
  931. \end{adjustwidth}
  932. \ifstudent
  933. \makeinsidepage
  934. \else
  935. \pagestyle{plain}
  936. \makepermissionpage
  937. \fi
  938. \ifdedication
  939. \makededicationpage
  940. \fi
  941. \cleartorecto%
  942. \phantomsection
  943. \swedishenglish{\addcontentsline{toc}{chapter}{Sammanfattning}}
  944. {\addcontentsline{toc}{chapter}{Abstract}}
  945. \cleardoublepage
  946. \ifstudent
  947. \begin{abstract}
  948. \@abstract
  949. \end{abstract}
  950. \else
  951. \abstractpages
  952. \fi
  953. \cleardoublepage
  954. \newpage
  955. \@acknowledgments
  956. \swedishenglish{\addcontentsline{toc}{chapter}{Författarens tack}}
  957. {\addcontentsline{toc}{chapter}{Acknowledgments}}
  958. \cleardoublepage
  959. {\pagestyle{plain}\tableofcontents\relax\cleardoublepage}
  960. \iftotalfigures {\pagestyle{plain}\listoffigures\relax\cleardoublepage}\fi
  961. \iftotaltables {\pagestyle{plain}\listoftables\relax\cleardoublepage}\fi
  962. \@ifpackageloaded{todonotes}{\pagestyle{plain}\listoftodos\relax\cleardoublepage}{}
  963. \ifprinterfriendly
  964. \cleartooddpage
  965. \else
  966. \cleartorecto
  967. \fi
  968. \pagenumbering{arabic}
  969. \pagestyle{ruled}
  970. }
  971. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  972. %%% liuthesis.cls ends here