The csslides Class for L^{A}TEX 2ε

Martin Reddy

January 14, 1997

1 Introduction

This document describes the csslides class (v1.2) which has been specifically written for L^{A}TEX 2ε. This class provides a means to design and create overhead slides for presentations, seminars, or lectures. The resulting slides exhibit a consistent departmental image and could be used for both internal and external presentations. To use this class, all you need do is begin your L^{A}TEX document with the declaration:

     \documentclass[<options>]{csslides}

csslides has been built upon the FoilTEX system. As such, it offers many of the facilities which this presentation package offers. The default formatting is to produce portrait (upright) slides using a 20 point sans serif font, with no hyphenation. The figure and table environments have been redefined so that they do not ‘float’ (i.e. they stay where you put them).

This document will begin by introducing the various class options which csslides currently supports. It will also describe the various commands and environments which it offers the user. Following this, there is a section describing the notes facility, and how to customise the colours of a slide. Finally, a simple example of using the csslides class is provided. The interested reader is also referred to the FoilTEX documentation (i.e. “texdoc foiltex”).

2 Class Options

The csslides class provides a number of options to alter the display of your slides (many of these are actually implemented by the FoilTEX package, upon which csslides has been built). The following class options are currently supported by csslides (these should be specified in the square-bracketed section of the \documentclass command):

landscape : by default, csslides will produce portrait (upright) slides. This option can be used to force landscape (sideways) slides. N.B. in order to display landscape documents correctly using xdvi you should explicitly state the new page size. This can be done by invoking the command as follows: xdvi -paper a4r <DVIfilename>.

17pt, 20pt, 25pt, 30pt : these options can be used to specify the base font size for the slides. These will also redefine the various L^{A}TEX size-changing commands relative to the new font size (e.g. \tiny, \small, \large, etc.). The default option is 20pt.

centre : by default, all text is flush with the top of the slide. This option can be used to produce slides where the text is centred vertically on the slide.

colour : produces slides in colour instead of the default black and white rendering. This option will render various parts of the slide in different colours and will also produce a full colour University crest (see Section 6 for information on customising the slide’s colour). By default the crest will be black and white and all text will be black.

squeeze / short : the squeeze (or short) option can be used to produce larger margins at the top and bottom of the page—i.e. squeeze the slide into a smaller space space vertically (or horizontally if you are using the landscape option). This is useful when printing out to some colour printers (such as the EUCS colour printer) as these often have substantially larger margin areas than black and white laser printers. N.B. if you need to use this option in order to print your slides, then you should avoid mixing portrait and landscape slides in the same document.

slidesonly : if you have produced notes for various slides using the csslides notes facility (see Section 5), then this option can be used to ignore all notes pages when compiling the L^{A}TEX code. This will produce a DVI document which only contains the slides for the presentation.

notesonly : if you have produced notes for various slides using the csslides notes facility (see Section 5), then this option can be used to ignore all of the slides when compiling the L^{A}TEX code. This will produce a DVI document which only contains the notes for the presentation.

leftjust : by default, all text on the slides will be full justified; that is, flush to the left and right margins. The user may use this option to produce slides with left justified text (i.e. with a ragged right margin).

perpetua : uses the University’s Corporate font for the slides’ header and footer texts.

3 Commands

The csslides class also exports a number of macros which can be used to help produce your slides. These are common or useful operations which are provided to ease the development of your presentation material.

\maketitle : The commands used to produce a title slide are exactly the same as those to produce title pages using the report or article classes. However, a number of optional arguments are also supported for customising the text which appears in the footer of each slide.

• \title[...]{...} : the title of the presentation. The optional parameter can be used to specify a shorter version to appear in the footer. If the optional parameter is not specified, then the main title will be used in the footer.

• \author[...]{...} : the name of the speaker(s). The optional parameter can be used to specify a shorter version to appear in the footer. If the optional parameter is not specified, then the main author list will be used.

• \date[...]{...} : the date of the presentation (or any other text, e.g. the department and University name). Again, the optional parameter can be used to specify a shorter version to appear in the footer, or perhaps the name of the seminar or conference being presented at, or even the e-mail address of the first speaker. If the optional parameter is not specified, then the main date text will be used in the footer.

