-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtucsdissertation.cls
206 lines (169 loc) · 5.09 KB
/
tucsdissertation.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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
%mainfile diss
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{tucsdissertation}[2006/10/17 TUCS Dissertation.]
\RequirePackage{ifthen,epsfig,graphics}
\RequirePackage[usenames]{color}
% For the cover pages.
\newboolean{cover}
\DeclareOption{cover}{\setboolean{cover}{true}}
%%%%%%%%%%%%%%%%%%%%
% A TUCS Dissertation is a kind of book.
%%%%%%%%%%%%%%%%%%%%
\newcommand{\@defaultfontsize}{11pt}
\DeclareOption*{
\ifthenelse{\equal{\CurrentOption}{12pt}}{\renewcommand{\@defaultfontsize}{12pt}}
{
\ifthenelse{\equal{\CurrentOption}{11pt}}{}
{
\ifthenelse{\equal{\CurrentOption}{10pt}}{\renewcommand{\@defaultfontsize}{10pt}}
{
\PassOptionsToClass{\CurrentOption}{book}
}
}
}
}
\ProcessOptions
\PassOptionsToClass{\@defaultfontsize}{book}
\LoadClass[twoside,a4paper,titlepage]{book}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TUCS Dissertations have some fields that books dont, namly:
% tucsnumber: The number of the TUCS Dissertations
% isbn: The ISBN number of the Publication.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\@tucsnumber}{?}
\newcommand{\tucsnumber}[1]{\renewcommand{\@tucsnumber}{#1}}
\newcommand{\@isbn}{?}
\newcommand{\isbn}[1]{\renewcommand{\@isbn}{#1}}
\newcommand{\theisbn}{\@isbn}
%%%%%%%%%%%%%%%%%%%%
% isss: The ISSN number of the series.
%%%%%%%%%%%%%%%%%%%%
\newcommand{\@issn}{1239-1883}
\newcommand{\theissn}{\@issn}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The date in a TUCS Dissertations is just given as: Month YEAR.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\today}{%
\ifcase\month\or
January\or
February\or
March\or
April\or
May\or
June\or
July\or
August\or
September\or
October\or
November\or
December\fi\
\number\year
}
% Set up the margins _after_ the paper size has been selected by whatever
% style files the user has.
\AtBeginDocument{
\setlength{\textwidth}{125mm}
\setlength{\textheight}{205mm}
\setlength{\evensidemargin}{15.6mm}
\setlength{\oddsidemargin}{15.6mm}
}
%%%%%%%%%%%%%%
% Fonts used on cover pages
%%%%%%%%%%%%%%
% The font for the title on the front cover
\newcommand{\title@font}{%
\fontseries{m}%
\fontshape{n}%
\fontsize{24.88}{28} %%%{17.28}{20}
\selectfont
\sffamily}
% The font for the author{s} on the front cover
\newcommand{\author@font}{%
\fontseries{m}%
\fontshape{n}%
\fontsize{24.88}{28} %%%{17.28}{20}
\selectfont
\sffamily}
\newcommand{\TUCSDiss@font}{%
\fontseries{m}%
\fontshape{n}%
\fontsize{23}{24}
\selectfont
\sffamily}
% The font for the univerities on the back cover
\newcommand{\backhead@font}{%
\fontseries{m}%
\fontshape{n}%
\fontsize{11}{12}%
\selectfont
\sffamily}
% The font for the departments on the back cover
\newcommand{\back@font}{%
\fontseries{m}
\fontshape{n}%
\fontsize{11}{12}%
\selectfont
\sffamily}
% The font for the dissertation number and date on the front cover
\newcommand{\tinfo@font}{%
\fontseries{m}
\fontshape{n}%
\fontsize{17.28}{18}%
\selectfont
\sffamily}
% The font for ISBN and ISSN on back cover
\newcommand{\tinfotwo@font}{%
\fontseries{m}
\fontshape{n}%
\fontsize{12}{14}%
\selectfont
\sffamily}
% This is the command that actually makes the title.
\renewcommand{\maketitle}{
\pagestyle{empty}
\clearpage
\begin{figure}[t]
\begin{picture}(100,100)(0,0)
\put(-77,-345){\includegraphics{TUCS_etukansi.eps}}
\put(-32,120){\parbox[t]{15cm}{\color{white}\author@font\@author}}
%\put(-32,10){\parbox[t]{15cm}{\color{white}\title@font\@title}}
\put(-32,10){\parbox[t]{15cm}{\color{white}\Huge\sf\@title}}
\put(71,-270){\begin{tabular}{p{41ex}}\TUCSDiss@font{\color{Gray}TUCS Dissertations} \\
\begin{center}\tinfo@font{\color{Gray}No \@tucsnumber, \@date} \end{center}
\end{tabular}}
%\put(95,-270){\author@font{\color{Gray}TUCS Dissertations}}
%\put(135,-290){\tinfo@font{\color{Gray}No \@tucsnumber, \@date}}
\end{picture}\\\mbox{}
\end{figure}
\cleardoublepage
\pagestyle{plain}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TUCS Dissertations have a page at the end with some logos on it.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\AtEndDocument{%
\clearpage
\pagestyle{empty}%
%%%\enlargethispage*{2cm}
\ifthenelse{\boolean{cover}}{%
\cleardoublepage
\hbox{}
\clearpage
}{%
\ifthenelse{\isodd{\value{page}}}{%
\hbox{}
\clearpage
}{}%
}%
\begin{picture}(0,0)(0,0)
%\put(-110,-650){\includegraphics{TUCS_takakansi.eps}} %%% (-80,-600)
\put(-87,-514){\includegraphics{Diss_backcoverA4.eps}} %%% (-80,-600)
%\put(-60,-180){\parbox[t]{15cm}{\color{white}\tinfo@font{Joukahaisenkatu 3$\,$-$\,$5, 20520 Turku, Finland \ $|$\ www.tucs.fi}}}
\end{picture}\\
%
\begin{picture}(100,535)(0,0)
%\put(-5,-25){\tinfotwo@font a ISBN \@isbn a}
\put(-5,-30){\tinfotwo@font ISBN \@isbn }
\put(-5,-45){\tinfotwo@font ISSN \@issn }
\end{picture}
}