chaksem.cls0000644000200000020000000002474610372462721011565 0ustar chakchak%%% This is a LaTeX2e document class. %%% %%% Customization of the `seminar' style for overhead presentations %%% %%% Manuel M. T. Chakravarty [1997..2005] %%% %%% This file is free software; you can redistribute it and/or modify %%% it under the terms of the GNU General Public License as published by %%% the Free Software Foundation; either version 2 of the License, or %%% (at your option) any later version. %%% %%% This file is distributed in the hope that it will be useful, %%% but WITHOUT ANY WARRANTY; without even the implied warranty of %%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %%% GNU General Public License for more details. %%% %%% DOCU ====================================================================== %%% %%% * `online' option for PostScript that can be used online (otherwise, it is %%% for printed slides) %%% %%% * `paper' for generating a four-up paper version of slides (overlays are %%% collapsed onto a single page) %%% %%% * `helvetica' option for alternative font (is heavier, and thus, usually %%% better for SVGA LCD projectors) %%% %%% * All macros that are meant to be used by user documents (ie, the exported %%% macros) are having a comment starting with a template of the macro usage. %%% %%% Thanks to Aart Middeldorp for improvements. %%% %%% TODO ====================================================================== %%% %%% * \slitemize is a kludge %%% %%% * Aart asked for better support for slide* (at least remove the bars or %%% provide an extra command to remove them) %%% \NeedsTeXFormat{LaTeX2e} \ProvidesClass{chaksem}[2006/02/08 v1.7b Chak's Seminar Style] % Conditional to special case formatting for print versions of slides % \newif\ifpaper \paperfalse % Pipe options through to the `seminar' style % \DeclareOption*{\PassOptionsToClass{\CurrentOption}{seminar}} \DeclareOption{online}{% overlays should accumulate \special{!tx@Dict begin /BeginOL { dup (all) eq exch TheOL le or { IfVisible not { Visible /IfVisible true def } if } { IfVisible { Invisible /IfVisible false def } if } ifelse } def end}% } % OLD: % \DeclareOption{online}{% overlays should accumulate % \special{!tx@Dict begin /BeginOL { dup (all) eq exch TheOL le or { IfVisible % not { CP OLUnit T moveto /IfVisible true def } if } { IfVisible { CP % OLUnit NET moveto /IfVisible false def } if } ifelse } def end}% % } \DeclareOption{paper}{% \AtEndOfClass{\overlaysfalse\articlemag{1}\twoup} \PassOptionsToClass{article}{seminar} \papertrue } \DeclareOption{avantgarde}{% std font (sans serif) \renewcommand{\familydefault}{pag} } \DeclareOption{helvetica}{% alternative heavier font (sans serif) \renewcommand{\familydefault}{phv} } \ExecuteOptions{avantgarde} \ProcessOptions % seminar style including support for overlays % \LoadClass[semlayer,semcolor]{seminar} % Assume a printer driver that is capable to process the landscape special % \renewcommand{\printlandscape}{% \special{landscape}% \special{! TeXDict begin /landplus90{true}store end }% } \RequirePackage{newcent} % as basic font \RequirePackage{palatino} \RequirePackage{pifont} % for labels in lists \RequirePackage{ifthen} % colours / grey scales % \newgray{darkgray}{.55} \let\dgray=\darkgray \newgray{bggray}{.8} \newcmykcolor{dblue}{1 1 0 .3} \newcmykcolor{dgreen}{1 0 .7 .4} \newcmykcolor{dorange}{0 .6 .8 .3} \newcmykcolor{dmagenta}{.3 1 0 0} \newcmykcolor{lightgreen}{.25 0 .25 0} %\newcmykcolor{altlightgreen}{.3 0 .1 0} \newcmykcolor{lightyellow}{0 0 .5 0} \newcmykcolor{lightblue}{.5 .5 0 .1} \newcmykcolor{lightmagenta}{.05 .25 0 0} \newcmykcolor{ultralightgreen}{.12 0 .12 0} \newcmykcolor{ultralightblue}{.12 .12 0 0} \newcmykcolor{ultralightred}{0 .12 .12 0} % Default colours for emphasis and subheadings % \let\emcol=\dorange \let\headcol=\dblue % Coloured emphasis % \newcommand{\Emph}[1]{{\emcol #1}} % New page style, where the current heading is set in the lower left of all % slides belonging to the heading % % * the lower right corner by default contains the page number, but can be % replaced by something else (eg, author of the talk) by re-defining % \thatheading % \newpagestyle{withheading}% {\thismark}{{\sc\thisheading}\hfill{\sc\thatheading}} \def\thisheading{\toprulecol } \def\thatheading{\toprulecol \thepage} \pagestyle{withheading} % Set footers % \newcommand{\setfooter}[1]{\setleftfooter{#1}} \newcommand{\setleftfooter}[1]{% \gdef\thisheading{\toprulecol #1}} \newcommand{\setrightfooter}[1]{% \gdef\thatheading{\toprulecol#1}} % \heading[optional text for second line]{Heading text} % % Display a heading, which optionally may contain a second line (we can't use % \\ in a heading text, because the same text is also displayed in the footer) % \newcommand{\heading}[2][!*NEVER USED ARGUMENT*!]{% \ifthenelse{\equal{#1}{!*NEVER USED ARGUMENT*!}}{% \centerline{\textbf{\textsc{\darkgray\large#2}}}% \vspace*{.2em} \par\ignorespaces% % \setfooter{\botrulecol #2} \setfooter{#2} }{% \begin{center}\textbf{\textsc{\darkgray\large#1\\#2}}\end{center}% \setfooter{#1\ldots} }% } % OBSOLETE (since v1.2d) -- will go away % \newcommand{\headingx}[2]{% \begin{center}\textbf{\textsc{\darkgray\large#1\\#2}}\end{center}% \setfooter{#1 #2}} % \subheading{heading text} % \subheading*{heading text} % % For second level headings (set in small caps and left aligned, followed by a % colon); the star form is without a colon % \newcommand{\subheading}{% \@ifstar\@subheadingstar\@subheading} \def\@subheadingstar #1{% {\hskip0pt{\headcol#1}}} \def\@subheading #1{% {\hskip0pt{\headcol#1:}}} % OBSOLETE (since v2.0a) -- will go away % \newcommand{\subheadingx}[1]{% \textbf{\textsc{\darkgray#1}}} % \markslide % % Mark optional slides with \markslide (they get a star set in the lower right % corner) % \def\thismark{} % here we store the marker \newcommand{\markslide}{% % mark a slide \def\thismark{*}} % note: this defines \thismark *locally* % New slide frame, consisting of two horizontal lines -- above and below the % main material (this is less heavy than full frames, but still more % interesting than no frame at all) % \let\toprulecol=\black \let\botrulecol=\black \newslideframe{bars}{% \vbox{% % \centerline{\toprulecol\raise1em\hbox{\rule{\textwidth}{.5pt}}}% \centerline{\raise1em\hbox{% {\toprulecol\rule{.05\textwidth}{.5pt}}% \toprulecol\rule{.9\textwidth}{.5pt}% {\toprulecol\rule{.05\textwidth}{.5pt}}% }}% #1% % \centerline{\botrulecol\rule{\textwidth}{.5pt}}% \centerline{% {\botrulecol\rule{.05\textwidth}{.5pt}}% \botrulecol\rule{.9\textwidth}{.5pt}% {\botrulecol\rule{.05\textwidth}{.5pt}}% }% }% } \slideframe{bars} % \begin{slitemize} % \item First thing % \item Second thing % ... % \item Nth thing % \end{slitemize} % % an itemize environment using Zapf's rounded right arrow; the items are set in % a slightly smaller font with modified spacing % \newenvironment{slitemize}{% \begin{dinglist}{220}% \small \vspace*{-.5em} \setlength{\itemsep}{-.15em} }{ \end{dinglist}% \vspace*{-.1em}% \ignorespaces } % \begin{slumerate} % \item First thing % \item Second thing % ... % \item Nth thing % \end{slumerate} % % an enumerate environment using Zapf's encircled numbers; the items are set in % a slightly smaller font with modified spacing % \newenvironment{slumerate}{% \begin{dingautolist}{192}% \small \vspace*{-.5em} \setlength{\itemsep}{-.15em} }{ \end{dingautolist}% \vspace*{-.1em}% \ignorespaces } % for overlays % % \fst{stuff} % ... % \nin{stuff} % % format stuff for the second, third, and so on overlay % \newcommand{\fst}[1]{{\overlay{0}#1}} \newcommand{\snd}[1]{{\overlay{1}#1}} \newcommand{\trd}[1]{{\overlay{2}#1}} \newcommand{\fou}[1]{{\overlay{3}#1}} \newcommand{\fif}[1]{{\overlay{4}#1}} \newcommand{\six}[1]{{\overlay{5}#1}} \newcommand{\sev}[1]{{\overlay{6}#1}} \newcommand{\eig}[1]{{\overlay{7}#1}} \newcommand{\nin}[1]{{\overlay{8}#1}} % \begin{first} stuff \end{first} % ... % \begin{ninth} stuff \end{ninth} % % overlays for larger chunks of text % \newenvironment{first}{% \bgroup\overlay{0}% }{% \egroup\ignorespaces } \newenvironment{second}{% \bgroup\overlay{1}% }{% \egroup\ignorespaces } \newenvironment{third}{% \bgroup\overlay{2}% }{% \egroup\ignorespaces } \newenvironment{fourth}{% \bgroup\overlay{3}% }{% \egroup\ignorespaces } \newenvironment{fifth}{% \bgroup\overlay{4}% }{% \egroup\ignorespaces } \newenvironment{sixth}{% \bgroup\overlay{5}% }{% \egroup\ignorespaces } \newenvironment{seventh}{% \bgroup\overlay{6}% }{% \egroup\ignorespaces } \newenvironment{eight}{% \bgroup\overlay{7}% }{% \egroup\ignorespaces } \newenvironment{ninth}{% \bgroup\overlay{8}% }{% \egroup\ignorespaces } % \beforeafter{overlay}{stuff1}{stuff2} % % the third argument in a box of the same size as that used by the second % argument, but on the overlay specified by the first argument (note that the % second text does not *replace* the first text, but *overlays* on it) % % Example: % \beforeafter{snd}{stuff}{stuff on second overlay} % \makeatletter \newcommand{\beforeafter}[3]{% \newif\ifouterm@th \ifmmode\outerm@thtrue\else\outerm@thfalse\fi \setbox0=\hbox{\ifouterm@th$#2$\else#2\fi}% % \unhcopy0\hskip-\wd0% % doesn't work in math mode #2% \hskip-\wd0% % this does \csname\string#1\expandafter\endcsname{#3}% } \makeatother % \fstsnd{stuff1}{stuff2} % \sndtrd{stuff1}{stuff2} % % shorthands for frequent case of \beforeafter % \newcommand{\fstsnd}[2]{\fst{\beforeafter{snd}{#1}{#2}}} \newcommand{\sndtrd}[2]{\snd{\beforeafter{trd}{#1}{#2}}} \newcommand{\fsttrd}[2]{\fst{\beforeafter{trd}{#1}{#2}}} % \eraseafter{overlay}{stuff to stroke out} % % stroke out in red in overlay specified in the first argument % \makeatletter \newcommand{\eraseafter}[2]{% \newif\ifouterm@th \ifmmode\outerm@thtrue\else\outerm@thfalse\fi \setbox0=\hbox{\ifouterm@th$#2$\else#2\fi}% % \unhcopy0\hskip-\wd0\hskip-.15ex% #2\hskip-\wd0\hskip-.15ex% \csname\string#1\expandafter\endcsname{{% \red\raise.25em\hbox{\rule{\wd0}{1pt}\rule{.15ex}{1pt}}}}% } \makeatother % \snderase{stuff to stroke out} % % stroke out in red in second overlay % \newcommand{\snderase}[1]{\eraseafter{snd}{#1}} % Useful elements % % \Therefore % % an implication arrow % \newcommand{\Therefore}{{\headcol\ding{252}}} chaksem-doc.tex0000644000200000020000000001425107450000653012330 0ustar chakchak%%% This is a LaTeX2e document. %%% %%% It documents the use of `chaksem.cls. %%% %%% Manuel M. T. Chakravarty [1999..2000] %%% %%% $Id: chaksem-doc.tex,v 1.3 2002/03/26 05:05:44 chak Exp chak $ %%% %%% This file is free software; you can redistribute it and/or modify %%% it under the terms of the GNU General Public License as published by %%% the Free Software Foundation; either version 2 of the License, or %%% (at your option) any later version. %%% %%% This file is distributed in the hope that it will be useful, %%% but WITHOUT ANY WARRANTY; without even the implied warranty of %%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %%% GNU General Public License for more details. \documentclass[a4paper]{article} \usepackage{a4wide} \usepackage[T1]{fontenc} \usepackage{pifont} % backslash hack (uses the answer to Exercise 7.5 from Knuth's TeXbook) % { \catcode`/=0 \catcode`\\=13 /gdef/backslashchar{/string\} } \newcommand{\cmd}[1]{\texttt{\backslashchar#1}} \begin{document} \title{Presentations with \LaTeX2e} \author{% Manuel M. T. Chakravarty\\ School of Computer Science \& Engineering\\ University of New South Wales, Australia\\[1ex] \texttt{chak@cse.unsw.edu.au}\\ \texttt{www.cse.unsw.edu.au/\string~chak} } \date{Version 1.2a (for Version 1.6a of the class file \texttt{chaksem})} \maketitle \section{Introduction} The \texttt{chaksem} class provides support for preparing slides and online presentations.\footnote{Here, an \emph{online presentation} mean a talk using a SVGA projector (or beamer) instead of OHP slides.} It is based on the \texttt{seminar} style and PSTricks (which have to be installed, along with support for PostScript fonts, on the system). The class file and information is available at % \begin{quote} \texttt{http://www.cse.unsw.edu.au/\string~chak/presentation.html} \end{quote} \begin{quote}\itshape Warning: The present documentation is rather brief. \end{quote} \subsection{Why?} Some may ask: Why use LaTeX, when there are specialized (online) presentations tools available? Here are some good reasons: % \begin{itemize} \item Layout of mathematical formulae and program text is much better than in standard presentation tools. \item Reuse of material from a (research) paper is easier. \item The whole range of LaTeX packages and support tools is at your disposal. \item Portable solution: You can use whichever operating system you like. \end{itemize} % However, if you are reading this, you are probably already a believer\ldots \section{The Document} A document containing a presentation has to start with \cmd{documentclass\{chaksem\}}, where (in addition to those allowed by the \texttt{seminar} style) the following class options are supported: % \begin{description} \item[\texttt{online}] Prepare output for an online presentation (overlays accumulate). \item[\texttt{paper}] Generating a four-up paper version of slides (overlays are collapsed onto a single page). \item[\texttt{avantgarde} (default)] Use the PostScript avantgarde font as the font family default. \item[\texttt{helvetica}] Use the PostScript helvetica font as the font family default. \end{description} \section{Slides} Slides are composed within \texttt{seminar} style's \texttt{slide} environment. Slides can be given titles with \texttt{chaksem}'s \cmd{heading} command. The command's argument is set centered, in large letter and small caps in dark grey. Furthermore, it appears in this and all following slide's footers until the next \cmd{heading} command is encountered. If a title is to be broken across two lines at a fixed position, an optional argument can be used to specify the contents of the second line (the use of \cmd{\backslashchar} in the argument looks ugly in the footer). The command \cmd{subheading} uses a smaller font, sets the argument, flushed left and terminates it with a colon. The star-form \cmd{subheading*} omits the trailing colon. Furthermore, \cmd{markslide} places an asterisk in the top left corner (I use this to mark slides that are optional in my talks). \section{Lists} The environment \texttt{slitemize} is a replacement for \LaTeX's \texttt{itemize}. It uses \ding{220} instead of $\bullet$ to mark the list items and sets the items in a slightly smaller font. This leads to visually more appealing slides and saves some "slide real estate." Furthermore, \texttt{slumerate} can be used instead of \texttt{enumerate}. It uses \ding{192}, \ding{193}, \ldots\ to number the items, and otherwise, behaves like \texttt{slitemize}. \section{Overlays} The commands \cmd{snd}, \cmd{trd}, \cmd{fou} up to \cmd{nin}, together with the environments \texttt{second}, \texttt{third}, \texttt{fourth} up to \texttt{ninth} can be used to enclose material that should appear on the second to ninth overlay (more than three overlays are not practical on OHP slides, but useful for presentations).\footnote{Here, \emph{first overlay} means the root slide.} For reasons of orthogonality, there is also \cmd{fst}. The command \cmd{fstsnd} allows to center some material displayed on the second overlay inside the box created by some other material on the first overlay. In other words, \cmd{fstsnd}\texttt\{$\textit{arg}1$\texttt{\}\{}$\textit{arg}2$\texttt\} puts $\textit{arg}1$ on the first overlay and then centers $\textit{arg}2$ on top of it on the second overlay. In a similar way, \cmd{snderase} strokes its argument, which is placed on the first overlay, out on the second overlay. A more general facility are the commands \cmd{beforeafter} and \cmd{eraseafter}, which behave like \cmd{fstsnd} and \cmd{snderase}, respectively, but are more general as they are parametrised with the number of the overlay on which the second text or the strike out should go. There is also a command \cmd{sndtrd} that does what it's name suggests. \section{Don't forget\ldots} Please remember that \texttt{chaksem} makes heavy use of PostScript functionality via PSTricks; in other words, there is not too much point in examining the result with a DVI previewer---convert to PostScript and use a PostScript previewer. Send comments and suggestions for improvement to % \begin{quote} \texttt{chak@cse.unsw.edu.au} \end{quote} \end{document}