-
Notifications
You must be signed in to change notification settings - Fork 0
/
germancv.cls
97 lines (82 loc) · 2.66 KB
/
germancv.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
% SPDX-FileCopyrightText: © 2024 Sebastian Davids <[email protected]>
% SPDX-License-Identifier: Apache-2.0
\ProvidesClass{germancv}[German CV class]
\NeedsTeXFormat{LaTeX2e}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} % pass through any options to the base class
\ProcessOptions\relax % process given options
\LoadClass[a4paper]{article} % load the base class
\RequirePackage[bottom=2cm,left=2.5cm,right=1.5cm,top=2cm]{geometry} % DIN 5008
\RequirePackage[utf8]{inputenc} % allow UTF-8 source encoding
\RequirePackage[ngerman]{babel} % use German terminology
\RequirePackage[strict]{csquotes} % use appropriate German quotes
\RequirePackage[useregional=numeric]{datetime2} % date formatting
\RequirePackage[document]{ragged2e} % required for non-justified text % required for non-justified text
\RequirePackage{xifthen} % required for conditional statements
\RequirePackage{titlesec} % customize title styles
\titleformat{\section}{\normalfont\Large\bfseries\sffamily}{\thesection}{1em}{}[\titlerule\vspace*{4pt}]
\RequirePackage{fontspec} % font support
\setmainfont{Nunito}[
Path=./fonts/,
Extension=.ttf,
UprightFont=*-Regular,
BoldFont=*-Bold,
ItalicFont=*-Italic,
BoldItalicFont=*-BoldItalic,
]
\setsansfont{Lora}[
Path=./fonts/,
Extension=.ttf,
UprightFont=*-Regular,
BoldFont=*-Bold,
ItalicFont=*-Italic,
BoldItalicFont=*-BoldItalic,
]
\RequirePackage{enumitem} % customize list styles
\newlist{listcvsection}{enumerate}{2}
\setlist[listcvsection]{leftmargin=0.1em,itemsep=1em,label={}}
\newlist{listcvitemlist}{enumerate}{2}
\setlist[listcvitemlist]{leftmargin=1.6em,itemsep=0pt,parsep=0.5em,labelsep=1em,label=\rule[0.3ex]{0.6ex}{0.6ex}}
\pagestyle{empty} % suppress headers and footers
\newcommand{\range}[2]{%
#1\,\textendash\,#2%
}
\newenvironment{cvsection}[1]{%
\section*{#1}%
\begin{listcvsection}%
}{%
\end{listcvsection}%
}
\newenvironment{cvitemplain}[1]{%
\item%
\begin{minipage}[t]{0.2\textwidth}#1\end{minipage}%
\hfill%
\begin{minipage}[t]{0.75\textwidth}%
}{%
\end{minipage}%
}
\newenvironment{cvitembold}[1]{%
\begin{cvitemplain}{#1}%
\bfseries%
}{%
\end{cvitemplain}%
}
\newenvironment{cvitem}[5]{%
\begin{cvitemplain}{#1}%
\textbf{#2}%
\ifthenelse{\isempty{#3}}{\\}{, #3\\}%
\ifthenelse{\isempty{#4}}{}{\textbf{#4}\\}%
\ifthenelse{\isempty{#5}}{}{\vspace{1em}#5}%
}{%
\end{cvitemplain}%
}
\newenvironment{cvitemlist}[5]{%
\begin{cvitemplain}{#1}%
\textbf{#2}%
\ifthenelse{\isempty{#3}}{\\}{, #3\\}%
\ifthenelse{\isempty{#4}}{}{\textbf{#4}\\}%
\ifthenelse{\isempty{#5}}{}{\vspace{1em}#5}%
\begin{listcvitemlist}%
}{%
\end{listcvitemlist}%
\end{cvitemplain}%
}