-
Notifications
You must be signed in to change notification settings - Fork 22
/
chalmers-thesisletter.cls
143 lines (125 loc) · 3.04 KB
/
chalmers-thesisletter.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
%
% By Carl Sandström
%
% To set personal data:
%
% \sender{Carl Sandström}
% \telephone{031-772 15 23}
% \email{[email protected]}
% \thesisname{On Homogenization of Stokes Flow in Porous Media}
%
% Use \maketitlepage to create letter.
%
\NeedsTeXFormat{LaTeX2e}
% Define variables "licentiate" and "doctorate"
\newif\iflicentiate
\newif\ifdoctorate
% Read options from \documentclass command
\DeclareOption{licentiate}{\global\licentiatetrue\global\doctoratefalse}
\DeclareOption{doctorate}{\global\licentiatefalse\global\doctoratetrue}
\ProcessOptions
\ProvidesClass{chalmers-thesisletter}
\LoadClass{article}
% Load packages
\RequirePackage[left=0.5cm,top=1cm,right=0.5cm,bottom=1cm,nohead,nofoot]{geometry}
\RequirePackage{graphicx}
% Define output variables
\newcommand{\sender}[1]{\gdef\@sender{#1}}
\newcommand{\telephone}[1]{\gdef\@telephone{#1}}
\newcommand{\email}[1]{\gdef\@email{#1}}
\newcommand{\thesistitle}[1]{\gdef\@thesistitle{#1}}
\newcommand{\department}[1]{\gdef\@department{#1}}
% \newcommand{\maketitlepage}{
% \thispagestyle{empty}
% \vbox to 0.90\textheight {
% \begin{minipage}[c]{0.49\linewidth}
% \begin{tabular}{rl}
% Date & \today \\
% Sender & \@sender \\
% Telephone & \@telephone \\
% E-mail & \@email
% \end{tabular}
% \vspace{7em}
% \end{minipage}
% \begin{minipage}[t]{0.49\linewidth}
% \begin{center}
% \includegraphics[width=0.35\linewidth]{figures/Avancez_black} \\
% \vspace{2em}
% \parbox{0.45\paperwidth}{
% Chalmers University of Technology \\
% \@department\vspace{1em}\\
% H\"orsalsv\"agen 7a \\ 412 96 G\"oteborg \\ Sweden
% }
% \end{center}
% \end{minipage}
% %\vskip 1em
% %\hrulefill
% %\vskip 1em
% %{\centering
% \begin{center}
% \parbox{0.8\paperwidth}{
% Enclosed is a copy of my
% \iflicentiate
% Licentiate
% \fi
% \ifdoctorate
% PhD
% \fi
% thesis entitled:\\
% \emph{\@thesistitle}
% %\vspace{1.5cm}\\
% \vfil
% Sincerely, \vspace{1.5cm} \\
% \@sender
% \vskip 1em
% }
%
% \end{center}
% }
% }
\newcommand{\maketitlepage}{
\thispagestyle{empty}
\vbox to 0.47\textheight {
\begin{minipage}[c]{0.49\linewidth}
\begin{tabular}{rl}
Date & \today \\
Sender & \@sender \\
Telephone & \@telephone \\
E-mail & \@email
\end{tabular}
\vspace{7em}
\end{minipage}
\begin{minipage}[t]{0.49\linewidth}
\begin{center}
\includegraphics[width=0.35\linewidth]{figures/Avancez_black} \\
\vspace{2em}
\parbox{0.45\paperwidth}{
Chalmers University of Technology \\
\@department\vspace{1em}\\
H\"orsalsv\"agen 7a \\ 412 96 G\"oteborg \\ Sweden
}
\end{center}
\end{minipage}
\vskip 1em
\hrulefill
\vskip 1em
\hspace{2em}\parbox{0.8\paperwidth}{
Enclosed is a copy of my
\iflicentiate
Licentiate
\fi
\ifdoctorate
PhD
\fi
thesis entitled:\\
\emph{\@thesistitle}
}
%\vspace{1.5cm}\\
\vfill
\hspace{2em}\parbox{0.8\paperwidth}{
\noindent Sincerely, \vspace{2.5cm} \\
\@sender
}
\vskip 1em
}
}