diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /usergrps/uktug/baskervi/4_1/goossens.tex |
Initial commit
Diffstat (limited to 'usergrps/uktug/baskervi/4_1/goossens.tex')
-rw-r--r-- | usergrps/uktug/baskervi/4_1/goossens.tex | 394 |
1 files changed, 394 insertions, 0 deletions
diff --git a/usergrps/uktug/baskervi/4_1/goossens.tex b/usergrps/uktug/baskervi/4_1/goossens.tex new file mode 100644 index 0000000000..bc195fd3e6 --- /dev/null +++ b/usergrps/uktug/baskervi/4_1/goossens.tex @@ -0,0 +1,394 @@ +\def\Lit#1{\texttt{#1}} +\newcommand{\Cmd}[1]{{\ttfamily\upshape\char'134#1}} +\def\SEM{\texttt{seminar}} +\def\PS{\textsc{PostScript}} +\newenvironment{coldinglist}[2]% +{\begin{list}{\textcolour{#2}{\ding{#1}}}{}}% +{\end{list}}% + +\title{Colour slides with \LaTeX\ and \SEM{}} +\author[Michel Goossens and Sebastian Rahtz]{Michel + Goossens (CERN)\\Sebastian Rahtz (ArchaeoInformatica)} +\begin{Article} +\section{Slides and \LaTeX} +Many \LaTeX\ users want to take advantage of \TeX's high-quality +typesetting when they produce overhead slides for a +presentation. This facility was originally provided by a separate +package, \SLiTeX, but that had a number of disadvantages: + +\begin{itemize} +\item it was limited to a set of specially-scaled Computer Modern + fonts and it was not easy to adapt to other fonts; +\item the user was required to have two separate files, one for + control information and the other for the actual slides; +\item the control of colour and overlays was limited and crude; +\item There was only one `style' for slides, and writing a different + layout (to, say, put a logo on each slide) was not documented. +\end{itemize} + +\LaTeX{} users now have a variety of fonts, and vast numbers of +styles, to choose from, but \SLiTeX\ has lagged behind. When +\LaTeXe{} was released at the end of 1993, this included a simple +\LaTeX\ document class (already available in the New Font Selection +Scheme, version 2) to emulate \SLiTeX\ without the overhead of a +separate macro package. However, there is a much better \LaTeX\ +package which has been available for some time now---\SEM; if used in +conjunction with a PostScript printer, and a set of useful macros +called PSTricks,\footnote{The \SEM\ package and PSTricks are the work + of Timothy van Zandt ({\ttfamily tvz@princeton.edu}).} this offers +almost every imaginable facility, including: +\begin{dinglist}{43} + \item Fancy frames, headers and footers; + \item Landscape and portrait slides in the same document; + \item Coloured text and tables; + \item Interleaving of annotations and slides; + \item Slide `chapters' and list of slides; + \item Overlays. +\end{dinglist} + +\SEM\ is a normal \LaTeX\ package which can be used with almost all +other \LaTeX\ packages (such as those to change font, include +graphics etc). Its main job is to produce transparencies, but it can +also make accompanying notes from the same file. It is compatible with +$\mathcal{AMS}$-\LaTeX\ and \LaTeXe. + +\section{Using the \SEM{} style} + +Usage is simple; begin your document in the normal way\footnote{We are + assuming \LaTeXe\ here, just to remind you to upgrade.} with +\begin{verbatim} + \documentclass{seminar} +\end{verbatim} +\noindent The slide environments are +\begin{verbatim} + \begin{slide} + ... + \end{slide} + + \begin{slide*} + ... + \end{slide*} +\end{verbatim} + +Where \verb|slide| is for landscape slides and \verb|slide*| is for +portrait slides. By default, the document is typeset in {\em +landscape} mode, but if you include the \verb|portrait| package +option, the document is typeset in portrait mode. \emph{Typesetting} +the document in landscape mode is different from \emph{printing} it in +landscape mode; you have to worry about the orientation of the page +when printing, but with \verb|dvips| this is simple, and taken care of +in the local control file described below. + +So the default output\footnote{We have added a package + ``\Lit{times}'' so that the output will reduce + properly to thumbnails for this article.} +from this input: + +\begin{verbatim} +\documentclass{seminar} +\usepackage{times} +\begin{document} +\begin{slide} +My talk is about: +\begin{description} +\item[Cats] Nice furry creatures + which belong in every good home; +\item[Dogs] Nasty barking things + which bite you; +\item[Snakes] They come slithering + through the grass and \emph{have + no feet}; this is most disturbing; +\item[Rhinoceroses] {\bfseries Never} + be rude to a rhino; they are bigger + than you, and meaner. +\end{description} +\end{slide} +\end{document} +\end{verbatim} + +will look like: \parbox[c][\totalheight]{5.5cm}{\epsfig{figure=demo1.ps,width=5cm}} + +Most slides will be no more +complicated than this, using standard \LaTeX\ +environments like \texttt{itemize}, +\texttt{enumerate} and \texttt{tabular}. + +\section{Frame styles} +\def\Showslide#1{\parbox[c][\totalheight]{5cm}{\epsfig{figure=#1,width=5cm}}} +A variety of slide framing styles are available, set with the +\verb|\framestyle| command; the following are some of the predefined +ones (some assume you have a PostScript printer), using the +\verb|\slideframe| command: + +\begin{tabular}{@{}m{12mm}l} +none & \Showslide{demo2.ps} +\end{tabular} + +\begin{tabular}{@{}m{12mm}l} +shadow & \Showslide{demo3.ps} +\end{tabular} + +\begin{tabular}{@{}m{12mm}l} +double & \Showslide{demo4.ps} +\end{tabular} + +\begin{tabular}{@{}m{12mm}l} +oval & \Showslide{demo5.ps} +\end{tabular} + +Similarly, a variety of page styles (the headers and footers) are +available with the \verb|\pagestyle| command, such as: + +\begin{tabular}{@{}m{12mm}l} +empty & \Showslide{demo6.ps} +\end{tabular} + +\begin{tabular}{@{}m{12mm}l} +plain & \Showslide{demo7.ps} +\end{tabular} + +\begin{tabular}{@{}m{12mm}l} +align & \Showslide{demo8.ps} +\end{tabular} + +Both slide frames and page styles can be customized; for instance, the +examples in this paper (\eg\ Figure \ref{seminarcolour}) are suitable +for use at CERN. + +\section{Interleaving notes, and selecting subsets} +It is easy to intersperse your slides with notes to yourself; these +can be simply placed between the \texttt{slide} environments or enclosed +in a specific \texttt{note} environment. You can use any \LaTeX\ commands +in these notes, and include your whole article here if desired. When +you want to print the slides, a variety of package options can be used: + +\begin{description} +\item[slidesonly] Only the slides are printed; +\item[notesonly] Only the slides are printed; +\item[notes] The slides are interleaved with the notes; +\item[article] The document notes are typeset like a normal \LaTeX\ paper, + and the slides are placed as figures (reduced to half size). +\end{description} +The \Cmd{slideplacement} command can be used to affect how slides +are placed in the \texttt{article} format; the possible parameters are: + +\begin{description} +\item[float] (default) Slides are floated +\item[float*] Slides are floated, but if two column format is chosen + they will span both columns +\item[here] Slides are placed where they occur in the notes +\end{description} + +Further detailed control of the interaction between slides and notes +is given in the \emph{User's Manual}. + +Selected slides can be included or excluded with the +\verb|\onlyslides| or \verb|\noteslides| commands which a parameter of +a comma-separated list of slides; this can be numbers, ranges (\eg\ +5--10) or \LaTeX\ \verb|\ref| commands referring to \verb|\label| +commands in the slides. + +%\begin{figure*} +%\begin{tabular}{@{}cc@{}} +% \framebox{{\epsfig{figure=over1,height=.45\textheight}}} & +% \framebox{{\epsfig{figure=over2,height=.45\textheight}}} \\ +% \framebox{{\epsfig{figure=over3,height=.45\textheight}}} & +% \framebox{{\epsfig{figure=over4,height=.45\textheight}}} \\ +%\end{tabular} +%\caption{Slide overlays} +%\label{overlays} +%\end{figure*} + +\begin{figure*} +\begin{tabular}{@{}p{.49\textwidth}p{.49\textwidth}@{}} +\epsfig{figure=sem1.ps,width=.45\textwidth} & +\epsfig{figure=sem2.ps,width=.45\textwidth} \\ +\verb|\SlideColours{Red}{Yellow}| & +\verb|\SlideColours{Black}{White}|\\ +\epsfig{figure=sem3.ps,width=.45\textwidth} & +\epsfig{figure=sem4.ps,width=.45\textwidth} \\ +\verb|\SlideColours{White}{Blue} | & +Red on gradient White/JungleGreen\\ +\end{tabular} +\caption{Colour in slide background and foreground: (simulated with grey levels)} +\label{seminarcolour} +\end{figure*} + +\section{Control over slide size, fonts and magnification} +There are a great number of parameters by which the user can change +any of the following either on a slide-by-slide basis, or for the whole +document: +\begin{itemize} +\item Slide height and width; +\item Top, bottom, left and right margins; +\item Text justification (it is ragged right by default); +\item Page breaking by varying tolerance of over-running material; +\item Inter-line spacing; +\item Point size, and choice of fonts. +\end{itemize} +How to change the default settings is explained in detail in the {\em +User's Guide}. + +Because \SEM\ works by magnifying pages, sophisticated users should +read the manual to see how to deal with setting and changing \TeX\ +dimensions. Most users need not worry about this---in commands like +\verb|\epsfig| you should always express your `width' and `height' +requests in fractions of the line size anyway. + +\section{Advanced use: customing the \SEM\ control file} + +The \SEM\ package always starts by trying to find a file called +\Lit{seminar.con} on the \Lit{TEXINPUTS} path; this gives the user or +site an opportunity to conveniently customize the defaults. The +\Lit{seminar.con} file can contain any \LaTeX\ commands, including +inputting style files. Our figures were typeset using a +\Lit{seminar.con} set up for CERN; the contents of this are given +below, with explanation of what is being done. It also shows how +higher-level functions can be added which the average user would not +want to program for themselves. + +First, we set up landscape macros for the \verb|dvips| driver. +\begin{verbatim} +\newcommand{\printlandscape}{% + \special{papersize=297mm,210mm}} +\end{verbatim} +We will assume PostScript printers, and gain nice PostScript +effects like rounded box corners; these will need some extra style files: +\begin{verbatim} +\input semcolor.sty +\input fancybox.sty +\end{verbatim} +For slide `sections', list of contents, we use another style file: +\begin{verbatim} +\input slidesec.sty +\end{verbatim} +This allows us to use various commands, some of which are +used below. We can also produce list of slides, in two layouts: + +\vspace{3pt} + +\noindent \begin{tabular}{@{}p{4cm}p{4cm}} +\hline +\Cmd{listofslides} & \Cmd{Slidecontents} \\ +\epsfig{figure=cont1.ps,width=4cm}& +\epsfig{figure=cont2.ps,width=4cm} \\ +\hline +\end{tabular} + +\vspace{3pt} + +\noindent +For slide headings, there is a predefined \verb|\slideheading| +command; we will amend this so that it is typeset with a `shadow'. The +\verb|slidechapter| command is also defined (the code is not given +here) which allows the user to break the slides into groups; the slide +chapter title will be given in the bottom right corner with this CERN style. +\begin{verbatim} +\def\@empty{} +\renewcommand{\makeslideheading}[1]{% + \gdef\theslideheading{#1}% + \def\@tempa{#1}% + \ifx\@tempa\@empty\else + \begin{Sbox} + \begin{Bcenter} + \large\bfseries#1 + \end{Bcenter} + \end{Sbox} + \centerline{\shadowbox{\TheSbox}} + \vspace{1ex minus 1ex} + \fi +} +\end{verbatim} +Now the CERN page and frame styles; +the plain `cern' style just places registration `+' marks, +and the date: +\begin{verbatim} +\newpagestyle{cern}% + {{\color{Black}\small + {\bfseries +} \hfil \today + \hfil {\bfseries+}}}% + {{\color{Black}\small + {\bfseries +} \hfil \thepage + \hfil {\bfseries+}}}% +\end{verbatim} +Whereas the `cernsections' style has section headings and a logo: +\begin{verbatim} +\newpagestyle{cernsections}% + {{\color{Black}\small + \raisebox{-.5cm}[0cm][0cm]{% + \epsfig{figure=cernlogo.ps,height=.8cm}} + \hfil {\bfseries\theslideheading} \hfil + {\bfseries\thepage} }}% + {{\small\color{Black}\today + \hfil \thechapterheading /\inchap }}% +\end{verbatim} + +For the slide frames, we define a frame with the word ``CERN'' +set in a coloured box on the lower left; this is done using the +PSTricks macros (which are automatically included by the `semcolor' +option above). The colour commands are those predefined in +\texttt{dvips}'s \texttt{color.pro} header file: +\begin{verbatim} +\newslideframe{cern}{{\SlideFront + \boxput(-0.7,-1.11){\psframebox% + [linecolor=black,fillcolor=ForestGreen, + fillstyle=solid]{\hbox{{\normalsize + \sffamily\color{Black}CERN}}}}{#1}% + \color{Black}}} +\end{verbatim} + +Finally we make sure that each slide starts with the current +foreground colour. +\begin{verbatim} +\def\everyslide{\SlideFront} +\def\theslideheading{} +\end{verbatim} + +The user uses the command \verb|\SlideColours|, with two parameters, +which are colour names for foreground and background. A synonym is +defined for black on white. We have to be a bit careful defining +the frame border, because by default it is coloured using the \PS\ +`setgray' operator, and that might not work with the colour +separation, so we define an explicit blue frame (for variety). +\begin{verbatim} +\newslideframe{blueframe}[% + \psset{linecolor=NavyBlue,% + linewidth=\slideframewidth,% + framesep=\slideframesep,% + cornersize=absolute,% + linearc=.5cm% + }]{\psframebox{#1}} +\def\SlideColours#1#2{% + \gdef\SlideFront{\color{#1}}% + \slideframe{\Framedefault}% + \slideframe*[\psset{fillcolor=#2,% + fillstyle=solid}]{blueframe}% +} +\def\SlideColours#1#2{% + \gdef\SlideFront{\color{#1}}% + \slideframe{\Framedefault}% + \slideframe*% + [\psset{linecolor=Black,% +fillcolor=#2,fillstyle=solid}]% + {scplain}% + } +\def\blackandwhite{\SlideColours{Black}{White}} +\end{verbatim} +The slide defaults will be for a detailed layout and CERN logo, +with yellow writing on a blue background: +\begin{verbatim} + \pagestyle{cernsections} + \slideframe{cern} + \def\Framedefault{cern} + \SlideColours{Yellow}{RoyalBlue} +\end{verbatim} + +\end{Article} +\endinput + +%---------------------------------------------------------------------- +\end{Article} +\endinput + + + |