%% BEGIN sem-user.tex \def\FileDate{93/04/01} \def\FileVersion{1.0} %% %% COPYRIGHT 1993, by Timothy Van Zandt, Timothy.VAN-ZANDT@insead.edu %% %% %% This file may be distributed and/or modified under the conditions of %% the LaTeX Project Public License, either version 1.2 of this license %% or (at your option) any later version. The latest version of this %% license is in: %% %% http://www.latex-project.org/lppl.txt %% %% and version 1.2 or later is part of all distributions of LaTeX version %% 1999/12/01 or later. %% %% %% %% This LaTeX file prints the User's Guide for seminar.sty. %% You must have my tvz-hax.sty, tvz-user.sty, and fancybox.sty, %% which are distributed with seminar.sty. %% %% This is distributed with the index file sem-user.ind. %% To make an new index, run, e.g.: %% makeindex sem-user.idx %% %% STYLE OPTIONS: %% `a4' : For A4 paper. %% `twoside' : For two-sided printing. %% `2up' : For two-up printing. (Uses non-standard font magnifications. %% See 2up.doc for details.) %% \documentstyle[12pt]{tvz-user} \makeindex % Used with twoside option: \def\theheadertitle{seminar.sty: User's Guide} % No headers, 1in top margin \setlength{\topmargin}{0pt} \setlength{\headheight}{0pt} \setlength{\headsep}{0pt} \setlength{\textheight}{8.75in} \setlength{\footskip}{.625in} \papersizeadjust % Change part environment: \renewcommand{\part}[1]{% \clearpage \refstepcounter{part} \addcontentsline{toc}{part}{\protect\numberline{\thepart}#1}% \hrule height 1pt\relax \vskip 1ex \hbox to\columnwidth{\strut\huge\bf\thepart\hfil#1}% \vskip 1ex \hrule height 1pt\relax \vskip 3ex} \def\MainFont{\tt} % For macro definitions. \ShortVerb \ShortMeta \let\filedate\FileDate \begin{document} \thispagestyle{empty} \null \vfill \begin{center} {\huge\bf seminar.sty}\\[9pt] {\LARGE\bf A \bLaTeX\ style for slides and notes}\\[14pt] {\LARGE\bf User's Guide}\par \vskip 1.5em \large \renewcommand{\thefootnote}{\fnsymbol{footnote}} Timothy Van Zandt\\ {\normalsize\tt Timothy.VAN-ZANDT@insead.edu} \vskip 1em \thefiledate\\ Version \FileVersion\par \end{center} \par \setlength{\unitlength}{1cm} \thicklines \centerline{\lower.8in\hbox{% \begin{picture}(0,0) \put(2,-11){\framebox(4,2){}} \put(2,-11){\line(-2,3){1}} \put(2,-9){\line(-2,3){1}} \put(6,-9){\line(-2,3){1}} \put(1,-9.5){\line(0,1){2}} \put(1,-7.5){\line(1,0){4}} \put(5.8,-8.7){\line(0,1){2}} \put(5.0,-6.7){\oval(1.6,1.6)[tr]} \put(5.0,-5.9){\line(-1,0){.7}} \put(3.1,-6.4){\framebox(1.2,1){}} \put(3.1,-6.4){\line(-1,2){.3}} \put(3.1,-5.4){\line(-1,3){.3}} \put(4.3,-5.4){\line(-1,3){.3}} \put(2.8,-5.8){\line(0,1){1.3}} \put(2.8,-4.5){\line(1,0){1.2}} \put(0,6.2){\oval(14,10)} \put(.02,6.18){\oval(14,10)} \thinlines \put(2.8,-5.8){\line(-4,3){9.6}} \put(2.8,-4.5){\line(-3,5){9.35}} \put(4,-4.5){\line(1,6){2.6}} \put(6.8,1.4){\line(-1,-3){2.5}} \end{picture}}} \par \bigskip \rightskip=0pt plus 2em\relax \parshape=20 0cm 2.3cm 0cm 2.9cm 0cm 3.5cm 0cm 4.1cm 0cm 4.7cm 0cm 5.3cm 0cm 5.9cm 0cm 6.5cm 0cm 7.1cm 0cm 7.7cm 0cm 8.3cm 0cm 8.3cm 0cm 8.3cm 0cm 7.3cm 0cm 7.3cm 0cm 7.3cm 0cm 7.3cm 0cm 7.3cm 0cm 7.3cm 0cm 7.3cm seminar.sty is a \LaTeX\ style for typesetting slides or transparencies, and accompanying notes. Here are some of its special features: It is compatible with \AmS-\LaTeX, and you can use PostScript and \AmS{} fonts. Slides can be landscape and portrait. There is support for color and frames. The magnification can be changed easily. Overlays can be produced from a single slide environment. Accompanying notes, such as the text of a presentation, can be put outside the slide environments. The slides, notes or both together can then be typeset in a variety of formats. \vfill \twosideclearpage \pagenumbering{roman} \tableofcontents \twosideclearpage \section*{Getting Started} \addcontentsline{toc}{section}{Getting Started} \markboth{Getting Started}{Getting Started} "seminar.sty" is a \LaTeX{} document style for typesetting slides, and more. You should know how to use \LaTeX, as described in Leslie Lamport's \LaTeX: {\em User's Guide and Reference Manual}. Let's get started: \begin{enumerate} \item If you are installing "seminar.sty", read the the accompanying read-me file, and put the input files where your \TeX\ looks for inputs. \item Typeset the sample file, "semsamp1.tex", to see that everything is working. You can use \LaTeX\ or \AmS-\LaTeX. \item Read Appendix \ref{short-fonts}, on page \pageref{short-fonts}. \item To start making landscape slides, use \begin{LVerbatim} \documentstyle{seminar} \begin{document} \begin{slide} foo \end{slide} \end{document} \end{LVerbatim} and print out your document in landscape mode. \item To start making portrait slides, include the \o{portrait} style option, and use the \e{slide*} environment instead of \e{slide}: \begin{LVerbatim} \documentstyle[portrait]{seminar} \begin{document} \begin{slide*} foo \end{slide*} \end{document} \end{LVerbatim} \item If you have used \SliTeX, see Section \ref{slitex}. \item For A4 paper, use the "a4" style option. \item When you are ready to explore "seminar.sty"'s special features, skim the {\em User's Guide}, including the appendices. \item Play around with the sample file "semsamp2.tex" to try out some of "seminar.sty"'s special features. \item When you run into problems, look for help in Part \ref{Help}. \end{enumerate} \twosideclearpage \pagenumbering{arabic} \part{Just slides} \section{Landscape and portrait slides} "seminar.sty" is a \LaTeX\ (or \AmS-\LaTeX) document style. Thus, begin your document with \begin{LVerbatim} \documentstyle{seminar} \end{LVerbatim} The slide environments are\MainEnvIndex{slide}\MainEnvIndex{slide*}% \begin{LVerbatim} \begin{slide} ... \end{slide} \begin{slide*} ... \end{slide*} \end{LVerbatim} \e{slide} is for landscape slides and \e{slide*} is for portrait slides. By default, the document is typeset in landscape mode, but if you include the \O{portrait} style option, the document is typeset in portrait mode. Typesetting the document in landscape mode is different from printing it in landscape mode; you may have to take care of the latter when printing with your dvi driver (see Appendix \ref{S-landscape}). If you have both landscape and portrait slides in your file, there are two ways to print the slides: \begin{itemize} \item If you dvi driver supports rotation, then you can print all the slides at once. See Appendix \ref{S-landscape} for details. \item You can first print your landscape slides by putting the command \begin{MD} \landscapeonly \end{MD} in the preamble, and then print the portrait slides by inserting instead the command \begin{MD} \portraitonly \end{MD} and including the \o{portrait} style option. \end{itemize} \section{The height and width of slides\label{slidedim}} The dimensions of the slides are set by the lengths \begin{MD} \slidewidth\\ \slideheight \end{MD} The ``width'' refers to the width of a slide when looking at it in landscape orientation, whether it is a landscape or portrait slide (and the same goes for ``height''). The default width is 8.5 inches and the default height is 6.3 inches. The slide environments have an optional argument that lets you change the dimensions of a single slide, as in \begin{LVerbatim} \begin{slide*}[7.5in,6in] \end{LVerbatim} The first dimension is the slide's ``width'', and the second dimension is the slides ``height''. If you remember what we said about what ``width'' and ``height'' mean, you will see that the above example begins a portrait slide that is 7.5 inches high and 6 inches wide. \section{Margins within a slide} When a slide is not full, the material is vertically centered within the slide. The command \begin{MD} \centerslidesfalse \end{MD} cause the material to be flush to the top, instead. The command \begin{MD} \centerslidestrue \end{MD} switches back to vertical centering. The right margin in slides is ragged by default. You can change this with the command \begin{MD} \raggedslides[len] \end{MD} should be the maximum space between the end of the line and the right margin. The argument is optional; \n\raggedslides\ is equivalent to \begin{LVerbatim} \raggedslides[1fil] \end{LVerbatim} which gives a ragged right margin, as in \LaTeX's "flushleft" environment (the default). On the other hand, \begin{LVerbatim} \raggedslides[0pt] \end{LVerbatim} gives a justified margin, and \begin{LVerbatim} \raggedslides[2em] \end{LVerbatim} gives a semi-ragged margin. Note that as a margin becomes less ragged, hyphenation becomes more likely and more material fits on a slide. \section{Page breaking within a slide environment\label{S-pagebreak}} A slide environment can contain more than one ``page'' of slides; \TeX\ will break slides into pages automatically. If the mere idea disturbs you, put the command \begin{LVerbatim} \extraslideheight{10in} \end{LVerbatim} in your document. You can then divide slides into pages yourself by starting new slide environments or using the \begin{MD} \newslide \end{MD} command within a slide environment. And you need read this section no further. If instead you use the command \begin{LVerbatim} \extraslideheight{0pt} \end{LVerbatim} then \TeX\ will break pages the way you would expect. This is a quick and dirty way to break a whole paper or a long proof into slides. However, dividing material into slides is usually too delicate a matter to be left up to \TeX, and ultimately you will make all the page breaks yourself. On the other hand, automatic page breaking can still be helpful at the early stages, letting \TeX\ find preliminary page breaks for you. Setting the "\extraslideheight" to "0pt" doesn't give you much flexibility about where to put the page breaks. Of course, you can always put a page break earlier than the one found by \TeX, but occasionally you will prefer to let a slide overflow by a small amount rather than rewrite the whole slide. Therefore, by default, "seminar.sty" uses\MainIndex{\extraslideheight}% \begin{LVerbatim} \extraslideheight{10pt} \end{LVerbatim} This adds on an extra "10pt" to the target slide height (as determined by "\slideheight" for landscape slides and "\slidewidth" for portrait slides) {\em for the purpose of page-breaking only}. If the resulting slide exceeds the slide height, you will get a message like \begin{LVerbatim} LaTeX Error: Slide 3 overfull by 9pt. \end{LVerbatim} "seminar.sty" then tries to reduce the slide to its maximum height by squeezing out rubber vertical space (e.g., tightening up the interline spacing). If the slide is still too full, you will get another warning like: \begin{LVerbatim} Overfull \vbox by 4.4pt while output was active. \end{LVerbatim} You can go back and look for a way to make the slide shorter, or you can insert a "\newslide" command to change the page-break, or you can just ignore these warnings. The recommended value to give in the argument of "\extraslideheight" is the largest length by which you might be willing to let a slide overflow. After you have decided on the page breaks, you can shut up the warnings about overfull slides and "\vbox"'s with \begin{LVerbatim} \renewcommand{\slidefuzz}{1in} \end{LVerbatim} The value of \n\slidefuzz\ (which should be length, even though \n\slidefuzz\ is an ordinary command sequence) is the threshold above which "seminar.sty" gives a warning about an overfull slide. The default definition is "2pt". \section{Margins on the page\label{S-slidemargins}} After "seminar.sty" makes a slide (or a slide page) as described above, it (optionally) frames the slide. This is described in Section \ref{S-frames}. For making and framing the slide, "seminar.sty" does not need to know anything about the paper you are printing on, or the margins you want. Hence, none of \LaTeX's standard page parameters are relevant within a slide environment. (However, for the sake of consistency, "seminar.sty" sets "\textwidth" to the width of the slide and "\textheight" to the height of the slide within a slide environment.) Now "seminar.sty" has to do something with the finished slide. As you read this User's Guide, you will find that there are various options. However, right now we are making slides for printing on transparencies, and so we have to position the slide on the transparency and add headers and footers. "seminar.sty" does not use \LaTeX's page parameters for this either. Instead, it uses the following parameters: \begin{center} \begin{tabular}{lc} {\em Parameter:} & \em Default:\\ \N\slideleftmargin & .5in\\ \N\sliderightmargin & .5in\\ \N\slidetopmargin & .5in\\ \N\slidebottommargin & .5in \end{tabular} \end{center} There are commands, to be set with "\renewcommand".\footnote{The only true length parameters (meaning that thay should be set with "\setlength") in "seminar.sty" are \n\slidewidth, \n\slideheight, \n\slideframewidth, \n\slideframesep, \n\semin, and \n\semcm.} \begin{figure} \hrule height 1pt\relax \begin{center} \setlength\unitlength{.7cm} \begin{picture}(13,11.5)(-1,-1.5) \thicklines \put(0,0){\framebox(11,8.5){\Huge My slide}} \put(5.5,4.25){\fancyoval(8.5,6){}} \thinlines \put(0,8.65){\line(0,1){.3}} \put(.75,8.65){\line(0,1){.3}} \put(.5,8.8){\vector(1,0){.25}} \put(.5,8.8){\vector(-1,0){.5}} \put(.375,9.1){\makebox(0,0)[b]{\n\slideleftmargin}} \put(10.25,8.65){\line(0,1){.3}} \put(11,8.65){\line(0,1){.3}} \put(10.75,8.8){\vector(1,0){.25}} \put(10.75,8.8){\vector(-1,0){.5}} \put(10.625,9.1){\makebox(0,0)[b]{\n\sliderightmargin}} \put(0,-.15){\line(0,-1){.3}} \put(11,-.15){\line(0,-1){.3}} \put(5.5,-.3){\vector(1,0){5.5}} \put(5.5,-.3){\vector(-1,0){5.5}} \put(5.5,-.6){\makebox(0,0)[t]{\n\paperheight}} \put(-.15,0){\line(-1,0){.3}} \put(-.15,.75){\line(-1,0){.3}} \put(-.3,.5){\vector(0,1){.25}} \put(-.3,.5){\vector(0,-1){.5}} \put(-.6,.375){\makebox(0,0)[r]{\n\slidebottommargin}} \put(-.15,8.5){\line(-1,0){.3}} \put(-.15,7.75){\line(-1,0){.3}} \put(-.3,8){\vector(0,1){.5}} \put(-.3,8){\vector(0,-1){.25}} \put(-.6,8.125){\makebox(0,0)[r]{\n\slidetopmargin}} \put(11.15,0){\line(1,0){.3}} \put(11.15,8.5){\line(1,0){.3}} \put(11.3,4.25){\vector(0,1){4.25}} \put(11.3,4.25){\vector(0,-1){4.25}} \put(11.6,4.25){\makebox(0,0)[l]{\n\paperwidth}} \put(.75,7.75){\makebox(0,0)[bl]{Here is my header}} \put(10.25,7.75){\makebox(0,0)[br]{9/30/99}} \put(.75,.75){\makebox(0,0)[tl]{Here is my footer}} \put(10.25,.75){\makebox(0,0)[tr]{7-9}} \end{picture} \caption{Slide margins.\label{SlideMargins}} \end{center} \hrule height 1pt\relax \end{figure} Look at Figure \ref{SlideMargins}. Note that the headers and footers lie {\em inside} the top and bottom margins, respectively. The slide is then centered horizontally and vertically between the margins. \section{Magnification and lengths} "seminar.sty" changes \TeX's magnification so that the output is larger than when typesetting an article. This means, for example, that if you paste some input from a paper you are writing with \LaTeX\ into a slide, it will look pretty much the same in the slide, except that it is magnified. For example, "\vspace{.5in}" produces a space that gets bigger along with the fonts and everything else. Of course, it won't look identical, since "seminar.sty" uses its own spacing parameters and margins. \TeX's standard magnifications are in magsteps. $n$ magsteps means a magnification of $1.2^n$. "seminar.sty"'s default magnification is 4 magsteps, but you can change this with the command \begin{MD} \slidesmag{n} \end{MD} should be an integer between $-5$ and 9. As noted above, lengths grow with the magnification. For spacing, like the parameter "\parindent" or using "\\[2pt]" to add a little extra space between lines, this is great, because it is easier to think in unmagnified dimensions. Setting "\parindent" to ".5cm" will look the same (relative to everything else) whatever the magnification. However, if you want to set the unit in a "picture" environment to 1cm, {\em as it appears on the slide}, use \begin{LVerbatim} \setslidelength{\unitlength}{1cm} \end{LVerbatim} "\setslidelength" is like \LaTeX's "\setlength", but it scales the size down so that the resulting size after magnification is, in this example, 1cm (in the process, it removes any stretch from rubber lengths).% \footnote{If you know what {\tt true} dimensions are, you may be wondering why they haven't been mentioned. These are not recommended because you will not be able to print the slides two-up or use the {\tt article} format.} There is also a \begin{MD} \addtoslidelength{cmd}{len} \end{MD} command. "seminar.sty" also provides the lengths \begin{MD} \semin\\ \semcm \end{MD} which are equal to an inch and a centimeter, scaled down to ``before magnification'' size. For example, \begin{LVerbatim} \rule{1pt}{4\semcm} \end{LVerbatim} makes a line 4 centimeters long on the transparency,.\footnote{Suppose you want to use another unit, such as millimeters, instead of centimeters. Then try this: \begin{LVerbatim} \newcommand{\semmm}{\semcm} \renewcommand{\semcmlength}{1mm} \setslidelength{\semmm}{1mm} \end{LVerbatim}} "\textwidth", "\textheight", "\columnwidth" and "\linewidth" all have the expected values in slides. (But "\slidewidth" and "\slideheight" do not.) Thus, this would \begin{LVerbatim} \rule{1pt}{.5\textwidth} \end{LVerbatim} make a line that is 1/2 the width of the slide. For help getting an EPS file to be the right size, see page \pageref{EPS}. Finally, there are some parameters that "seminar.sty" scales for you, and hence you can (and should) set them at their magnified values (the actual size on transparencies): \begin{itemize} \item "\slidewidth" and "\slideheight" \item "\slideframewidth" and "\slideframesep" (see Section \ref{S-frames}). \item The slide margin parameters (see Section \ref{S-slidemargins}). \item The \LaTeX\ page parameters, {\em when they are set in the preamble}.\footnote{The \LaTeX\ page parameters are listed on page 163 of Lamport's {\em \LaTeX\ User's Guide and Reference Manual}. They are used for notes (see Section \ref{S-notes}) and the \o{article} option (see Sections \ref{S-twoup} and \ref{S-article}), but not for printing slides onto transparencies. Lamport warns that resetting page parameters in the middle of the document is tricky; here it is more so, because you do have to worry about scaling them. But you can use "\setslidelength" for this.} \end{itemize} Note that the warnings about overfull slides (see Section \ref{S-pagebreak}) report unmagnified dimensions. \section{Font sizes} The "\slidesmag" command lets you change the magnification of your document. You can effectively fine tune the magnification by using the "11pt" and "12pt" style options. For example, instead of increasing the magnification from 4 to 5, you can switch to the "12pt" style option. There are differences---e.g., magnification affects the space you get from "\hspace{1in}"---but the fonts will at least be roughly the same size either way. The "11pt" option gives a half-step, somewhat like "\slidesmag{4.5}", if the latter were permitted. Sometimes you want to use smaller font sizes for a single slide, in order to fit in that little bit of extra material, or to use larger font sizes, so that the few things you have to say on a slide don't look too lonely. You can't changing the magnification in the middle of the document, but you can change the size of the fonts with the command \begin{MD} \ptsize{n} \end{MD} This switches to the font sizes that are in effect when you use the "pt" option. Actually, can be 8, 9, 10, 11, 12, 14 or 17, whether you have "art.sty" or not. \section{Spacing parameters\label{S-spacing}} \begin{figure} \hrule height 1pt \begin{center} \begin{tabular}{llc} {\em Command:} & {\em Initializes:} & {\em Default} \\[2pt] \N\slideparskip & "\parskip" & "1ex minus .2ex"\\ \N\slideparindent & "\parindent" & "0pt"\\ \N\slidefootnotesep & "\footnotesep" & "1.2ex"\\ \N\slideleftmargini & "\leftmargini" & "1.8em" \\ \N\slideleftmarginii & "\leftmarginii" & "1.4em" \\ \N\slideleftmarginiii & "\leftmarginiii" & "1em" \\ \N\slidelabelsep & "\labelsep" & ".5em" \\ \N\slideitemsep & "\itemsep" & ".8ex minus .2ex" \\ \N\slidepartopsep & "\partopsep" & "1ex minus .2ex" \\ \N\slidestretch & "\baselinestretch" & "1.2"\\ \N\slidearraystretch & "\arraystretch" & "1.2" \end{tabular} \caption{Slide spacing parameters.\label{SpacingDefaults}} \end{center} \hrule height 1pt \end{figure} The commands in Figure \ref{SpacingDefaults} are used to initialize some of the spacing parameters at the beginning of each slide environment and when "\ptsize" is used in a slide environment. These are spacing parameters that should depend on the size of fonts and that in \LaTeX's "article" style would be set in "art10.sty", etc. These commands should all be changed with "\renewcommand", even though, except for the "stretch" parameters, their values should be lengths. Note that "ex" and "em" units are used because these are the units that depend of font sizes. Outside a slide environment, redefine the commands on the left if you want to change these spacing parameters. Within a slide environment, reset the parameters directly, or redefine the commands on the left and then use the "\ptsize" command. In other \LaTeX\ styles, the extra distance between lines that is inserted when "\baselinestretch" exceeds 1 is eaten up by tall or deep lines. E.g., if the line contains a table or a large math operator, there is probably no extra space at all. The advantage of this system is that the distance between baselines does not fluctuate with every tilde. The disadvantage is that lines can end up too close. In "seminar.sty", on the other hand, fraction \begin{MD} \slideskip \end{MD} of the extra space cannot be eaten, but up to fraction \begin{MD} \slideshrink \end{MD} of this extra space that cannot be eaten can be removed if there is too much material on the slide. This gives you added flexibility about how much material to include on a slide. Both \n\slideskip\ and \n\slideshrink\ can be set with "\renewcommand" to a number between 0 and 1. The default value of \n\slideskip\ is ".75" and the default value of \n\slideshrink\ is ".25". Set \n\slideskip\ to "0" to revert to \LaTeX's usual behavior, as described above. For example, suppose you are using a 10pt font, \n\slidestretch\ is "1.2", \n\slideskip\ is ".75", and \n\slideshrink\ is ".25". The "\baselineskip" for a 10pt font is normally 12pt, leaving a little space between the lines. Then "\baselineskip" is set to \begin{center} "\slidestretch" $\times$ "12pt" $=$ 1.2$\times$12pt $=$ 14.4pt \end{center} The extra space between lines that is inserted is thus 2.4pt, and \begin{center} "\slideskip" $\times$ 2.4pt $=$ .75$\times$2.4pt $=$ 1.8pt \end{center} of this cannot be eaten by tall or deep lines. However, the space between lines can be reduced by up to \begin{center} "\slideshrink" $\times$ 1.8pt $=$ .25$\times$1.8pt $=$ .45pt \end{center} if the slide would otherwise be too long. \section{Slide frames\label{S-frames}} Slides can be framed. The command \begin{MD} \slideframe[commands]{style} \end{MD} specifies the frame style to use. Valid frame styles are "none" and "plain", unless you use macros that define additional styles. For example, the \o{fancybox} style option defines the frames "shadow", "double", "oval" and "Oval" (corresponding to the "\shadowbox", "\doublebox", "\ovalbox" and "\Ovalbox" commands defined in that style option). The \o{semcolor} option defines the styles "scplain", "scdouble", and "scshadow". All the frame styles use the lengths \begin{MD} \slideframewidth\\ \slideframesep \end{MD} which are the (magnified) width of the line (default 4pt) and the distance between the slide and the frame (default .4in), respectively. \n\slideframe's optional argument is for commands that you want to use to customize the slide frame style. For example: \begin{LVerbatim} \slideframe[\setlength{shadowsize}{12pt}]{shadow}\\ \slideframe[\psset{fillstyle=gradient}]{scplain} \end{LVerbatim} If you want to build your own custom slide frame, use the command \begin{MD} \newslideframe{style}[commands]{frame command} \end{MD}