diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
commit | b4fc5f639874db951177ec539299d20908adb654 (patch) | |
tree | 52f08823ca58fffe3db6a9b075635038c567626c /Master/texmf-dist/doc/latex/seminar | |
parent | dec3d98ebe442d7ea93efbaa8dd2e2be8149a467 (diff) |
doc 4
git-svn-id: svn://tug.org/texlive/trunk@80 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/seminar')
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/2up.doc | 539 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/fancybox.doc | 1268 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/read-me.2e | 62 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/readme.pst | 204 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/sem-read.me | 294 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/sem-user.pdf | bin | 0 -> 251653 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/sem-user.tex | 1935 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/semsamp1.tex | 98 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/semsamp2.tex | 285 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/tvz-code.sty | 280 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/tvz-hax.sty | 255 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/seminar/tvz-user.sty | 204 |
12 files changed, 5424 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/seminar/2up.doc b/Master/texmf-dist/doc/latex/seminar/2up.doc new file mode 100644 index 00000000000..3e4c4ae3fa5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/2up.doc @@ -0,0 +1,539 @@ +%% BEGIN 2up.doc +%% +%% Documentation for 2up.tex/2up.sty. +%% Run through LaTeX, with or without the NFSS. +%% +%% See below if you want to try out two-up printing. +%% +%% LaTeX version of this documentation courtesy of +%% H. David Todd <hdtodd@mockingbird.wesleyan.edu> +%% +%% +\documentstyle[12pt,twoside]{article} + +\def\FileDate{January 28, 1993} +\def\FileVersion{1.2} + +%% INSTRUCTIONS FOR TWO-UP PRINTING. +%% 1. Change \iffalse below to \iftrue. +%% 2. Uncomment \special{landscape} if using Rokicki's dvips, or otherwise +%% remember to print the document out in landscape mode. +%% 3. Uncomment one of the booklet options, if desired. +%% +\iffalse + \input 2up.tex + \targetlayout{twosided} + \TwoupWrites + % \special{landscape} %% This works with Rokicki's dvips + % \targetlayout{Booklet} %% Booklet printing with 2-sided printer/copier. + % \targetlayout{booklet} %% Booklet printing with 1-sided printer/copier. +\fi + +\makeatletter + +%% PAGE NUMBERING: +%% Adjust page numbering if using booklet layout option. +\setcounter{page}{0} +\def\next{\if@leftpage\else\stepcounter{page}\fi} +\@ifundefined{target@stop}{}{\next} + +%% CONTENTS: +\def\tableofcontents{% + \par\begin{center} + \large\bf Contents + \end{center} + \begin{quote}\@starttoc{toc}\end{quote}} + +%% PAGE PARAMETERS: +\setlength{\parindent}{0pt} % paragraph indent +\setlength{\parskip}{4pt plus 1pt minus 1pt} +\setlength{\topmargin}{0pt} +\setlength{\headheight}{12pt} % height of running head +\setlength{\headsep}{30pt} % distance between header and text +\setlength{\textheight}{8.2in} % height of text on page + +%% DATES, VERSIONS AND TITLES: +\def\@maketitle{% + \begin{center} + {\Large\bf \@title \par} + \vskip 1.2em {\lineskip .5em + \begin{tabular}[t]{c}\@author\end{tabular}\par} + \vskip .8em {\@date}% + \end{center} + \par + \vskip .5em} + +%% Page Style: +\pagestyle{myheadings} +\markboth{Two-Up Style Guide}{Version \FileVersion, \FileDate} + +%% Special list: +\newcommand{\namelistlabel}[1]{\mbox{\bf #1}\hfil} +\newenvironment{namelist}[1]% + {\begin{list}{}% + {\let\makelabel\namelistlabel + \settowidth{\labelwidth}{#1} + \setlength{\leftmargin}{1.1\labelwidth}}}% + {\end{list}} + +%% VERBATIM: +%% +\begingroup + \catcode`\{=12 \catcode`\}=12 + \catcode`\(=1 \catcode`\)=2 + \catcode`\+=0 \catcode`\\=12 + +gdef+|(\) % \| = character \ + +gdef+{({) % \{ = character { + +gdef+}(}) % \} = character } ++endgroup +\def\Backslash{\protect\|} +%% +%% Define some functional font commands: +%% +\def\MainFont{\tt} % For macro definitions. +\def\UsageFont{\tt} % For in-line macro names. +\def\InlineFont{\tt} % For other in-line snipets of code. +\def\MetaFont{\rm\it} % For meta arguments. +%% +%% Short-cuts for font commands: +%% +\def\s#1{\string#1} +\def\t#1{{\InlineFont\string#1}} % For other in-line code. +\def\m#1{{\MetaFont #1\/}} % For just putting things in italics +\def\M#1{{\InlineFont\{\m{#1}\}}} % Arg is in italic, enclosed in tt braces. +\let\N\t % For in-line macro names. +\catcode`\<=13 \def<#1>{\m{#1}} % <meta> +\catcode`\"=13\def"{\verb"} % Short verb +%% +%% This is for listing macro definitions in a quote-like environment. +%% +\begingroup + \catcode`\[=1 \catcode`\]=2 + \catcode`\{=13 \catcode`\}=12 + \gdef\@MD[% + \catcode`\{=13 \catcode`\}=12 + \def{##1}[\{[\MetaFont ##1]\}]] +\endgroup +\def\MD{% + \quote + \begingroup + \@MD + \def\end{\endgroup\end}% + \def\\{\@centercr\s}% + \MainFont + \s} +\def\endMD{\endquote} +%% + +%% End preamble. +\catcode`\@=12 + +\begin{document} + +\title{Documentation for 2up.tex:\\ + Two-up printing for Generic TeX} +\author{Timothy Van Zandt\thanks{The documentation was put into + \LaTeX\ format by David Todd.}\\ Timothy.VAN-ZANDT@insead.edu} +\date{Version \FileVersion\\[3pt] \FileDate} + +\maketitle +\thispagestyle{empty} + + "2up.tex"/"2up.sty" allows one to print a document two-up, with +considerable flexibility as to paper size and layout. It produces a standard +dvi file, and does not involve an additional dvi or PostScript filter. It +should work with most \TeX\ macro packages. + + {\bf Usage:} Input "2up.tex", or include "2up" as a LaTeX style option. +There is a good chance you will get the desired layout. (But you will probably +need to generate new font bitmaps to get high quality output.) See the rest of +this documentation for detailed information on controlling 2up.tex. + +\begingroup +\def\baselinestretch{.8}\large\normalsize +\tableofcontents +\endgroup +\clearpage + +\section{Comparison with other methods} + +There are other tools for two-up printing: +\begin{description} +\item[PostScript filters] +These work well as long as you only use PostScript fonts (as opposed to the +usual Metafont fonts). Otherwise, the PostScript filter scales bitmapped +fonts, and the quality is lower than with "2up.tex". + +\item[Rokicki's dvidvi] +"dvidvi" is a versatil tool that does much more than +2up printing. However, if only rearranges the pages, and does not adjust the +magnification to ensure that the pages fit properly in a two-up format. It +also adds one more step to the \TeX-dvi-printer cycle. "2up.tex", on the other +hand, combines the changes to \TeX's magnification and page layout with the +rearranging of the pages, all with an easy-to-use interface and from within +your \TeX\ document. (See Section \ref{dvidvi} on using both "2up.tex" and +"dvidvi" together.) +\end{description} + +\section{A warning about fonts} + +Two-up printing generally involves reducing a document, and thus using fonts +sizes that are not typically found on your system. If you are using bitmapped +fonts (standard for \TeX\ users), and you do not have and cannot generate the +extra fonts bitmaps, you will find 2up.sty (and any other method of two-up +printing) to give very poor quality output. + +If you are using a program like Rokicki's "dvips" that can generate extra font +bitmaps as needed, you will find that it takes a long time to print your 2up +document the first few times, as "dvips" is busy making the extra fonts. This +problem will go away. Be thankful you have such an easy way to get extra font +bitmaps. + +\section{Usage} + +Input "2up.tex". \LaTeX\ users can include "2up" as a style option. + +Then set the target and source layout: +\begin{MD} + \source{mag}{width}{height}\\ + \target{mag}{width}{height} +\end{MD} + +\begin{itemize} +\item The ``source'' layout is the layout of your document +the way it is usually printed. The ``target'' layout is the layout when it +is printed two-up. + +\item <width> and <height> are the true width and height of the paper, +when looking at the output right-side-up. + +\item <mag> refers to the source and target magnification. It should be an +integer, equal to 1000 times the magnification factor. There are also some +magic magnification numbers: +\begin{description} +\item[$\setminus$magstep<n>] for a magnification of 1.2$^n$ (n=0,...,5), or + +\item[$\setminus$magstepminus<n>] for a magnification of 1.2$^{-n}$ +(n=0,...,5). +\end{description} +Using these magnification values will make best use of the available fonts on +your system. +\end{itemize} + +"2up.tex" takes each source page, and centers in half a target page. To get +the pages to fit, the magnification of the document typically has to be +reduced. If you find that the pages are too crowded, try reducing the target +magnification. If they are too lonely, try increasing the target +magnification. + +If you want to adjust the positioning of the scaled pages, try changing the +values of "\hoffset" or "\voffset" with "\advance" or \LaTeX's "\addtolength". + +Don't change the magnification of your document after using the "\target" +command, as you will override the settings made by 2up.tex. + +You can also specify some options: +\begin{MD} + \targetlayout{options} +\end{MD} +where <options> is a comma separated list with no spaces. Valid +options are: +\begin{namelist}{topbottomxxx} + +\item [topbottom] The two source pages are printed one on top of the other. +\item [twosided] Odd pages are always printed on the right or the bottom. +\item [booklet] Pages are printed like a booklet. See Section \ref{booklet}. +\item [Booklet] Like "booklet", but for two-sided printers/copiers. +\item [dvidvi] For arranging in two-up layout with "dvidvi". See Section +\ref{dvidvi}. + +\end{namelist} + +The only other changes you might want to make to your document are the +following: +\begin{itemize} +\item You have to see to it that the target output is printed with the +correct orientation (landscape or portrait). See the documentation for your +dvi driver for details. + +\item "2up.tex" will inserts a line between pages if you change the following +dimensions: +\begin{namelist}{pagesepwidthxxx} +\item [$\setminus$pagesepwidth] Thickness of line. (Default 0pt) +\item [$\setminus$pageseplength] Length of line. (Default 6.5in) +\item [$\setminus$pagesepoffset] Distance from bottom of page to bottom of +line, or (with "topbottom" layout) from side of page to beginning of line. +(Default 1in) +\end{namelist} + +\item You can, but do not need to, use the following commands: +\begin{namelist}{twoupemptypagexxx} + +\item [$\setminus$twoupemptypage] inserts a completely blank half page +in the target. + +\item [$\setminus$twoupclearpage] \LaTeX\ users: ejects a complete target +page. + +\item [$\setminus$twoupeject] Plain \TeX users: ejects a complete target +page. + +\end{namelist} +\end{itemize} + +\section{Defaults} + + The following commands set the parameters for some common sources and +targets. The definitions of these commands are also useful examples. + + For A4 paper, just replace "8.5in" and "11in" in the definitions below by +the width and height of A4 paper. + +\begin{description} + +\item [$\setminus$twouparticle] + +This is the default for \LaTeX. +\begin{namelist}{Sourcexx} + +\item [Source:] A portrait document on 8.5x11 inch paper with wide margins as +used in \LaTeX's article style, and without marginal notes. + +\item [Target:] A landscape document on the same size paper, with the source +pages printed side by side. + +\item [Definition:]\hspace{1pt} +\begin{verbatim} +\target{\magstepminus1}{11in}{8.5in} +\source{\magstep0}{8.5in}{11in}} +\end{verbatim} +\end{namelist} + +If you use narrower side margins, or if you use marginal notes, then you +will need to use "\twoupplain" or \\ "\twouplegaltarget", defined below. + +\item [$\setminus$twoupplain] + +This is the default for non-\LaTeX. + +It is the same as "\twouparticle", but for source documents with narrower +margins. +\begin{namelist}{Sourcexxx} + +\item [Definition:]\hspace{1pt} +\begin{verbatim} +\target{\magstepminus2}{11in}{8.5in} +\source{\magstep0}{8.5in}{11in} +\end{verbatim} +\end{namelist} + +\item [$\setminus$twouplegaltarget] + +\begin{namelist}{Sourcexxx} +\item [Source:] A portrait document on 8.5x11 inch paper with just about any +margins and perhaps with marginal notes. + +\item [Target:] A landscape document on legal size paper (8.5x14 inches), +with the source pages printed side by side. + +\item [Definition:]\hspace{1pt} +\begin{verbatim} +\target{\magstepminus1}{14in}{8.5in} +\source{\magstep0}{8.5in}{11in} +\end{verbatim} +\end{namelist} + +\item [$\setminus$twouplandscape]\hspace{1pt} +\begin{namelist}{Sourcexxx} + +\item [Source:] A landscape document on 8.5x11 inch paper with just about any +margins. + +\item [Target:] A portrait document on the same size paper, with the +source pages stacked vertically. + +\item [Definition:]\hspace{1pt} +\begin{verbatim} +\target{\magstepminus2}{8.5in}{11in} +\source{\magstep0}{11in}{8.5in} +\targetlayout{topbottom} +\end{verbatim} +\end{namelist} + +\end{description} + + +\section{True Dimensions} + +\TeX\ lets you use `true' dimensions, as in +\begin{verbatim} + \topmargin 1truein + \setlength{\topmargin}{1truein} +\end{verbatim} +This sets the length to 1 inch +as it appears on the page, no matter what the magnification. + +Once you use `true' dimensions, it is impossible to change the +magnification of your document, and hence it is almost impossible +to use 2up.tex. You will get an error like: +\begin{verbatim} + ! Incompatible magnification (833); + the previous value will be retained (2000). +\end{verbatim}% + +The use of `true' dimensions might be hiding in macros or style files +you are using. For example, Plain \TeX's "\magnification" command uses +true dimensions; use "\mag" instead, and then set "\hsize" and +"\vsize" appropriately scaled. If you can't find the culprit `true' +dimension in your document or input files, try putting this on the +(very) first line of your document: +\begin{verbatim} + \mag 143 \voffset 1truein \mag 1000 +\end{verbatim} + +You will get the error listed above wherever true dimensions are used +(and in some other places as well). + + +\section{Page Cross-References} + + Page cross-references (e.g., in an index or table of contents) will not be +accurate with "2up.tex", because finished pages are not immediately shipped +out. This can also cause problems with some special \LaTeX\ styles that have +multiple ".aux" files (e.g., for each chapter). + + To get better, but not perfect, page cross-references, try putting the +command +\begin{verbatim} + \TwoupWrites +\end{verbatim} +at the beginning of your document, after inputting "2up.tex". This is good for +drafts, and may fix problems with \LaTeX\ styles that have multiple ".aux" +files. "\TwoupWrites" makes "\write" and "\read" "\immediate", if you know +what that means. It might cause problems of its own, but try it and see. + + To get accurate page cross-references: +\begin{enumerate} +\item Run the job without "2up.tex", until all cross-references +are properly resolved. Run any index utility at this point. + +\item Run the job ONE MORE TIME with "2up.tex"; it will use the +correct cross-references from the previous runs. (In \LaTeX\ documents, +it is useful at this point to include the "\nofiles" command, so that +the correct cross-references are preserved.) +\end{enumerate} + +\section{Booklets\label{booklet}} + +Here are some special considerations for making booklets: + +\begin{itemize} + +\item Use the "booklet" target layout if your printer or copier cannot print +two +sides directly. "2up.tex" prints out the ``tops'' of the pages, and then the +``bottoms'', so that you can copy or print on both sides by doing one side, +flipping the output over, and doing the other side. + +\item Use "Booklet" if your printer or copier can print directly on two sides. + +\item You must have enough memory and box registers to hold all the pages in +the document. A Big\TeX\ should be able to handle at least a 32-page booklet. + +\item Sometimes booklet printing is part of the design of a document, rather +than an afterthought. In this case, you should set up the margins for the +target half-page rather than using "2up.tex" to scale the document. For +example, if using \LaTeX, 8.5x11 inch paper, \LaTeX's twoside style option, +and headings, try the following page parameter changes: +\begin{verbatim} + \setlength{\oddsidemargin}{-0.2in} + \setlength{\evensidemargin}{-0.5in} + \setlength{\textwidth}{4.2in} + \setlength{\textheight}{6.5in} + \setlength{\topmargin}{-.4in} +\end{verbatim} +If you do this, "2up.tex" isn't adjusting margins or scaling the +document. You coould therefore get by without "2up.tex" by using "dvidvi". +\end{itemize} + +\section{Using dvidvi\label{dvidvi}} + + With the "dvidvi" layout option, "2up.tex" takes care of adjusting the +margins, and you then use "dvidvi" to arrange the pages in a two-up +format. The advantage is that cross referencing comes out right. +The disadvantage is that it involves one more step. + +Start by \TeX ing your document with "2up.tex" and the "dvidvi" layout option. +Then run the dvi file through "dvidvi". Specify the offsets for "dvidvi" at +the middle of the page. E.g., for +a side-by-side layout on 8.5x11in paper, use +\begin{verbatim} + dvidvi '2:0,1(5.5in,0in)' foo bar +\end{verbatim} +For other paper sizes, replace "5.5in" by half the target paper width. For the +"topbottom" layout, reverse the dimensions, e.g., +(0in,5.5in). For booklet printing, see the +the documentation for "dvidvi". + + +\section{Compatibility\label{compatibility}} + + These macros should work with most \TeX\ macro packages, except for +the following possible but unlikely compatibility problems: + +\begin{itemize} + +\item If you use a macro package other than \LaTeX\ that does unusual things +to end a document and/or that modifies the definition of "\end", you may +find that the last page is nor printed or that an extra page with headings +is inserted at the end of the document. This is fixable on a case-by-case +basis. See the redefinition of "\end" in "2up.tex". + +\item "2up.tex" might not work if you meddle with \TeX's "\shipout" primitive +after loading "2up.tex". + +\item If the first page of the source document is not on the first two-up +target +page (possible, for example, with two-sided printing and the "booklet" +option, but generally unlikely), "\special"'s that come at the beginning +of the document also do not get onto the first page of output. This can mess +up "\special"'s for landscape printing or +including a PostScript header file. In this case, you have to specify +these things as command line options when using your dvi driver. + +\end{itemize} + + +\section{Changes} +\begin{namelist}{V0.9xxx} +\raggedright + +\item [V0.9a] Everything redone. Too many differences to point out. + +\item [V0.9b] Interface redone again. "booklet" option added. + +\item [V0.9c] Pages ship out a little earlier. A few bugs fixed. + + Parameters "\pageseplength" and "\pagesepthickness" added. + +\item [V0.9d] Fixed bug with "\twoupclearpage" and "\twoupeject". + +\item [V0.9e] Made pages be counted (from dvi driver's viewpoint) by the +physical page number. + +\item [V0.9f] Parameter "\pagesepoffset" added, and "\pagesepthickness" +changed to "\pagesepwidth". + +\item [V1.0] None. Just seemed seemed like it was time to call it 1.0 + +\item [V1.1] Added "Booklet" and "dvidvi" target layouts. + + "\hoffset" and "\voffset" in source document now have expected effect. + +\item[V1.2] Fixed incompatibility problem with AmS-\TeX/AmS-\LaTeX. + + Added "\TwoupWrites" command. + +\end{namelist} +\end{document} +%% END 2up.doc diff --git a/Master/texmf-dist/doc/latex/seminar/fancybox.doc b/Master/texmf-dist/doc/latex/seminar/fancybox.doc new file mode 100644 index 00000000000..6b9cea2d0dc --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/fancybox.doc @@ -0,0 +1,1268 @@ +%% BEGIN fancybox.doc +%% +%% COPYRIGHT 1992, by Timothy Van Zandt, Timothy.VAN-ZANDT@insead.edu. +%% For copying restrictions, see fancybox.sty. +%% +%% Documentation for fancybox.sty. +%% Run through LaTeX, with or without the NFSS. +%% +\def\FileVersion{1.3} +\def\FileDate{2000/09/19} +%% +%% This creates two temporary files: \jobname.ex1 and \jobname.tmp + +\documentclass[12pt]{article} + +\makeatletter + +%% INPUT FANCYBOX.STY HERE TO CHECK FILE VERSION. + +\usepackage{fancybox} + +\ifx\FileVersion\fileversion\else + \@latexerr{Fancybox style file and documentation do not have the same + version}\@ehd +\fi + +%% DATES, VERSIONS AND TITLES: + +\def\expanddate#1/#2/#3/{\year=#1 \month=#2 \day=#3} +\begingroup + \expandafter\expanddate\filedate/ + \xdef\thefiledate{\today} +\endgroup + +\title{Documentation for fancybox.sty:\\ + Box tips and tricks for \LaTeX} +\author{Timothy Van Zandt\\ Timothy.VAN-ZANDT@insead.edu} +\date{Version \fileversion\\ \thefiledate} + +\def\@maketitle{% + \begin{center} + {\Large\bf \@title \par} + \vskip 1.2em {\lineskip .5em + \begin{tabular}[t]{c}\@author\end{tabular}\par} + \vskip .8em {\@date}% + \end{center} + \par + \vskip .5em} + +%% PAGE STYLE: + +\pagestyle{myheadings} +\if@twoside + \markboth{Documentation for fancybox.sty}% + {Version \fileversion, \thefiledate}% +\else + \markright{fancybox.sty, Version \fileversion} +\fi + +%% PAGE PARAMETERS: + +% Paragraphs are marked by large space rather than indentation: +\parindent 0pt +\parskip 7pt plus 1pt minus 1pt + +\setlength{\topmargin}{0pt} +\setlength{\headheight}{12pt} % height of running head +\setlength{\headsep}{30pt} % distance between header and text +\setlength{\textheight}{8.2in} % height of text on page + +%% TABLE OF CONTENTS + +\newskip\myskip + +\def\tableofcontents{% + \par\vfill + \begin{quote} + \begin{center} \Large\bf Contents \end{center} + \def\numberline##1{\hbox to 0pt{\hss##1\hskip 1em}}% + \let\oldaddvspace\addvspace + \def\addvspace##1{% + \myskip##1\relax + \oldaddvspace{.5\myskip}} + \@starttoc{toc}% + \end{quote} + \thispagestyle{empty} + \vfill + \clearpage} + + +%% VERBATIM HACKS: + +\VerbatimFootnotes + +% Short meta (works in verbatim. Can't use < for other purposes. +\catcode`\<=13 \def<#1>{{\rm\it #1\/}} % <meta> (works in verbatim) + +% Short verbatim. " can appear in verbatim environments. +\def\temp{\Verb"} +\expandafter\def\expandafter\dospecials\expandafter{\dospecials\do\"} +\catcode`\"=13 +\let"\temp + +% Verbatim item: +\newcommand{\vitem}{\SaveVerb[{\def\bf{}\item[\UseVerb{\MyTemp}]}]{\MyTemp}} + +%% EXAMPLES: + +\setlength{\fboxsep}{6pt} + +\begin{VerbatimOut}{\jobname.ex1} +% 1. Save example verbatim to \jobname.tmp, +% 2. Input verbatim with \catcode`\"=14 (" is a comment). +% 3. Input again with \catcode\`"=9 (" is ignored). + +\renewcommand{\EveryVerbatimLine}[2]{} + +\renewcommand{\EveryVerbOutLine}[2]{} + +\newcommand{\BeginExample}{% + \VerbatimEnvironment\begin{VerbatimOut}{\jobname.tmp}} + +\newcommand{\EndExample}{% + \end{VerbatimOut}%. + \renewcommand{\EveryVerbatimLine}{}% + \renewcommand{\EveryVerbatimCodes}{\catcode`\"=14}% + \LVerbatimInput{\jobname.tmp}% + \catcode`\"=9} + +\newenvironment{example}{\BeginExample}{\EndExample + \begin{center}\input{\jobname.tmp}\end{center}} + +\newenvironment{example*}{\BeginExample}% + {\EndExample \input{\jobname.tmp}} + +\newenvironment{example**}{\BeginExample}% + {\EndExample \globaldefs=1 \input{\jobname.tmp}} + +\end{VerbatimOut} + +\input{\jobname.ex1} + +%% END PREAMBLE: +\makeatother + +\begin{document} +\setcounter{page}{0} +\maketitle +\begin{quote} +"fancybox.sty", together with its documentation, gives extensive answers to +and solutions for many questions about how to frame or rotate this or that in +\LaTeX. It also contains commands for shadow, double and oval frames. +\end{quote} + +\tableofcontents + +\section{Fancy frames} + +"fancybox.sty" has five variants of \LaTeX's "\fbox" command: +\begin{quote}\raggedright +"\shadowbox", "\doublebox", "\ovalbox" (with "\thinlines") and "\Ovalbox" +(with "\thicklines"). +\end{quote} +Here are examples:\footnote{In this documentation, the default value of +"\fboxsep" has been changed from 3pt to 6pt.} +\begin{example} + \shadowbox{\large\bf New Glarus Birdwatch} +\end{example} +\begin{example} + \doublebox{\large\bf New Glarus Birdwatch} +\end{example} +\begin{example} + \ovalbox{\large\bf New Glarus Birdwatch} +\end{example} +\begin{example} + \Ovalbox{\large\bf New Glarus Birdwatch} +\end{example} + +The distance between the box and the frame is "\fboxsep", as with \LaTeX's +"\fbox" command. The commands use other parameters as well: +\begin{description} +\vitem"\shadowbox" The width of the frame is "\fboxrule" (the same as with +"\fbox"). The width of the shadow is "\shadowsize" (default: "4pt"). + +\vitem"\doublebox" The width of the inner frame is .75"\fboxrule", and the +width of the outer frame is 1.5"\fboxrule". The distance between the two +frames is 1.5"\fboxrule" plus .5pt. + +\vitem"\ovalbox" The width of the frame is set by the "\thinlines" +declaration. The diameter of the corner arcs is set with the "\cornersize" +command. +\begin{LVerbatim} + \cornersize{<num>} +\end{LVerbatim} +sets the diameter of the corners arcs to <num> times the lessor of the width +and height of the box. +\begin{LVerbatim} + \cornersize*{<dim>} +\end{LVerbatim} +sets the diameter of the corner arcs to <dim>. This is all approximate, +because \LaTeX\ has a limited range of arc sizes to choose from. The default +is +\begin{LVerbatim} + \cornersize{.5} +\end{LVerbatim} + +\vitem"\Ovalbox" This is like "\ovalbox", except that the width of the lines +is set by the "\thicklines" declaration. +\end{description} + +There are no analogs to \LaTeX's "\framebox" command, which has various +optional arguments not supported by "\fbox". You can get the exact same +functionality by putting the argument of the above framing commands in a +"\makebox". + +There is also a variant "\fancyoval" of \LaTeX's "\oval" picture object. The +difference is that "\oval" always makes the diameter of the corner arcs as +large as possible, and "\fancyoval" uses the "\cornersize" command to set the +diameter. + +\section{A short course on boxes} + +\begingroup\sloppy +The "\shadowbox", "\doublebox", "\ovalbox" and "\Ovalbox" commands described +in the previous section are examples of LR-box commands, meaning that their +argument is processed in LR mode. \LaTeX\ LR-box commands include "\mbox", +"\makebox", "\fbox", "\framebox", "\sbox" and "\savebox". All the PSTricks +commands whose argument is text are LR-box commands, including, e.g, the +framing, rotating, scaling and positioning commands, and some of the node +commands. Any rotation command is an LR-box command. + +\endgroup + +The purpose of the rest of this documentation is to provide answers to, and +solutions for, frequently asked questions about using LR-box commands with +\LaTeX. I will use "\fbox" for the leading example of a box framing +command,\footnote{In the examples using "\fbox", be aware that the default +value of "\fboxsep" has been changed in this documentation from 3pt to 6pt.} +and "\rotateleft" for the leading example of a box rotation command. +("fancybox.sty" does not contain a "\rotateleft" command, as this must be +implemented via "\special"'s, but there are numerous box-rotation style files +around.) However, most of what is said here applies to any LR-box command. + +In each LR-box command, the text is processed in restricted horizontal mode, +which is referred to as ``LR-mode'' in Lamport's {\em \LaTeX: User's Guide and +Reference Manual}. In restricted horizontal mode, the input, consisting of +regular characters and boxes, is made into one (long or short) line. There is +no line-breaking, nor can there be vertical mode material such as an entire +displayed equation. However, the fact that you can include another box means +that this isn't really a restriction. + +For one thing, alignment environments such as \LaTeX's "tabular" are just +boxes, and thus present no problem. Picture environments and the LR-box +commands themselves are also just boxes. Entire paragraphs or other vertical +mode material such as displayed equations can be nested in a "\parbox" or +"minipage". + +\section{Defining LR-box environments} + +To frame a "minipage", you have to write +\begin{LVerbatim} + \fbox{% + \begin{minipage}{3in} + blah + \end{minipage}} +\end{LVerbatim} +You might want to define an environment "fminipage" that frames its contents, +but you can't use +\begin{LVerbatim} + \newenvironment{fminipage}% + {\fbox{\begin{minipage}}% + {\end{minipage}}} +\end{LVerbatim} +because the braces are not balanced in the definition. + +"fancybox.sty" contains an "Sbox" environment that makes it easy to define +your own LR-box environments. It is a variant of \LaTeX's "\sbox" command that +saves the contents of the environment in a storage bin that can be retrieved +with the command "\TheSbox".\footnote{The difference between +\begin{LVerbatim} + \begin{Sbox} + blah + \end{Sbox} + \TheSbox +\end{LVerbatim} +and +\begin{LVerbatim} + \newsavebox{\mybox} + \sbox{\mybox}{blah} + \usebox{\mybox} +\end{LVerbatim} +is that "Sbox" saves the contents globally, and "\TheSbox" erases the contents +globally.} +For example, here is a framed minipage: +\begin{LVerbatim} + \begin{Sbox} + \begin{minipage}{3in} + blah + \end{minipage} + \end{Sbox} + \fbox{\TheSbox} +\end{LVerbatim} +and here is an "fminipage" environment that works: +\begin{example**} + \newenvironment{fminipage}% + {\begin{Sbox}\begin{minipage}}% + {\end{minipage}\end{Sbox}\fbox{\TheSbox}} +\end{example**} +Let's see that it really works: +\begin{example} + \begin{fminipage}{2in} + Since the former doesn't use braces to delimit + the contents of the box, $\ldots$ + \end{fminipage} +\end{example} + + +\section{Math} + +In-line math, or pieces of a displayed equation (as opposed to a whole +equation), are horizontal mode material, but most LR-box commands switch out +of math mode when they occur in math mode. Thus, you have to explicitly switch +back in to math mode when desired.\footnote{This is {\em not} true for the +PSTricks LR-box commands.} +For example: +\begin{example} + $x + y = \fbox{$\Omega$}$ +\end{example} + +You also have to explicitly write +\begin{quote} + "\scriptstyle", "\scriptscriptstyle" or "\displaystyle" +\end{quote} +if you want one of these special math styles. For example, here I will frame +an equation, but not the equation number: +\begin{example*} + \begin{equation} + \fbox{$\displaystyle + \int_{\Omega_0} \zeta(\omega) d\omega + \geq \bar{r}$} + \end{equation} +\end{example*} + +Entire displayed equations or "eqnarray" environments work differently because +they are vertical mode material. Thus, they have to go inside a "\parbox" or +"minipage". E.g., +\begin{example*} + \newlength{\mylength} + \[ + \setlength{\fboxsep}{15pt} + \setlength{\mylength}{\linewidth} + \addtolength{\mylength}{-2\fboxsep} + \addtolength{\mylength}{-2\fboxrule} + \fbox{% + \parbox{\mylength}{ + \setlength{\abovedisplayskip}{0pt} + \setlength{\belowdisplayskip}{0pt} + \begin{equation} + x + y = z + \end{equation}}} + \] +\end{example*} +The outer "\[" "\]" are just used to display the boxed equation, rather than +actually switch into math mode. Note how I set the width of the "\parbox" so +that the displayed box would exactly have width "\linewidth".\footnote{That is +what "\mylength" is for. It is better to define a single scratch length that +you reuse rather than creating a new one each time.} + + I also set the display skips to "0pt" and increased the size of "\fboxsep" so +that I would have the same distance all around between the equation and the +frame. + +This is again a mouthful, and so I might instead define:\footnote{The reason +for using "\minipage" instead of "\begin{minipage}", and so on, is that with +AmS-\LaTeX, "\begin" and "\end" cannot appear in the definition of a new +equation environment.} +\begin{example**} + \newenvironment{FramedEqn}% + {\setlength{\fboxsep}{15pt} + \setlength{\mylength}{\linewidth}% + \addtolength{\mylength}{-2\fboxsep}% + \addtolength{\mylength}{-2\fboxrule}% + \Sbox + \minipage{\mylength}% + \setlength{\abovedisplayskip}{0pt}% + \setlength{\belowdisplayskip}{0pt}% + \equation}% + {\endequation\endminipage\endSbox + \[\fbox{\TheSbox}\]} +\end{example**} +"fancybox.sty" doesn't bother defining any such environments, because there +are too many possible designs. But let's see if the one above works: +\begin{example*} + \begin{FramedEqn} + \Rightarrow P\sim\xi(P_\gamma)- \frac{1}{3} + \end{FramedEqn} +\end{example*} + +"fancybox.sty" contains a "Beqnarray" environment, which is like the +"eqnarray" environment but it is not vertical mode material. Instead, it +produces a box just large enough to hold all the equations. For example: +\begin{example} + \fbox{% + \begin{Beqnarray*} + x & = & y\\ + y & > & x \\ + \int_4^5 f(x)dx & = & \sum_{i\in F} x_i + \end{Beqnarray*}} +\end{example} +The unstarred version produces standard equation numbers on the right (even +with the "leqno" style option and AmS-\LaTeX). It might not work with special +equation numbering macros. + + +\section{Floats}\label{floats} + +A common mistake is to put a whole "table", "figure" or other float +environment inside an LR-box command. Instead, you should put everything that +is {\em inside} the environment (including the "\caption", if you want that +boxed too) inside a "minipage" of the desired width, and then put the +"minipage" inside the LR-box command. + +For example: +\begin{example*} + \begin{table}[h] + \begin{center} + \fbox{% + \begin{minipage}{.8\textwidth} + \begin{center} + \begin{tabular}{rl} + foo & bar + \end{tabular} + \end{center} + \caption{A table of foo and bar.} + \end{minipage}} + \end{center} + \end{table} +\end{example*} +Note how I had to use "center" twice: once to center the framed box, and again +to center the stuff inside the box. + +That is a mouthful, and so I might define a "FramedTable" environment like the +following, which sets the size of the "minipage" so that the framed box is +exactly the width of the page (no need for the first "center" environment this +time): +\begin{example**} + \newenvironment{FramedTable}% + {\begin{table}[h] + \begin{Sbox}% + \setlength{\mylength}{\textwidth}% + \addtolength{\mylength}{-2\fboxsep}% + \addtolength{\mylength}{-2\fboxrule}% + \begin{minipage}{\mylength}}% + {\end{minipage}\end{Sbox}\fbox{\TheSbox}\end{table}}% +\end{example**} +Now let's see if it works: +\begin{example*} + \begin{FramedTable} + \begin{center} + \begin{tabular}{rl} + foo & bar + \end{tabular} + \end{center} + \caption{A table of foo and bar.} + \end{FramedTable} +\end{example*} + +The most common reason to want to rotate an entire float, caption and all, is +to put it on a page by itself in landscape mode, centered both horizontally +and vertically. Compared to the table framing we did above, we just have to +replace "\fbox" by our box rotation command (e.g., "\rotateleft" or whatever), +set the width of the minipage to "\textheight" (if you want to use the full +size of the page), and use the float position specifier "[p]". "fancybox.sty" +contains an environment, +\begin{LVerbatim} + \begin{landfloat}{<float>}{<rotation command>} + ... + \end{landfloat} +\end{LVerbatim} +that automates this. It has two arguments: the name of the floating +environment, and your rotation command. For example, if "\rotateleft{foo}" +rotates "foo" by 90 degrees, and you want a landscape mode "table", then try +\begin{LVerbatim} + \begin{landfloat}{table}{\rotateleft} + ... + \end{landfloat} +\end{LVerbatim} +If the whole document is in landscape mode, then "landfloat" gives you a +portrait-mode float---good for a table that is too tall to fit in landscape +mode. + +If you don't add a caption to a float, it doesn't matter much what floating +environment you use (e.g., "table", "figure" or whatever). Thus, you can put +anything in a landscape float. For example, suppose I have a very wide +equation. Then I can write: +\begin{LVerbatim} + \begin{landfloat}{table}{\rotateleft} + \begin{equation} + ... + \end{equation} + \end{landfloat} +\end{LVerbatim} +"fancybox.sty" defines a generic caption, "\GenericCaption", that doesn't +affect the numbering of floats, doesn't make an entry in a list of floats, and +doesn't add anything to the argument you give. I could have used this if I +wanted to add a caption to the previous example. + +\section{Center, flushleft and flushright} + +There are two ways to box a "center", "flushleft" or "flushright" environment. +If you have long lines and you want \TeX\ to do the line breaking, then put +the environment inside a "minipage".\footnote{List and other such environments +work best inside a "minipage" environment rather than a "\parbox".} If you +have short lines and you want the frame to adjust itself to the size of the +longest line, then use "fancybox.sty"'s +\begin{quote} + "Bcenter", "Bflushleft" or "Bflushright" +\end{quote} +environment instead. + +These are basically just "tabular" environments with a single column, and so +each line should end with "\\", or "\\["<dim>"]" to insert extra space, and +the text on each line must be balanced. Also, each line is sitting in its own +group, and so, e.g., if you want to change the font for the whole environment, +you should do this before the environment rather than after. +Like the "tabular" environment, the box that is produced has the baseline at +the center, unless you include an optional argument "[t]" to align the box +with the top line or "[b]" to align the box with the bottom line. + +For example: +\begin{example} + \setlength{\fboxsep}{10pt}% + \fbox{% + \begin{Bcenter} + Love of life\\ + and other short stories\\ + by Policarpa Salabarrieta + \end{Bcenter}} +\end{example} +Compare this with: +\begin{example} + \setlength{\fboxsep}{10pt}% + \fbox{% + \begin{minipage}{6cm} + \begin{center} + Love of life and other short stories + by Policarpa Salabarrieta + \end{center} + \end{minipage}} +\end{example} + +In either case, if we want the resulting framed box centered, we have to +include it inside another "center" environment. + +Here is another example: +\begin{example} + My list: \fbox{% + \begin{Bflushleft}[b] + Galanga root\\ + Coconut\\ + Tempeh + \end{Bflushleft}} +\end{example} + + +\section{Lists} + +There are again two ways to box a list environment such as +\begin{quote} + "itemize", "enumerate" or "description". +\end{quote} +You can put it in a "minipage" of pre-determined size and let \TeX\ do the +line breaking, or you can use +\begin{quote} + "Bitemize", "Benumerate" or "Bdescription" +\end{quote} +instead, and let the box adjust to the size of the longest line. + +For example. +\begin{example} + \fbox{% + \begin{Bitemize} + \item Groceries + \item Clean hamster cages + \item Pick up Peter + \end{Bitemize}} +\end{example} + + Most of the usual list parameters are irrelevant except for "\itemsep" and +"\labelsep". These environments are also based on the "tabular" environment, +and so each item should be balanced text. You can't write "\vspace{4pt}" +either, but you can insert an extra amount of space before an item by writing +"\item(4pt)" (or "\item(4pt)[label]" if you have a label). Also, you can break +lines within an item using "\\" or "\\[<dim>]". For example: +\begin{example} + \fbox{% + \begin{Bdescription} + \item[David] Groceries + \item[Eli] Hamster cages\\ + Surreal numbers + \item(3pt)[Doris] Pick up Peter + \end{Bdescription}} +\end{example} + +These environments also have an optional argument, "[t]" to align the box with +the top line, and "[b]" to align the box with the bottom line. +\begin{example} + To do: + \fbox{\setlength{\itemsep}{0pt}% + \begin{Benumerate}[t] + \item Groceries + \item Hamster cages + \item Pick up Peter + \end{Benumerate}} +\end{example} + +There is also a generic "\Blist" command that is analogous to \LaTeX's +"\list". It has the same two obligatory arguments, plus a third optional +"[t]" or "[b]" argument for changing the alignment. + +\section{Superimposing boxes} + +The command +\begin{LVerbatim} + \boxput*(<x>,<y>){<LR stuff1>}{<LR stuff2>} +\end{LVerbatim} +puts <LR stuff1> either behind (the default) or in front of (with the "*") <LR +stuff2>.\footnote{You will only notice the difference between "\boxput" and +"\boxput*" if you are using color implemented by "\special"'s} The resulting +box has the dimensions of <LR stuff2>. + +The coordinates "(<x>,<y>)" determine where the center of <LR stuff1> is +positioned. For example, "(0,0)" puts it at the center of <LR stuff2>, "(0,1)" +puts it at the center-top, and "(-1,-1)" puts it in the bottom-left corner. + +More generally, the origin of the coordinate system is at the center of <LR +stuff2>, one unit in the vertical direction is half the vertical size of <LR +stuff2>, and one unit in the horizontal direction is half the width of <LR +stuff2>. Thus, <x> and <y> should always be numbers (without units such as +"pt" or "cm"), with one exception: If <y> is "b" or "B", <LR stuff1> is +positioned vertically at the baseline of <LR stuff2>. "(<x>,<y>)" is +optional---the default is "(0,0)". + +Except for the funny coordinate system, "\boxput" is like the "\put" command +in a "picture". In particular, you can use "\makebox" in <LR stuff1> to +fine-tune the positioning, and <LR-stuff1> can contain a "picture" +environment. + +You might use "\boxput" to put a ``water mark'' in the background of a box, or +to put a label next to a box, when you don't want this label to take up any +space. Here is a lazy example: +\begin{example} + \boxput{\makebox(0,0){\Huge Censored!}}{\parbox{3in}{% + The origin of the coordinate system is at the center of + {\em LR stuff2}, and one unit in the x-direction + is half the width of {\em LR stuff2}.}} +\end{example} + +This would be a lot more interesting using PSTricks, with ``Censored!'' in the +foreground, rotated 30 degrees, and red: +\begin{LVerbatim} + \boxput*{\rput{30}{\Huge\red Censored}}{\parbox{3in}{% + blah blah}} +\end{LVerbatim} + +Here is another example using PSTricks: +\begin{LVerbatim} + \newcommand{\titledframe}[2]{% + \boxput*(0,1){\psframebox*{#1}}% + {\psframebox[framesep=12pt]{#2}}} +\end{LVerbatim} +\newcommand{\titledframe}[2]{% + \boxput*(0,1){#1}% + {\fboxsep=12pt \fbox{#2}}} +The following example illustrated roughly how it works, but ``My title'' does +not blot out the frame behind it because this documentation does not use +PSTricks. \begin{example} + \titledframe{My title}{% + \parbox{2in}{The title is superimposed + on the top part of the frame.}} +\end{example} + +\section{Framing a whole page} + +The commands +\begin{LVerbatim} + \fancyput*(<x>,<y>){<LR stuff>} + \thisfancyput*(<x>,<y>){<LR stuff>} +\end{LVerbatim} +are pretty much like "\put" commands in a \LaTeX\ picture environment whose +origin is 1 inch down and to the right from the top left corner of the +page.\footnote{Don't blame me for \TeX's peculiar 1 inch margins.} The only +differences are that (i) that any LR-mode material is permitted (including +\LaTeX\ "picture" environment, of course), (ii) the coordinate is optional +"(0pt,0pt)" is substituted by default), and (iii) if the coordinate is +included, you {\em must} specify the units. + +"\thisfancyput" affects only the current page, and is a global declaration +(analogous to "\thispagestyle"). + +If you include the optional "*", then the command adds to, rather than +replaces, other things that have been inserted with "\fancyput" or +"\thisfancyput". + +These commands are particularly useful for framing a page, because you can get +a frame that is, e.g., 1 inch from each side of the physical page without +having to worry about what margins you are using for the document. Here is an +example: +\begin{example*} + \thisfancyput(3.25in,-4.5in){% + \setlength{\unitlength}{1in}\fancyoval(7,9.5)} +\end{example*} +You could also use "\fancyput" to add some kind of ``watermark'' or background +image (e.g., a light gray ``DRAFT''). + +There are other commands that directly frame or in some other way box the page +of text: +\begin{LVerbatim} + \fancypage{<cmds1>}{<cmds2>} + \thisfancypage{<cmds1>}{<cmds2>} +\end{LVerbatim} + +Each finished page, before adding the headers and footers, (and thus having +width and height "\textwidth" and "\textheight", is boxed with +\begin{LVerbatim} + <cmds1>{<pagebox>} +\end{LVerbatim} +Thus, <cmds1> should be, or should end with, a command whose argument can be a +box, such as "\fbox" or "\rotateleft". + +Then the headers and footers are added, using the new width of the page, and +this is boxed with +\begin{LVerbatim} + <cmds2>{<pagebox>} +\end{LVerbatim} +The same rules apply to <cmds2> as to <cmds1>. + +Here is an example: +\begin{example*} + \thisfancypage{% + \setlength{\fboxsep}{8pt}% + \setlength{\shadowsize}{8pt}% + \shadowbox}{} +\end{example*} + +{\bf Warning:} The commands described in this section change \LaTeX's output +routine, and may not work with document styles that do the same. Also, bad +arguments can cause serious errors with uninformative error messages. + +\section{Switching to landscape mode midstream} + +The most common reason to switch to landscape mode midstream is to rotate a +float, such as a table or figure. This was discussed in Section \ref{floats}. + +If you want to rotate one or more pages, without rotating the headers and +footers, use the +\begin{LVerbatim} + \begin{LandScape}{<cmd>} + ... + \end{LandScape} +\end{LVerbatim} +environment. <cmd> should be the command for rotating the page 90 degrees to +the left or right. (E.g., "\rotateleft", or "\rotate[l]".) + +If you want to rotate the headers, footers and margins as well, use the +\begin{LVerbatim} + \begin{Landscape}{<paperwidth>}{<paperheight>}{<cmd>} + ... + \end{Landscape} +\end{LVerbatim} +environment (the small "s" makes the difference) to rotate the pages left +(counterclockwise), and use the "Landscape*" environment (same arguments) to +rotate the pages right (clockwise). The three arguments are the width of the +paper, the height of the paper, and the rotation command you are using. For +example, if I have a portrait mode document using the US 8.5in by 11in paper, +and if "\rotateleft{foo}" rotates "foo" 90 degrees counterclockwise, then I +can write +\begin{LVerbatim} + \begin{Landscape}{8.5in}{11in}{\rotateleft} +\end{LVerbatim} + +You can use "\LandScape", "\Landscape" and "\Landscape*", rather then the +"LandScape", "Landscape" and "Landscape*" environments, if you want the rest +of the document to be in landscape mode. + +If your document is being printed in landscape mode, then these environments +switch to portrait mode. + +For example, suppose I have a landscape mode document, and I want to switch to +portrait mode for the rest of the document, rotating the pages to the +``right'' with "\rotateright". Then I would write +\begin{LVerbatim} + \Landscape*{11in}{8.5in}{\rotateright} +\end{LVerbatim} + +These environments switch the text width and height, leaving the margins +exactly as they were before. It is quite possible that you want to make other +changes to the page parameters after switching to landscape mode, but as +Lamport points out the \LaTeX\ {\em User's Guide and Reference Manual}, this +generally doesn't work right in the middle of the document. "fancybox.sty" has +a command "\UsePageParameters" which gets around this. It should be used right +after you change the page parameters (and the page parameter changes should +come right after the beginning of the landscape environment, or "\clearpage"). + +{\bf Warning:} The commands and environments described in this section change +\LaTeX's output routine, and may not work with document styles that do the +same. Also, bad arguments can cause serious errors with uninformative error +messages. + +\section{Verbatim} + +If you try to frame some verbatim text by typing +\begin{LVerbatim} + \fbox{% + \begin{minipage}{5cm} + \begin{verbatim} + \My \Program \Listing + if { foo } { bar } fi + \end{verbatim} + \end{minipage}} +\end{LVerbatim} +you will get nonsense at best. This is because the argument to "\fbox" is read +before the "\begin{verbatim}" is processed. But then it is too late for \TeX\ +to go back and interpret the contents of the verbatim environment literally +rather than as special \TeX\ commands and characters. + +One solution is to use the "Sbox" environment: +\begin{example} + \begin{Sbox} + \begin{minipage}{5cm} + \begin{verbatim} + \My \Program \Listing + if { foo } { bar } fi + \end{verbatim} + \end{minipage} + \end{Sbox} + \setlength{\fboxsep}{8pt} + \fbox{\TheSbox} +\end{example} + +"fancybox.sty" also contains a command that ``fixes'' \LaTeX's LR-box commands +for use with verbatim text: +\begin{LVerbatim} + \VerbBox{<cmd>}{<LR stuff>} +\end{LVerbatim} +This is like +\begin{LVerbatim} + <cmd>{<LR stuff>} +\end{LVerbatim} +but <LR stuff> can contain verbatim text.\footnote{Or other tricks that +involve "\catcode" changes, as occurs with some foreign language macros.} For +example: +\begin{example} + \VerbBox{\fbox}{\verb+\foo{bar}+} +\end{example} + +For footnotes, put the command "\VerbatimFootnotes" in the preamble, and then +you can use verbatim commands or environments in the argument of "\footnote". +This is an optional feature because it might conflict with somebody else's +modification of the footnote system. + +If you try to define your own framed verbatim environment with +\begin{LVerbatim} + \newenvironment{FramedVerb}% + {\begin{Sbox}\begin{minipage}{5in}\begin{verbatim}} + {\end{verbatim}\end{minipage}\end{Sbox} + \setlength{\fboxsep}{8pt}\fbox{\TheSbox}} +\end{LVerbatim} +and then type +\begin{LVerbatim} + \begin{FramedVerb} + if { foo } { bar } fi + \end{FramedVerb} +\end{LVerbatim} +you will again run into trouble because after the "\begin{verbatim}", \LaTeX\ +is searching for the literal string "\end{verbatim}" as the end of the +verbatim text. It just skips right over the "\end{FramedVerb}" and may well +continue to the end of the file or until it throws up. + +"fancybox.sty" contains some verbatim environments that get around this +problem and that have other advantages for LR-boxing verbatim listings, when +compared to the standard \LaTeX\ "verbatim" environment. Admittedly, many of +their special features have nothing to do with boxes. + +Here are the basic verbatim environments: +\begin{description} + \vitem"Verbatim" Works pretty much like \LaTeX's "verbatim". + \vitem"LVerbatim" Like "Verbatim", but "list" rather than "trivlist" is used +to display the listing, and so it is indented from the left margin. (This is +what I am using for verbatim listings in this document.) + \vitem"BVerbatim[<pos>]" Produces a box with the same width as the longest +verbatim line. The baseline is in the center, unless you include the optional +argument "[t]" for alignment with the top line or "[b]" for alignment with the +bottom line. + \vitem"VerbatimOut{<file>}" Writes the verbatim text to <file>. + \vitem"SaveVerbatim{<cmd>}" Saves the verbatim text as <cmd>. <cmd> is +defined globally, without checking whether <cmd> is already defined. Use +obviously innocuous names like "\MyTemp". +\end{description} + +{\bf Important:} For any of these verbatim environments, or new verbatim +environments you define yourself (see below), nothing should come after +"\begin{Verbatim}" or before "\end{Verbatim}" on the same line --- not even +spaces!% + \footnote{If you need to allow something to come before "\end{Verbatim}", +then you have two options: + \begin{itemize} + \item Put the command "\AltGetVerbatim" in the preamble. This switches to a +scheme where anything preceding "\end{Verbatim}" is simply ignored. This can +cause problems if you do really weird things with active characters or other +commands within the verbatim environment (e.g., active conditionals that are +not balanced within a line of verbatim text), but in this case you are +probably a good enough hacker to use the next option. + \item "\EndVerbatimTokens" is a token register that you can set to the +tokens that should precede "\end{Verbatim}" on the same line, with their +verbatim "\catcode"'s. + \end{itemize}} +If you put something after "\begin{Verbatim}" on the same line, it is simply +ignored. However, if you put something after "\end{Verbatim}" on the same +line, or if you misspell "\end{Verbatim}", you will get an error such as +\begin{LVerbatim} + ! File ended while scanning use of \Verbatim. +\end{LVerbatim} +and the document will end at that point. + +You can define new verbatim environments using "\newenvironment". You just +have to start the definition with +\begin{LVerbatim} + \VerbatimEnvironment +\end{LVerbatim} + For example, here is the framed verbatim environment we tried earlier: +\begin{example**} + \newenvironment{FramedVerb}% + {\VerbatimEnvironment + \begin{Sbox}\begin{minipage}{5cm}\begin{Verbatim}}% + {\end{Verbatim}\end{minipage}\end{Sbox} + \setlength{\fboxsep}{8pt}\fbox{\TheSbox}} +\end{example**} +Let's give it a try: +\begin{example} + \begin{FramedVerb} + if { foo } { bar } fi + \end{FramedVerb} +\end{example} + +Here are three commands for inputting a whole file verbatim. The file must end +with a new line. +\begin{description} + \vitem"\VerbatimInput{<file>}" Like "\Verbatim". + \vitem"\LVerbatimInput{<file>}" Like "\LVerbatim". + \vitem"\BVerbatimInput[<pos>]{<file>}" Like "\BVerbatim". +\end{description} + +Here are three commands for making use of verbatim text that has been saved to +a command: +\begin{description} + \vitem"\UseVerbatim{<cmd>}" Like "\Verbatim". + \vitem"\LUseVerbatim{<cmd>}" Like "\LVerbatim". + \vitem"\BUseVerbatim[<pos>]{<cmd>}" Like "\BVerbatim". +\end{description} +The "SaveVerbatim" environment and the "\UseVerbatim" commands are useful for +including verbatim text in the argument of "\marginpar", "\fbox" and other +commands. For example, here is another way to define the "FramedVerb" +environment: +\begin{LVerbatim} + \newenvironment{FramedVerb}% + {\VerbatimEnvironment + \begin{SaveVerbatim}{\MyTemp}}% + {\end{SaveVerbatim}% + \setlength{\fboxsep}{8pt}% + \fbox{\begin{minipage}{5cm}\UseVerbatim{\MyTemp} + \end{minipage}}} +\end{LVerbatim} + +Here are some verbatim commands for short-pieces of (in-line) verbatim text: +\begin{description} + \vitem"\Verb<char> <literal> <char>" \ \\ + Like \LaTeX's "\verb" command, but it will complain if it encounters a new +line in <literal>.\footnote{Be careful that your word processing does not +insert one for you.} For example: +\begin{example*} + "\begin{quote} + The main use for the \Verb+SaveVerbatim+ + environment and the \Verb+\UseVerbatim+ + commands is to include $\ldots$ + "\end{quote} +\end{example*} + \vitem"\UseVerb{<cmd>}" Like "\UseVerbatim", but without any particular +formatting. It is intended for including short pieces of literal text saved +with "\SaveVerb" (below).\footnote{But it can also be used for multiple lines +saved with the "SaveVerbatim" environment if you want to do the formatting +yourself. E.g., try this in a tabbing environment with "\VerbatimTab" +appropriately defined.} + \vitem"\SaveVerb[<whatever>]{<cmd>}<char> <literal> <char>"\ \\ + This is like "\Verb", but it saves <literal> as <cmd>, and then returns to +the optional argument <whatever>. Like the "SaveVerbatim" environment, it +defines <cmd> globally without checking whether <cmd> is already defined. +Without the optional argument, the most common use is for including verbatim +text in a "\marginpar", "\section" or other command argument. + + The optional argument can be used for special tricks. For example, all the +listings of commands in this documentation use "\vitem" in a "description" +environment, where "\vitem" is defined by:\footnote{The braces enclosing the +optional argument of "\SaveVerb" prevent the "]" inside the argument from +being mistaken for the end of the argument.} +\begin{LVerbatim} + \newcommand{\vitem}% + {\SaveVerb[{\item[\UseVerb{\MyTemp}]}]{\MyTemp}} +\end{LVerbatim} +Whereas +\begin{LVerbatim} + \item[\Verb"\foo"] +\end{LVerbatim} +would not work because after "\item" reads its argument it is too late to +interpret "\foo" literally, +\begin{LVerbatim} + \vitem"foo" +\end{LVerbatim} +does work because it is equivalent to +\begin{LVerbatim} + \SaveVerb{\MyTemp}"foo"\item[\UseVerb{\MyTemp}] +\end{LVerbatim} +\end{description} + + +These environments and commands use various parameters that make it easy to +customize their behavior. However, until you want to find the need for such +customization, you might as well ignore the rest of this section. + +Internally, "fancybox.sty" separates the reading and formatting of verbatim +text. Most of the environments and commands perform both functions, but +"SaveVerbatim" and "\SaveVerb" only read the text, while "UseVerbatim" (and +company) and "\UseVerb" only format the text. "VerbatimOut" gets special +treatment. The parameters that apply to each class of verbatim environment or +command is listed in Table \ref{verbtable}. + +\begin{table} +\begin{center} +\renewcommand{\arraystretch}{0} +\setlength{\tabcolsep}{7pt} +\newcommand{\vs}{& \\[\tabcolsep]} +\newcommand{\VS}{\\ \vs \hline \vs} +\begin{tabular}{|l|l|} +\hline \vs +{\em Where} & {\em What} +\\ \vs \hline +\hline \vs + \begin{Bflushleft} + Environments\\ + that format + \end{Bflushleft} +& + \begin{Bflushleft} + "\VerbatimSpace"\\ + "\VerbatimTab"\\ + "\VerbatimFont"\\ + "\VerbatimFuzz"\\ + "\EveryVerbatimLine"\\ + "\EveryVerbatim"\\ + "\ThisVerb" + \end{Bflushleft} +\VS + \begin{Bflushleft} + Environments\\ + that read + \end{Bflushleft} +& + \begin{Bflushleft} + "\EveryVerbatimCodes"\\ + "\ThisVerbCodes" + \end{Bflushleft} +\VS + \begin{Bflushleft} + "\Verb" and\\ + "\UseVerb" + \end{Bflushleft} +& + \begin{Bflushleft} + "\VerbSpace"\\ + "\VerbTab"\\ + "\VerbFont"\\ + "\EveryVerb"\\ + "\ThisVerb" + \end{Bflushleft} +\VS + \begin{Bflushleft} + "\Verb" and\\ + "\SaveVerb" + \end{Bflushleft} +& + \begin{Bflushleft} + "\EveryVerbCodes"\\ + "\ThisVerbCodes" + \end{Bflushleft} +\VS + \begin{Bflushleft} + "VerbatimOut" + \end{Bflushleft} +& + \begin{Bflushleft} + "\EveryVerbOutCodes"\\ + "\ThisVerbCodes"\\ + "\EveryVerbOutLine"\\ + "\ThisVerb" + \end{Bflushleft} +\\ \vs \hline +\end{tabular} +\caption{Parameters for the verbatim environments and +commands.\label{verbtable}} +\end{center} +\end{table} + +All the parameters, including "\VerbatimFuzz", are ordinary commands, and +should be changed with "\renewcommand". + +Here is a description of each of the parameters for environments that format +the verbatim text: +\begin{description} + \vitem"\VerbatimSpace" The insertion text for spaces. The default is "\ ", +which produces a blank space. Change it to "\ttspace" to get \ttspace. + \vitem"\VerbatimTab" The insertion text for tabs. The default is +\begin{LVerbatim} + \ \ \ \ \ \ \ \ +\end{LVerbatim} + \vitem"\VerbatimFont" The font to use for verbatim text. The default is +"\tt" + \vitem"\VerbatimFuzz" This is the amount by which lines can be too long in a +"Verbatim" or "LVerbatim" environment before you get overfull "\hbox" +warnings. This threshold is usually .1pt, but the default definition of +"\VerbatimFuzz" is "2pt" because verbatim lines won't break and are therefore +often too long. + \vitem"\EveryVerbatimLine" This is inserted at the beginning of each line of +verbatim environments or verbatim files. By default it does nothing. I like to +indent each line in the verbatim environment in the input file by 2 spaces, so +I define +\begin{LVerbatim} + \renewcommand{\EveryVerbatimLine}[2]{} +\end{LVerbatim} +to eat those spaces. (But I have to remember to put in two spaces or space +markers for blank lines too.) You might also use it to number the lines. For +example: +\begin{example} + \newcounter{VerbLineNo} + \renewcommand{\EveryVerbatimLine}% + {\makebox[10pt][r]{% + \stepcounter{VerbLineNo}% + \tiny\rm\arabic{VerbLineNo}}% + \hspace{10pt}} + \renewcommand{\EveryVerbatim}% + {\setcounter{VerbLineNo}{0}} + \begin{SaveVerbatim}{\MyTemp} + \setlength{\fboxsep}{15pt} + \setlength{\mylength}{\linewidth} + \end{SaveVerbatim} + \fbox{\BUseVerbatim{\MyTemp}} +\end{example} + \vitem"\EveryVerbatim" Whatever else you want to say before formatting the +verbatim text. By default, it does nothing. + \vitem"\ThisVerb" This is executed before any of the commands above, and +then its value is cleared. Use this to customize a single verbatim formatting +environment. +\end{description} + +Here is a description of the parameters for environments that read the +verbatim text: +\begin{description} + \vitem"\EveryVerbatimCodes" This command is inserted just before reading the +verbatim text. Use it to play with "\catcode"'s (see the {\em \TeX book}). For +example, I might type +\begin{LVerbatim} + \renewcommand{\EveryVerbatimCodes}{\catcode`\"=14} +\end{LVerbatim} +if I want to use \Verb+"+ as a comment character in verbatim text.% +%% The use of SaveVerbatim and \SaveVerb is not necessary here because +%% \VerbatimFootnotes is in effect. This is just a test. +\begin{SaveVerbatim}{\MyTemp} + \def\MyQuote{"} % \MyQuote is now the character ", + \def\temp{\Verb"} % in case I need it. + \catcode`\"=13 % Now " is like a command. + \let"\temp % Now "foo" is like \Verb"foo" + \def\do{\noexpand\do\noexpand} % Now " can be used in verbatim + \edef\dospecials{\dospecials\do\"} % environments anyway. +\end{SaveVerbatim}\SaveVerb{\Foo}+"+\SaveVerb{\FFoo}+\Verb"foo"+% +\footnote{Here is another "\catcode" trick. We make \UseVerb{\Foo} a short +verbatim command, so that we can say \UseVerb{\Foo foo\Foo} instead of +\UseVerb{\FFoo}: +\LUseVerbatim{\MyTemp}} + \vitem"\ThisVerbCodes" This command is executed before "\EveryVerbCodes", +and then it is cleared. Use this to fool with the "\catcode"`s of a single +verbatim environment. +\end{description} + +The parameters for "\Verb", "\UseVerb" and "\SaveVerb" and the "VerbatimOut" +environment are analogous to the similar commands for other environments. + +Here is an example of the use of "\ThisVerb" to define a variant of "\Verb" +that uses \ttspace\ to mark spaces: +\begin{LVerbatim} + \newcommand{\SVerb}{% + \renewcommand{\ThisVerb}% + {\renewcommand{\VerbatimSpace}{\ttspace}}% + \Verb} +\end{LVerbatim} + +Finally, without further comment, here are the definitions of the "example" +and "example*" environments that were used for the examples in this document: +{\renewcommand{\EveryVerbatimLine}{}\LVerbatimInput{\jobname.ex1}} + +\section{Changes} +\raggedright + +\paragraph*{Version 0.9, November 23, 1992} First release. + +\paragraph*{Version 0.91, November 25, 1992} +\begin{enumerate} + \item "\shadowsize" is now a length, to be set with "\setlength" or +"\addtolength". + \item "\fancypage" split into "\fancypage" and "\fancyput" +\end{enumerate} + +\paragraph*{Version 0.92, December 20, 1992} +\begin{enumerate} + \item New "\boxput" command for superimposing boxes. + \item New "\VerbatimFootnotes" command. + \item New "\VerbBox" command for verbatim boxes. + \item New "Sbox" environment. Makes "\beginsbox" and "\endsbox" + obsolete, but the latter have been retained for compatibility. +\end{enumerate} + +\paragraph{Version 0.93, January 20, 1993} +\begin{enumerate} + \item New "\EndVerbatimTokens" for tokens that precede "\end{Verbatim}". + \item New "\AltGetVerbatim", to allow any tokens to precede +"\end{Verbatim}". + \item Fixed bug in "\BVerbatimInput" that caused second line to be repeated. + \item New "LandScape" environment, for rotating pages without rotating +headers and footers. + \item Slide frames "Oval", "oval", "shadow" and "double" are defined when +"seminar.sty" v0.93 (and maybe later) is loaded. +\end{enumerate} + +\paragraph{Version 1.0, February 10, 1993} +\begin{enumerate} + \item Fixed bugs in "\boxput". + \item New "Beqnarray" environment. +\end{enumerate} + +\paragraph{Version 1.1, 1997 (D.G./S.R.)} +\begin{enumerate} + \item Minimal adaptations for \LaTeX{} 2e compatibility (macros + "\fancypage", "\thisfancypage", "\fancyput", "\thisfancyput", + "\@Landscape", "\LandScape"). +\end{enumerate} + +\paragraph{Version 1.2, February 27, 1998 (D.G./S.R.)} +\begin{enumerate} + \item Other adaptations for \LaTeX{} 2e. +\end{enumerate} + +\paragraph{Version 1.3, September 19, 2000 (D.G./S.R.)} +\begin{enumerate} + \item Corrections of the output routine for \LaTeX{} 2e compatibility + (from Marcin Wolinski and Heiko Oberdiek). + \item Add a "\ProvidesPackage" command (from Heiko Oberdiek). +\end{enumerate} + +\end{document} +%% END fancybox.doc diff --git a/Master/texmf-dist/doc/latex/seminar/read-me.2e b/Master/texmf-dist/doc/latex/seminar/read-me.2e new file mode 100644 index 00000000000..a220dca4561 --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/read-me.2e @@ -0,0 +1,62 @@ +THIS IS A SUPPLEMENTARY READ-ME FOR V1.0e OF THE SEMINAR PACKAGE + +*********************************************************************** +**** "readme" file for the Seminar package, v1.0e, 94/09/12 **** +*********************************************************************** + +COPYRIGHT 1993, 1994 by Timothy Van Zandt, Timothy.VAN-ZANDT@insead.edu + +BUGS: If you have problems using this seminar package with LaTeX2e, + report them to Timothy.VAN-ZANDT@insead.edu. The problem probably lies + with seminar.cls. You can probably continue to use the seminar + package with LaTeX2e in compatibility mode, while waiting for a bug + fix, by renaming seminar.cls to something else. + +ABOUT V1.0e: + + The V1.0e distribution is identical to v1.0 of 93/04/01, + except for a few changes so that Seminar can work with + NFSS2 and LaTeX2e: + + - semhelv.sty and semlcmss.sty have been modified to work + with NFSS2 and LaTeX2e (but they still work with NFSS). + + - seminar.cls has been added. This is a LaTeX2e document class, + derived from seminar.sty v1.0 by Sebastian Rahtz. + + If you already have have seminar.sty v1.0e, then all you need + are this read-me file plus these files from the inputs + directory: + + seminar.cls semhelv.sty semlcmss.sty + +USING SEMINAR WITH LATEX2E: + + !!! YOU MUST BE USING A LATEX2E RELEASED AFTER 19 FEBRUARY 1994 + + You can either use seminar.sty in compatibility mode: + \documentstyle{seminar} + Or use the seminar.cls document class: + \documentclass{seminar} + + Unless you are using other macros that only work in + compatibility mode, you might as well use the document class. + + You can use the following options with \documentclass{seminar}: + + article slidesonly notes notesonly notesonly* + noxcomment portrait a4 (or a4paper) semhelv semlcmss + semlayer semrot semcolor slidesec + + plus appropriate options for the article document class + (e.g., 11pt) + + NOTE: Use `a4' or `a4paper', not `sem-a4'. + + `seminar.cls' is a minimal modification of seminar.sty. The + next release will take advantage of more of LaTeX2e's special + capabilities. + + +Tim Van Zandt +August 24, 1994 diff --git a/Master/texmf-dist/doc/latex/seminar/readme.pst b/Master/texmf-dist/doc/latex/seminar/readme.pst new file mode 100644 index 00000000000..8d489f677e7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/readme.pst @@ -0,0 +1,204 @@ + --------------- + | PSTricks 97 | + --------------- + + + +----------------------------------------------------------------------- +PSTricks is the work of Timothy van Zandt <tvz@nwu.edu> + +PSTricks 97 is edited by Denis Girou <Denis.Girou@idris.fr> + and Sebastian Rahtz <sebastian.rahtz@computing-services.oxford.ac.uk> +----------------------------------------------------------------------- + + + +1 - Copyright + --------- + +COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu. + +This program can be redistributed and/or modified under the terms +of the LaTeX Project Public License Distributed from CTAN +archives in directory macros/latex/base/lppl.txt. + +2 - Introduction + ------------ + +This package is a re-release of PSTricks, incorporating all of the +beta releases and bug fixes made up to March 1997. It is *not* +intended as a full new release of PSTricks, but as a consolidation and +cleaned distribution. Because Timothy van Zandt does not currently have +enough time to work on PSTricks, he gave permission for Denis Girou +and Sebastian Rahtz to produce this interim solution. + +No new features have been added in PST97, except the release of the +small pst-fill package for filling (tiling) arbitrary regions and the +various evolving contributions, but we have merged in all the bug fixes +and beta addons which Timothy produced. + +We have renamed some of the files that make up PSTricks, for consistency. + + +3 - Installation + ------------ + +3.1 - (La)TeX files + + a - You have to move all the files from the "generic" subdirectory +to a directory part of your TEXINPUTS environment variable, or to add it +in your TEXINPUTS list of paths. + + b - If you are a LaTeX user (and not only a plain TeX one), you have +to do the same thing for the "latex" subdirectory, which define LaTeX +wrappers for all the PSTricks files. + +3.2 - PostScript header files + + a - If you use the "dvips" DVI to PostScript converter, you have +to move all the files from the "dvips" subdirectory to a directory part +of your DVIPSHEADERS environment variable, or to add it in your DVIPSHEADERS +list of paths. + + b - If you use the Y&Y's "dvipsone" DVI to PostScript converter, +you have to rename generic/dvipsone.con to generic/pstricks.con and to move +all the files of the "dvips" subdirectory to the TeX input folder. + + c - If you use the MicroPress "VTeX" DVI to PostScript converter, +you have to rename generic/vtex.con to generic/pstricks.con and to move +all the files of the "dvips" subdirectory to the TeX input folder. + + d - If you use the "textures" (version 1.7 or 1.8) DVI to PostScript +converter (for Macintosh), you should proceed as follows: + * create a new folder PSTricks97 (for instance) as a subfolder in +Textures' TeX inputs folder, + * copy the "generic", "dvips", "latex" and "contrib" subfolders +from the "pst97" folder to the newly created "PSTricks97" folder, + * open the "generic" folder and remove the file pstricks.con, +then rename the file textures.con to pstricks.con, + * open the "dvips" folder and change the following line in the file +pstricks.pro (courtesy Michael J. Sharpe <msharpe@euclid.ucsd.edu>): +/STV { SDict begin normalscale end STP } def +by +/STV { Mag 72.27 72 div mul dup neg scale STP } def + It was also reported that the `pst-text' package (to put text +along paths) doesn't work with the "textures" driver. + Textures's users must also look at the page kindly maintained +by Michael Sharpe: http://math.ucsd.edu/~msharpe/pst-textures.html + + d - If you use another driver than these four ones, you have to adapt +a pstricks.con file for it, if the one for "dvips" doesn't work for it. +You can also look at the instructions of the old obsolete/src/pstricks.con +file. And if nothing work, ask for help on the PSTricks mailing list, +hopping that somebody on the list has the same configuration than you... + +3.3 - Test of the installation + +The file doc/test-pst.tex allow you to test all your installation and the +various components of PSTricks. It is the concatenation of most of the +examples of the PSTricks chapter of "The LaTeX Graphics Companion". +You must take care (mainly if you are "normally" a user of plain TeX only, +that it require LaTeX and some packages of it distribution (namely `calc', +`ifthen' and `graphicx'). It also require the `random' and `subfigure' +packages, which can be found on CTAN or the TeXLive cdrom - see the README +file of the doc subdirectory). + +3.4 - Known pitfalls + + a - To use the standard `color' package (which is available both +for plain TeX and LaTeX) with PSTricks, you must load the `pstcol' extra +package written by David Carlisle, which interface the two packages, +loading them in the right order, and overriding some small parts of PSTricks +to allow it to use the `color' package system for specifying color. +We strongly recommend that you use the `color' package today. + + b - Don't try to load the `color' package if you use `pst-all' +(it is already loaded in the correct order). + + c - If needed, preferably load the `graphics' / `graphicx' package +after PSTricks, and in this case use the `graphics' syntax of \scalebox +(not the one described in the PSTricks documentation). + + d - If you load `graphics' / `graphicx' before PSTricks, you must use +the PSTricks syntax of \scalebox in all cases (not the one described +in the `grfguide' document). + + e - We have rename some package files for consistency. But the reference +documentation in obsolete/doc subdirectory still refer to the old names. +So, take care that `pst2eps' is now `pst-eps', `charpath' is now `pst-char', +`gradient' is now `pst-grad', `textpath' is now `pst-text' and `pstree' is +now `pst-tree'. + + +4 - Contents + -------- + +4.1 - Subdirectories + +The distribution contain the following subdirectories: + +contrib : various contributions +doc : documentations (up to date ones - the obsolete/doc subdirectory + contain the reference documentation for the version 0.93a and + the additional old Beta material, which is still necessary to use...) +dvips : PostScript header files +generic : TeX generic sources +latex : LaTeX wrappers +obsolete: documentation and sources for the version 0.93a and the + additional old Beta material + +4.2 - PSTricks core files + +The generic subdirectory contain the core files of PSTricks (and the latex +subdirectory contain the corresponding wrapper files). By alphabetic order: + +multido : loop facility for Generic TeX (in fact independant of PSTricks) +pst-3d : 3d projections +pst-char: stroking and filling character paths +pst-coil: coils and zigzags +pst-eps : conversion of PSTricks graphics to EPS files +pst-fill: fillings and tilings +pst-grad: gradients +pst-node: nodes and node connections +pst-plot: plots +pst-text: texts along a path +pst-tree: trees + +In addition, there is a LaTeX package `pst-all' in the latex subdirectory, +which loads all of the PSTricks components, plus `pstcol', in one go +(`pstcol' require also a color.cfg file defined; make sure you do _not_ load +the `color' package by itself). The only reason for _not_ using this is that +it uses extra memory for facilities you might not need. + + +5 - Documentation + ------------- + +There is NOT a complete up to date _reference_ documentation for PSTricks 97. +You must still refer to the reference documentation of the version 0.93a and +the additional old Beta material, available in the obsolete/doc subdirectory +(it was put in the "obsolete" subdirectory to clearly show that it is not up +to date nor supported by actual mainteners). Take care to notice what has +changed in additional old Beta documents (betadoc?.ps files) comparing to the +ones for 0.93a version (pst-usr?.ps files). + +Denis Girou maintain a list of known errors in both version 0.93a and +additional old Beta documentations, in obsolete/doc/pst-doc.err + +A large chapter of "The LaTeX Graphics Companion", by Goossens, Rahtz and +Mittelbach, Addison Wesley 1997, is dedicated to PSTricks, and this +currently forms the only systematic description of the integration of +the basic PSTricks and the beta additions of 1993. The source of all examples +from that book is also on CTAN/info/lgc and most of them in the doc/lgc +subdirectory of the PST97 distribution. + +There is also a supporting set of Web pages, actually maintained +by Denis Girou, on http://www.tug.org/applications/PSTricks with various +pointers and examples classified by categories. + +And there is also a mailing list devoted to discussions on PSTricks usage. +The informations to subscribe to this list and to consult the archives can +be found on the Web page. + +-- +Denis Girou and Sebastian Rahtz (updated May 5, 1999) diff --git a/Master/texmf-dist/doc/latex/seminar/sem-read.me b/Master/texmf-dist/doc/latex/seminar/sem-read.me new file mode 100644 index 00000000000..ba972a2bf62 --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/sem-read.me @@ -0,0 +1,294 @@ +------------------------------------------------------- +IMPORTANT NOTE + +With the agreement of Timothy Van Zandt (now Timothy.VAN-ZANDT@insead.edu), +the distributions conditions on seminar are now relaxed to: + + This package may be distributed under the terms of the LaTeX Project Public + License, as described in lppl.txt in the base LaTeX distribution. + Either version 1.0 or, at your option, any later version. + +This overrides any conditions listed below. + +June 3rd 1999 (last updated September 2005) +Sebastian Rahtz <sebastian.rahtz@oucs.ox.ac.uk> +Denis Girou <denis.girou@idris.fr> + +(Tim's helpers on earth) +------------------------------------------------------- + +%% BEGIN sem-read.me +*********************************************************************** +**** "readme" file for seminar.sty package, v1.0, 93/04/01 **** +*********************************************************************** + +COPYRIGHT 1993, by Timothy Van Zandt + +DESCRIPTION: + + seminar.sty is a LaTeX document style for typesetting slides or + transparencies, and accompanying notes. It has many advantages over + SliTeX. Here are some of the style's special features: + * It is a LaTeX style, rather than another format. + * It is compatible with AmS-LaTeX. + * You can use any fonts that work with LaTeX, including PostScript + fonts and AmSFonts. + * Slides can be landscape and portrait within the same file. + * Color is supported through PostScript. + * The slides can have a frame and a colored background. + * The magnification can be changed with a single command. + * 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. + Some of these features require a PostScript output device. + +FILES: + + Inputs: + seminar.sty : The main style file. + sem-page.sty : Page parameters. + semlayer.sty : The semlayer style option (overlays and color layers). + semhelv.sty : The semhelv style option . + semlcmss.sty : The semlcmss style option. + semcolor.sty : The semcolor style option. + semrot.sty : THe semrot style option. + slidesec.sty : The slidesec style option. + sem-a4.sty : The sem-a4 style option. + xcomment.sty : The macros for omitting notes. + 2up.tex : Macros for printing documents two-up. + 2up.sty : The same as 2up.tex, but with .sty extension. + npsfont.sty : Macros for defining new PostScript fonts with the NFSS. + fancybox.sty : Box tips and tricks for LaTeX. + + Documentation: + sem-user.tex : User's guide for seminar.sty. + sem-user.ind : Index for sem-user.tex. + semsamp1.tex : A sample document for seminar.sty. + semsamp2.tex : Another sample document for seminar.sty. + 2up.doc : Documentation for 2up.tex. + fancybox.doc : Documentation for fancybox.sty. + tvz-hax.sty : For typesetting sem-user.tex and sem-code.tex. + tvz-code.sty : For typesetting sem-code.tex. + tvz-user.sty : For typesetting sem-user.tex. + sem-read.me : This file. + read-me.pst : The read-me file for the PSTricks package. + + Sources: + seminar.doc : Documented code for seminar.sty. + semlayer.doc : Documented code for semlayer.sty. + xcomment.doc : Documented code for xcomment.sty. + sem-make.tex : For extracting code from seminar.doc and semlayer.doc. + sem-code.tex : For typesetting seminar.doc and semlayer.doc. + xc-make.tex : For extracting code from xcomment.doc. + xcomment.tex : For typesetting xcomment.doc. + +GETTING STARTED: + + 1. Put the input files in a directory where your TeX looks for inputs. + + 2. Typeset and print sem-user.tex. + + 3. Read the preface "Getting Started", and then the appendices. + + 4. Typeset semsamp1.tex and semsamp2.tex. + + 5 If upgrading from v0.92, see the changes listed at the end of this + file. If upgrading from v0.91 or earlier, good luck. + +HACKERS: + + The files seminar.doc, semlayer.doc and xcomment.doc contain the + documented code, using Frank Mittelbach's doc system. + See sem-code.tex and xcomment.tex for instructions on typesetting + these files. + See sem-make.tex and xc-make.tex for instruction on extracting + stripped input (.sty) files from these .doc files. + +MORE ABOUT THE SUPPLEMENTAL STYLES AND MACROS: + + The following styles and macros are not specifically for use + with seminar.sty, and hence are not described in detail in + the seminar.sty User's Guide. You do not need to read the + documentation of these files in order to use seminar.sty. + If you have versions on your system that are older than the + ones distributed with seminar.sty, be sure to replace these. + + FANCYBOX.STY: + fancybox.sty is a LaTeX style option with tips and tricks for LR-box + commands. The documentation, fancybox.doc, is extensive. + + 2UP.TEX: + 2up.tex/2up.sty contains macros for typesetting documents in a + two-up format. seminar.sty's \twoup command provides an interface. + 2up.doc is the documentation for 2up.tex. + + NPSFONT.STY: + npsfont.sty contains macros for defining new PostScript fonts + with the New Font Selection Scheme. The documentation is in + npsfont.sty itself. + + XCOMMENT.STY: + xcomment.sty, a LaTeX style option, permits one to typeset only + selected environments, omitting input outside these environments. + See xcomment.tex if you want to typeset the documentation. + + SLIDESEC.STY + slidesec.sty is an experimental file contains sectioning commands + for slide type documents. The documentation is in slidesec.sty + itself. + + +SEMINAR.STY AND PSTRICKS.TEX: + + pstricks.tex is a collection of PostScript macros that is compatible + with most TeX macro packages, including Plain TeX and LaTeX. Included are + macros for color, graphics, rotation, overlays, nodes and much more. + + seminar.sty, combined with the semcolor option, the PSTricks package, + and your favorite macros for including EPS files, make a complete + TeX presentation software package. + + You can probably obtain the PSTricks package from wherever you got + the Seminar package, or try + Princeton.EDU:/pub or Princeton.EDU:/pub/tvz + + You must install the PSTricks package before using the semcolor option. + + seminar.sty will work with pstricks.tex v0.92, and maybe later + versions. + + +ACKNOWLEDGEMENTS: + + The author is thankful to Frank Mittelbach for his documentation system. + + Thanks to Sebastian Rahtz for bits of advice, and many users for + comments and bug reports. + +BUGS: + + Too many to list, and who knows what they are anyway. These files are all + preliminary and unstable. Not responsible for neck injuries. + + + Thanks. + +CHANGES: + + v1.0: Included sem-a4.sty file, as a way to let the default papersize + be A4 (The a4 option still works). Added \epsfslidesize to make + it easier to set the slide of eps files with epsf.sty. Fixed bug + which caused the width of second pages of a multi-page slide to + end up too small if the page only contained a quote or similar + environment with reduced margins. + + v0.93a: Fixed bugs so that slides would come out properly with the + 2-up,article and portrait options (together), and so that + slides would be positioned correctly with the portrait style + option. + + v0.93: + + INCOMPATIBLE CHANGES: + + ! Use the a4 option instead of sem-a4. There is not longer a + separate file for a4. + + ! No more \fewnotes, \nonotes. Use \slideplacement instead. + + ! No more \layerstyle, \overlaystyle. + + ! Slide styles are now "left" and "bottom". + + ! No more \ifslides. Use \ifarticle\else. + + ! You must now use the semlayer option to use overlays (in addition + to the semcolor option). + + ! No "down" slide rotation (only "none", "left" and "right". + + ! portrait option is no longer a separate file. + + ! \paperwidth and \paperheight are now ordinary commands, to be set + with \renewcommand. + + ! \slidefonts is now always invoked in slide environments, and never in + the preamble. (But semhelv.sty and semlcmss.sty have changed to + reflect this.) + + ! Method for customizing the slide frames has changed. + \slideframecolor, \slideframearc, \slidefillcolor and + \slideshadowcolor are obsolete. + + ! \landscape command replaced by \printlandscape to avoid conflict with + other style files. (E.g., \def\printlandscape{\special{landscape}}). + + NEW FEATURES: + + + A slide environment can have multiple `pages'. \extraslideheight{len} + controls page cutting. See user's guide for details. + + + \centerslidestrue (default) causes the contents of partially full + slides to be vertically centered in the slide. \centerslidesfalse + causes it to be flush top. + + + New \raggedslides[len] command, for setting + whether right margin in slides is ragged or justified. Default is + \raggedslides. \raggedslides[0pt] gives justified slides. + + + \slideplacement + + + \onlynotestoo + + + \slideskip and \slideshrink for added control over interline space. + + + + New: \slideleftmargini, \slideleftmarginii, \slideleftmarginiii, + \slidelabelsep, \slideitemsep, \slidepartopsep, + \slideparskip, \slideparindent, \slidefootins, \slidefootnotesep, + \slidedisplayskips, \theslidefootnote + + + \input and \endinput now supported for the slidesonly selection. + + + New conditional: \ifportrait + + + \newslideframe + + + \leftsliderotation, \rightsliderotation. + + + New \slidetopmargin, \slidebottommargin, \slideleftmargin, + \sliderightmargin. + + + New notesonly* selection. + + + New \slidesclearpagetrue + + + New \semcm and \semin. + + + New note environment and \noxcomment command, as an alternative + to treating everything outside slide environments as notes. + + + BACKWARDS-COMPATIBLE CHANGES: + + * \maketitle now uses LaTeX's default from article.sty in notes. + + * Bug in article option with the \twoup command fixed. + + * \topmargin in sem-a4 changed from -.75in to 1in. + + * \slidefontsizes is obsolete (but still works). Use \ptsize instead. + + * Page parameters are now in a separate file sem-page.sty. sem-a4.sty + has been changed to reflect this. + + v0.92: + Mostly bug fixes, plus some extra options. The PSTricks package + is no longer distributed with seminar.sty. + + Pre v0.91: + Entirely rewritten. Too many changes to list. Note especially + that system of formats and selections has changed. + +%% END sem-read.me diff --git a/Master/texmf-dist/doc/latex/seminar/sem-user.pdf b/Master/texmf-dist/doc/latex/seminar/sem-user.pdf Binary files differnew file mode 100644 index 00000000000..2227746eae3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/sem-user.pdf diff --git a/Master/texmf-dist/doc/latex/seminar/sem-user.tex b/Master/texmf-dist/doc/latex/seminar/sem-user.tex new file mode 100644 index 00000000000..7b0fb3c480e --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/sem-user.tex @@ -0,0 +1,1935 @@ +%% BEGIN sem-user.tex +\def\FileDate{93/04/01} +\def\FileVersion{1.0} +%% +%% COPYRIGHT 1993, by Timothy Van Zandt, Timothy.VAN-ZANDT@insead.edu +%% +%% Copying of part or all of any file in the seminar.sty package +%% is allowed under the following conditions only: +%% (1) You may freely distribute unchanged copies of the files. Please +%% include the documentation when you do so. +%% (2) You may modify a renamed copy of any file, but only for personal +%% use or use within an organization. +%% (3) You may copy fragments from the files, for personal use or for use +%% in a macro package for distribution, as long as credit is given +%% where credit is due. +%% +%% You are NOT ALLOWED to take money for the distribution or use of +%% these files or modified versions or fragments thereof, except for +%% a nominal charge for copying etc. +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% 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} +<len> 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} +<n> 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 "<n>pt" +option. Actually, <n> can be 8, 9, 10, 11, 12, 14 or 17, whether you have +"art<n>.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} +<style> is the name of the frame, "[<commands>]", which is optional, will be +inserted before the frame command and before the <commands> given by +"\slideframe"'s optional argument. These commands can be used to set some +default parameter values. Then the final argument should frame "#1". + +For example, if "\myframe{foo}" frames "foo", and if "\myframe" uses the +length "\baldness" as a parameter, then you might write +\begin{LVerbatim} + \newslideframe{wildframe}[\setlength{\baldness}{.2cm}]% + {\myframe{#1}} +\end{LVerbatim} +You can still override the default value of "\baldness", as in +\begin{LVerbatim} + \slideframe[\setlength{\baldness}{.1cm}]{wildframe} +\end{LVerbatim} + +There is a starred version of \n\slideframe\ that adds the frame to previously +specified frames.\footnote{If using color or PostScript images, note that each +frame gets added to the background.} This can be used for special tricks. For +example, if you are using the \o{fancybox} and \o{semcolor} options, then +\begin{LVerbatim} + \newslideframe{draft}% + {\boxput{\rput{30}{\Huge\gray DRAFT}}{#1}} + \slideframe{draft} + \slideframe*{scdouble} +\end{LVerbatim} +puts the word ``DRAFT'' in the background of each slide, gray and rotated 30 +degrees, and then adds a double frame.\footnote{Use "\boxput*" to put "DRAFT" +in the foreground. See "fancybox.doc" for details.} + + +\part{Advanced Features} + +\section{Counters} + +The counter for slides is \C{slide}. The default definition of \N\theslide\ is +"\arabic{slide}". You can use "\label" and "\ref" to cross-reference slides, +and the page number in slide environments is set to +\n\theslide.\footnote{However, these page or slide cross-references are not +always accurate when you let \TeX\ break pages for you within a slide.} Thus, +you can write, for example, +\begin{LVerbatim} + See equation (\ref{foo}) on Slide \pageref{foo}. +\end{LVerbatim} + +You may want some counters, such as equation counters, to be reset with each +new slide environment or \n\newslide\ command. By default, only the "footnote" +counter is reset this way, but you can specify your own (comma-separated) list +of counters to be reset with the command +\begin{MD} + \slidereset{list} +\end{MD} +If you want to reset additional counters, rather than replace the list +entirely, use +\begin{MD} + \addtoslidereset{list} +\end{MD} + +There is another way in which the footnote counter gets special treatment. The +command +\begin{MD} + \theslidefootnote +\end{MD} +is used for the counter text instead of "\thefootnote". The default definition +is +\begin{LVerbatim} + \alph{footnote} +\end{LVerbatim} + +\section{Selectively including or excluding slides} + +The commands +\begin{MD} + \onlyslides{list}\\ + \notslides{list} +\end{MD} +can be used to include or exclude only those slides in the given list. The +argument should expand to a comma-separated list of numbers or ranges. The +numbers do not need to be in order, the list can contain numbers that do not +correspond to any slide, and there can be duplicate numbers. Negative numbers +should be enclosed in curly braces. Since the argument is first expanded, you +can use the "\ref" command in the argument. For example, +\begin{LVerbatim} + \onlyslides{{-2},\ref{dp}-10,\ref{chart},0,17-999} +\end{LVerbatim} +is legal. If "\label{dp}" appears in slide 5 and "\label{chart}" appears in +slide 12, this is equivalent to: +\begin{LVerbatim} + \onlyslides{{-2},5-10,12,0,17-999} +\end{LVerbatim} + +\section{Printing your slides two-up\label{S-twoup}} + +Printing your slides two-up is useful both for previewing slides and for +making hard copies to distribute or for proofreading. + +One way to print your slides two-up is to include the \O{article} style +option. This is described further below. + +Another way is to include the command +\begin{MD} + \twoup[n] +\end{MD} +in the preamble. This inputs "2up.tex", which contains generic macros for +two-up printing, and sets the parameters to values that are likely to work. +Including the optional argument "[<n>]" increases the two-up magnification by +$n$ magsteps. $n$ can be a positive or negative integer. If you are not able +to get the right layout, then include the \O{2up} style option, read the +documentation of "2up.tex", and set the parameters yourself, rather than using +the \n\twoup\ command. + +The \o{article} style option is also called the article {\em format} (as +opposed to the slides format). In the article format without the \o{portrait} +option, the slides are centered horizontally and vertically, two to a page (if +they fit---landscape slides do fit by default). With the portrait option, the +slides are printed side-by-side, two to a page. In the \o{article} format, you +can mix landscape and portrait slides with different orientations, but this +does not work well with the \o{portrait} option. + +You can change the article format's magnification with +\begin{MD} + \articlemag{n} +\end{MD} +This command works like the "\slidesmag" command (page \pageref{+slidesmag}). +The default is +\begin{LVerbatim} + \articlemag{0} +\end{LVerbatim} +Increase the article magnification if the slides look too lonely; decrease it +if they are not coming out two-up. + +The size of the slides depends on the {\em difference} between the +magnifications in the slides and article format. E.g., since the default +slides magnification is 4 magsteps, the slides are scaled down in the article +format by 4 magsteps. When you change the slides magnification with +\n\slidesmag, you also have to change the article magnification with +\n\articlemag\ by the same amount if you want the size of the slides in the +article format to remain the same. However, when the article magnification in +magsteps is negative , you will be using non-standard font magnifications +(which will produce terrible results if you cannot generate the needed +fonts---see Appendix \ref{bitmaps} for advice). + +Whether or not landscape slides (or rotated portrait slides) come out two-up +in the article format without the \o{portrait} option depends on (i) the +difference between the slides and article magnification, (ii) the values of +\n\slidewidth\ and \n\slideheight\, (iii) the size of the slide frame, and +(iv) the article format's page parameters. With the default values of +(ii)--(iv), the slides will still come out two-up if you change the difference +between the slides and article magnification to 3 (e.g., increase the value of +\n\articlemag\ by 1). Try this if you want the slides to be larger. + +If you use the \o{article} option {\em and} the \n\twoup\ command, then your +slides should be printed four-up! + +You will notice labels on the side or bottom of each slide in the \o{article} +format. The command +\begin{MD} + \slidestyle{style} +\end{MD} +determines where these labels go. There are three predefined slide styles: +\begin{description} +\item[\tt empty] No captions or labels are used. +\item[\tt left] The labels go on the left of each slide (the default when the +\o{portrait} option is not used). +\item[\tt bottom] The labels go on the bottom (the default with the +\o{portrait} option). +\end{description} +The label you get is the value of \N\slidelabel. The default definition of +\n\slidelabel\ is +\begin{LVerbatim} + \bf Slide \theslide +\end{LVerbatim} + +\section{Notes\label{S-notes}} + +In addition to slides, you can include a few comments following each slide to +remind you of what to say, or even the entire text of your presentation for +your own benefit or to be distributed to others. These comments or text, +referred to in this documentation as ``notes'', do not go inside any special +environment. However, a slide cannot go in the middle of a paragraph of notes. + +To include notes this way, you have to use one of the following style options, +which determine what is printed: +\begin{quote} + \begin{tabular}{ll} + \O{slidesonly} & Only the slides are printed.\\ + \O{notes} & Both notes and slides are printed.\\ + \O{notesonly} & Only the notes are printed.\\ + \end{tabular} +\end{quote} +These style options are referred to as {\em selections} in this documentation. + +The pages of notes following slide 5 are numbered 5.1, 5.2, etc. + +You can use the "portrait" option to print out your notes, even if you don't +use this option when printing the slides. + +With the "notesonly" selection, the slides are not printed, but they are +processed. This means that one can still refer in the notes to slides or to +equations in slides. + +The fact that various spacing parameters are initialized at the beginning of +each slide (see Section \ref{S-spacing}) means that when you reset these +parameters outside a slide environment, only the notes are affected. This lets +you use different values for notes and slides. The command \N\slidefonts\ can +be used for any special font commands that should apply only to slides. Also, +the command \N\everyslide\ is executed at the beginning of every slide, and +you can use this for any other customizations you want to include. + +You can also use the "11pt" or "12pt" style option for your notes, without +changing the size of the fonts in the slides, by using the "\ptsize" command +to set the font sizes for slides. For example, suppose that the "12pt" +document style option is used, but the preamble contains the command +\begin{LVerbatim} + \ptsize{11} +\end{LVerbatim} +and the second slide begins with the command +\begin{LVerbatim} + \ptsize{9} +\end{LVerbatim} +Then the notes use the "12pt" font size declarations, all the slides but the +second one use the "11pt" font size declarations, and the second slide uses +the "9pt" font size declarations. + +Notes are typeset using \LaTeX's standard output routines, and \LaTeX's +standard page parameters. + + Finally, it is even possible to use a different page style for notes and +slides. The page style for notes is set by the "\pagestyle" and +"\thispagestyle" commands. The command +\begin{MD} + \slidepagestyle{style} +\end{MD} +sets a different page style for the slides. If the argument is empty, then the +page style for slides reverts to the one for notes.\footnote{There is no +"\thisslidepagestyle" command.} + +With the command +\begin{MD} + \onlynotestoo +\end{MD} +the "\onlyslides" and "\notslides" commands apply to the notes as well. + + +\section{How notes are omitted\label{omit}} + +In the previous section, it was stated that notes are not enclosed in a +special environment. "seminar.sty" omits notes using special +macros\footnote{Defined in {\tt xcomment.sty}} that comment out everything +{\em outside} the slide environments (and a few other environments mentioned +below). Global declarations that should be processed even when slides are +omitted go in \e{allversions*} environments, described below. + +"seminar.sty" also let you use a more conventional approach to notes. If you +put the command +\begin{MD} + \noxcomment +\end{MD} +in the preamble, then the notes go inside \E{note} environments, and you can +put all the global declarations outside any environment. "xcomment.sty" is +used to make \e{note} a comment environment when note should be omitted, and +otherwise the \e{note} environment does nothing. This mode of operation is +more robust than omitting everything outside the slide environments, but +remembering to insert the +\begin{LVerbatim} + \begin{note} ... \end{note} +\end{LVerbatim} +is more tedious. + +Here are a few technicalities that have to do with "xcomment.sty" and that +apply whether or not you use \n\noxcomment. +\begin{enumerate} +\item The text that follows the beginning of a slide environment (when not +using \n\noxcomment) or the end of a \e{note} environment {\em must have +balanced curly braces}. +\item "\input" and "\include" commands are followed, even when found in +omitted notes, but you must use the \LaTeX\ syntax "\input{<file>}" (as +opposed to \verb*+\input <file> +), and the inputted file must end with +"\endinput" (this is a good practice anyway). +\item In omitted text, "%" is still a comment character (hence it is possible +to comment out a slide or note environment). +\item A temporary file, "\jobname.tmp", is created (this is of no +consequence---just in case you wanted to know where it comes from). +\end{enumerate} + +The rest of this section deals with special considerations when omitting +everything outside the slide environments. + +If you might want to make a global change to one of the slide parameters after +the document preamble, you cannot include it in a slide environment because +the change will be local, and you cannot include it in the notes because the +change won't be processed when the notes are omitted. + +To get around this problem, an environment \E{allversions*} is provided. It is +processed even when notes are omitted, and any parameter changes or command +definitions made within the environment are global. Don't generate any output +within this environment. + +On a rare occasion you might want to include some text that should be typeset +even when the other notes are omitted (e.g., a list of the slides, or a cover +page). The \E{allversions} environment is provided for this purpose. + +If you do any serious hacking, you might want to add to the list of +environments that should be included with the "slidesonly" selection. Do this +with the command +\begin{MD} + \addtoslidelist{list} +\end{MD} +where <list> is a comma separated list of environments, without spaces. + +\section{The article format\label{S-article}} + +The \o{article} style option was described in Section \ref{S-twoup} as a way +to print your slides two-up. This option is also a good way to print your +notes. + +The \o{article} option gets its name because your document is typeset somewhat +like it would be with \LaTeX's "article" style. (It uses \LaTeX's standard +page parameters, but some of the default values are different.) It is also +called the article {\em format}; the slides format is what you get without the +\o{article} option. + +You probably don't want to use the \o{portrait} style option with the +\o{article} format except when you are only printing portrait slides. But you +are welcome to experiment. + +With the \o{notesonly} selection, you can make the notes as big as you want +using the \n\articlemag\ command (e.g., for easy reading while giving a +presentation). Just as in the \o{slides} format, the page parameters are +scaled at the beginning of the document so that they can be set with their +true dimensions in the preamble. + +The commands +\begin{MD} + \setartlength{cmd}{len}\\ + \addtoartlength{cmd}{len} +\end{MD} +are analogous to "\setslidelength" and "\addtoslidelength", but they scale the +lengths so that they end up at the specified size after magnification in the +"article" format. You never would use such a command in slide environments or +to set slide parameters, but you might use these in the notes if you were +planning on typesetting your notes with the "article" format rather than the +"slides" format. + +You can change the placement of slides in the \o{article} format using the +\begin{MD} + \slideplacement{name} +\end{MD} +command. Here are the valid placement names: +\begin{description} + \item[float] The slides are floated. This is the default with the \o{notes} +selection and the \o{portrait} option. + \item[float*] Like "float", but if the notes are printed in a two-column +format the slides extend across both columns (e.g., like "table" versus +"table*"). This is the default with the \o{notes} selection without the +\o{portrait} option. + \item[onepercol] Each slide is centered horizontally and vertically within a +single column. This is the default when only slides are printed and the +\o{portrait} option is used. + \item[twopercol] Each slide is centered horizontally, two or one per column, +depending on how many fit. This is the default when only slides are printed +and the \o{portrait} option is not used. + \item[here] Each slide is centered horizontally, separated from adjoining +text or other slides by the rubber length \N\slidesep. The default value of +\n\slidesep\ is "\intextskip". This is useful with the \o{notes} selection +when you want the slides to precede accompanying comments and when you do not +mind large spaces at the bottom of pages. + \item[here*] This is like "here*", but with "here*" the length \n\slidesep\ +is not lost when it falls at the beginning of a page or after a slide. +\end{description} + +If you want each slide environment to begin a new page (with any of the +selections), put the command +\begin{MD} + \slideclearpagetrue +\end{MD} +in the preamble. + +The \o{notesonly} selection has a starred version, \O{notesonly*}, which +produces a slide marker for each slide environment, like this one: +\begin{center} +\leavevmode +\vbox{% +\hrule height 1pt +\kern 8pt +\hbox to \linewidth{\hss \LARGE\bf Slide 4 \hss}% +\kern 8pt +\hrule height 1pt} +\end{center} + + +Commands that are irrelevant in the "article" format are simply ignored. The +idea is that it should be possible to switch back and forth between the two +formats without making any other changes in the document. However, this is not +entirely possible. Changing "\parindent" or "\textwidth" in the preamble +affects both formats. You can get around this using the \n\ifarticle\ +conditional. For example, +\begin{LVerbatim} + \ifarticle + blah blah + \else + blee blee + \fi +\end{LVerbatim} +The "\else" part is optional. + + +\section{Page styles} + +The page styles "empty", "plain", "headings" and "myheadings" work like in +\LaTeX's article style. There is also a page style "align" which puts "+" +signs in the corners, like in \SliTeX.\footnote{See question \ref{Pagestyle} +in Section \ref{tips} for suggestions on defining new page styles.} You can +change the size of the fonts used in headers and footers in the slides format +by setting the commands +\begin{MD} + \slideheadfont\\ + \slidefootfont +\end{MD} +to the desired size, using "\renewcommand" (but any explicit font declarations +in a page style override these commands). The default definition of these +commands is "\scriptsize". + + +\section{Other style options\label{options}} + +The style options described so far, "portrait", "article", "slidesonly", +"notes", and "notesonly", were designed specifically for "seminar.sty". There +are other such style options described elsewhere in this documentation: +"semrot" (page \pageref{o+semrot}), \o{semlayer} (page \pageref{o+semlayer}). +\o{semcolor} (page \pageref{o+semcolor}), "semhelv" (page +\pageref{o+semhelv}), "semlcmss" (page \pageref{o+semlcmss}), and "a4" (page +\pageref{o+a4}). + +Here are two more style options that are part of the "seminar.sty" package, +but that can be used with other document styles: +\begin{description} +\item[fancybox] "fancybox.sty" is specific to slides, but it contains commands +and documentation that are useful for making slides. + +\item[slidesec] This sets up some sectioning/heading commands for slides, and +lets you print a list of slides or a table of contents. See the file +"slidesec.sty" for details. +\end{description} + +It is impossible to predict, much less describe, the consequences of using all +the other available \LaTeX{} style option with each selection and format. +Since this document style is an extension of \LaTeX's "article" style, style +options and commands that do not work with \SliTeX{} may well work here. Just +about any style option that works with \LaTeX's "article" style will work with +the "article" format. When unsure of the effect of an option, just try it and +see for yourself what happens. + +\section{Overlays\label{S-overlays}} + +For overlays, you must use both the \O{semlayer} and \o{semcolor} style +options (see page \pageref{o+semcolor}). + +Overlays have two purposes. First, you can use overlays to gradually add +layers of information on a slide during a presentation. Second, you can use +overlays to make color layers; each layer is printed in black-on-white on +paper, and then you use some kind of color copying service to put each layer +on a transparency in a different color. This is not nearly as nice as having a +color printer or using a color printing service, but it's the next best thing. + +"seminar.sty" lets you make both types of overlays (and the main slide) from a +single slide environment. The command\footnote{You can also write +\begin{Ex} + "\begin{overlay}{<n>}" $\ldots$ "\end{overlay}" +\end{Ex}} +\begin{MD} + \overlay{n} +\end{MD} +puts whatever is in its scope (\TeX\ group) on overlay $n$, where +$n=0,\ldots,9$. Actually, overlay 0 refers to the main slide, but you might +use "\overlay{0}" because overlay commands can be nested. As implemented by +the "semcolor" style option, these overlay commands can be used just about +anywhere, including in math mode, tables, and around an included graphics file +(if it is a conforming EPS file, at least). Also, it is all right to use +non-consecutive overlay numbers. + +For color layers, you have to start by defining some colors using the command +\begin{MD} + \colorlayers{colors} +\end{MD} +<colors> should be a comma separated list of color names, without spaces, as +in +\begin{LVerbatim} + \colorlayers{red,green,blue} +\end{LVerbatim} +Then you can use the command "\red" just like the command \n\overlay"{<n>}"; +everything in its scope goes on a red color layer. + +The "\colorlayers" command obeys the usual rules on scope. You can use this +command any time, including in a slide environment. The command is cumulative, +meaning that previously defined color layers continue to exist. The command +was purposely defined so that it does not complain when a color name is +already defined; this makes it easier to switch from some other color system +to a layer system. However, you should be careful not to inadvertently +redefine some command that you need. Fortunately, there are no \TeX{} +primitives whose names are the names of colors. + +When you print out the slides, the main slide is printed, followed by each of +the color layers (if any) for the main slide. Then each of the overlays is +printed, together with each of its color layers. Only overlays or color layers +that are actually used (i.e., that are not empty) are printed. + +You can turn overlays and color layers on and off with the commands +\begin{MD} + \overlaystrue\\ + \overlaysfalse\\ + \layerstrue\\ + \layersfalse +\end{MD} +These commands can be used at any time, and they obey the usual scoping rules. +The default is for overlays to be active in the "slides" format and suppressed +in the "article" format. + +The counter \C{overlay} keeps track of the overlays. The default definition of +\N\theoverlay\ is: +\begin{LVerbatim} + \theslide-\alph{overlay} +\end{LVerbatim} +Overlays can be cross-referenced. + +The command \N\currlayer\ is set to the name of the current color layer. +\N\thelayer\ makes a label for layers; its default definition is: +\begin{LVerbatim} + \theoverlay-\currlayer +\end{LVerbatim} +Color layers cannot be cross-referenced. + +For example, if slide 7 has overlays 1 and 2 and colors "red" and "green", +then the main slide is numbered 7, followed by layers 7-red and 7-green, +followed by overlay 7-a, followed by layers 7-a-red and 7-a-green, followed by +overlay 7-b, followed by layers 7-b-red and 7-b-green. + +The caption used in the slide styles is \n\overlaylabel\ for overlays and +\N\layerlabel\ for layers. The defaults are, respectively, +\begin{LVerbatim} + \bf Overlay \theoverlay + \bf Layer \thelayer +\end{LVerbatim} + +By default the overlays and layers use the same page styles in the "slides" +format as their ``owner.'' You can specify special page styles with the +commands: +\begin{MD} + \overlaypagestyle{style}\\ + \layerpagestyle{style} +\end{MD} + +Finally, by default the overlays and layers use the same frame style as their +``owner.'' You can specify special frame styles with the commands: +\begin{MD} + \overlayframe[commands]{style}\\ + \layerframe[commands]{style} +\end{MD} + + +\part{Help\label{Help}} + +Road map: +\begin{itemize} + \item If you just want to figure out how to do something, check Section +\ref{tips}, ``Tips and tricks.'' + \item If you are trying to decipher an error message, check Section +\ref{errors}, ``Errors.'' + \item If you are trying to solve some system-dependent problem that has +arisen, check Section \ref{trouble}, ``Troubleshooting.'' + \item To convert \SliTeX\ files, see Section \ref{slitex}, ``Converting +\SliTeX\ files''. +\end{itemize} + +\section{Tips and tricks\label{tips}} + +\faq{How can I fit more material in the slides?} + +Or alternatively, make the little material you have fill up the slide. + +Let us count the ways: +\begin{enumerate} +\item Change the magnification with \n\slidesmag"{<n>}" (affects all the +slides). +\item Change the height and/or width of one or all the slides. +\item Use "\ptsize{<n>}". +\item Change \n\slidestretch. +\item Use the \n\raggedslides\ command, which changes the propensity to +hyphenate. +\end{enumerate} + +\faq{How do I include an Encapsulated PostScript figure?\label{EPS}} + +The only thing tricky about including EPS files is getting the size right. For +example, suppose the you want to include a postscript file in a slide using +the "epsf.sty" macros, and you want it to be 6 inches wide. Then this will do +the trick: +\begin{LVerbatim} + \setslidelength{\epsfxsize}{6in} + \epsffile{mypic.eps} +\end{LVerbatim} + +If you include the command +\begin{MD} + \espfslidesize +\end{MD} +(e.g., in the preamble), then "epsf.sty" will take care of scaling the size +for you, and so you can just set "\epsfxsize" and "\epsfysize" to their +magnified sizes (using "\setlength" rather than "\setslidelength"). Or you can +not set these parameters at all, and then the eps file appears at its natural +size on the slide. + +Either way, this will have the expected effect: +\begin{LVerbatim} + \setlength{\epsfysize}{.8\textheight} + \epsffile{mypic.eps} +\end{LVerbatim} + +"psfig.tex" does not handle magnification properly. By using magnified +dimensions, without "\setslidelength", as in +\begin{LVerbatim} + \psfig{file=mypic.eps,width=6in} +\end{LVerbatim} +the picture should appear correctly within a slide, but then it will not scale +properly if you try to use the \o{article} option or the \n\twoup\ command. +The solution, if using Rokicki's "dvips", is to use "epsf.sty" (written by the +man himself). + +\faq{How can I print just selected overlays, layers or pages of notes in the +{\tt slides} format?} + +The "\onlyslides" and "\notslides" commands affect only slides. If a slide is +omitted, so are all its overlays and color layers. To be more selective, you +have to use your dvi driver to select the pages to be printed. + +In the "slides" format, the page numbers recognized by dvi drivers correspond +to the numbers of the slides. This means that a slide and all the overlays, +layers and notes that correspond to that slide have the same page number. Some +drivers allow one to select occurrence $n$ of a page number. E.g., with +"dvips", +\begin{LVerbatim} + dvips -p2.1 -l2.4 myslides +\end{LVerbatim} +will print the first through fourth page of overlays or notes that follow +slide 2. + +If your dvi driver does not support such selection, and you would prefer that +the driver recognize physical page numbers, then put the command +\N\truepagenumbers\ in the preamble. + + +\faq{How do I define custom page styles?} +\label{Pagestyle} + +There is nothing special about defining new page styles in "seminar.sty". +However, to make it easier to do this in the preamble, the commands +\begin{MD} + \newpagestyle{style}{header}{footer}\\ + \renewpagestyle{style}{header}{footer} +\end{MD} +are provided.\footnote{% + You can also use the macros in "fancyheadings.sty", which is available from +various archives. However, you have to set the pagestyle {\em after} +"\begin{document}". +Otherwise, the dimensions get screwed up. If using the \o{slidesonly} +selection, then you also need to enclose the "\pagestyle" command in +an \e{allversions*} environment. E.g., +\begin{LVerbatim} + \begin{allversions*} + \pagestyle{fancy} + \end{allversions*} +\end{LVerbatim}} + +<style> is the name of the page style, and <header> is the header, and +<footer> is the footer. These can only be used for simple page styles that are +the same for odd and even pages, and that do not do anything special with +section marks. + +Headers and footers are set in an "\hbox" the width of the page +("\textwidth"). You can use stretchable space such as "\hspace*{\fill}" or +"\hfil" to center some information or put it flush against the margins. See +the definitions of page styles in "latex.tex" and "article.sty" for examples. + +Here is an example: Professor Starr wants lots of information in the headers +and footers for the slides, and so she defines the page style +"mypagestyle":\footnote{{\tt\string\thedate} is set with the {\tt\string\date} +command.} +\begin{LVerbatim} + \newpagestyle{mypagestyle}% + {\sl Big U \hfil \thedate \hfil \thepage}% + {\hfil File \jobname.tex; printed \today\hfil} +\end{LVerbatim} +Prof.\ Starr wants to use the standard "headings" page style for notes and the +"mypagestyle" page style for slides, and she wants overlays to just have the +overlay number. Therefore, she defines another page style for the overlays: +\begin{LVerbatim} + \newpagestyle{myoverlays}{\hfil \thepage}{} +\end{LVerbatim} +and she puts +\begin{LVerbatim} + \pagestyle{headings} + \slidepagestyle{mypagestyle} + \overlaypagestyle{myoverlays} +\end{LVerbatim} +in the preamble. + +\faq{How do I change a parameter only for the {\tt slides} format?} +\label{conditionals} + +The conditionals +\begin{MD} + \ifarticle\ $\ldots$ "\else" $\ldots$ "\fi"\\ + \ifslidesonly\ $\ldots$ "\else" $\ldots$ "\fi"\\ + \ifnotes\ $\ldots$ "\else" $\ldots$ "\fi"\\ + \ifnotesonly\ $\ldots$ "\else" $\ldots$ "\fi"\\ + \ifportrait\ $\ldots$ "\else" $\ldots$ "\fi" +\end{MD} +allow one to select for what versions material is to be processed. "\ifnotes" +is true if and only if the "notes" selection is in effect, and so on. The +"\else" clause is optional. See {\em The \TeX book}, Chapter 20, for more +information about using conditionals. + +For example, the first line below sets the slide rotation to "right" in the +"article" format only. The second line changes the page style for the "notes" +and "notesonly" selections and "article" format: +\begin{LVerbatim} + \ifarticle\sliderotation{right}\fi + \ifarticle\ifslidesonly\else\pagestyle{myheadings}\fi\fi +\end{LVerbatim} + +\faq{Why does extra space get inserted at the top of a slide when I begin the +slide with a color or overlay command (when using the \o{semcolor} option)?} + +Color and overlay commands with the "semcolor" option use "\special"'s. \TeX{} +adds the space "\parskip" between the "\special"'s and the first material in +the slide. + +Here is the workaround: If that material is an ordinary paragraph, put the +command "\leavevmode" just after the color or overlay command. In other cases, +if you are sure this is the problem, put "\vskip-\parskip" just before the +color or overlay command. + +\section{Errors\label{errors}} + +There are several errors that identify themselves as being from "seminar.sty", +but the error messages are so self-explanatory that that there is no need to +describe them here. Instead, this section explains a few especially cryptic +\TeX{} error messages that can arise when using "seminar.sty". These errors +may also arise for reasons that are not particular to the "seminar.sty" +macros. See your favorite \TeX{} and \LaTeX{} manuals for more help in +debugging your documents. + +\error"! File ended while scanning use of \next." + +You are missing an "\end{document}" on the main file or an "\endinput" on a +file that is input. + + +\error"! File ended within \read." + +You may have an unmatched curly brace following "\begin{slide}" on the same +line. See Section \ref{omit}. + + +\error"! Paragraph ended before \begin@slide was complete." + +You have not specified the optional argument for the "slide" or "slide*" +environment correctly (see Section \ref{slidedim}), or the first character in +a slide environment is a "[" (put a pair "{}" of braces before the "["). + +\section{Troubleshooting\label{trouble}} +\setcounter{faq}{0} + +\faq{A few slides do not come out two-up with the \o{article} option.} + +First, read Section \ref{S-twoup} carefully. If the slides still do not come +out twoup, it might be that there is extraneous output between the slides. Try +putting the commands +\begin{LVerbatim} + \slideplacement{here*} + \setlength{\slidesep}{8pt plus 1fill} +\end{LVerbatim} +in the preamble ("8pt" should be one-half the minimum distance between +slides). If this solves the problem, look for the extraneous output, or just +leave those commands in the preamble. + + +\faq{What kind of incompatibilities are there between {\tt seminar.sty} and +other macros?} + +Of course, whenever you load macros that are not part of the standard \LaTeX{} +distribution and that were not designed to work with "seminar.sty", problems +may arise because of name conflicts. What are listed here are changes made to +\LaTeX{} commands that may conflict with other macros that also redefine these +command. The problems listed here are very unlikely to occur, however, unless +you have a habit of seriously hacking the standard \LaTeX{} macro files. + +\begin{enumerate} +\item This style modifies the definitions of the \LaTeX{} primitive +"\document". It generally will not be upset by, nor will it void, +modifications to "\document" made before "seminar.sty" is input. However, +subsequent modifications of "\document" may cause problems. + +\item "xcomment.sty", which is input by "seminar.sty" with the "slidesonly" +selection, modifies the definition of "\end" within included environments. +This is generally compatible with modifications to "\end" made outside +environments, but may conflict with modifications to "\end" made inside +environments. +\end{enumerate} + +\faq{Why are the landscape slides displayed sideways and the portrait slides +displayed upside down on my previewer?} + +This document style makes frequent use of landscape mode. Some DVI-to-PS +converters, such as older versions of Rokicki's "dvips", use their own +PostScript macros to print a landscape document, rather than simply +instructing PostScript to use landscape mode. +If the PostScript output of such a converter is viewed using a PostScript +previewer that does not allow you to choose the orientation of the display, +the output will be positioned correctly on the page, but the page will always +be displayed in portrait mode. When viewing slides without the "portrait" +option, the landscape slides will be sideways, and the portrait slides will be +upside-down! + +There is nothing this style can do to coerce the page to be displayed in +landscape mode. There are various ways to minimize neck strain, however: +\begin{enumerate} +\item The direction in which the portrait slides are rotated can be reversed, +so that they end up right-side-up. Just put +\begin{LVerbatim} + \sliderotation{right} +\end{LVerbatim} +before the beginning of the document (assuming that you are using rotation +macros). +\item You can also get the portrait slides to be displayed right-side-up by +using the "portrait" style option (Section \ref{options}). +\item In the "article" format, the document is typeset in portrait mode +(unless the "portrait" option is used), and so the landscape slides are +right-side-up. You can use this format when composing and proof-reading the +slides. +\end{enumerate} + +\faq{Why is my dvi driver soooo slow?} + +Probably it cannot find the right font bitmaps, and so it is either +automatically generating new ones, or it is scaling the ones it can find. +Either way, as long as you can somehow generate the missing font bitmaps, this +problem is transitory. See Appendix \ref{bitmaps} for details. + +\faq{Why does \TeX{} complain about missing circle fonts?} + +Older versions of the NFSS use the names "circle10" and "circlew10" for the +\LaTeX circle fonts, instead of the otherwise standard names "lcircle10" and +"lcirclew10". You can copy your ".pk" and ".tfm" files to the new names, or +get a new version of the NFSS. + +\section{Converting \SliTeX\ files}\label{slitex} + +"seminar.sty" can do everything \SliTeX\ can do, and much +more\footnote{However, color layers and overlays require PSTricks and a +PostScript printer.} Here is a brief and incomplete description of how to do +with "seminar.sty" what you can do with \SliTeX, and how to convert \SliTeX\ +files. + +\begin{itemize} + \item Use "seminar" as your document style, instead of "slides". + + \item Run \LaTeX\ or \AmS-\LaTeX, instead of \SliTeX. + + \item With "seminar.sty", the preamble and slides can all go in the same +file. + + \item The default in "seminar.sty" is to get landscape slides. If you want +to convert a \SliTeX\ file containing portrait slides, add the "portrait" +style option, and replace your "slide" environments by "slide*" environments. + + \item With "seminar.sty", notes do not need to go in a separate environment. +To convert a \SliTeX\ file containing "note" environments, define a note +environment that does nothing: +\begin{LVerbatim} + \newenvironment{note}{}{} +\end{LVerbatim} + + \item For color layers: + \begin{itemize} + \item Use the "\colorlayers" command instead of the "\colors" command. + \item Delete the argument to the "slide" and "slide*" environments that +lists the color layers. + \item Include the \o{semlayer} style option. + \end{itemize} + + \item "seminar.sty" does not use separate environments for overlays: + \begin{itemize} + \item Remove the "overlay" environments. + \item Replace "\invisible" commands by "\overlay{1}", "\overlay{2}", etc. + \item Include the \o{semlayer} style option. + \end{itemize} + + \item To actually produce the overlays and color layers, you have to have +PSTricks and a PostScript printer, and you must include the \o{semcolor} style +option. + + \item Use \n\onlyslides"{<list>}" and \n\onlynotestoo\ instead of +"\onlynotes". +\end{itemize} + + +\begingroup +\def\addcontentsline#1#2#3{}% +\def\thepart{Appendices:} +\part{Configuration} +\endgroup +\begingroup +\def\thepart{} +\addcontentsline{toc}{part}{Appendices:\hspace{1em}Configuration} +\endgroup +\appendix + +Before reading this appendix, you should follow the installation instructions +in the file "sem-read.me" that is distributed with "seminar.sty". + +\section{The short story about fonts}\label{short-fonts} + +"seminar.sty" is a \LaTeX{} style, and you can use whatever fonts that are +compatible with \LaTeX\ (or \AmS-\LaTeX). However, you are likely to want to +use special fonts with "seminar.sty"; see Appendix \ref{fonts} for help. +Furthermore, you are likely to want to use fonts in sizes that are larger than +the standard sizes; see Appendix \ref{bitmaps} for help. + +But if you don't want to read these appendices, you can just use whatever +\LaTeX\ fonts you know how to use (e.g., the standard Computer Modern fonts). +To be sure you need only standard font magnifications:\footnote{This is not a +consideration if you are using only PostScript or other scalable fonts.} +\begin{itemize}\label{font-res} + \item Don't use the "11pt" or "12pt" style options (or the \n\ptsize{} +command). + \item Don't change the document magnification (or only use 0--4 magsteps). + \item Don't use any font size larger than "\large". + \item Don't use the \n\twoup\ command. +\end{itemize} + +\section{Choosing fonts\label{fonts}} + +So that you can use different fonts for the notes and the slides (if you +want), the command "\slidefonts" is invoked at the beginning of every slide +environment. Define it to set up any special fonts for the slides. + +Here are the font configurations that come ready-to-use with "seminar.sty". +You might also use these as a starting point for your own configurations. +\begin{enumerate} +\item You can just use the regular old Computer Modern fonts that you probably +grew up on. For this, you don't have to do anything at all. Ain't that easy? +But see the next section about font bitmaps. + +\item The \O{semhelv} style option sets up the PostScript Helvetica text fonts +for the slides. The Computer Modern fonts are still used for math and for the +notes with the \o{article} format. You need a PostScript printer, a dvi-to-ps +driver that supports PostScript fonts (e.g., Rokicki's "dvips"), and the New +Font Selection Scheme. You should also check the font file names used in +"semhelv.sty", and change them if necessary to match the names on your system. + +This combination of fonts is highly recommended because sans serif fonts look +good for slides, Helvetica is a resident font in just about all PostScript +printers, and the fonts are scalable and thus there is no problem of needing +new bitmaps. + +\item The \O{semlcmss} style option sets up the \SliTeX\ sans serif fonts for +the slides, and uses the Computer Modern fonts for notes with the \o{article} +format. The \SliTeX\ fonts are ugly, but they might be the only usable sans +serif font you have on your system and you are really dying for that kind of +font. Also, they usually come ready for printing magnified documents, and so +you won't need too many new font bitmaps. You must have the New Font Selection +Scheme. "semlcmss" uses +\begin{LVerbatim} + \slidesmag{4} + \ptsize{10} +\end{LVerbatim} +Deviating from this will increase the need for new font bitmaps. +\end{enumerate} + +The New Font Selection Scheme (NFSS) mentioned above is a macro package for +\LaTeX{} that greatly simplifies using non-standard fonts. The NFSS was +written by Frank Mittelbach and Rainer Sch\"opf, and is available from various +archives, including: +\begin{center} +"ftp.uni-stuttgart.de" +\end{center} +It is far easier to take the 10 minutes or so that are required (in theory, at +least) to install the NFSS, than it is to try to muck around with \LaTeX's +font primitives. + + +\section{Font bitmaps\label{bitmaps}} + +If you are only using PostScript or other scalable fonts, or if you obey the +restrictions listed on page \pageref{font-res}, then you can ignores this +appendix. + +To use "seminar.sty", you may need font bitmap sizes that are not currently +found on your system. This section describes how to avoid this and what to do +about it. First, a few paragraphs about magnification and font bitmaps. + +\TeX's Metafont fonts are designed for a type size, such as 5pt. Most font +families are available at least in the sizes 5pt, 6pt, 7pt, 8pt, 9pt and 10pt. +Some are also available in the sizes 12pt and 17pt (and others), but often any +size above 10pt is obtained by scaling the 10pt fonts. Table \ref{font-mag} +lists the possible magnifications for fonts, depending on which option you are +using ("10pt", "11pt" or "12pt"), and depending on the \LaTeX{} type size +declaration that is in effect (e.g., "\small"). The magnifications are given +in magsteps, which is \TeX's standard unit for font magnifications. $n$ +magsteps means a magnification of $1.2^n$. + +\begin{table} +\hrule height 1pt\relax +\begin{center} +\begin{tabular}{l|c|c|c|} +\multicolumn{1}{l}{size} & +\multicolumn{1}{c}{default (10pt)} & + \multicolumn{1}{c}{11pt option} & + \multicolumn{1}{c}{12pt option}\\ +\cline{2-4} "\tiny" & 0 & 0 & 0\\ +\cline{2-4} "\scriptsize" & 0 & 0 & 0\\ +\cline{2-4} "\footnotesize" & 0 & 0 & 0 \\ +\cline{2-4} "\small" & 0 & 0 & 1/2 \\ +\cline{2-4} "\normalsize" & 0 & 1/2 & 1 \\ +\cline{2-4} "\large" & 1 & 1 & 2 \\ +\cline{2-4} "\Large" & 2 & 2 & 3 \\ +\cline{2-4} "\LARGE" & 3 & 3 & 4\\ +\cline{2-4} "\huge" & 4 & 4 & 5\\ +\cline{2-4} "\Huge" & 5 & 5 & 5\\ +\cline{2-4} +\end{tabular} + +\caption{Font magnification in magsteps ($n$ means a magnification of $1.2^n$) +for a font that is available in 5pt, 6pt, 7pt, 8pt, 9pt and 10pt +sizes.\label{font-mag}} +\end{center} +\hrule height 1pt\relax +\end{table} + +Both the "article" and the "slides" formats may also magnify the document. By +default, the magnification of the "slides" format is 4 magsteps, and the +magnification of the "article" format is 0. To find the total font +magnification, add the magnification listed in the table to the magnification +of the document. E.g., in the "slides" format with the "12pt" option (or the +command "\ptsize{12}" at the beginning of a slide), the "\large" command may +invoke fonts that have a magnification of up to 7 magsteps. + +Most systems have font bitmaps for 0, 1/2, 1, 2, 3, 4 and 5 magsteps. If you +obey the restrictions listed on page \pageref{font-res}, then you will only +need fonts in these standard magnifications. However, if you want to use other +font magnifications, then check with your system administrator to determine +which of the following applies to you (or just plunge ahead and see what +happens): +\begin{enumerate} +\item If you have Metafont and "dvips" or some other driver that automatically +generates font bitmaps as needed, and if this feature is enabled, then you +will simply notice that it takes a long time to print documents at first, +because the driver has to wait for the new font bitmaps to be made. +Eventually, you will have generated all the extra bitmaps you need, and this +delay will go away. +\item If you have Metafont, but your dvi driver does not automatically +generate needed bitmaps, then you just need to keep track of what font bitmaps +you are missing as you use "seminar.sty" and occasionally run Metafont to make +them. You will also notice a delay when a font bitmap is missing, because your +driver will probably scale the closest bitmap it finds, and this can take time +on some systems. +\item If you do not even have Metafont, then you have to try to get by without +the extra bitmaps. Scaled fonts look lousy, but an occasional scaled font in a +heading is not so bad. +\end{enumerate} + +Of course, PostScript and other scalable fonts do not present any problem, and +so it is a good idea to use these as much as possible. The Computer Modern +fonts are available from Blue Sky Research in PostScript Type I format. If you +do not have PostScript versions of the CM fonts, and you instead use other +PostScript fonts for text, then you are likely to still need bitmapped fonts +for mathematics. However, since mathematics is usually set at "\normalsize" or +smaller, this is not a big problem. + +If you are installing "seminar.sty" on a multi-user system, then hopefully you +will make the needed fonts available. + +\section{Color} + +You can use whatever color commands you ordinarily use with \LaTeX. You might +try the \o{semcolor} style option, which lets you use the PSTricks color +commands for printing on a color PostScript printer. The \o{semcolor} option +combined with the \o{semlayer} option (see Section \ref{S-overlays}) lets you +print color layers. + +\section{Landscape printing and slide rotation\label{S-landscape}} + +If your dvi driver supports a "\special" for landscape printing, then you can +define \N\printlandscape\ in the preamble of your document to invoke this +command. E.g., for "dvips" put the line +\begin{LVerbatim} + \renewcommand{\printlandscape}{\special{landscape}} +\end{LVerbatim} +in the preamble. Otherwise, "seminar.sty" will display a message reminding you +to print your document in landscape mode, when appropriate. + +You can print both landscape and portrait slides in one shot if you can rotate +the portrait slides when printing in landscape mode or the landscape slides +when printing in portrait mode. If you are using a PostScript printer, you +probably are using a dvi driver that supports rotation; otherwise, you +probably are not. Here are suggestions for setting up rotation: +\begin{itemize} +\item The \o{semcolor} option provides an interface to the rotation macros in +PSTricks (see Appendix \ref{S-semcolor}); it works with many popular dvi-to-ps +drivers. + +\item If you are using Rokicki's "dvips" and want rotation but do not want to +load the entire PSTricks package, then use the \O{semrot} option instead of +the \o{semcolor} option. + +\item If the \o{semcolor} and \o{semrot} options do not work for you, but you +have your own rotation macros, then you have to define the commands +\begin{MD} + \leftsliderotation\\ + \rightsliderotation +\end{MD} +so that they rotate something left and right, respectively. For example, +\begin{LVerbatim} + \renewcommand{\leftsliderotation}[1]{\rotateleft{#1}} +\end{LVerbatim} +\end{itemize} + +In any case, you can determine the direction of rotation using +\begin{MD} + \sliderotation{direction} +\end{MD} +where valid directions are "none", "left" and "right". The default is "left". + +By default, the headers and footers aren't rotated, but you can switch between +rotating and not rotating the headers with the commands: +\begin{MD} + \rotateheaderstrue\\ + \rotateheadersfalse +\end{MD} + +\section{The semcolor style option\label{S-semcolor}} + +The \O{semcolor} option sets up an interface between "seminar.sty" and the +PSTricks package. PSTricks is a collection of PostScript macros for \TeX. It +works with Rokicki's "dvips", and several other dvi-to-ps drivers. You can +probably get the PSTricks package from wherever you obtained "seminar.sty", or +check the archives listed in the PSTricks read-me file, "read-me.pst", which +is distributed with "seminar.sty". + +What the \o{semcolor} style option gives you, compared to just using the +PSTricks package, is: +\begin{description} +\item[Color] A small patch to make the PSTricks color commands more robust in +slides. +\item[Rotation] The rotations "left" and "right" are defined. "left" is the +default. +\item[Framing] The frame styles "scplain" (using "\psframebox"), "scdouble" +(using "\psdblframebox") and "scshadow" (using "\psshadowbox"). +\item[Overlays] Overlays and layers, when used in conjunction with the +\o{semlayer} option. +\end{description} + +\section{A4 and other paper sizes\label{S-papersizes}} + +Use the \O{a4} option when using A4 paper. Note that this option does not +correspond to an independent file. + +If you want to configure seminar.sty for A4 paper by default (without having +to include style options), then you can do one of the following: +\begin{enumerate} + + \item Add the following line to "seminar.con" (see Appendix +\ref{S-configfile}): +\begin{LVerbatim} + \input{sem-a4.sty} +\end{LVerbatim} + + \item Add the following lines to "seminar.con" (these lines are just the +contents of "sem-a4.sty"): +\begin{LVerbatim} + \def\paperwidth{210mm} + \def\paperheight{297mm} + \input sem-page.sty + \slidewidth 222mm + \slideheight 152mm +\end{LVerbatim} + + \item Create a file such as "mysem.sty", to be used as a document {\em +style} (rather than style {\em option}), with the following lines: +\begin{LVerbatim} + \def\paperwidth{210mm} + \def\paperheight{297mm} + \input seminar.sty + \slidewidth 222mm + \slideheight 152mm +\end{LVerbatim} + +\end{enumerate} + +For other paper sizes, you can create a style option by modifying +"sem-a4.sty". Then any of the options described above is available to you, +(with the appropriate parameter values). However, this will give satisfactory +results only for paper sizes that are close to A4 or 8.5in by 11in. + +Note that for any paper size, even 8.5in by 11in, the page parameters that are +set this way are just suggested defaults, and most people will want to +customize them. Because of the variety of ways in which "seminar.sty" +documents can be printed, this is a little more complex than with most +document styles. Examine "sem-page.sty" to see what page parameters need to be +set, and when. + +\section{Configuration file\label{S-configfile}} + +You can put customizations to "seminar.sty" in a file named "seminar.con". +This file is optional. It is loaded by "seminar.sty" if it exists, {\em +before} loading the style option files. E.g., "seminar.con" might contain the +following lines: +\begin{LVerbatim} + \input semhelv.sty + \input semcolor.sty + \renewcommand{\printlandscape}{\special{landscape}} + \endinput +\end{LVerbatim} + +\clearpage +\PrintUserIndex + +\end{document} +%% END sem-user.tex diff --git a/Master/texmf-dist/doc/latex/seminar/semsamp1.tex b/Master/texmf-dist/doc/latex/seminar/semsamp1.tex new file mode 100644 index 00000000000..365e26d5b85 --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/semsamp1.tex @@ -0,0 +1,98 @@ +%% BEGIN semsamp1.tex +% +% This is a sample document for seminar.sty, v0.93 (and maybe later). +% +% Try this with and without the article option: + +\documentstyle[fancybox,article]{seminar} + +\def\printlandscape{\special{landscape}} % Works with dvips. + +\articlemag{1} + +%\twoup % Try me. + +\newpagestyle{327}% + {Economics 327 \hspace{\fill}\rightmark \hspace{\fill}\thepage}{}% +\pagestyle{327} + +\markright{Choice under uncertainty} + +\slideframe{Oval} + +\newcommand{\heading}[1]{% + \begin{center} + \large\bf + \shadowbox{#1}% + \end{center} + \vspace{1ex minus 1ex}} + +\newcommand{\BF}[1]{{\bf #1:}\hspace{1em}\ignorespaces} + +\begin{document} + + +\begin{slide} +\heading{A heading} + +One thing this example illustrates is how the {\tt article} style option is +good for printing slides two-up, for distribution to a seminar audience or +class, or just for proofreading. + +\BF{Definition} +$p$ (weakly) first-order stochastically dominates $q$ if for every $\bar z\in +Z$, +\[ + p(z\leq \bar z) \leq q(z\leq \bar z) +\] +\end{slide} + + +\begin{slide} +\heading{Problems with stochastic dominance as a DT} + +\begin{center} + \begin{tabular}{|r|l|}\hline + $z$ & $p(z)$\\ \hline + \$999 & .01\\ \hline + \$1,000,000 & .99 \\ \hline + \end{tabular}% + \hspace{1cm}% + \begin{tabular}{|r|l|}\hline + $z$ & $q(z)$\\ \hline + \$1,000 & 1\\ \hline + \end{tabular} +\end{center} +\end{slide} + +\begin{slide} +\heading{Candidate Theory \#3: Expected utility} + +Let $Z$ be an arbitrary set of outcomes. Let $u:Z\rightarrow R$ be a utility +representation of the DM's preferences over the elements of $Z$ as certain +outcomes. (I.e., $u(y)\geq u(z)$ iff $y \geq z$.) + +\end{slide} + + +\begin{slide} +\heading{Expected utility \& the St.\ Petersburg Paradox} + +This can get around even St.\ Petersburg Paradox, because we don't require +that utility be linear in money: + +\begin{center} + \begin{tabular}{r|c|c|c|c|c}\cline{2-6} + Prize & \$2 & \$4 & \$8 & \$16 & $\ldots$\\ \cline{2-6} + $u(z)=\log_2(z)$ & 1 & 2 & 3 & 4 & $\ldots$ \\ \cline{2-6} + Prob. & 1/2 & 1/4 & 1/8 & 1/16 & $\ldots$\\ \cline{2-6} + \end{tabular} +\end{center} + +Expected utility is $\sum_{k=1}^\infty k/2^k = 2$, and so lottery gives same +expected utility as getting \$4 for sure. +\end{slide} + + +\end{document} +%% END semsamp1.tex diff --git a/Master/texmf-dist/doc/latex/seminar/semsamp2.tex b/Master/texmf-dist/doc/latex/seminar/semsamp2.tex new file mode 100644 index 00000000000..2d54fa570db --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/semsamp2.tex @@ -0,0 +1,285 @@ +%% BEGIN semsamp2.tex +% This is a sample document for seminar.sty, v0.93 (and maybe later). +% +% This file contains both landscape and portrait mode slides. +% Choose one of the following to print them out: +% - If using PSTricks, try the semcolor style option. +% - If using Rokicki's dvips, try the semrot style option. +% - To print the landscape slides, put \landscapeonly in the preamble. +% To print the portrait slides, include the portrait style option and +% put \portraitonly in the preamble. +% +% +\documentstyle[% + slidesonly,% Try notes or notesonly instead. + %notes,% Use instead of slidesonly to typeset the notes. + %notesonly,% Use instead of slidesonly to typeset notes and slides. + %semcolor,% Try me if using PSTricks. + %semrot,% Try me if using Rokicki's dvips. + %semhelv,% Try me if using a PostScript printer. + %article,% Try me. + %portrait,% Try me. + %sem-a4,% Try me if using A4 paper. + semlayer% This must be included, but you need the semcolor option to + ]{seminar} % actually see the overlays. + +\slidesmag{5} +\articlemag{1} + +%\twoup % Try me for twoup printing. + +%\portraitonly % To print only portrait slides +%\landscapeonly % To print only landscape slides + +%\notslides{\ref{questions}-7,1} %Try me: The slides are omitted. +%\onlyslides{\ref{questions}-7,1} %Try me: Only these slides are included. +%\onlynotestoo %Try me: For selecting notes as well. + +\colorlayers{red,blue} % Try deleting this if using the semcolor option, + % to get \blue and \red to use PostScript color. + +%\overlaysfalse % Suppress overlays with semcolor option. +%\layersfalse % Suppress color layers with semcolor option. + +\rotateheaderstrue % Try this out if using rotation macros. + + +\title{Example for seminar.sty} +\author{Policarpa Salabarrieta} +\date{July 21, 1991} + +\newcommand{\sref}[1]{SLIDE \ref{#1}} +\newcommand{\heading}[1]{\begin{center}\large\bf #1\end{center}} + +\newpagestyle{MH}% + {University of Guaduas, March 13, 1998\hfil\thepage}{} +\pagestyle{MH} + +\begin{document} + +\maketitle % This won't show up when \onlynotestoo is in effect. + +\begin{slide} + \ifslidesonly % Title slide only for slidesonly selection. + \maketitle + \addtocounter{slide}{-1} + \slidepagestyle{empty} + \fi +\end{slide} + +This is a lot of gobbledy-gook intended only to illustrate some of the +features of seminar.sty. + + The phrase information overload rings a bell with just about anyone. +Certainly you all receive more working papers or more applications for +graduate school than you can readily read. Nevertheless, the term information +overload is ill-defined. (\sref{too_much}, top) + + A message like this when you check your email conjures up the notion of +information overload. More generally, information overload always means too +much information, in some sense or another. But what does ``too much'' mean? +(\sref{too_much}, bottom) It might just mean that people cannot process all +the information they receive. That is certainly true for everyone. A claim +that is much stronger, and that is implicit when people complain about +informaton overload, is that people {\em should} receive less information, by +some criterion. + +\begin{slide}\label{too_much}% +\begin{center} + \large\bf + Information overload = ``Too much'' information +\end{center} +\smallskip + +\begin{verse} \bf\tt + You have 134 unread messages:\\ + Do you want to read them now? +\end{verse} + +\begin{enumerate} + {\overlay2 + \item People {\overlay1 cannot process all} the information they receive.} + \item People {\em should} receive less information. + \end{enumerate} +\end{slide} + + In this paper, I use the term ``information overload'' in both senses. +(\sref{overload}, bottom). Specifically, I say that an {\em individual} is +overloaded with information if she receives more information than she can +process. But I say that there is information overload in a {\em network} if +there is some mechanism that makes the senders and/or receivers better off by +restricting the flow of information. This latter notion of information +overload is an equilibrium property, and it depends on what we mean by +``better off.'' + +\begin{slide*}\label{overload} +\ptsize{12} + +\begin{itemize}{\overlay1 + \item There is information {\overlay0 overload in a network if} there is +some mechanism that, compared to the {\em status quo}, makes the senders +and/or receivers better off by restricting the flow} of information.' + + \item There is information overload in a network if there is some mechanism +that, compared to the {\em status quo}, makes the senders and/or receivers +better off by restricting the flow of information. +\end{itemize} + +\end{slide*} + +(\sref{questions}) + The purpose of my paper is to show why there can be information overload in +a network and what kind of mechanisms can make the receivers and/or senders +better off. Since the cost of communication is one factor that restricts +communication, I am thus also going to look at how the welfare of the senders +and receivers depends on the cost of communication. + + Most messages don't become jumbled and we can choose which ones to process. +But some of us may have a bias towards choosing to process more information +than we should, like the graduate student who feels compelled to read every +article on the usual lengthy reading list, and just ends up getting confused +and ruffling through the papers. + + +\begin{slide}[7.3in,5.5in] \label{questions} +\heading{Questions} + +\begin{itemize} + {\overlay1\item When could {\blue there be overload} in networks?} + \item What mechanims make the receivers and senders better off? + \item How does the welfare {\red of the senders} and receivers depend on the +cost of communication? +\end{itemize} +\end{slide} + + +However, experiments in consumer research and psychology have failed to find +that such a bias is prevalent. This is in spite of the fact that it is common +for stress and cognitive strain to increase with information load. We may +incur such stress and strain because the information we choose to process is +valuable to us. + +More commonly, then, we can and do choose to process roughly as much +information as we can handle efficiently. This is called screening. But when +we choose which messages to begin to process, we're ignorant of their +contents, since otherwise there would be no reason to process them in the +first place. Therefore, if we receive more junk mail, then some of the +important mail gets crowded out, and we are effectively less informed. + +\begin{slide} \label{informed} +\begin{center} + {\bf Being more informed} \par + \smallskip + is always better,\par + \medskip + \overlay1{but it's not the same as \par + \smallskip + {\bf receiving more information}} +\end{center} +\end{slide} + + Why would the senders communicate too many messages in the first place? If I +present too much material in this seminar, you have to choose which parts to +ignore and I would rather make that decision myself, since I know what I most +want to get across. Thus, it is in my interest not to overload you with +information. Generally, whenever there is a single sender of messages, that +sender will prefer to screen rather than have the receiver screen, because the +sender has an interest in which messages the receiver processes. +But when there are more senders, one sender's messages tend to crowd out the +messages of the other senders, as in this example here. If the senders don't +take this external cost into account when sending messages, they may +collectively overload the receiver. (\sref{akbar}) + +There are several reasons that our scarcity of attention, that is, our limited +capacity to process information, can mean that we become less informed when we +receive more information. I have a cartoon here to illustrate these reasons. +(\sref{akbar}) + +\begin{slide}\label{akbar}\def\slidefuzz{15pt} + {\large A tax $\tau$ on communication is said to support +$\tilde{\cal{X}}(c)$ if $\tilde{\cal{X}}(c)$ is an equilibrium for +$\Gamma(c+\tau)$.} +\medskip + + {\bf Proposition 6.} {\em Assume $\tilde{\cal{X}}(c)$ is not an equilibrium +for $\Gamma(c)$.\vspace{-3pt} +\begin{enumerate} + \item If $\mbox{supp}(\gamma)=[0,1]^n$, there is no tax that supports +$\tilde{\cal{X}}(c)$. + \item If $\mbox{supp}(\gamma)=S^{n-1}$, there is a tax that supports +$\tilde{\cal{X}}(c)$ if and only if $m=1$, $p_j>c\, \forall j$, and + \begin{enumerate} + \item $n=2$; or + \item $n=3$ and $p_i^{-1}+p_j^{-1}\geq p_k^{-1}$ for all distinct +$i,j,k$; or + \item $n=4$ and $p_1=p_2=p_3=p_4$. +\end{enumerate} +\end{enumerate}} +\end{slide} + + If, by restricting communication, we eliminate the less relevant messages, +then we can become more informed. But how can we achieve this? Restricting the +flow of information shifts the task of screening messages from the receivers +to the senders. Unlike the receivers, the senders do know the contents of the +messages they originate. If the senders' interests coincide with those of the +receiver and if the senders have sufficient knowledge about the receivers, +then the senders will choose the messages which are most relevant to the +receivers. This may make the receivers, and even the senders, better off. + + The network in Slide \ref{architectures} attains the minimal delay $c(8,24) += 6$ using 8 processors. It is an example of the efficient one-shot networks +described by Foo. We will focus on a class of networks that are similar to the +Foo networks but that may differ slightly. For $q$, $c$ and $n$ such that $1 +\leq q \leq \lfloor n/2 \rfloor$ and $c(q,n) \leq c \leq n$, let $R_{nqc}$ be +the class of essential networks for adding $n$ items using $q$ processors in +$c$ cycles that have the following properties: + +\begin{slide*}\label{architectures} +\heading{Architecture} + +\begin{center} +\setlength{\unitlength}{1.65in} +\begin{picture}(1.1,1.6)(3.5,5.0) +\put(4.0,6.5){\circle*{.04}} +\put(4.1,6.5){1} +\put(4.0,6.0){\circle*{.04}} +\put(4.1,6.0){2} +\put(4.0,6.1){\vector(0,1){.3}} +\put(3.5,6.0){\circle*{.04}} +\put(3.6,6.0){3} +\put(3.6,6.1){\vector(1,1){.3}} +\put(4.0,5.5){\circle*{.04}} +\put(4.1,5.5){4} +\put(4.0,5.6){\vector(0,1){.3}} +\put(4.5,6.0){\circle*{.04}} +\put(4.6,6.0){5} +\put(4.4,6.1){\vector(-1,1){.3}} +\put(4.5,5.5){\circle*{.04}} +\put(4.6,5.5){6} +\put(4.4,5.6){\vector(-1,1){.3}} +\put(3.5,5.5){\circle*{.04}} +\put(3.6,5.5){7} +\put(3.5,5.6){\vector(0,1){.3}} +\put(4.0,5.0){\circle*{.04}} +\put(4.1,5.0){8} +\put(4.0,5.1){\vector(0,1){.3}} +\end{picture} +\end{center} +\end{slide*} + +Why would the senders communicate too many messages in the first place? If I +present too much material in this seminar, you have to choose which parts to +ignore and I would rather make that decision myself, since I know what I most +want to get across. Thus, it is in my interest not to overload you with +information. + +Generally, whenever there is a single sender of messages, that sender will +prefer to screen rather than have the receiver screen, because the sender has +an interest in which messages the receiver processes. But when there are more +senders, one sender's messages tend to crowd out the messages of the other +senders, as in this example here. If the senders don't take this external cost +into account when sending messages, they may collectively overload the +receiver. (\sref{architectures}) + +\end{document} +%% END semsamp2.tex diff --git a/Master/texmf-dist/doc/latex/seminar/tvz-code.sty b/Master/texmf-dist/doc/latex/seminar/tvz-code.sty new file mode 100644 index 00000000000..eff544ef555 --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/tvz-code.sty @@ -0,0 +1,280 @@ +%% BEGIN tvz-code.sty +%% 93/04/01 +%% Tim Van Zandt Timothy.VAN-ZANDT@insead.edu +%% +%% Lousy hacks for typesetting the documented code for the +%% seminar.sty and PSTricks packages. + +\input tvz-hax.sty +\input doc.sty % Tested with v1.7k +\input art11.sty + + +%%%%%%%%%%%%%%%%%%% PAGE PARAMETERS %%%%%%%%%%%%%%%%%%%%%%%%%% + +% Paragraphs are marked by space rather than indentation: +\parindent 0pt +\parskip 4pt plus 1pt minus 1pt + +% Textwidth just wide enough for 78 characters of code. +\setbox\@tempboxa=\hbox{\small\tt f} +\textwidth 78\wd\@tempboxa +\oddsidemargin\paperwidth\relax +\advance\oddsidemargin -\textwidth +\divide\oddsidemargin 2 +\advance\oddsidemargin -1in +\setbox\@tempboxa=\hbox{\tiny 999\ } +\advance\oddsidemargin\wd\@tempboxa +\evensidemargin\oddsidemargin + +\if@twoside + \advance\oddsidemargin .3in + \advance\evensidemargin -.3in +\fi + +% No headers, 1in top margin +\topmargin 0pt +\headheight 0pt +\headsep 0pt + +% Total bottom margin 1in, text height 9in +\textheight 9in +\footskip .625in + +% Now adjust for different paper size: +\@tempdima=\paperheight +\advance\@tempdima-11in +\divide\@tempdima 2 +\advance\topmargin \@tempdima + +% Marginal notes always on left. +\marginparwidth 3.5cm +\marginparsep .5cm +\reversemarginpar + + +%%%%%%%%%%%%%%%%%%% MACROCODE PATCH FOR SHORT META %%%%%%%%%%% + +\expandafter\def\expandafter\macrocode\expandafter{% + \expandafter\DeleteShortMeta + \macrocode} + +%%%%%%%%%%%%%%%%%%%% DOC PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newbox\junkbox +\def\DocInput#1{% + \MakePercentIgnore + \setbox\junkbox=\hbox\bgroup + \input{#1}% + \MakePercentComment} +\let\EndDocPreamble\egroup + +%%%%%%%%%%%%%%%%%%%%%%%%%%% VERBATIM %%%%%%%%%%%%%%%%%%%%%%%%% + +% Use fancybox.sty's LVerbatim environment. Each line should contain +% percent plus three spaces (or other char), including blank lines. E.g., +% \begin{LVerbatim} +% foo +% bar +% \end{LVerbatim} + +\def\EveryVerbatimLine#1#2#3#4{} +\begingroup + \catcode`\%=12 + \catcode`\ =\active + \global\EndVerbatimTokens{% } +\endgroup +\AltGetVerbatim + + +%%%%%%%%%%%%%%%%%% INDEXING %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Things are faster without \MakeIndex + +\def\MakeIndex{\makeindex\EnableCrossrefs} +\DisableCrossrefs + +% Use \codelabel[int]{foo} to label last line of code plus int. +% E.g., to label first and then last line of some code: +% \codelabel[1]{foo} +% \begin{macrocode} +% foo +% bar +% \end{macrocode} +% \codelabel{foo} + +\def\codelabel{\@ifnextchar[{\@codelabel}{\@codelabel[0]}} +\def\@codelabel[#1]#2{% + \@bsphack + \begingroup + \advance\c@CodelineNo #1 + \def\@currentlabel{\the\c@CodelineNo}% + \label{#2}% + \endgroup + \@esphack} + +% Definitions in code are indexed by page number, but other occurences +% are indexed by the line of code. + +\CodelineIndex +\def\SpecialMainPageIndex#1{% + {\let\special@index\index\SpecialMainIndex{#1}}} +\renewcommand{\theCodelineNo}{{\rm\tiny\arabic{CodelineNo}}} + +% Index numbers for main definitions are set in bold rather than underlined. + +\def\main#1{{\bf #1}} + +% two column index + +\setcounter{IndexColumns}{2} + +% Customize index prologue: + +\def\index@prologue{% + \section*{Index}\markboth{Index}{Index}% + \addcontentsline{toc}{section}{Index}% + The {\bf bold} numbers denote the pages where the entries are defined, + and all other numbers indicate the {\em lines of code} where + the entries are used.} + + +%%%%%%%%%%%%%%%%%%%%%%%%%% MACRO %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% A change to the macro environment; prints macro names within the margins +% of the text, instead of as marginal notes. Use one \macro command, +% with comma separated macro names. + +\newif\iffirst@macroname +\newif\ifnestedmacro + +\def\macro{% + \ifnum\macro@level=\z@ + \def\next{\MakePrivateLetters \m@cro@}% + \else + \def\next{\@latexerr{Nested \string\begin{macro}}\@eha + \endgroup\end{macro}\macro@level=\z@\begin{macro}} + \fi + \next} +\def\m@cro@#1{% + \first@macronametrue + \m@@cro@@#1,\@nil,} +\def\m@@cro@@#1,{% + \def\@tempa{#1}\def\@tempb{\@nil}% + \ifx\@tempa\@tempb + \let\next\finishm@@cro@@ + \else + {\advance\c@CodelineNo\@ne\SpecialMainPageIndex{#1}\nobreak}% + \DoNotIndex{#1}% + \iffirst@macroname + \edef\saved@macronames{\string#1}% + \first@macronamefalse + \else + \def\comma{\noexpand\comma}% + \edef\saved@macronames{\saved@macronames\comma\string#1}% + \fi + \let\next\m@@cro@@ + \fi + \next} +\def\finishm@@cro@@{% + \advance\macro@level\@ne + \def\comma{{\rm, }}% + \ListMacroNames{\saved@macronames}} + +\let\endmacro\relax + +\def\ListMacroNames{% + \@startsection{subsubsection}{3}{\z@}{-2.25ex plus -.5ex minus-.2ex}% + {1.3ex plus.2ex}{\csname reset@font\endcsname\large\tt}*} + +\MacroIndent 0pt + +\def\MacroFont{\small\tt} + + +%%%%%%%%%%%%%%%%%%%%% DoNot Index %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\DoNotIndex{\ ,\!,\[,\\,\],\^,\`,\{,\},\~} +\DoNotIndex{\@warning,\active} +\DoNotIndex{\begingroup,\catcode,\char,\csname,\def,\do} +\DoNotIndex{\docdate,\dospecials,\edef,\else,\endcsname,\endgroup} +\DoNotIndex{\expandafter,\fi,\filedate,\fileversion} +\DoNotIndex{\gdef,\if,\ifcat} +\DoNotIndex{\ifx,\immediate,\lccode,\let} +\DoNotIndex{\lowercase,\next,\noexpand} +\DoNotIndex{\relax,\space,\the} +\DoNotIndex{\toks@,\typeout,\write} +\DoNotIndex{\@M,\@arabic,\@author,\@auxout,\@bsphack,\@car,\@date} +\DoNotIndex{\@dblarg,\@dblfloat,\@eha,\@empty,\@esphack,\@evenfoot} +\DoNotIndex{\@evenhead,\@float,\@gobble,\@gobbletwo,\@gtempa,\@ifnextchar} +\DoNotIndex{\@ifundefined,\@ixpt,\@latexerr,\@listI,\@listi,\@listii} +\DoNotIndex{\@listiii,\@listiv,\@listv,\@listvi,\@makefnmark,\@mkboth} +\DoNotIndex{\@namedef,\@nameuse,\@mne,\@nil,\@normalsize,\@oddfoot} +\DoNotIndex{\@oddhead,\@tempa,\@tempb,\@tempc,\@tempd} +\DoNotIndex{\@tempdima,\@testfalse,\@testtrue,\test@member} +\DoNotIndex{\@thanks,\@thefnmark,\@title} +\DoNotIndex{\@topnum,\@viiipt,\@viipt,\@vipt,\@vpt,\@xiipt} +\DoNotIndex{\@xipt,\@xpt,\@xivpt,\@xviipt,\@xxpt,\@xxvpt} +\DoNotIndex{\addcontentsline} +\DoNotIndex{\advance,\aftergroup,\baselinestretch,\begin} +\DoNotIndex{\belowdisplayshortskip,\belowdisplayskip,\bf,\bgroup} +\DoNotIndex{\box,\c@@page,\c@page,\c@secnumdepth,\clearpage,\columnsep} +\DoNotIndex{\columnwidth,\copy,\dimen@,\dimen@i,\dimen@ii,\divide} +\DoNotIndex{\dp,\ds@article,\ds@notes,\ds@notesonly} +\DoNotIndex{\ds@slidesonly,\egrou,\end,\end@dblfoloat,\end@float} +\DoNotIndex{\endinput,\fnsymbol,\footheight,\footnotesep,\footskip} +\DoNotIndex{\global,\globaldefs,\hbox,\headheight,\headsep,\hfil} +\DoNotIndex{\hrule,\hskip,\hss,\ht,\Huge,\huge} +\DoNotIndex{\if@filesw,\if@test,\if@twocolumn,\if@twoside} +\DoNotIndex{\ifcase,\ifdim,\ifvmode,\ignorespaces} +\DoNotIndex{\input,\interlinepenalty,\itemsep,\ixpt,\label} +\DoNotIndex{\labelsep,\labelwidth,\LARGE,\large,\Large} +\DoNotIndex{\leavevmode,\leftmargin,\leftmargini,\leftmarginii} +\DoNotIndex{\leftmarginiii,\leftmarginiv,\leftmarginv} +\DoNotIndex{\leftmarginvi,\leftmark,\leftskip,\lineskip} +\DoNotIndex{\magstep,\marginparsep,\marginparwidth,\markboth} +\DoNotIndex{\markright,\medbreak,\multiply,\newbox,\newcount} +\DoNotIndex{\newcounter,\newdimen,\newif,\newlabel,\newpage} +\DoNotIndex{\newtoks,\nobreak,\nointerlineskip,\normallineskip} +\DoNotIndex{\normalsize,\null,\number,\numberline,\oddsidemargin} +\DoNotIndex{\offinterlineskip,\or,\par,\parbox,\parskip,\partopsep} +\DoNotIndex{\prevdepth,\protect,\ref,\refstepcounter,\rightmrk} +\DoNotIndex{\rm,\scriptsize,\section,\sectionmark,\setbox,\setcounter} +\DoNotIndex{\sl,\small,\stepcounter,\string,\textheight,\textwidth} +\DoNotIndex{\thefootnote,\thepage,\thesection,\thesubsection} +\DoNotIndex{\thispagestyle,\tiny,\topmargin,\topsep,\uppercase} +\DoNotIndex{\vbox,\vfill,\viiipt,\viipt,\vipt,\vpt,\vskip,\vss} +\DoNotIndex{\wd,\xcommentloaded@,\xdef,\xiipt,\xipt,\xivpt,\xpt} +\DoNotIndex{\xviipt,\xxpt,\xxvpt,\z@} +\DoNotIndex{\abovedisplayskip,\abovedisplayshortskip,\@currentlabel} +\DoNotIndex{\@dottedtocline,\@ne\@setsize,\@starttoc,\@tempboxa,\@} +\DoNotIndex{\arraystretch,\centerline,\egroup,\end@dblfloat} +\DoNotIndex{\evensidemargin,\footnotesize,\ifnum,\parindent,\parsep} +\DoNotIndex{\rightmark,\@afterindenttrue,\@ne,\if@specialpage.\long} +\DoNotIndex{\fboxrule,\fboxsep,\@for,\vfil} +\DoNotIndex{\@@fortmp,\@@tempa,\@@tempb,\@ehd,\@for,\@fortmp,\@m} +\DoNotIndex{\@mparswitchfalse,\@mparswitchtrue,\@nnil,\@spaces} +\DoNotIndex{\@specialstyle,\@temptokena,\@twosidefalse,\@twosidetrue} +\DoNotIndex{\@whilenum,\alph,\arabic,\count@,\errhelp,\errmessage} +\DoNotIndex{\fbox,\index,\minipage,\newcommand,\overfullrule} +\DoNotIndex{\pagestyle,\raggedright,\ref@stepcounter,renewcommand} +\DoNotIndex{\semcolor@loaded,today,\@tempcnta,\@tempcntb,\trivlist,\t,\p} +\DoNotIndex{\today,\item,\@colht,\@currenvir,\@thefoot,\@thehead} +\DoNotIndex{\@totalleftmargin,\allowbreak,\@captype,\@footnotetext} +\DoNotIndex{\@listdepth,\@minipagefalse,\@minipagetrue,\@mpfn,\@mpfootins} +\DoNotIndex{\endtrivlist,\everypar,\hsize,\ifvoid,\lastskip} +\DoNotIndex{\linewidth,\skip,\thempfn,\thempfootnote,\topskip,\unvbox} +\DoNotIndex{\@@input,\@@par,\@acci,\@accii,\@acciii,\@cclv,\@height} +\DoNotIndex{\@maxdepth,\@tempdimb,\@tempg,\@temph,\@texttop,\@twocolumnfalse} +\DoNotIndex{\@xfloat,\addvspace,\alloc@,\bigskipamount,\botmark,\chardef} +\DoNotIndex{\closein,\closeout,\count,\countdef,\dimen,\glossary,\goodbreak} +\DoNotIndex{\insc@unt,\intextsep,\kern,\mag,\marginpar,\maxdepth,\medskip} +\DoNotIndex{\moveleft,\newinsert,\newskip,\onecolumn,\openin,\openout} +\DoNotIndex{\read,\renewcommand,\repeat,\rightskip,\strut,\vfuzz,\voffset} +\DoNotIndex{\vsize} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\endinput + +%% END tvz-code.sty diff --git a/Master/texmf-dist/doc/latex/seminar/tvz-hax.sty b/Master/texmf-dist/doc/latex/seminar/tvz-hax.sty new file mode 100644 index 00000000000..9be6a984267 --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/tvz-hax.sty @@ -0,0 +1,255 @@ +%% BEGIN tvz-hax.sty +%% 93/04/01 +%% Tim Van Zandt Timothy.VAN-ZANDT@insead.edu +%% +%% These are some lousy hacks for typesetting the code +%% and User's Guide in the Seminar and PSTricks packages. + + +%%%%%%%%%%%%%%%%%%%%%%%%%% PAPER SIZES %%%%%%%%%%%%%%%%%%%%%% + +% Default paper size is 8.5in by 11in. +% Just include the `a4' style option for A4 paper size. +% For other paper sizes, define \paperwidth and \paperheight +% before the \documentstyle command. + +\@ifundefined{paperwidth}{\def\paperwidth{8.5in}}{} +\@ifundefined{paperheight}{\def\paperheight{11in}}{} +\@namedef{ds@a4}{\def\paperwidth{210mm}\def\paperheight{297mm}} + + +%%%%%%%%%%%%%%%%%%%% INPUTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\newif\iftwoup +\@namedef{ds@2up}{\input 2up.tex \twouptrue} + +\input article.sty +\input fancybox.sty % Version 0.93 or later. + +\iftwoup + \if@twoside + \targetlayout{twosided} + \fi +\fi + +\if@twoside + \def\twosideclearpage{% + \clearpage + \ifodd\c@page\else + \thispagestyle{empty}% + \null\leavevmode + \clearpage + \fi} +\else + \let\twosideclearpage\clearpage +\fi + + +%%%%%%%%%%%%%%%%%%%%% MISC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\arraystretch{1.2} + +\hfuzz 1pt + +% Just in case I'm using AmS-LaTeX. +\def\makeatother{\catcode`\@=12\relax} + + +%%%%%%%%%%%%%%%%%%%%%%%%%% SHORT META %%%%%%%%%%%%%%%%%%%%%%%% + +% Works in verbatim environments, unless specially designed. +\begingroup + \catcode`\<=\active + \gdef\ShortMeta{% + \catcode`\<=\active + \def<##1>{{\MetaFont ##1\/}}} +\endgroup +\def\DeleteShortMeta{\catcode`\<=12\relax} +\def\MetaFont{\sl} % For meta arguments. + +%%%%%%%%%%%%%%%%%%%%%%%%%% FILE VERSIONS %%%%%%%%%%%%%%%%%%%%% + +% \GetVersion{file} scans first ten lines of <file> for +% \filedate and \fileversion definitions. +% +% \CheckVersion{file} scans <scans> file for \filedate and \fileversion +% and then compares these witha \FileDate and \FileVersion. +% +\def\GetVersion#1{% + \immediate\openin1=#1 + \count@=0 + \let\fileversion\relax + \let\filedate\relax + \@testtrue + \loop + \if@test + \advance\count@1 + \immediate\read1 to \@tempa + \@tempa + \ifnum\count@=10 + \@latexerr{Couldn't find fileversion}\@eha + \@testfalse + \else + \ifx\fileversion\relax + \@testtrue + \else + \ifx\filedate\relax + \@testtrue + \else + \@testfalse + \fi + \fi + \fi + \repeat} + +\def\CheckVersion#1{% + \GetVersion{#1} + \ifx\FileVersion\fileversion + \ifx\FileDate\filedate\else + \@latexerr{Doc date (\FileDate) and file date (\filedate) + do not match}\@eha + \fi + \else + \@latexerr{Doc version (\FileVersion) and file version (\fileversion) + do not match}\@eha + \fi} + +% This expands the date, as defined in \filedate. + +\def\expanddate#1/#2/#3/{% + \number#3{} + \month=#2 + \ifcase\month\or + January \or February \or March \or April \or May \or June \or + July \or August \or September \or October \or November \or December + \fi + 19#1} +\def\thefiledate{\expandafter\expanddate\filedate/} +\date{\thefiledate} + + +%%%%%%%%%%%%%%%%% LOGOS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\AmS{{\protect\the\textfont\tw@ + A\kern-.1667em\lower.5ex\hbox{M}\kern-.125em S}} + +\def\b@LaTeX{% + \begingroup + \csname reset@font\endcsname + \rm\bf + L\kern-.32em + \raise.36ex\hbox{% + \ifx\@currsize\Huge\LARGE\else + \ifx\@currsize\huge\Large\else + \ifx\@currsize\LARGE\large\else + \ifx\@currsize\Large\normalsize\else + \ifx\@currsize\large\small\else + \ifx\@currsize\normalsize\footnotesize\else + \ifx\@currsize\small\scriptsize\else + \ifx\@currsize\footnotesize\scriptscriptsize + \fi\fi\fi\fi\fi\fi\fi\fi + \bf A}% + \kern-.15em + T\kern-.1667em + \lower.7ex\hbox{E}\kern-.125em + X% + \endgroup} +\def\bLaTeX{\b@LaTeX} + + +%%%%%%%%%%%%%%% PAGE STYLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% The `docheadings' page style uses footers rather than headers. + +\def\ps@docheadings{% + \let\@mkboth\markboth + \def\@oddhead{}% + \let\@evenhead\@oddhead% + \def\@oddfoot{% + \small\sf + \rightmark + \hfil + \thepage}% + \def\@evenfoot{% + \small\sf + \thepage + \hfil + \theheadertitle}% + \def\sectionmark##1{\markright {##1}}}% +\pagestyle{docheadings} + + +%%%%%%%%%%%%%%%%%%%%%%%% Table of Contents %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Tighten up spacing in TOC: + +\newskip\tempskip +\def\TOCshrink{.5} +\def\TableOfContents{% + \begin{quote} + \begin{center} \Large\bf Contents \end{center} + \def\numberline##1{\hbox to 0pt{\hss##1\hskip 1em}}% + \let\oldaddvspace\addvspace + \def\addvspace##1{% + \tempskip##1\relax + \oldaddvspace{\TOCshrink\tempskip}} + \@starttoc{toc}% + \end{quote}} +\def\tableofcontents{% + \clearpage + \markright{Table of contents}% + \TableOfContents + \clearpage} + + +%%%%%%%%%%%%%%%%%%%%%%%% code and examples %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% `Ex' is an environment for putting samples of code. +% It is a variant of +% \begin{quote}\tt ... \end{quote}. +% It is NOT verbatim. + +\def\NotNested{% + \def\begin##1{% + \@latexerr{Bad nesting of environments. + Perhaps missing \end{\@currenvir}}\@eha + \end{\@currenvir}% + \begin{##1}}} + +\def\Ex{% + \NotNested + \list{}{}\item[]% + \if@minipage\else\vskip\parskip\fi + \leftskip\@totalleftmargin + \rightskip\z@ + \parindent\z@ + \parskip\z@ + \parfillskip\@flushglue + \hfuzz 1pt + \@@par + \global\@inlabelfalse} +\def\endEx{\endlist} + +% Various things to make it easier to write code and examples: + +\begingroup + \catcode`\{=12 \catcode`\}=12 + \catcode`\(=1 \catcode`\)=2 + \catcode`\+=0 \catcode`\\=12 + +gdef+|(\) % \| = character \ + +gdef+{({) % \{ = character { + +gdef+}(}) % \} = character } ++endgroup +\def\Backslash{\protect\|} + +% Define some functional font commands: + +\def\MainFont{\tt} % For macro definitions. +\def\UsageFont{\tt} % For in-line macro names. +\def\InlineFont{\tt} % For other in-line snipets of code. +\def\DisplayFont{\tt} % For displayed code. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\endinput +%% END tvz-hax.sty diff --git a/Master/texmf-dist/doc/latex/seminar/tvz-user.sty b/Master/texmf-dist/doc/latex/seminar/tvz-user.sty new file mode 100644 index 00000000000..2a3a8ca04aa --- /dev/null +++ b/Master/texmf-dist/doc/latex/seminar/tvz-user.sty @@ -0,0 +1,204 @@ +%% BEGIN tvz-user.sty +%% 93/04/01 + +\input tvz-hax.sty + +\def\papersizeadjust{% + \@tempdima=\paperwidth\relax + \advance\@tempdima-8.5in + \divide\@tempdima 2 + \advance\oddsidemargin\@tempdima + \advance\evensidemargin\@tempdima + \@tempdima=\paperheight + \advance\@tempdima-11in + \divide\@tempdima 2 + \advance\topmargin\@tempdima} + +\begingroup + \catcode`\"=\active + \gdef\ShortVerb{% + \catcode`\"=\active + \def"{\Verb"}}% + \gdef\DeleteShortVerb{\catcode`\"=12\relax} +\endgroup + +% Paragraphs are marked by large space rather than indentation: +\setlength{\parindent}{0pt} +\setlength{\parskip}{7pt plus 1pt minus 1pt} + +% Reduce \topsep: +\def\@listI{% + \leftmargin\leftmargini + \parsep 5\p@ plus2.5\p@ minus\p@ + %\topsep 10\p@ plus4\p@ minus6\p@ + \topsep 5\p@ plus2\p@ minus2\p@ + \itemsep 5\p@ plus2.5\p@ minus\p@} +\let\@listi\@listI +\@listi +\def\@listii{% + \leftmargin\leftmarginii + \labelwidth\leftmarginii + \advance\labelwidth-\labelsep + %\topsep 5\p@ plus2.5\p@ minus\p@ + \topsep 2\p@ plus.5\p@ minus\p@ + \parsep 2.5\p@ plus\p@ minus\p@ + \itemsep \parsep} +\def\@listiii{% + \leftmargin\leftmarginiii + \labelwidth\leftmarginiii + \advance\labelwidth-\labelsep + %\topsep 2.5\p@ plus\p@ minus\p@ + \topsep 1\p@ plus.2\p@ minus.2\p@ + \parsep \z@ + \partopsep \p@ plus\z@ minus\p@ + \itemsep \topsep} + +\skip\footins 20pt plus 4pt minus 2pt + +%%%%%%%%%%%%%%%%%%%%%%% Special hacks for User's Guides %%%%%%%%%%%%%%%%%%%%% +%% +%% Listing questions +\newcounter{faq}[section] +\def\thefaq{\arabic{faq}} +\let\l@faq\@gobbletwo +\def\faq{\@startsection{faq}{2}{\z@}% + {3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}{\faqfont}} +\def\faqfont{\normalsize\sf} +\def\faqmark#1{} +%% +%% Listing errors +\def\error{\vskip 2ex\noindent} +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\@ifundefined{AmSTeX} + {\def\AmSTeX{\leavevmode\hbox{$\cal A\kern-.2em\lower.376ex% + \hbox{$\cal M$}\kern-.2em\cal S$-\TeX}}}{} +\@ifundefined{BibTeX} + {\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em% + T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}}{} +\@ifundefined{SliTeX} + {\def\SliTeX{{\rm S\kern-.06emL\kern-.18em\raise.32ex\hbox + {\sc i}\kern -.03em\TeX}}}{} +\@ifundefined{PlainTeX}{\def\PlainTeX{{\sc Plain}\kern2pt\TeX}}{} + +%%%%%%%%%%%%%%% Special indexing for User's Guides %%%%%%%%%%%%%%%%%%%%%%%%% +%% +%% +\@ifundefined{actualchar}{\def\actualchar{@}}{} +\@ifundefined{quotechar}{\def\quotechar{"}}{} +\@ifundefined{levelchar}{\def\levelchar{!}}{} +\@ifundefined{encapchar}{\def\encapchar{|}}{} +\@ifundefined{verbatimchar}{\def\verbatimchar{+}}{} +%% +%% These are the indexing commands: +%% +%% Commands: \MainIndex \UsageIndex +%% Environments: \MainEnvIndex \UsageEnvIndex +%% Style options: \MainOptionIndex \UsageOptionIndex +%% Counters: \MainCntIndex \UsageCntIndex +\def\@Index#1{\@bsphack\index{#1}\@esphack} +\def\Index#1#2{% + \@bsphack + \index{\expandafter\@gobble\string#2\actualchar\string + \verb\quotechar*\verbatimchar\string#2\verbatimchar + \encapchar #1}} +{\catcode`\!=0 !catcode`!\=12!gdef!special@gobble#1{!if\#1!else#1!fi}} +\def\MainIndex{\Index{main}} +\def\UsageIndex{\Index{usage}} +\def\SpecialIndex#1#2#3{% + \@Index{#3\actualchar{\tt #3} (#1)\encapchar #2}% + \@Index{#1s:\levelchar{\tt #3}\encapchar #2}} +\def\MainEnvIndex{\SpecialIndex{environment}{main}} +\def\UsageEnvIndex{\SpecialIndex{environment}{usage}} +\def\MainOptionIndex{\SpecialIndex{option}{main}} +\def\UsageOptionIndex{\SpecialIndex{option}{usage}} +\def\MainCntIndex{\SpecialIndex{counter}{main}} +\def\UsageCntIndex{\SpecialIndex{counter}{usage}} +%% +%% Font for index page numbers: +\def\main#1{{\bf #1}} +\def\usage#1{{#1}} +%% +%% These combine various functions: +%% +%% Commands: \Main \Usage +%% Environments: \MainEnv \UsageEnv +%% Style options: \MainOption \UsageOption +%% Counters: \MainCnt \UsageCnt +%% +%% The "Main" ones +%% * Index argument. +%% * Print argument with \MainFont +%% * Create label +foo, e+foo or o+foo. +%% +%% The "Usage" ones +%% * Index argument. +%% * Print argument with \UsageFont. +%% +\def\SpecialLabel#1#2+{\label{+#2}} +\def\LabelIndex#1{\MainIndex{#1}\expandafter\SpecialLabel\string#1+} +\def\Main#1{% + \MainIndex{#1}% + \expandafter\SpecialLabel\string#1+% + {\MainFont\string#1}} +\def\Usage#1{\UsageIndex{#1}{\UsageFont\string#1}} +\def\MainEnv#1{% + \MainEnvIndex{#1}% + \label{e+#1}% + {\MainFont #1}} +\def\UsageEnv#1{\UsageEnvIndex{#1}{\UsageFont #1}} +\def\MainOption#1{% + \MainOptionIndex{#1}% + \label{o+#1}% + {\MainFont #1}} +\def\UsageOption#1{\UsageOptionIndex{#1}{\UsageFont #1}} +\def\MainCnt#1{% + \MainCntIndex{#1}% + \label{c+#1}% + {\MainFont #1}} +\def\UsageCnt#1{\UsageCntIndex{#1}{\UsageFont #1}} +%% +%% These are abbreviations. +%% +\def\N{\Main} +\def\n{\Usage} +\def\E{\MainEnv} +\def\e{\UsageEnv} +\def\O{\MainOption} +\def\o{\UsageOption} +\def\C{\MainCnt} +\def\c{\UsageCnt} +%% +%% This is for listing commands in a description environment. +\def\xitem#1{\item[\Main{#1}]} +%% +%% +\renewcommand{\EveryVerbatimLine}[2]{} +\VerbatimFootnotes + +%% User's guide and documented code have different index prologue. +\def\PrintUserIndex{{\let\ps@plain\@empty\@input{\jobname.ind}}} + +\begingroup + \catcode`\<=1 \catcode`\>=2 + \catcode`\{=13 \catcode`\}=12 + \catcode`\[=13 + \gdef\@MD<% + \catcode`\{=13 \catcode`\}=12 \catcode`\[=13 + \def{##1}<\{<\MetaFont ##1\/>\}>% + \def[##1]<\string[<\MetaFont ##1\/>]>> +\endgroup +\def\MD{% + \NotNested + \Ex + \begingroup + \@MD + \def\end{\par\endgroup\end}% + \def\\{\@centercr\Main}% + \MainFont + \Main} +\def\endMD{\endEx} + +\endinput +%% END tvz-user.sty |