Newer
Older
Ola Leifler
committed
%%% liuthesis.cls ---
%%
Ola Leifler
committed
%% Description:
Ola Leifler
committed
%% Maintainer:
Ola Leifler
committed
%% Version:
Ola Leifler
committed
%% URL:
%% Keywords:
%% Compatibility:
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ola Leifler
committed
%%
%%% Commentary:
%%
Ola Leifler
committed
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ola Leifler
committed
%%
Ola Leifler
committed
%%
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ola Leifler
committed
%%
%% This program is free software; you can redistribute it and/or
%% modify it under the terms of the GNU General Public License as
%% published by the Free Software Foundation; either version 3, or
%% (at your option) any later version.
Ola Leifler
committed
%%
%% This program is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
%% General Public License for more details.
Ola Leifler
committed
%%
%% You should have received a copy of the GNU General Public License
%% along with this program; see the file COPYING. If not, write to
%% the Free Software Foundation, Inc., 51 Franklin Street, Fifth
%% Floor, Boston, MA 02110-1301, USA.
Ola Leifler
committed
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ola Leifler
committed
%%
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
%%% Code:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{liuthesis} [2017/04/20 Thesis class for LiU]
\typeout{Undergraduate and graduate thesis class for LiU by Ola Leifler - v 1.1}
\def\createvariable#1{%
\expandafter\def\csname #1\endcsname{\expandafter\gdef\csname @#1\endcsname}
\csname #1\endcsname{\texttt{\textbackslash #1}}
}
% \def\createconditionalvariable#1{
% \expandafter\newif\csname if#1\endcsname
% \csname #1 false\endcsname
% \def\csname#1\endcsname
% }
\RequirePackage{xkeyval}
\RequirePackage{ifxetex}
\ifxetex
\else
\RequirePackage[utf8]{inputenc}
\fi
\RequirePackage[absolute]{textpos}
% For conditionally including lists of tables and figures
\RequirePackage[figure,table]{totalcount}
\createvariable{edition}
\createvariable{presentationroom}
\createvariable{presentationbuilding}
\createvariable{presentationcampus}
\createvariable{presentationdate}
\createvariable{presentationdateenglish}
\createvariable{presentationtime}
\createvariable{thesislanguage}
\createvariable{faculty}
\createvariable{issn}
\createvariable{degreeprefix}
\createvariable{degreesuffix}
\createvariable{exhibittext}
\createvariable{exhibittextswedish}
\createvariable{opponenttitle}
\createvariable{opponentname}
\createvariable{opponentuniversity}
\createvariable{opponentcountry}
\createvariable{thesisnumber}
\createvariable{currentyearthesisnumber}
\createvariable{supportedby}
\createvariable{publicationyear}
\createvariable{publicationmonth}
\createvariable{isbn}
\createvariable{supervisor}
\createvariable{examiner}
\createvariable{titleenglish}
\createvariable{titleswedish}
\createvariable{keywords}
\createvariable{keywordsswedish}
\createvariable{department}
\createvariable{departmentenglish}
\createvariable{departmentshort}
\createvariable{division}
\createvariable{divisionshort}
\createvariable{dateofpublication}
\createvariable{publicationseries}
% Undergrad specific
\createvariable{area}
\createvariable{level}
\createvariable{thesistypenameswedish}
\createvariable{thesistypenameenglish}
\createvariable{thesiscredits}
\createvariable{thesissubject}
\createvariable{thesissubjectenglish}
\newif\ifsubtitleswedish
\subtitleswedishfalse
\def\subtitleswedish#1{\subtitleswedishtrue\gdef\@subtitleswedish{#1}}
\newif\ifsubtitleenglish
\subtitleenglishfalse
\def\subtitleenglish#1{\subtitleenglishtrue\gdef\@subtitleenglish{#1}}
\newif\ifdedication
\dedicationfalse
\def\dedication#1{\dedicationtrue\gdef\@dedication{#1}}
\newif\ifexternalsupervisor
\externalsupervisorfalse
\def\externalsupervisor#1{\externalsupervisortrue\gdef\@externalsupervisor{#1}}
\createvariable{divanumber}
% Include the abstract
\gdef\@abstract{\input{abstract}}
\gdef\@sammanfattning{\input{sammanfattning.tex}}
\gdef\@acknowledgments{\input{acknowledgments.tex}}
\newif\iflith
\lithtrue
\newif\ifhu
\newif\iffilfak
\newif\ifphd
% \phdtrue
\newif\iflic
\licfalse
\newif\ifstudent
\studenttrue
\newif\ifprinterfriendly
\printerfriendlyfalse
\DeclareOption{hu}{%
\hutrue
\lithfalse
\filfakfalse
\faculty{Faculty of Health Sciences}
\gdef\@facultyshort{HU}
\gdef\@facultyshortlogo{hu}
\publicationseries{Linköping University Medical Dissertations}
\degreeprefix{medicine}
}
\DeclareOption{lith}{%
\lithtrue
\hufalse
\filfakfalse
\faculty{Institute of Technology}
\publicationseries{Linköping Studies in Science and Technology}
\degreeprefix{teknologie}
\gdef\@facultyshort{Tek}
\gdef\@facultyshortlogo{lith}
\gdef\@area{LITH}
}
\DeclareOption{filfak}{%
\filfaktrue
\lithfalse
\hufalse
\faculty{Philosophical faculty}
\gdef\@facultyshort{FilFak}
\gdef\@facultyshortlogo{filfak}
\publicationseries{Linköping Studies in Arts and Sciences}
\degreeprefix{filosofie}
% \gdef\@area{FFK-UP}
}
\DeclareOption{msc}{%
\studenttrue
\phdfalse
\licfalse
\level{A}
\gdef\@thesistypenameenglish{Master}
\gdef\@thesistypenameswedish{avancerad nivå}
\thesiscredits{30}
\PassOptionsToClass{oneside}{memoir}
}
\DeclareOption{bachelor}{%
\studenttrue
\phdfalse
\licfalse
\level{G}
\gdef\@thesistypenameenglish{Bachelor}
\gdef\@thesistypenameswedish{grundnivå}
\thesiscredits{16}
\PassOptionsToClass{oneside}{memoir}
}
\DeclareOption{lic}{%
\lictrue
\phdfalse
\studentfalse
}
\DeclareOption{phd}{%
\licfalse
\studentfalse
\phdtrue
}
\DeclareOption{printerfriendly}{%
\printerfriendlytrue
}
\DeclareOption{swedish}{%
\thesislanguage{swedish}
}
\DeclareOption{english}{%
\thesislanguage{english}
}
\newif\ifexhibitpage
\exhibitpagefalse
\DeclareOption{exhibitpage}{%
\exhibitpagetrue
\PassOptionsToClass{oneside}{memoir}
}
Ola Leifler
committed
% % % Add the necessary biblatex options to the class options
% \DeclareOptionX{biblatexoptions}{%
% \gdef\@biblatexoptions{#1}
% \PassOptionsToPackage{\@biblatexoptions}{biblatex}
% }
% \DeclareOptionX{memoiroptions}{%
% \PassOptionsToClass{#1}{memoir}
% }
Ola Leifler
committed
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}}
\ExecuteOptions{english,phd,lith,a4paper}
\ProcessOptions*
%% There is a special exception to the rule that publication series
%% are defined by the faculty, and that is the philosophical faculty
%% that uses a special series for licentiate theses
\iflic
\iffilfak
\publicationseries{Faculty of Arts and Sciences}
\fi
\fi
\LoadClass{memoir}
\RequirePackage{color}
\RequirePackage[svgnames]{xcolor}
\RequirePackage{pdfpages}
\RequirePackage{tikz}
\RequirePackage{pbox}
\RequirePackage{ifthen}
\RequirePackage{geometry}
\RequirePackage[pdfusetitle]{hyperref}
\RequirePackage{amssymb}
\RequirePackage{amsmath}
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
% Set up input encoding and font handling
\ifxetex
\RequirePackage[MnSymbol]{mathspec}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Some versions of latex have issues with mathspec, see
% https://tex.stackexchange.com/questions/85696/what-causes-this-strange-interaction-between-glossaries-and-amsmath
\let\RequirePackage\original@RequirePackage
\let\usepackage\RequirePackage
% End workaround
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\RequirePackage{xltxtra}
\defaultfontfeatures{Mapping=tex-text}
\else
\RequirePackage{graphicx}
\RequirePackage{palatino}
\RequirePackage{mathabx}
\RequirePackage{mathpazo}
\RequirePackage[T1]{fontenc}
\fi
\ifphd
\gdef\@degreetype{\@degreeprefix {} doktorsexamen}
\gdef\@degreetypeenglish{Doctor of \@degreesuffix}
\else
\iflic
\gdef\@degreetype{\@degreeprefix {} licentiatexamen}
\gdef\@degreetypeenglish{Licentiate degree in \@degreesuffix}
\fi
\fi
\iflith
\iflic
\issn{0280-7971}
\fi
\ifphd
\issn{0345-7524}
\fi
\fi
% We use the same series for lic and PhD at Filfak/HU
\ifhu
% \ifphd
Ola Leifler
committed
\issn{0345-0082}
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
% \fi
% \iflic
% \typeout{Please define the ISSN by issuing a \textbackslash issn command}
% \issn{\textbackslash\texttt{issn}}
% \fi
\fi
\iffilfak
% \ifphd
\issn{0282-9800}
% \fi
% \iflic
% \typeout{Please define the ISSN by issuing a \textbackslash issn command}
% \issn{\textbackslash\texttt{issn}}
% \fi
\fi
\newcommand{\swedishenglish}[2]{
\ifthenelse{\equal{\@thesislanguage}{swedish}}{#1}{#2}
}
\RequirePackage{csquotes}
\ifxetex
\RequirePackage{polyglossia}
\swedishenglish{
\setmainlanguage{swedish}
\setotherlanguages{english}
}{
\setmainlanguage{english}
\setotherlanguages{swedish}
}
\else
\swedishenglish{
Ola Leifler
committed
\RequirePackage[swedish]{babel}
Ola Leifler
committed
\RequirePackage[english]{babel}
}
\fi
%% Include articles
\RequirePackage{calc}
\RequirePackage{ragged2e}
\definecolor{nicered}{rgb}{.647,.129,.149}
\newsavebox{\feline@article}
\newcommand\feline@article@marker[1][4cm]{%
Ola Leifler
committed
\sbox\feline@article{%
\resizebox{!}{#1}{\fboxsep=1pt%
\colorbox{nicered}{\color{white}\bfseries\thearticle\phantom{.}}%
}}%
Ola Leifler
committed
\rotatebox{90}{%
Ola Leifler
committed
\heightof{\usebox{\feline@article}}+\depthof{\usebox{\feline@article}}}%
{!}{{\scshape \MakeUppercase Paper}}}\quad%
\raisebox{\depthof{\usebox{\feline@article}}}{\usebox{\feline@article}}%
Ola Leifler
committed
}
Ola Leifler
committed
\sbox\feline@article{\feline@article@marker[#1]}%
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
\makebox[0pt][l]{% aka \rlap
\makebox[\spinemargin][r]{
\usebox\feline@article
}
}
}
\newcounter{article}
\setcounter{article}{0}
\renewcommand{\thearticle}{\Roman{article}}
\includepdfset{pages=-}
\setlength{\TPVertModule}{2cm}
\setlength{\TPHorizModule}{\paperwidth - 4.3cm}
\newcommand{\papermark}{Paper \thearticle}
\newcommand{\includearticle}[2][pages=-]{%
\@twosidetrue
\refstepcounter{article}%
\cleartorecto%
\thispagestyle{empty}
\mbox{}%
\vspace*{\fill}
\begin{center}%
{\hfill \feline@chm[2.5cm]\\[2\baselineskip]}
{\fullcite{#2}}
\end{center}%
\vspace*{\fill}%
\cleartorecto%
\label{art:#2}%
\addcontentsline{toc}{chapter}{\papermark}%
\includepdf[#1]{#2}%
}
\newenvironment{papers}{
\makeevenhead{ruled}{\papermark}{}{}
\renewcommand*{\thechapter}{\thearticle}
Ola Leifler
committed
\newlength{\numberheight}
Ola Leifler
committed
\setlength{\afterchapskip}{40pt}
\setlength{\numberheight}{10mm}
\renewcommand*{\chapterheadstart}{\vspace*{40pt}}
\renewcommand*{\afterchapternum}{\par\nobreak\vskip 25pt}
\renewcommand*{\chapnamefont}{\normalfont\LARGE\flushright}
\renewcommand*{\chapnumfont}{\normalfont\HUGE}
\renewcommand*{\chaptitlefont}{\normalfont\Huge\bfseries\flushright}
Ola Leifler
committed
}
\renewcommand*{\chapternamenum}{}
Ola Leifler
committed
}%
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
\makeoddfoot{plain}{}{}{\thepage}}
\renewcommand{\@chapapp}{\papermark}
\chapterstyle{paperstyle}
}{}
\newcommand{\includearticletex}[1]{%
\stepcounter{article}%
\cleartorecto%
\thispagestyle{empty}
\mbox{}%
\vspace*{\fill}
\begin{center}%
{\hfill \feline@chm[2.5cm]\\[2\baselineskip]}
{\fullcite{#1}}
\end{center}%
\vspace*{\fill}%
\clearpage{}
\chapter[\papermark][\papermark]{\citetitle{#1}}
\label{art:#1}
\input{papers/#1}%
}
\ifx\pdfoutput\undefined
\else
\pdfoutput=1
\DeclareGraphicsExtensions{.pdf,.jpg,.png}
\fi
\graphicspath{{figures/}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% font selection, based on availability %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\tryfonts#1#2{
\ifxetex
\def\primaryfont{"#1"} % first preferred font
\def\secondaryfont{"#2"} % if first font not avaliable
\count255=\interactionmode
\batchmode
\font\bodyfont=\primaryfont\space at 10pt
\ifx\bodyfont\nullfont
\font\bodyfont=\secondaryfont\space at 10pt
\ifx\bodyfont\nullfont
\errorstopmode
\errmessage{Neither #1 or #2 fonts installed, quitting..}
\else
\fontspec{#2}
\setmainfont{#2}
\fi
\else
\fontspec{#1}
\setmainfont{#1}
\fi
\interactionmode=\count255
\else
\typeout{ **** Please use XeTeX and install Calibri for correct typesetting ***}
\fi
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% The exhibit page %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\exhibitpagelith}{%
\tryfonts{Calibri}{Carlito}
\copypagestyle{exhibitpagestyle}{plain}
\makeevenfoot{exhibitpagestyle}{ISBN \@isbn}{}{ISSN \@issn}
\makeoddfoot{exhibitpagestyle}{ISBN \@isbn}{}{ISSN \@issn}
\thispagestyle{exhibitpagestyle}
\begin{center}
{\footnotesize \@publicationseries}\\
{\footnotesize \ifphd Dissertations,\else Licentiate Thesis\fi {} No. \@thesisnumber}\\[15mm]
{\Large\bfseries\swedishenglish{\@titleswedish}{\@titleenglish}}\\[5mm]
by\\[5mm]
{\Large\bfseries\@author}
\vfill
{\small\textbf{Akademisk avhandling}\\
som för framläggande av \@degreetype{} i \@thesissubject{}
vid Linköpings universitet kommer att offentligt försvaras i sal
\@presentationroom, hus \@presentationbuilding, universitetsområde
\@presentationcampus, \@presentationdate{} kl. \@presentationtime}\\[2\baselineskip]
\textbf{Fakultetsopponent}\\
\@opponenttitle{} \@opponentname\\
\@opponentuniversity\\
\@opponentcountry
\\[15mm]
\vfill
\includegraphics[width=35mm]{liu_primary_black_en}
\\[15mm]
Linköping University\\
\@departmentenglish\\
\@division\\
SE--581 83 Linköping\\[5mm]
Linköping \@publicationyear\\
\vspace*{1mm}
\end{center}
\clearpage{}
\tryfonts{Calibri}{Carlito}
\small \textbf{Abstract}\\
\@abstract
\vfill
\footnotesize
\begin{flushleft}
Keywords: \@keywords\\[3mm]
\@supportedby\mbox{}\\[3mm]
Ola Leifler
committed
URL: \texttt{http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-\@divanumber}\\[3mm]
Ola Leifler
committed
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
}
\newcommand{\exhibitpagefilfak}{%
\begin{center}
\tryfonts{KorolevLiU}{Calibri}
\@publicationseries{} No. \@thesisnumber\\[3\baselineskip]
{\Large\@titleswedish\\
\@subtitleswedish}\\[5mm]\fi
\small
{\bfseries\@author}\\[5mm]
{\bfseries Akademisk avhandling}\\
som för framläggande av \@degreetype{} i \@thesissubject{}
vid Filosofiska fakulteten kommer att offentligt försvaras i sal
\@presentationroom, hus \@presentationbuilding, universitetsområde
\@presentationcampus, \@presentationdate{} kl. \@presentationtime\\[2\baselineskip]
{\bfseries Sammanfattning}\\
\@exhibittextswedish\\[6mm]
\vfill
\begin{flushleft}
Nyckelord: \@keywordsswedish\\[3mm]
\end{flushleft}
\includegraphics[width=35mm]{liu_primary_black_sv}\\
\@department\\
Linköpings universitet, 581 83 Linköping\\[5mm]
ISBN \@isbn{} ISSN \@issn
\clearpage{}
\normalsize
{\@publicationseries{} No. \@thesisnumber}\\[3\baselineskip]
{\Large\@titleenglish\\
\@subtitleenglish}\\[5mm]
\small
{\bfseries\@author}\\[5mm]
{\textbf{Academic dissertation}\\
Academic dissertation for the Degree of \@degreetypeenglish{} in \@thesissubjectenglish{}
at the Faculty of Arts and Sciences to be publicly defended on
\@presentationdateenglish{} at \@presentationtime{} in room
\@presentationroom, building \@presentationbuilding, campus
Ola Leifler
committed
\@presentationcampus{} by \@author}
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
\\[2\baselineskip]
{\bfseries Abstract}\\
\@abstract
\vfill
\begin{flushleft}
Keywords: \@keywords\\[3mm]
\end{flushleft}
\includegraphics[width=35mm]{liu_primary_black_en} \\
\@departmentenglish\\
Linköping University, SE--581 83 Linköping\\[5mm]
ISBN \@isbn{} ISSN \@issn
\end{center}
\clearpage{}
}
\newcommand{\gettitle}{\swedishenglish{\@titleswedish}{\@titleenglish}}
\iflic
\newcommand{\isrn}{LIU-\@facultyshort{}-Lic-{}-\@publicationyear:\@currentyearthesisnumber}
\fi
\ifstudent
\newcommand{\isrn}{LIU-\@departmentshort{}/\@area{}-EX-\@level{}-{}-\@publicationyear/\@currentyearthesisnumber-{}-SE}
\fi
\newcommand\makeundergraduatetitle{%
{\tryfonts{Calibri}{Carlito}
{\raggedleft%
\sffamily%
\swedishenglish{%
\begin{large}%
Linköpings universitet | \@department\par
Examensarbete på \@thesistypenameswedish, \@thesiscredits hp | \@thesissubject\par%
20\@publicationyear\ | \isrn\par%
\end{large}%
}{%
\begin{large}%
Linköping University | \@departmentenglish\par
\@thesistypenameenglish{} thesis, \@thesiscredits{} ECTS | \@thesissubject\par%
20\@publicationyear\ | \isrn\par%
\end{large}%
}%
}%
\vspace*{50mm}%
\swedishenglish{%
\hspace*{36mm}%
}{%
\hspace*{38mm}%
}%
\newlength{\thesiswidth}%
\swedishenglish{%
\setlength{\thesiswidth}{\paperwidth-86mm}%
}{%
\setlength{\thesiswidth}{\paperwidth-88mm}%
}%
\begin{minipage}[t]{\thesiswidth}
{\fontsize{25pt}{30pt}\selectfont\swedishenglish{\@titleswedish}{\@titleenglish}\par}%
\swedishenglish{\ifsubtitleswedish}{\ifsubtitleenglish} -- {\fontsize{13pt}{15pt}\selectfont\swedishenglish{\@subtitleswedish}{\@subtitleenglish}\par}\fi%
\hrulefill{}
\\{}
{\tryfonts{Calibri}{Carlito}{%
\fontsize{13pt}{15pt}\selectfont%
\textit{\swedishenglish{\@titleenglish}{\@titleswedish}}\par}%
\swedishenglish{\ifsubtitleenglish}{\ifsubtitleswedish}--
{\fontsize{13pt}{15pt}\textit{\selectfont\swedishenglish{\@subtitleenglish}{\@subtitleswedish}}\par}
\fi}%
\vspace*{10mm}%
{\tryfonts{Calibri}{Carlito}\fontsize{12pt}{13pt}\selectfont\textbf{\@author}\par
}%
\vspace*{10mm}%
{\tryfonts{Calibri}{Carlito}\fontsize{10pt}{11pt}\selectfont
\parbox{\textwidth}{\swedishenglish{Handledare}{Supervisor}: \@supervisor\\
\swedishenglish{Examinator}{Examiner}: \@examiner\\[2\baselineskip]
\ifexternalsupervisor \swedishenglish{Extern
handledare}{External supervisor}: \@externalsupervisor\fi}}%
\end{minipage}
\vfill{}
\begin{textblock*}{\textwidth}(2cm,\paperheight-4cm)
\swedishenglish{\gdef\@langlogo{sv}}{\gdef\@langlogo{en}}
\parbox{0.4\textwidth}{\includegraphics[width=85mm]{liu_primary_black_\@langlogo}}%
\hspace*{32mm}
\parbox{0.5\textwidth}{\raggedleft%
\vspace*{4mm}
Linköpings universitet\\
SE--581 83 Linköping\\
\swedishenglish{013-28 10 00}{+46 13 28 10 00}, \href{http://www.liu.se}{www.liu.se}}
\end{textblock*}
}
}
\newcommand{\makegraduatetitle}{
\tryfonts{Calibri}{Carlito}
{\center
{\footnotesize\centerline\@publicationseries{}%\\
\ifphd
Ola Leifler
committed
Dissertations,
Ola Leifler
committed
\fi No. \@thesisnumber}\\[25mm]
{\LARGE\bfseries\gettitle}\\[20mm]
{\Large\bfseries\@author}\\
\vfill
\swedishenglish{\gdef\@langlogo{sv}}{\gdef\@langlogo{en}}
Ola Leifler
committed
\includegraphics[width=85mm]{liu_primary_black_\@langlogo}
\\[12mm]
{\footnotesize
\swedishenglish{%
\iflic
Ola Leifler
committed
Framlagd vid \@faculty{} vid Linköpings universitet som del av fordringarna för \@degreetype\\[6mm]
Ola Leifler
committed
\@department \\
Linköping universitet\\
581 83 Linköping
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
}{%
Linköping University\\
\@departmentenglish\\
\@division\\
SE-581 83 Linköping, Sweden\\
}
\vspace*{5mm}
Linköping \@publicationyear\\
}
}
}
\ifstudent
\renewcommand{\maketitle}{\makeundergraduatetitle}
\else
\renewcommand{\maketitle}{\makegraduatetitle}
\fi
\newcommand{\abstractpages}{%
\ifphd
\vspace*{6mm}
\ifxetex
\begin{swedish}
\else
\selectlanguage{swedish}
\fi
\setlength{\parindent}{0mm}
\setlength\parskip{8pt}\centerline{POPULÄRVETENSKAPLIG SAMMANFATTNING}
\vspace{3mm}
Ola Leifler
committed
\footnotesize{\@sammanfattning}
\ifxetex
\end{swedish}
\else
\swedishenglish
{
}
{
\selectlanguage{english}
}
\fi
\fi
\newpage
\vspace*{6mm}
{ \setlength{\parindent}{0mm}
\setlength\parskip{8pt}\centerline{ABSTRACT}
\vspace{3mm}
Ola Leifler
committed
\footnotesize{\@abstract}
}
}
\newcommand{\makepermissionpage}{
\mbox{}
\iffilfak
\ifphd
\hspace{-\parindent}
At the Faculty of Arts and Sciences at Linköping University,
research and doctoral studies are carried out within broad problem
areas. Research is organized in interdisciplinary research
environments and doctoral studies mainly in graduate
schools. Jointly, they publish the series Linköping Studies in Arts
and Sciences. This thesis comes from \@division{} at the \@departmentenglish.
\fi
\fi
\iflic
\vfill
\begin{center}
{\footnotesize
This is a Swedish Licentiate’s Thesis\\[0.8\baselineskip]
Swedish postgraduate education leads to a doctor’s degree and/or a
licentiate’s degree.\\
A doctor’s degree comprises 240 ECTS credits
(4 years of full-time studies).\\
A licentiate’s degree comprises 120 ECTS credits.}
\end{center}
\fi
\vfill
\begin{flushleft}
Edition \@edition\\[5mm]
\copyright{} \@author, \@publicationyear\\
ISBN \@isbn\\
ISSN \@issn\\
Ola Leifler
committed
{\footnotesize URL \texttt{http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-\@divanumber}}\\[1cm]
Published articles have been reprinted with permission from the
respective
copyright holder.\\
% Paper III \copyright{} XXX\\
Typeset using \ifxetex\XeTeX\else\LaTeX\fi\\[1cm]
Printed by LiU-Tryck, Linköping \@publicationyear
\end{flushleft}
\clearpage}
% Intro page for MSC theses
\newcommand{\makeinsidepage}{
\thispagestyle{empty}
{\tryfonts{Calibri}{Carlito}\selectfont
\vspace*{2cm}
\section*{Upphovsrätt}
\label{sec:upphovsratt}
Detta dokument hålls tillgängligt på Internet - eller dess framtida ersättare
- under 25 år från publiceringsdatum under förutsättning att inga extraordinära
omständigheter uppstår.
Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner,
skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för
ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid
en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av
dokumentet kräver upphovsmannens medgivande. För att garantera äktheten,
säkerheten och tillgängligheten finns lösningar av teknisk och administrativ
art.
Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den
omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna
sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i
sådant sammanhang som är kränkande för upphovsmannens litterära eller
konstnärliga anseende eller egenart.
För ytterligare information om Linköping University Electronic Press se
förlagets hemsida
\href{\texttt{http://www.ep.liu.se/}}{http://www.ep.liu.se/}.
\vspace*{2cm}
\section*{Copyright}
\label{sec:copyright}
The publishers will keep this document online on the Internet - or its possible
replacement - for a period of 25 years starting from the date of publication
barring exceptional circumstances.
The online availability of the document implies permanent permission for anyone
to read, to download, or to print out single copies for his/hers own use and to
use it unchanged for non-commercial research and educational purpose. Subsequent
transfers of copyright cannot revoke this permission. All other uses of the
document are conditional upon the consent of the copyright owner. The publisher
has taken technical and administrative measures to assure authenticity, security
and accessibility.
According to intellectual property law the author has the right to be mentioned
when his/her work is accessed as described above and to be protected against
infringement.
For additional information about the Linköping University Electronic Press and
its procedures for publication and for assurance of document integrity, please
refer to its www home page:
\href{\texttt{http://www.ep.liu.se/}}{http://www.ep.liu.se/}.
\vfill{}
\copyright{} \@author
\vfill{}
}
}
\newcommand{\makededicationpage}{
\mbox{}
\vfill
\begin{center}
\@dedication\\
\end{center}
\vfill
}
%%%%%%%%%%%%%%%%%
%
% Page size and layout
%
%%%%%%%%%%%%%%%%%
Ola Leifler
committed
\clubpenalty=10000
\widowpenalty=10000
\raggedbottom
Ola Leifler
committed
\newlength{\mylen} % a length
\newcommand{\alphabet}{abcdefghijklmnopqrstuvwxyzåäö} % the lowercase
Ola Leifler
committed
% alphabet
\begingroup
% keep font change local
Ola Leifler
committed
% \Large\sffamily
\settowidth{\mylen}{\alphabet}
Ola Leifler
committed
% \the\mylen.
\typeout{The length of the alphabet is \the\mylen}
% put in log file
% end the grouping
\endgroup
% Tryckmaterialets storlek
\setstocksize{297mm}{210mm}
Ola Leifler
committed
%
\ifstudent
\settrimmedsize{290mm}{205mm}{*}
\settypeblocksize{*}{34pc}{1.618} % golden ratio
\else
% LiU-specific definition of the S5 format
\settrimmedsize {240mm}{165mm}{*}
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
\settypeblocksize{*}{28pc}{1.618}
\fi
\newcommand{\resetlayout}{
\setlength{\trimtop}{\stockheight} % \trimtop = \stockheight - \paperheight
\addtolength{\trimtop}{-\paperheight} %
\setlength{\trimedge}{\stockwidth} % \trimedge = \stockwidth - \paperwidth
\addtolength{\trimedge}{-\paperwidth} %
% Beskär endast höger- och nederkanten på respektive papper
% \settrims{0pt}{0pt}
% Beskär runt om: Centrera tryckytan på pappret
\settrims{0.5\trimtop}{0.5\trimedge}
% Inner margin 2cm
\ifprinterfriendly
\renewcommand{\clearforchapter}{\cleartooddpage}
\fi
\ifstudent
\setlrmargins{*}{*}{1}
\else
\setlrmargins{*}{*}{1.5}
\fi
% Övre marginal 2cm, den undre automatiskt beräknad
\setulmargins{2cm}{*}{*}
}
%
% Common layout settings
% Variables and page layout
Ola Leifler
committed
\linespread{1.05}
\typeout{******** LiU thesis layout ********}
\typeoutlayout
\typeout{******** Standard memoir layout ********}
\typeoutstandardlayout
%% Load user settings from the file settings.tex
\AtBeginDocument{%
Ola Leifler
committed
\resetlayout
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
\checkandfixthelayout
\pagestyle{empty}
\ifexhibitpage
\iflith
\exhibitpagelith
\else
\exhibitpagefilfak
\fi
\end{document}%
\endinput%
\fi
\pagenumbering{roman}
\begin{adjustwidth}{-1cm}{-1cm}
\maketitle
\newpage
\end{adjustwidth}
\ifstudent
\makeinsidepage
\else
\pagestyle{plain}
\makepermissionpage
\fi
\ifdedication
\makededicationpage
\fi
\cleartorecto%
\phantomsection
\swedishenglish{\addcontentsline{toc}{chapter}{Sammanfattning}}
{\addcontentsline{toc}{chapter}{Abstract}}
\clearpage
\ifstudent
\begin{abstract}
\@abstract
\end{abstract}
\else
\abstractpages
\fi
\clearpage
\newpage
\@acknowledgments
\swedishenglish{\addcontentsline{toc}{chapter}{Författarens tack}}
{\addcontentsline{toc}{chapter}{Acknowledgments}}
\clearpage
{\pagestyle{plain}\tableofcontents\relax\clearpage}
Ola Leifler
committed
\iftotalfigures {\pagestyle{plain}\listoffigures\relax\clearpage}\fi
\iftotaltables {\pagestyle{plain}\listoftables\relax\clearpage}\fi
\@ifpackageloaded{todonotes}{\pagestyle{plain}\listoftodos\relax\clearpage}{}
\ifprinterfriendly
\cleartooddpage
\else
\cleartorecto
\fi
\pagenumbering{arabic}
\pagestyle{ruled}