%%% =================================================================== %%% @LaTeX-file{ %%% filename = "gslides.dtx", %%% version = "1.0", %%% date = "1999/06/08", %%% time = "16:42:16 EST", %%% checksum = "07396 337 1492 14154" %%% author = "Greg Gamble", %%% address = "Centre for Discrete Mathematics & Computing, %%% Department of Computer Science %%% & Electrical Engineering, %%% The University of Queensland, %%% Queensland 4072, %%% Australia", %%% telephone = "+61 7 336 52425," %%% FAX = "+61 7 336 54999, %%% copyright = "Copyright (C) 1999 Greg Gamble, %%% all rights reserved. Copying of this file is %%% authorised only if either: %%% (1) you make absolutely no changes to your copy, %%% including name; OR %%% (2) if you do make changes, you first rename it %%% to some other name.", %%% email = "gregg@maths.uwa.edu.au (Internet)", %%% codetable = "ISO/ASCII", %%% keywords = "latex, amslatex, ams-latex, installation", %%% supported = "yes", %%% abstract = "The \cls{gslides} class loads \cls{slides} and %%% adds some commands and environments which are %%% normal to other classes, like \cls{article}, but %%% missing from \cls{slides}." %%% docstring = "The checksum field above contains a CRC-16 %%% checksum as the first value, followed by the %%% equivalent of the standard UNIX wc (word %%% count) utility output of lines, words, and %%% characters. This is produced by Robert %%% Solovay's checksum utility.", %%% } %%% =================================================================== % % \iffalse %<*driver> \documentclass{amsdtx} \EnableCrossrefs \CodelineIndex \RecordChanges \begin{document} \title{The \cls{gslides} class} \author{Greg Gamble} \date{Version \fileversion, \filedate} \hDocInput{gslides.dtx} \end{document} % % \fi % % \maketitle % \tableofcontents % \markboth{THE \cls{GSLIDES} CLASS}{} % % \changes{v0.9}{99/06/02}{First release} % \changes{v0.95}{99/06/02}{Added definitions for \cn{abovecaptionskip} % and \cn{belowcaptionskip} and made % \cn{newblock} a noop.} % \changes{v1.0}{99/06/08}{Finished documentation.} % % \makeatletter % \DoNotIndex{\@autonumfalse,\@autonumtrue,\@eqnnum,\@extraslide} % \DoNotIndex{\@float,\@ifundefined,\@ignoretrue,\@makecaption} % \DoNotIndex{\@minipagefalse,\@plus,\@startsection,\@tempboxa} % \DoNotIndex{\G@slideswtrue,\end@float,\ext@figure,\ext@table} % \DoNotIndex{\fnum@figure,\fnum@table,\fps@figure,\fps@table} % \DoNotIndex{\ftype@figure,\ftype@table,\hb@xt@,\if@autonum} % \DoNotIndex{\p@,\st@rredfalse,\start@multline,\z@} % \makeatother % % \newcommand{\sltt}[1]{{\slshape\texttt{#1}}} % \section{Introduction} % The file \fn{gslides.dtx} is the master file for the \latex/ % class \cls{gslides}. It provides the documentation and % class file bundled together in one file. The file % \fn{gslides.cls} is generated by \texttt{latex}ing the % file \fn{gtools.ins}. % % Class \cls{gslides} builds on the standard \latex/ class % \cls{slides}, providing some commands and environments that are % normal in other classes but have been omitted from class % \cls{slides}, like sectioning commands and \env{figure} and % \env{table} environments. % % Sample \latex/ text, as opposed to code of the % \cls{gslides} class, is set in % {\slshape\verb+slanted typewriter type+\/}. % % \StopEventually{ % \begin{thebibliography}{9} % \addcontentsline{toc}{section}{\numberline{}Bibliography} % \bibitem{AmSLaTeX} American Mathematical Society, % \emph{\amslatex/ Version 1.2 User's Guide} (Nov.\ 1996). % Filename: \fn{amsldoc.dvi}. % \bibitem{amsdtx} M.~Downes, % \emph{The \cls{amsldoc} and \cls{amsdtx} document classes} % (Version 1.2b, Feb.\ 1995). % Filename: \fn{amsdtx.dvi}. % \bibitem{Companion} M.~Goossens, F.~Mittelbach, and A.~Samarin, % \emph{The \latex/ Companion} (Addison-Wesley, 1994). % \bibitem{TeX} D.~E.~Knuth, % \emph{The \tex/book}, % (Addison-Wesley, 1984). Describes \tex/ in detail. % \bibitem{LaTeX} L.~Lamport, % \emph{\latex/ -- A Document Preparation System} % (Addison-Wesley, first ed., 1985). Describes \latex/ 2.09. % \bibitem{LaTeXe} L.~Lamport, % \emph{\latex/ -- A Document Preparation System} % (Addison-Wesley, second ed., 1994). Updated for \LaTeXe. % \bibitem{clsguide} The \latex/3 Project, % \emph{\LaTeXe\ for class and package writers} (Jun.\ 1997). % Filename: \fn{clsguide.dvi}. % \end{thebibliography} % \addcontentsline{toc}{section}{\numberline{}Index} % \DisableCrossrefs % \PrintIndex % %\enlargethispage*{2\baselineskip} % \addcontentsline{toc}{section}{\numberline{}Change History} % \PrintChanges % } % % \section{Implementation} % The usual name, date, and version information. % \begin{macrocode} \typeout{gslides 1.0} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{gslides}[1999/06/08 v1.0] % \end{macrocode} % \section{Usage} % Mostly users will begin their \latex/ source file in the % following way: % \pagebreak % \begin{quote}\slshape % \verb+\documentclass{gslides}+ % \end{quote} % which is equivalent to: % \begin{quote}\slshape % \verb+\documentclass[a4paper,final,titlepage,autonum]{gslides}+ % \end{quote} % \section{Options inherited from \cls{slides}} % The usual papersize options of class \cls{slides}: % \begin{quote} % \opt{a4paper}, \opt{a5paper}, \opt{b5paper}, % \opt{letterpaper}, \opt{legalpaper}, % \opt{executivepaper} % \end{quote} % are available. The default papersize for class % \cls{gslides} is \opt{a4paper}. % % All of class \cls{slides}' other options: % \begin{quote} % \opt{landscape}, \opt{clock}, \opt{draft}, % \opt{final}, \opt{titlepage}, \opt{notitlepage}, % \opt{leqno}, \opt{fleqn} % \end{quote} % are also available. By default, (as for class % \cls{slides}) the options \opt{final}, \opt{titlepage} are % switched on. Class \cls{slides} also declares options % \opt{onecolumn} and \opt{twocolumn}, but only % \opt{onecolumn} is supported (\opt{twocolumn} only warns % that there is \emph{no twocolumn layout for slides}). % \section{Additional options} % We provide just two additional options over those already % provided by class \cls{slides}. % \begin{description} % \item[\opt{autonum}] This option provides % \emph{auto}matically \emph{num}bering % without using any \verb+\begin{slide}+ or % \verb+\end{slide}+ commands. % By default: \emph{applied}. % \item[\opt{noautonum}]Switches off the % \emph{auto}matically \emph{num}bering % of slides. % By default: \emph{not applied}. % \end{description} % We discuss these options in more detail in % Section~\ref{sec:autonum}. % \begin{macrocode} \newif\if@autonum \DeclareOption{autonum}{\@autonumtrue} \DeclareOption{noautonum}{\@autonumfalse} \ExecuteOptions{autonum} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{slides}} \ProcessOptions\relax \LoadClass[a4paper]{slides} % \end{macrocode} % \section{The additional commands and environments} % The \cls{slides} class is devoid of % many of the usual definitions and environments. Often one bases % one's seminar/talk on a paper or thesis that has been previously % prepared as a \latex/ document. Thus, in class \cls{gslides} % we provide some rudimentary form of many environments and % definitions that are available in other document classes. % In this way, one can have a very quick approximation to % a first draft of one's talk just by changing the % \cn{documentclass} declaration. % % The \cls{slides} class doesn't % provide \cn{section} or \cn{subsection} \dots so we provide these % commands based on the \cn{section} definition in the \cls{amsbook} % class; they are essentially identical and behave like starred % environments (they are unnumbered). % We define \cn{thanks} to be \cn{footnote}, so that the % \cn{maketitle} command behaves normally. % We provide rudimentary \env{abstract} and \env{thebibliography} % environments and essentially make \cn{bibitem} a noop. % We also make \cn{newblock} a noop. We don't make \cn{cite} % a noop, but if one chooses to, this is the way to do it: % \begin{quote}\slshape % \verb+\renewcommand{\cite}[2][]{}+ % \end{quote} % (one needs to remember to deal with the optional argument). % \begin{macrocode} \providecommand\section{% \@startsection{section}{1}{\z@}% {.7\baselineskip\@plus\baselineskip}{.5\baselineskip}% {\normalfont\bfseries\centering}} \providecommand\subsection{% \@startsection{subsection}{2}{\z@}% {.7\baselineskip\@plus\baselineskip}{.5\baselineskip}% {\normalfont\bfseries\centering}} \def\thanks{\footnote} \newenvironment{abstract}{\section{Abstract}}{} \def\bibitem#1{\par} \def\thebibliography#1{\section{References}} \def\endthebibliography{} \def\newblock{} % \end{macrocode} % We provide rudimentary \env{table} and \env{figure} % environments. In most document classes these are \texttt{float} % environments; in class \cls{slides} almost certainly one % would prefer \env{table}s and \env{figure}s \emph{not} to float. % So we use package \pkg{float}, which provides an option \opt{H} % (mnemonical for: \emph{H}ere definitely) that essentially stops a % \env{table} or \env{figure} from floating. We then make \opt{H} the % default placement option for both \env{table}s and \env{figure}s. % Though we define \texttt{table} and \texttt{figure} counters, % we do not use them; % captions are simply centred in boldface, above or below the % \env{table} or \env{figure} without numbering. % \begin{macrocode} \RequirePackage{float} \newcounter{figure} \providecommand\fps@figure{H} \providecommand\ftype@figure{1} \providecommand\ext@figure{lof} \providecommand\fnum@figure{} \newenvironment{figure}{\@float{figure}}{\end@float} \newcounter{table} \providecommand\fps@table{H} \providecommand\ftype@table{2} \providecommand\ext@table{lot} \providecommand\fnum@table{} \newenvironment{table}{\@float{table}}{\end@float} \newlength{\abovecaptionskip} \setlength{\abovecaptionskip}{10\p@} \newlength{\belowcaptionskip} \setlength{\belowcaptionskip}{0\p@} \long\def\@makecaption#1#2{% \vskip\abovecaptionskip \sbox\@tempboxa{\bfseries #2}% \ifdim \wd\@tempboxa >\hsize \bfseries #2\par \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip} % \end{macrocode} % Finally we provide some hacks so that equation numbering % works \dots the \env{equation} and \env{multline} environments % of the \pkg{amsmath} package and the \cls{slides} class are % somewhat incompatible. % \begin{macrocode} \AtBeginDocument{% \@ifundefined{multline}{}{% \def\equation{$$\refstepcounter{equation}} \def\endequation{\eqno \hbox{\@eqnnum}$$\global\@ignoretrue} \def\multline{\addtocounter{equation}{-1}% \start@multline\st@rredfalse}% }% } % \end{macrocode} % \section[The \opt{autonum} and \opt{noautonum} options] % {Automatic numbering of slides:\\ % the \opt{autonum} and \opt{noautonum} options}\label{sec:autonum} % The option \opt{autonum} ensures all slides are numbered % sequentially without using the \env{slide}, \env{overlay} and % \env{note} environments. It is a quick and dirty solution % to the numbering problem -- if the \cls{slides} documentclass % is rewritten (and it ought to be) then this option may break % or become obsolete. % % By default, we switch \opt{autonum} on. % To switch the option \opt{autonum} off, we provide the % option \opt{noautonum}. % % We now give some explanation of how \cls{slides} % environments work. % Without using the \opt{autonum} option, to get numbering of % slides one normally has to use the % \env{slide} environment, i.e.\ one has to partition one's % document with \verb+\begin{slide}+ and \verb+\end{slide}+ % commands. This is so one can have overlay slides via % the \env{overlay} environment (such slides are numbered % $N$\texttt{-a}, $N$\texttt{-b}, \dots where $N$ is the % number of the \env{slide} they are intended to overlie) % and note pages via the \env{note} environment (such pages are % numbered $N$\texttt{-1}, $N$\texttt{-2}, \dots where $N$ is the % number of the \env{slide} they are notes for). % % Often, however % we don't use either the \env{overlay} or \env{note} environment % and it would be nice if the slides were numbered without having % to use \verb+\begin{slide}+ or \verb+\end{slide}+ at all. % This is what the \opt{autonum} option provides. % It is still possible to have \env{overlay} or \env{note} % environments so long as \verb+\end{note}+ or \verb+\end{overlay}+ % is followed by \cn{slide} (or \verb+\begin{slide}+) % (when one is intending to be back in \env{slide}-producing mode). % \enlargethispage*{3\baselineskip} % \begin{macrocode} \if@autonum% \pagestyle{slide} \AtBeginDocument{\slide} \AtEndDocument{\endslide} \def\@extraslide{\par\break\stepcounter{slide}\G@slideswtrue} \fi% % \end{macrocode} % \begin{macrocode} \endinput % \end{macrocode} % \CheckSum{145} % \Finale