For example, the following extract illustrates how to create a title slide for your presentation and also customise some of the footer entries:

     \title[General Relativity]%
           {The Origins of the General Theory of Relativity}
     \author{Albert Einstein}
     \date[George Gibson Foundation]{June 20th, 1933}
     \maketitle

\slide[...]{...} : the slide command begins a new slide. You should use this command (or its environment version, given below) to separate all of the slides in your presentation.

The required argument (in curly brackets) is used to create a title at the top of the slide. The optional argument (in square brackets) can be used to specify an extra description in the header of the slide. E.g. you can use these two titles to display the general section heading in the header, and the more specific sub-section heading as the slide title. (You can use a \slide{} command to produce a blank slide with no titles.)

You can also use this command in an environment form, as below. The parameters and the effect of the environment version are exactly the same as the single command version above. N.B. If you wish to produce documents which contain notes for slides, and you wish to selectively extract either the notes or the slides, then you must use the following environment form of the command (see Section 5).

   \begin{slide}[...]{...}
      <slide text>
   \end{slide}

\sliderotated[...]{...} : this command works in exactly the same manner as the \slide macro above, except that it additionally rotates the slide through 90^{∘}. That is, if the default slide orientation is portrait, then the new slide will be rendered as landscape, and vice versa. You can use this command to mix portrait and landscape slides in the same document. Normal orientation is restored with the next invocation of a \slide command.

As with the \slide command, you can also use this command in an environment form. Once again, the parameters and the effect of the environment version are exactly the same as the single command version above.

   \begin{sliderotated}[...]{...}
      <slide text>
   \end{sliderotated}

\leftfooter, \middlefooter, \rightfooter : use these command to change the text in footer for the current and all subsequent slides. These commands alter the entries at the left margin, centre of footer and right margin respectively.

Note that your footer is initialised when you use the \title, \author and \date commands (see above). Any changes you wish to make to the footer should therefore occur after these commands.

\shrinklist : this command can be used to squeeze list environments as tight as possible. If you’re running out of space on a slide and you have a list environment which is using quite a bit of vertical space, you can use this command to compress the list. For example:

      \begin{enumerate}\shrinklist
         \item ...
         ...

4 Environments

This section describes the various environments which are available within the csslides class. For example, if you wish to use an environment called foo, then you would enter:

\begin{foo}
  ... your text here ...
\end{foo}

Theorem/Theorem* : used to present a theorem. This produces a bold header (Theorem), with the contents of the environment typeset in slanted text. An optional argument can be supplied in square brackets to identify the inventor, common name of theorem, etc.

The unstarred version of this environment produces numbered theorems; whilst the starred version suppress this numbering. (Note the uppercase first letter for the environment names. This is to avoid conflicts with users’ personal macros). For example:

         \begin{Theorem}[Adams]
            The Answer to Life, the Universe and Everything is forty-two.
         \end{Theorem}

Proof/Proof* : used to present a proof. The options and function are similar to those of the Theorem environment above, with the exception that the environment terminates with a □ symbol.

Lemma/Lemma* : used to present a lemma. The options and function are similar to those of the Theorem environment above.

Corollary/Corollary* : used to present a corollary. The options and function are similar to those of the Theorem environment above.

Proposition/Proposition* : used to present a proposition. The options and function are similar to those of the Theorem environment above.

Definition/Definition* : used to present a definition. The options and function are similar to those of the Theorem environment above.

boldequation/boldequation* : used to present an equation in bold typeface. As usual, the unstarred version of the environment will produce a number for the equation, whereas this is suppressed with the unstarred version.

5 Notes

The csslides class provides a facility for generating and manipulating notes for each slide. This can be used to generate a few short comments to remind you of what you want to say for a slide, or it could be the entire verbatim text of your oration. Currently, this facility works best if every slide and notes page occupies no more than one page (this is good practice anyway). You can specify the start of a notes page by issuing the command,

  \notes[...]

or (preferably) the equivalent environment version,

  \begin{notes}[...]
     <notes text>
  \end{notes}

The optional parameter (in square brackets) can be used to specify the title of the notes page. If a title is not provided, then the title which was supplied for the previous slide will be used. A notes command should immediately follow the slide command for the appropriate slide, e.g.

