forked from maxh-/org-dtek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dtek.cls
106 lines (85 loc) · 2.13 KB
/
dtek.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
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{dtek}[2013/04/07 Datateknologsektionen Chalmers]
\newif\ifincludeaddress
\includeaddresstrue
\DeclareOption{noincludeaddress}{\includeaddressfalse}
\ProcessOptions\relax
\LoadClass[11pt]{article}
\RequirePackage[quiet]{fontspec}
\RequirePackage{parskip}
\RequirePackage{graphicx}
\RequirePackage{fancyhdr}
\RequirePackage[swedish]{babel}
\RequirePackage{lastpage}
\RequirePackage[unicode]{hyperref}
\RequirePackage[includeheadfoot, top=2.0cm, bottom=4cm]{geometry}
\RequirePackage{xparse}
\RequirePackage{etoolbox}
\RequirePackage{pdfpages}
\AtBeginDocument{
\hypersetup{
pdftitle = {\@title},
pdfauthor = {\@author},
colorlinks=true,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
}
\DeclareDocumentCommand \subtitle {m} {%
\DeclareDocumentCommand \@subtitle {}{#1}
}
\DeclareDocumentCommand \maketitle {} {%
{\centering\bf\LARGE \@title\par}
\ifdef{\@subtitle}{{\centering\Large \@subtitle\par}}{}
}
% Set up headers
\DeclareDocumentCommand \makehf {}{%
\pagestyle{fancy}
\fancyhf{}
\newcommand{\headleft}{%
\raisebox{-3mm}{\includegraphics[width=16mm]{dteklogo}}\hspace{1mm}
\parbox[b]{10cm}{%
\textbf{Datateknologsektionen}\\
Chalmers studentkår\\
\@title
}
}
\newcommand{\headright}{%
Sida \thepage\ av \pageref{LastPage}\\
\@date
}
% Calculate header height
\settototalheight\headheight{\headleft}
\addtolength\headheight{1.0pt}
\lhead{\headleft}
\rhead{\headright}
\renewcommand{\headrule}{
\nointerlineskip
\hskip 16mm\hrulefill
}
\renewcommand{\footrulewidth}{\headrulewidth}
\ifincludeaddress
\lfoot{%
\flushleft Datateknologsektionen\\
Rännvägen 8\\
412 58 Göteborg
}
\rfoot{%
\begin{flushright}
\href{mailto:[email protected]}{[email protected]}\\
\href{http://dtek.se}{www.dtek.se}
\end{flushright}
}
\fi
}
\DeclareDocumentCommand \makeheadfoot {}{\makehf}
\DeclareDocumentCommand \makesign {m} {%
\parbox{0.47\textwidth}{%
\vspace{2cm}
\rule{0.47\textwidth}{0.5pt}\\
#1
}
}
\endinput