-
Notifications
You must be signed in to change notification settings - Fork 0
/
DHBW.cls
138 lines (118 loc) · 3.06 KB
/
DHBW.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
% Class
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{DHBW}[2022/08/01 DHBW Beamer Class]
\LoadClassWithOptions{beamer}
% Theme
\usetheme[header=true,footer=true]{DHBW}
% Packages
\usepackage{blindtext} % Blindtext: \blindtext, \Blindtext
\usepackage{csquotes} % Quotes: \enquote{}
\usepackage{environ} % Environments: \NewEnviron{}[][]{}
\usepackage{graphicx} % Graphics: \includegraphics[]{}
\usepackage{listings} % Listings: \lstinline!!, \begin{lstlisting} \end{lstlisting}, \lstinputlisting{}
\usepackage{tabulary} % Tables: \begin{tabulary}{\textwidth}{} \end{tabulary}
\usepackage{transparent} % Transparency: \transparent{}
% Placeholder for empty block title
\def\noblocktitle{\vspace*{-1ex}}
% Listings
\lstset
{
basicstyle=\ttfamily\small,
breaklines=true,
breakatwhitespace=false
}
% URLs
\renewcommand\UrlFont\em
% Fonts
\usepackage{ifxetex}
\ifxetex % XeTex
\usepackage{fontspec,xltxtra,xunicode}
\setmainfont[Mapping=tex-text]{Helvetica}
\setsansfont[Mapping=tex-text]{Helvetica}
\setmonofont[Scale=MatchLowercase]{Courier}
\usepackage{mathptmx}
\usepackage{polyglossia}
\setmainlanguage[babelshorthands=true]{german}
\else % pdfTeX
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[scaled=0.9]{helvet}
\usepackage{courier}
\usepackage{mathptmx}
\usepackage[german,ngerman]{babel}
\fi
% Stickers
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\usepackage[absolute,overlay]{textpos}
\setlength{\TPHorizModule}{\paperwidth}
\setlength{\TPVertModule}{\paperheight}
\TPshowboxesfalse
% Sticker: optionally rotated white box with frame and shadow
% (placed inline)
\NewEnviron{sticker}[1][0]
{
\tcbset{%
boxrule=0.5pt,
colback=white,
colframe=dhbw-gray-light,
drop lifted shadow,
enhanced,
sharp corners,
tikz={rotate=#1,transform shape},
tikznode upper
}
\centering
\begin{tcolorbox}[hbox]
\BODY
\end{tcolorbox}
}
% Supersticker: optionally rotated white box with frame and shadow
% (centered over the frame content)
\NewEnviron{supersticker}[1][0]
{
\tcbset{%
boxrule=0.5pt,
colback=white,
colframe=dhbw-gray-light,
drop lifted shadow,
enhanced,
sharp corners,
tikz={rotate=#1,transform shape},
tikznode upper
}
\TPMargin{0ex}
\TPReferencePosition{0.5, 0.5}
\textblockorigin{0.5\paperwidth}{0.5\paperheight}
\begin{textblock}{1}(0, 0)
\centering
\begin{tcolorbox}[hbox]
\BODY
\end{tcolorbox}
\end{textblock}
}
% Sidesticker: optionally rotated yellow box with frame and shadow
% (placed on the top right corner)
\NewEnviron{sidesticker}[1][0]
{
\tcbset{%
boxrule=0.5pt,
colback=dhbw-yellow!10,
colframe=dhbw-yellow!40,
drop lifted shadow,
enhanced,
sharp corners,
tikz={rotate=#1,transform shape},
tikznode upper
}
\TPMargin{2ex}
\TPReferencePosition{0, 0}
\textblockorigin{0ex}{\headerheight}
\begin{textblock}{1}(0, 0)
\raggedleft
\begin{tcolorbox}[hbox]
\BODY
\end{tcolorbox}
\end{textblock}
}
\endinput