\begin{slide}{Introduction}
Hello World!
\end{slide}
\begin{notes}
Waffle for about 10 minutes.
\end{notes}

The csslides class options slidesonly or notesonly can be used to suppress the generation of all notes or all slides, respectively. There are a some considerations which the user should be aware of when using these options:

1. In order to selectively filter out the text for a slide or a notes page you must use the environment versions of the slide, sliderotated, and notes commands (as in the above example). This is because TEX needs to know where the beginning and the end of a slide (or note) is so that it knows when to disable and enable the output of text. For this reason, it may be worth attempting to use the environment versions at all times in preference to the single command versions. (The single command versions are provided for compatibility with previous versions of csslides.)

2. If you do not explicity specify the title of a notes page, then the title will normally be taken from the previous slide. However, if you use the notesonly class option, then all the text within the previous slide will have been ignored. As a result, if you intend to use the notesonly option, then you should explicity specify the title of each notes page (using the optional parameter to the notes command), otherwise no title will appear.

6 Colour

If you supply the colour class option, then the slides will produced in colour. By default a rather conservative colour scheme will be used. However, you can customise the use of colour with the following commands:

\setbarcolour{...} : the colour used for the horizontal bars which appear at the top and bottom of each slide.

\settitlecolour{...} : the colour used for the title of a slide, as provided by the required parameter of the \slide or \sliderotated commands.

\setinfocolour{...} : the colour used for the information text in the header and footer of each slide.

\settextcolour{...} : the colour used for the main slide text. (N.B. this does not affect the title page.)

The parameters to all of the above can be any colour specification which is supported by the colour package of the standard L^{A}TEX 2ε graphics bundle, e.g. black, white, red, green,

blue, cyan, magenta, yellow, etc.

The csslides class provides a command \newcolour{<name>}{<r,g,b>} to enable you to define new colours. For example, the following code segment will produce slides rendered in orange text:

    \newcolour{orange}{1,0.5,0}
    \settextcolour{orange}

7 Lengths

Much of the layout of each slide can be tweaked by changing various length settings. Under normal circumstances you should not need to worry about any of the following: csslides will setup good defaults for you. But if you really want to squeeze things into a slide (which is perhaps not a good idea in the first place), then you can redefine some of the following

lengths appropriately, e.g. \setlength\abovetitleskip{1cm}.

\abovetitleskip : the length from the top of the page to the title created by \maketitle.

\titleauthorskip : the space between the title and the author produced by \maketitle.

\authordateskip : the space between the author and the date produced by \maketitle.

\dateabstractskip : the space between the date and the abstract produced by \maketitle.

\foilheadskip : the length between the header and the slide title produced by \slide.

\foiltitleskip : the length between the title and the body of a slide produced by \slide.

\abovecaptionskip : the space directly above the caption for a table or figure.

\belowcaptionskip : the space directly below the caption for a table or figure.

\abovefloatskip : the space directly above a table or figure.

\captionwidth : the width of a table/figure’s caption. The default is \textwidth.

8 Example L^{A}TEX 2ε Code

%
% A short example of how to use the csslides class to generate the
% slides for a presentation. It produces three slides (including a
% title slide). A notes page is generated for the title slide.

% Version 1.1. M. Reddy (mxr), 14 January 1997.
%
\documentclass{csslides}
\begin{document}
\title[CS Slides Example]{An Example of the\\CS Slides Class}
\author{Martin Reddy}
\date[mxr@dcs.ed.ac.uk]{\today}
\maketitle
\begin{notes}
This page contains notes for the title slide
\end{notes}
\begin{slide}[The Initial Waffly Bit]{Introduction}
This is an example of the csslides class style which
can be used to design presentations in the Computer
Science department at the University of Edinburgh.
It offers a number of facilities, including:
\begin{itemize}
\item landscape or portrait slides (with mixing in one document)
\item a notes generation facility
\item a selection of large sans serif font sizes
\item a consist layout with the University crest
\item a customisable footer section
\item several environments for theorems, proofs, etc.
\end{itemize}
\end{slide}
\begin{slide}{Conclusion}
That's All Folks!
\end{slide}
\end{document}
      Above L^{A}TEX source available on-line in /usr/local/share/TeX/tex/latex/examples