summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/elpres/elpres.cls
blob: 4775670f9fb5fb292d1487f661111127308506fb (plain)
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{elpres}[2021/02/20 class for plain electronic presentations]
%
% 2004/06/19 v0.1  - initial version
%
% 2004/08/29 v0.2  - Page number: now `footnotesize' instead of `normalsize',
%                  - Left and right margins changed
%                  - `cenumerate' and `cdescription' environments
%                    added
%
% 2005/08/12 v0.3  - Options for selection of fonts added
%
% 2018/01/20 v0.4  - Lists environments `citemize', `cenumerate', 
%                    `cdescription modified
%                  - aspect ratio may be selected: 4x3 (default) 16x9, 
%                    16x10: i.e. support for widescreen monitors added 
%                  - documentation updated 
%
% 2018/01/24 v0.4a - documentation completed
%
% 2020/07/12 v0.5  - class option `navisymb' added; elpres now also requires
%                    the hyperref and xcolor packages. New commands:
%                    `auvimm', `fromlinktext' `totargettext'.
%                    new class option `nofonts' for use with lualatex.
%                  - documentation updated
%
% 2020/08/15 v0.6  - command `slidetitlecolor' added, color scheme files
%                    added, most parts of the documentation rewritten
%
% 2021/02/20 v0.7  - command `pagenrconst' added, parts of the documentation 
%                    (manual) rewritten
%

% Options: select fonts
\newcommand{\fontna}{initialisiert}
\DeclareOption{nofonts}{%
  \renewcommand{\fontna}{withoutfont}%
}
\DeclareOption{tmrfont}{%
  \renewcommand{\familydefault}{\rmdefault}%
  \renewcommand{\fontna}{tmrfo}%
}
\DeclareOption{helvetfont}{%
  \renewcommand{\familydefault}{\sfdefault}%
  \renewcommand{\fontna}{helvetfo}%
}
\DeclareOption{cmfont}{%
  \renewcommand{\familydefault}{\rmdefault}%
  \renewcommand{\fontna}{cmfo}%
}
\DeclareOption{sansfont}{%
  \renewcommand{\familydefault}{\sfdefault}%
  \renewcommand{\fontna}{sansfo}
}

% Options: screen formats
\newcommand{\screenformat}{scr4x3}

\DeclareOption{4x3}{%
  \renewcommand{\screenformat}{scr4x3}%
}

\DeclareOption{16x9}{%
  \renewcommand{\screenformat}{scr16x9}%
}

\DeclareOption{16x10}{%
  \renewcommand{\screenformat}{scr16x10}%
}


% Option: navigation symbols
\newcommand{\navigation}{withoutnavigationsymb}
\DeclareOption{navisymb}{%
  \renewcommand{\navigation}{withnavi}%
}

\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
\ProcessOptions\relax
\LoadClass{article}

\RequirePackage{ifthen}
\RequirePackageWithOptions{xcolor}
\RequirePackage{graphicx}

\ifthenelse{\equal{\screenformat}{scr4x3}}{%
  \RequirePackage[foot=10.2pt,head=0pt,%
  paperwidth=128mm,paperheight=96mm,%
  left=5mm,top=5mm,right=7mm,bottom=8mm]{geometry}%
}{}

\ifthenelse{\equal{\screenformat}{scr16x9}}{%
  \RequirePackage[foot=10.2pt,head=0pt,%
  paperwidth=176mm,paperheight=99mm,%
  left=5mm,top=5mm,right=7mm,bottom=8mm]{geometry}%
}{}

\ifthenelse{\equal{\screenformat}{scr16x10}}{%
  \RequirePackage[foot=10.2pt,head=0pt,%
  paperwidth=160mm,paperheight=100mm,%
  left=5mm,top=5mm,right=7mm,bottom=8mm]{geometry}%
}{}


\RequirePackage[hyperfootnotes=false]{hyperref}
\RequirePackage{fancyhdr}

\renewcommand{\headrulewidth}{0mm}

\renewcommand{\maketitle}%
  {\ClassError{elpres}{Caution: ``maketitle'' command not supported}%
  {Please use ``titlepage'' environment instead}%
}


\fancypagestyle{pres}{%
\fancyhf{}%
\rfoot{\footnotesize \thepage}%
}

\renewcommand{\rhead}{\ClassError{elpres}{Caution: 
    command ``rhead'' not supported}}
\renewcommand{\chead}{\ClassError{elpres}{Caution: 
    command ``chead'' not supported}}
\renewcommand{\lhead}{\ClassError{elpres}{Caution: 
    command ``lhead'' not supported}}
\renewcommand{\fancyhead}{\ClassError{elpres}{Caution: 
    ``fancyhead'' not supported}}

\pagestyle{pres}

%% menu for navigation symbols
\ifthenelse{\equal{\navigation}{withnavi}}{%
\hypersetup{menubordercolor=white}%
\rfoot{% 
  \scriptsize%
     \providecolor{epnavigationmenucolor}{rgb}{0.6,0.6,0.6}
     \textcolor{epnavigationmenucolor}{%
     \Acrobatmenu{FirstPage}{$\ll$}\hspace{0.5em}%
     \Acrobatmenu{PrevPage}{$<$}\hspace{0.5em}%
     \Acrobatmenu{NextPage}{$>$}\hspace{0.5em}%
     \Acrobatmenu{LastPage}{$\gg$}\hspace{0.5em}%
     \Acrobatmenu{GoBack}{$\leftarrow$}\hspace{0.5em}%
     \Acrobatmenu{GoForward}{$\rightarrow$}\hspace{0.5em}%
     \Acrobatmenu{GoToPage}{[n]}\hspace{1.2em}%
   }\footnotesize \thepage}%
}{}%

\newcommand{\distance}[1]{\vspace*{\stretch{#1}}}
\newcommand{\abstand}[1]{\vspace*{\stretch{#1}}}

\setlength{\parskip}{0.6ex}
\setlength{\parindent}{0mm}

%% plain slide -- heading line

\providecommand{\sli@tico}{black}

\providecommand{\slidetitlecolor}[1]{%
  \renewcommand{\sli@tico}{#1}%
}

\newenvironment{psli}[1][]%
{{\raggedright \large\bfseries \textcolor{\sli@tico}{#1}\par}%
  \par\vspace*{\stretch{1}}}%
   {\par\vspace*{\stretch{1}}\newpage}
   
%% raw slide -- no heading
\newenvironment{rsli}{}{\newpage}%

%% compressed itemize
\newenvironment{citemize}%
  { \vspace{-0.7ex}%
    \begin{itemize}%
    \setlength{\itemsep}{0ex}%
    \setlength{\parskip}{0.1ex}%
    \setlength{\parsep}{0ex}%
    }%
  {\end{itemize}%
   \vspace{-0.7ex}}%

%% compressed enumerate
\newenvironment{cenumerate}%
  { \vspace{-0.7ex}%
    \begin{enumerate}%
    \setlength{\itemsep}{0ex}%
    \setlength{\parskip}{0.1ex}%
    \setlength{\parsep}{0ex}%
    }%
  {\end{enumerate}%
   \vspace{-0.7ex}}%

%% compressed description
\newenvironment{cdescription}%
  { \vspace{-0.7ex}
    \begin{description}%
    \setlength{\itemsep}{0ex}%
    \setlength{\parskip}{0.1ex}%
    \setlength{\parsep}{0ex}%
    }%
  {\end{description}%
   \vspace{-0.7ex}}%

 \ifthenelse{\equal{\fontna}{tmrfo}}%
 {\RequirePackage{mathptmx}%
   \RequirePackage{courier}}{}
 
 \ifthenelse{\equal{\fontna}{helvetfo}}%
 {\RequirePackage[scaled=0.92]{helvet}%
   \RequirePackage{courier}}{}
 
 \ifthenelse{\equal{\fontna}{initialisiert}}{\renewcommand{\familydefault}%
   {\sfdefault}}{}

 \ifthenelse{\equal{\fontna}{withoutfont}}{}{}

\newcommand{\auvimm}[2]{\href{#2}{#1}}

\newcommand{\fromlinktext}[2]{\hyperlink{#2}{#1}}
\newcommand{\totargettext}[2]{\hypertarget{#2}{#1}}

\newcommand{\pagenrconst}{\addtocounter{page}{-1}}

%% (External): Default colors for defined slide elements, the are modified in
%% style files -- these color names may be used by authors of presentations

% (External): normal text color
\definecolor{eptextcolor}{rgb}{0,0,0}
\color{eptextcolor}
% (External): highlighted text
\definecolor{ephighlightcolor}{rgb}{0.6,0.1,0.1}
% (External): may be used on the title page
\definecolor{eptitlecolor}{rgb}{0.6,0.1,0.1}

% vim: syntax=tex tw=2048 ai