summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/elpres/elpres-manual.tex
blob: 3cbbd024ee155bd7996842c91c5691d4cadcf7a3 (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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
\documentclass[11pt,a4paper]{article}

\setlength{\parskip}{0.6ex}
\setlength{\parindent}{0mm}
\usepackage[latin1]{inputenc}
\usepackage{textcomp}
\usepackage[a4paper,hmargin=2.4cm,bottom=3.2cm]{geometry}
\newcommand{\hoch}[1]{\raisebox{0.6ex}{#1}}
\newcommand{\tief}[1]{\raisebox{-0.6ex}{#1}}
\usepackage{url}

\title{\textsf{elpres} --- electronic presentations \\ with (PDF)\LaTeX}
\author{Volker Kiefel\thanks{volker dot kiefel at freenet dot de, 
       http://vkiefel.de/elpres.html}}
\date{v0.4a\\[1.8ex]
      January 24, 2018}
\begin{document}
\maketitle
\thispagestyle{empty}
 
{
\setlength{\parskip}{0ex}
\tableofcontents
}

\section{Introduction}

\textsf{Elpres} is a simple class for presentations to be shown on screen or
beamer. It is derived from \LaTeX's \texttt{article} class.  \textsf{Elpres}
is primarily intended to be used with PDF\LaTeX{} or with \LaTeX,
\texttt{dvips} and Ghostview/Ghostscript. The default ``virtual paper size''
of documents produced by this class: width=128mm, height=96mm corresponds to a
4:3 aspect ratio. Other aspect ratios for widescreen monitors may be selected
by class options. \textsf{Elpres} requires that the \texttt{ifthen},
\texttt{fancyhdr} and \texttt{geometry} packages are available on the system.
Enhancements to \texttt{elpres} are easily made available by other packages,
these include overlay support for incremental slides (package
\texttt{overlays}) hypertext elements (\texttt{hyperref} package) and slides
with a background from a bitmap (\texttt{wallpaper}, \texttt{eso-pic}
packages). 

\section{Installation}

Copy \texttt{elpres.cls} into  a directory, where your \LaTeX-system can find
it and update the files database\footnote{e.\,g.  by using the
\texttt{mktexlsr} or \texttt{texhash} command (TeXlive)}.

\section{Usage}

\label{secUsage}

The class is used with 
\begin{verbatim}
   \documentclass[options]{elpres}
\end{verbatim}

\textbf{Options of the \texttt{article} class} are also available to
\texttt{elpres}, e.\,g.  \texttt{10pt}, \texttt{11pt}, \texttt{12pt} for
selection of font size.  \textbf{\texttt{Elpres}-specific options} allow
selection of the font: \texttt{tmrfont} (Times Roman), \texttt{helvetfont}
(Helevetica), \texttt{cmfont} (Computer Modern), \texttt{sansfont} (Sans
Serif: default).  Options for different screen aspect ratios: \texttt{4x3}
(default), \texttt{16x9}, \texttt{16x10}. 

A simple example document:

\begin{verbatim}
   \documentclass[12pt,pdftex,helvetfont,4x3]{elpres}
   \usepackage[latin1]{inputenc}
   \usepackage{color}
   \usepackage[document]{ragged2e}
   \RaggedRight
   
   \begin{document}
   \begin{titlepage}
     \centering
     \distance{1}
     {
       \Huge \bfseries \textcolor{blue}{Title of the presentation} \par
     }
     \vspace{1.3ex} \large
     Author\\[2ex]Institution
     \distance{2}
   \end{titlepage}
   
   \begin{psli}[Title of Page]
   The first page
   
   \begin{itemize}
      \item first line in an itemized list
      \item second line in an itemized list
   \end{itemize}
   \end{psli}
   
   \begin{rsli}
   The second page
   \end{rsli}
   \end{document}
\end{verbatim}

%% Options to be used are \texttt{10pt}, \texttt{11pt}, \texttt{12pt} (font size),
%% \texttt{pdftex}, \texttt{dvips}
%% (if you use \texttt{graphicx} and/or \texttt{color} packages).

The title page can be created within the \texttt{titlepage} environment, the 
\verb+\maketitle+ command is not available.
Slides may be created with the
\texttt{psli}-environment\footnote{\texttt{psli}: plain slide}, you may add
the title of the slide with the optional parameter. 
The contents of the slide are centered vertically.

Another environment generating a slide is
\texttt{rsli}\footnote{\texttt{rsli}: raw slide}: slides are written 
without title,
contents are not vertically centered. 

The \verb+\distance{number}+ command allows to introduce vertical space into
slides constructed with the \texttt{rsli} and \texttt{titlepage} environments.
You should use pairs of \verb+\distance{}+ commands with numbers indicating
the relative height of empty space, see the titlepage in the example above.

The use of footnotes on slides is often problematic, if they cannot be
avoided, the \texttt{footmisc} package is recommended: the \texttt{perpage}
option resets numbering for each new slide. For a presentation, the
\texttt{symbol} option allows to use symbols instead of numbers. 
After inserting a new footnote, numbers or symbols are correctly
inserted only after a second run of \LaTeX.

\subsection{Improving paragraph justification}

By default, \LaTeX\ produces justified paragraphs with lines of equal length,
this may often not be appropriate for the usually very short lines of text
in presentations. The \LaTeX\ \verb+\raggedright+ command has its own
deficiencies: by inhibiting hypenation, the text at the right margin will
often look too
ragged. A solution is to use the \verb+\RaggedRight+ command of the
\texttt{ragged2e} package by Martin Schröder. 


\subsection{Generate vertically compressed lists}

The \texttt{elpres} package provides a ``vertically compressed''
\texttt{itemize}-environment:

\begin{verbatim}
   \begin{citemize}
     \item  one
     \item  two
   \end{citemize}
\end{verbatim}

Similarly, a \texttt{cenumerate} and a \texttt{cdescription} environment may
be used.

% neu Dezember 2017
Another solution for the customization of \texttt{itemize}
environments is given by the \texttt{enumitem} package. Therefore

\begin{verbatim}
   \usepackage{enumitem}
\end{verbatim}

should be added to the preamble, and  a comma-sperated list of parameters
parameters can be added in the format:

\begin{verbatim}
   \begin{itemize}[parameter-list] 
      ... 
   \end{itemize} 
\end{verbatim}

The ``vertically
compressed'' list can then be obtained with

\begin{verbatim}
   \begin{itemize}[nosep]
     \item  one
     \item  two
   \end{itemize}
\end{verbatim}

The \texttt{enumitem} package is also able to modify the \texttt{enumerate} and
description \texttt{environments}.




\section{Enhancements to elpres}

\label{secEnhancements}

\subsection{Include graphics files}

Graphics files/pictures can be included with the
\texttt{includegraphics}-command of the \texttt{graphicx}-package. Please be
aware that the dimensions of the pages are 128mm \texttimes{} 96mm and
therefore included graphics are scaled appropriately. A safe way to generate a
page with a picture could be (with \texttt{pict.png} as the name of the
graphics file): 

\label{secUsageGraph}


\begin{verbatim}
   \usepackage[pdftex]{graphicx} % (in preamble) 
   ...
   \begin{rsli}
     \centering
     \distance{1}
     \includegraphics[width=0.9\textwidth,%
                      height=0.9\textheight,%
                      keepaspectratio=true]{pict.png}
     \distance{1}
   \end{rsli}
\end{verbatim}


The \verb+\includegraphics[]{}+ comannd requires to select the correct device
driver related option (e.\,g. \texttt{pdftex} or \texttt{dvips})
(documentclass).


\label{secInclGraphicsFiles}


\subsection{Arrange text and pictures in two (or more) columns}

\label{secTwoColumns}

Text and graphics may be arranged in two or more columns with
\texttt{minipage} environments:

\begin{verbatim}
   \begin{minipage}[b][0.8\textheight][t]{0.5\textwidth}
     \colorbox{white}{%
       \includegraphics[width=0.9\textwidth]{graphics-file.png}}
   \end{minipage}
   \begin{minipage}[b][0.8\textheight][t]{0.48\textwidth}
   \footnotesize
   \begin{citemize}
      \item ...
      \item ...
      ...
   \end{citemize}
   \end{minipage}
\end{verbatim}

Details on the minipage environment may be found in the \LaTeX{}
documentation.


\subsection{Incremental slides (overlays)}

\label{secOverlay}

If the contents of slides are to be made visible step
by step this can be achieved by a series of output PDF or (PS) files (carrying
the same page number) usually called \emph{overlays}. It may also be of
interest to change a highlighting color in a series of overlays. This is most
easily done by using the \texttt{overlays} package written by Andreas Nolda 
together with \texttt{elpres}. 

To generate a series of four overlays sequentially showing four lines of a
list:

\begin{enumerate}
  \item load the \texttt{overlays} package in the preamble
  \item put a \texttt{psli} or \texttt{rsli} slide environment into an
  \texttt{overlays} (or \texttt{fragileoverlays}) environment 
  \item enter the number of overlays as the first parameter to the 
  \texttt{overlays} environment  
  \item enter text contents with the \texttt{visible} command with the range
    of overlays showing this text content
\end{enumerate}

A simple example:

\begin{verbatim}
   % to be added in preamble
   \usepackage{overlays}
   ...
   \begin{overlays}{4}
   \begin{psli}[Title of slide]
   \begin{itemize}
     \visible{1-4}{\item first item of list} 
     \visible{2-4}{\item second list item}
     \visible{3-4}{\item 3rd list item}
     \visible{4}{\item final list item}
   \end{itemize}
   \end{psli}
   \end{overlays}
   ... 
\end{verbatim}

The following example uses the \texttt{alert} command to highlight lines
sequentially:

\begin{verbatim}
   \begin{overlays}{4}
   \begin{psli}[Title of slide]
   \begin{itemize}
     \alert{1}{\item first item of list} 
     \alert{2}{\item second list item}
     \alert{3}{\item 3rd list item}
     \alert{4}{\item final list item}
   \end{itemize}
   \end{psli}
   \end{overlays}
\end{verbatim}

The ``hidden'' text contents are written by \texttt{overlays} in the same
color as the background, default is white. If you use a different background
color, you have to change the color of the hidden text as well by assigning the
background color to the color name \texttt{background} (understood by the
\texttt{overlays} package).  In the following example you define a light
yellow as background:

\begin{verbatim}
   % (in the preamble)
   \definecolor{myyellow}{rgb}{0.96,0.98,0.72} % define color
   \definecolor{background}{named}{myyellow}   % color assigned to 
                                               % hidden text
   \pagecolor{myyellow}                        % color of slide background
\end{verbatim}


For more details on \texttt{overlays}, see the documentation of the package.

\subsection{Create a ``handout'' from a presentation}

\label{secHandout}

If you wish to generate a handout from your presentation with more than one
pages on a printed page, you may process a PDF presentation file with
\texttt{pdfjam}\footnote{which regerettably is only available on
Linux or other Unix-like systems}.  

The following command:

\begin{verbatim}
   pdfjam --nup 2x3 --scale 0.9 -o new.pdf  presentation.pdf '1-4,7-17,22'
\end{verbatim}

\begin{sloppypar}
creates a ``handout'' PDF document (\texttt{new.pdf}) with the slides 1-4,7-17
and 22 of \texttt{presentation.pdf} arranged in  two columns and three rows.
With the additional option \texttt{--frame~true}, \texttt{pdfjam} draws a box
around each slide. More details can be found in the \texttt{pdfjam}
man page. On Windows systems Acrobat reader may be helpful to print
handout documents with more than one slide per printed page.
\end{sloppypar}

\subsection{Create presentations with hypertext elements}

\label{secHypertext}

You may use the hyperref package. As you normally will not insert
\verb+\section{}+-like commands, it is easier to define links with

\begin{verbatim}
   \hypertarget{target-name}{text}
\end{verbatim}

which can be addressed by

\begin{verbatim}
   \hyperlink{target-name}{text}
\end{verbatim}

The hyperref package will produce a warning message, if you use the
titlepage-environment (this is inherited from the article class). To avoid
the warning you can use the \texttt{rsli}-environment for the titlepage and use
\verb+\thispagestyle{empty}+ to suppress the page number on the title.

\subsection{Fill background of a presentation with bitmaps}


\label{secBackgroundWallpaper}

\subsubsection{\texttt{Wallpaper} package}

To create a slide background with a graphical wallpaper 
background using bitmap files you may use the \texttt{wallpaper}
package\footnote{written by Michael H.F. Wilkinson and available on CTAN}. 
Load the \texttt{wallpaper} package with

\begin{verbatim}
   \usepackage{wallpaper}
\end{verbatim}

\begin{sloppypar}
in the preamble. In order to generate a background based on bitmap
file \texttt{background.png}, enter 
\end{sloppypar}

\begin{verbatim}
   \CenterWallPaper{1}{background.png}
\end{verbatim}

before the contents of the presentation\footnote{i.\,e. following
\texttt{\textbackslash begin\{document\}}}. 
This works best with bitmaps with an appropriate aspect ratio, in the case of
an 4x3 screen format a bitmap picture of 640x480 pixel would fit perfectly. 
Moreover bitmap files may be
used as tiles as described in the \texttt{wallpaper} documentation like

\begin{verbatim}
   \TileSquareWallPaper{4}{background.png}
\end{verbatim}

More details on this topic may be found in the \texttt{wallpaper}
documentation.

\subsubsection{\texttt{Eso-pic} package}
\label{secBackgroundEsopic}

Another package which allows you to paint the background with a picture is
\texttt{eso-pic}\footnote{written by Rolf Niepraschk and available on CTAN}:

\begin{verbatim}
   \usepackage{eso-pic}
   
   ...

   \AddToShipoutPicture{
   \includegraphics[height=\paperheight]{background.png}
   }
\end{verbatim}

\verb+\AddToShipoutPicture{}+ puts the picture on every page, 
\verb+\AddToShipoutPicture*{}+ puts it on to the current page,
\verb+\ClearShipoutPicture+ clears the background beginning with the current
page.
Details of \texttt{eso-pic}'s commands can be found in the documentation.


\section{License}

This class is distributed under the \textsl{\LaTeX{} Project Public License}
(LPPL) which may be downloaded from
\url{http://www.latex-project.org/lppl.txt}. No warranty is provided for this
work (as stated in the LPPL).

\section{Versions}

\textbf{v0.1} (19.6.2004):  initial version.
\textbf{v0.2} (1.9.2004): page numbers now changed to footnotesize, left and
right margins slightly changed, `cenumerate' and `cdescription' environments
added.
\textbf{v0.2a} (19.9.2004): Section ``License'' added to the documentation.
\textbf{v0.2b} (17.10.2004): Documentation completed: description of the
\verb+\distance{}+ command included.
\textbf{v0.2c} (28.11.2004): Documentation completed (section
\ref{secHypertext} 
added).
\textbf{v0.2d} (25.12.2004): Documentation completed (section
\ref{secBackgroundWallpaper} added).
\textbf{v0.2e} (15.04.2005): Documentation completed (sections
\ref{secBackgroundEsopic} and \ref{secHandout} added).
\textbf{v0.3} (12.08.2005): new  (class) options for font selection:
\texttt{tmrfont} (Times Roman), \texttt{helvetfont} (Helevetica),
\texttt{cmfont} (Computer Modern), \texttt{sansfont} (Sans Serif: default).
Documentation updated, sections \ref{secInclGraphicsFiles} and
\ref{secTwoColumns} added.
\textbf{v0.4} (20.01.2018): New class options for different screen aspect
ratios \texttt{4x3}, \texttt{16x9}, \texttt{16x10}; ``compressed'' list
environments modified; documentation completed:
packages for use with \texttt{elpres}: \texttt{enumitem} (alternative list
environments), \texttt{overlays} (overlay support: incremental slides);
section \ref{secHandout} was completely rewritten.
\textbf{v0.4a} (24.01.2018): Documentation completed
\end{document}


%  vim:set spell:set fileencoding=latin1: