% This is documentation for the ffslides class. 
%
% Available options:
%   showgrid            Puts a 100x100 grid (with color ffgridcolor) over the 
%                       background.
%   <name>              If option <name> is entered, then a file matching 
%                       bground-<name>.txt is read to produce the background. 
%                       Files matching header-<name>.txt or footer-<name>.txt 
%                       are read to define the header or footer, respectively. 
%                       More than one such option can be specified, but only 
%                       the first match of each kind is used.
%   draft, leqno        Passed on to article class on which ffslides is based.
%   fleqn, openbib      Passed on to article class.
%   10pt, 11pt, 12pt    Passed on to article class (only need to set this for 
%                       font or package compatibility).
\documentclass[example]{ffslides}
%
%
%##############################################################################
%###                      BEGIN SET UP VISUAL STYLE                         ###
%##############################################################################

%=== Change page size/dimensions ===
% Use \ffpage{<lines_tall>}{<aspect_ratio>} To specify page dimensions.  E.g. 
% use 1.3333 for 4:3 pages, 1.7778 for 16:9 pages.
\ffpage{35}{1.3333}


%=== Set up fonts ===
% It is not necessary to put anything here, but this is a good place to put any
% font-related preamble lines.  For convenience here are some (not all) packages
% that allow selection of different matched text + math fonts.
% \usepackage{fourierNC}                 %-New Century Schoolbook + Fourier math
 \usepackage{newcent}                   %-Century Schoolbook
% \usepackage{mathptmx}                  %-Times 
% \usepackage{bookman}                   %-bookman
% \usepackage{mathpple}                  %-palatino
% \usepackage{mathpazo}                  %-palatino
% \usepackage{arev}                      %-arev 



%=== Load needed packages ===
% Packages pstricks, geometry, lastpage, twoopt, and graphics are loaded with 
% the class. Here, load any packages you need to make your design (e.g. pst-*
% packages for additional pstricks capabilities).
\usepackage{pst-slpe}  %-used for drawing background.


%=== Define colors ===
% Define any colors you will need.  Use the pstricks facilities, e.g.:
% \newrgbcolor{<name>}{R G B}
% \newgray{<name>}{graylevel} 
% Use name ffgridcolor to change the color of the alignment grid (if using 
% option showgrid, or the \gridon command)
\newrgbcolor{docbgcolor1}{0.4 0.08 0.08}  %used with "example"background option
\newrgbcolor{docbgcolor2}{0.73 0.47 0.47}  %used with "example"background option
\newrgbcolor{dochfcolor}{.995 .996 .6}  %used with "example" header/footer option
\newrgbcolor{deepblue}{.2 .2 .5}
\newgray{faintgray}{0.92}


%=== Redefine the background ===
% If not using the default background or setting the background through the
% class options, customize the background with
% \renewcommand{\drawbackground}{<code>}



%=== Redefine the header ===
% If not using the default header or the class option, customize the header with 
% \renewcommand{\drawheader}[1]{<code>}.  Remember that this command takes one
% argument (the slide title).




%=== Redefine the footer ===
% If not using the default footer or the class option, customize the footer with
% \renewcommand{\drawfooter}{<code>}.




%=== Control the dtext, ctext, and btext regions ===
% Use \renewcommand to change from the defaults. 
% * For dtext, you may change \dtexttopedge, \dtextleftedge, \dtextrightedge,  
%   and \dtextinclude. 
% * For ctext, you may change \ctextinclude.
% * For btext, you may change \btextboxinclude and you can change the default 
%   box style using \newpsstyle{btextboxstyle}{<pstricks parameters list>}
% The "include" macros are inserted just before the contents of their respective 
% boxes, so they can be used to set default colors, line spacing, \parskip, and 
% so on for the contents of each type of box.
\newpsstyle{btextboxstyle}{linecolor=deepblue,
                           %linestyle=none,
                           framesep=1ex,
                           fillcolor=faintgray,
                           fillstyle=solid, 
                           cornersize=absolute, 
                           linearc=0.15,
                           shadow=true,
                           shadowcolor=gray}
\renewcommand{\btextinclude}{\scriptsize\deepblue}
\renewcommand{\dtexttopedge}{0.13}


%=== Change default bullets for \qi, \qii, \qiii ===
% Use \renewcommand to re-define \qitemi, \qitemii, or \qitemiii to specify 
% what is to appear by default in the "bullet" or "left side" of the \qi, \qii,
% and \qiii structures.  By default these mimic the default bullets in an 
% itemize list. These commands are purely optional. 


 

%##############################################################################
%###                       END SET UP VISUAL STYLE                          ###
%##############################################################################

%=== Place your own macros below this line ====================================


% A few potentially useful packages are listed here for convenience:
%\usepackage{setspace}  %use, e.g., \begin{spacing}{2.5} blahblah \end{spacing}
%\usepackage{bbding}    %dingbat fonts e.g. for bullets
%\usepackage{amsmath}
%\usepackage{amssymb}
%\usepackage[normalem]{ulem}  %better underlines and other text decoration
%\usepackage{multicol}  %multi-column in a minipage (e.g. for contents, refs)
%\usepackage{enumitem}  %easier control of lists

%\usepackage{multicol}  %multi-column in a minipage
%\setlength{\multicolsep}{-\baselineskip} %remove skip before multicol environment.
%\setlength{\columnsep}{1.5em}

\usepackage{bbding}  %for "up to contents" footer arrow.
\usepackage{tocloft}  %formatting of TOC
\usepackage{fancyvrb}  %for SaveVerbatim environment.
\hypersetup{linkcolor=black,
            colorlinks=true,
            urlcolor=black,
            citecolor=black
}

% Shortcuts for writing typewriter text (verbatim doesn't work inside minipages)
\newcommand{\tw}[1]{\texttt{#1}}
\newcommand{\twbs}[1]{\texttt{\textbackslash #1}}

% For main command description pages
\newcommand{\emphtwbs}[1]{{\blue\textbf{\twbs{#1}}}}

% For writing a digit inside a circle
\newlength{\digitheight}
\newlength{\digitwidth}
\newcommand{\ninc}[1]{%
  \scriptsize%
  \settoheight{\digitheight}{#1}%
  \settowidth{\digitwidth}{#1}%
  \makebox[1.5\digitheight][c]{\deepblue#1%
    \pscircle[linecolor=deepblue,linewidth=0.1pt]
             (-0.5\digitwidth,0.5\digitheight){.75\digitheight}}%
}


%##############################################################################
%###                             BEGIN DOCUMENT                             ###
%##############################################################################

\begin{document}


%---------------------------------------
\blankpage
\psframe[fillstyle=solid,
         fillcolor=white,
         framearc=0.025](.025, 0.06)(.975, 0.94)
\ctext[c]{0.5}{0.2}{0.7}{%
\centering \Huge ffslides: freeform slides and more based on the article class}
\ctext[t]{0.5}{0.3}{0.55}{%
{\centering Mark A. Wolters\\
\today\\[2\parskip]}

\normalsize \textbf{Abstract:} The \tw{ffslides} document class is intended for those who prefer a ``do-it-yourself'' approach to creating presentations.  The distinguishing features of the class are:

\qi[1.~~]{Freedom to specify the page dimensions relative to the text size.}
\qi[2.~~]{Freedom to design the elements of the slides (header, footer, background) as you like.}
\qi[3.~~]{Freedom to place text, graphics, or annotations anywhere on the page you like, in any order you like.}

The class is essentially a small set of macros added to the article class to make it easier to achieve these three goals. As a side benefit, the freeform nature of the class means it can also be used to produce posters, research notes, or other documents where one might not want a rigid, pre-specified visual layout.

This document was created with the class.  Along with its \LaTeX\ source, it can be used as both a reference manual and an example presentation.
}


%---------------------------------------
\normalpage[0.05][0.5]{Table of Contents}{\hypertarget{Contents}{}%
\renewcommand{\contentsname}{}%     %-Gets rid of the redundant "Contents" title.
\setlength{\cftbeforetoctitleskip}{-1ex}  %-move the whole thing up
\setlength{\cftaftertoctitleskip}{0pt}    %-spacing after the (blank) title
\setlength{\cftbeforesecskip}{0pt}        %-controls spacing in toc.
\tableofcontents
}
\ctext[c]{0.955}{0.135}{0}{\ninc{1}}
\ctext[c]{0.495}{0.11}{0}{\ninc{2}}
\ctext[c]{0.26}{0.17}{0}{\ninc{3}}
\btext[tr]{0.95}{0.13}{0.3}{%
This document is created using the \tw{ffslides} class.  It is intended more to illustrate the capabilities of the class than as a model for creating a good design.

Throughout the document, boxes like this one will be used to provide comments and code examples elaborating on how content on the page was produced. For example:

\qi[\ninc{1}~~]{This box was created with command\\
  \texttt{\twbs{btext}[tr]\{0.95\}\{0.13\}\{0.3\}\{\%\\
  \hspace*{2em}This document...\\
  \}}
}

\qi[\ninc{2}~~]{The main text area on this page was set to take up only the left half of the page, using optional arguments to \twbs{normalpage}:\\
  \texttt{\twbs{normalpage}[0.05][0.5]\{Table of Contents\}\{...\}}
 }

\qi[\ninc{3}~~]{The table of contents was generated by the usual \twbs{tableofcontents} command. It was populated by adding the class's \twbs{makesection} and \twbs{makesubsection} commands  on the appropriate slides.
}

The full source for this document is found in \texttt{ffslides-doc.tex}. An empty template can be found in \texttt{ffslides-template.tex}.  The template has ample comments to guide the user through setting up their design.
}


%---------------------------------------
\normalpage[0.05][0.48]{Should I Use this Class?}{\makesection{Should I Use this Class?}{}%
The separation of content and format is one of the great strengths of \TeX/\LaTeX.  Nevertheless, presentations and posters are inherently visual and many of the strong points of \TeX\ (automatic paragraph and page breaking, automatic placement of floats, etc.) are either irrelevant or limiting when creating them. A (probably) common experience is expending a great deal of effort to discover ways to override or circumvent the default decisions of the \TeX\ system to make a slide look exactly the way you think it should. 

There are of course a variety of classes already extant to make it more natural to produce presentations and/or posters. When using them, you may find that i) there are still some difficult-to-overcome default design choices that you might not like, or ii) there is a considerable learning curve with a large number of new commands. 

The goal of this class is to provide a relatively small set of commands and a template that will allow the user to design a presentation from scratch to look the way they want; and further, to allow the user to place a variety of content freely on the page with minimal difficulty.
 
This was achieved by a simple strategy and heavy use of the package \tw{pstricks}. 
}
\ctext[tl]{0.52}{0.13}{0.43}{%
Here are the main ideas implemented in the  class:

\qi{The page height is user-specified in multiples of the line height, and the page's aspect ratio is also user-specified.  The actual page dimensions are set using the \tw{geometry} package.}
\qi{The user can define commands to draw the page background, header, and footer.  These are automatically generated on each new slide.}
\qi{All content is placed on the page using \tw{pstricks} macros (either directly, or through commands defined in the class).  This means that everything on the page is considered by \TeX\ to be zero width, and the \TeX\ ``current point'' never moves from the upper left corner of the page. The upshot: there is a fixed coordinate system for everything on the page. Controlling the relative positions of different items is straightforward.}
\qi{The class is based on the article class, and makes no modifications to that class other than adding commands to achieve the aforementioned functionality.  The class itself is pure \LaTeX, it doesn't use \TeX\ commands.}

This approach to creating presentations has a few consequences that will probably determine whether or not you will want to use the class.  These are discussed on the next slide.
}


%---------------------------------------
\normalpage[0.05][0.48]{Should I Use this Class? (continued)}{%
Consequences of the class's design:

\qi[1.~~]{If you want to achieve a certain effect in your presentation, you can probably do so, since the document is essentially an article with \tw{pstricks} objects and \tw{minipage}s positioned here and there.

  \qi{You can use your favorite packages and \LaTeX\ tricks to achieve many custom effects.}
  \qi{You can use the extensive capabilities of \tw{pstricks} as well as externally-produced graphics to customize the style to your heart's content.}
  \qi{On the other hand, you will need to know something about \tw{pstricks}, how \LaTeX\ handles boxes and space, how to define and redefine commands, and so on if you wish to do more than a basic presentation using the default style.}}

\qi[2.~~]{The number of new commands you will need to learn to use the class is fairly small.

  \qi{The hope is that you will spend more time learning generally-useful \LaTeX\ techniques  than studying the manual of a presentation package.}}

\qi[3.~~]{There is no built-in functionality for fancy things like animated slides, speaker notes, and so on.}
}
\ctext{0.52}{0.13}{0.43}{%
\qi[4.~~]{Using the package will necessarily involve tweaking the coordinates of the objects you place on the slides.  

  \qi{Depending on your patience level, an editor with a live/instant preview will be either a major bonus or a necessity.}}

The next two slides give a \textbf{quick start} showing how to make a basic document, and a \textbf{command summary} listing all of the new commands in the class.  

After you are familiar with the class these two pages can (hopefully) act as a reference guide while you're working.

The pages following the command summary explain how to use the class in more detail.

When creating your own presentations, it is recommended to start with the template \textbf{\texttt{ffslides-template.tex}}. The preamble of that document is structured and has lots of comments that describe what you should add to customize the presentation to your liking.
}

%---------------------------------------
\begin{SaveVerbatim}{TempVerb}
\documentclass{ffslides}
\ffpage{10}{1}
\begin{document}

\blankpage
\ctext[t]{0.5}{0.3}{0.5}{%
    \centering Blank page, title page}

\normalpage{Slide title}{%
    This text is shown in a ``dtext'' minipage}
\ctext{0.2}{0.6}{0.5}{%
    And this is in a ``ctext'' minipage}
\btext{0.5}{0.4}{0.4}{%
    This is in a ``btext'' minipage}

\end{document}
\end{SaveVerbatim}
\normalpage{Quick Start}{\makesection{Quick Start}%
\footnotesize \textbf{A minimal document.} Here is the code for a document with two pages, and what the typeset pages look like.  

~~~{\footnotesize\blue\BUseVerbatim{TempVerb}}
}
\putfig{0.5}{0.2}{0.2}{tiny_example_1.pdf}
\putfig{0.71}{0.2}{0.2}{tiny_example_2.pdf}
\ctext{0.05}{0.575}{0.5}{\footnotesize%
\textbf{Class options.} Use \twbs{documentclass[\textless options\textgreater]\{ffslides\}} to specify options. Available options are:

\qi[{\makebox[15ex][l]{\tw{showgrid}}}]{Puts a $100\times100$ grid (with color \tw{ffgridcolor}) over the background to help with alignment. See \hyperlink{Alignment grid}{Alignment grid}.}
\qi[{\makebox[15ex][l]{\tw{\textless name\textgreater}}}]{If a file named \tw{bground-\textless name\textgreater.txt} is found, the code in that file is used to define the background. Similarly \tw{header-\textless name\textgreater.txt} or \tw{footer-\textless name\textgreater.txt} will be used to define the header and footer. This makes styles somewhat portable. See \hyperlink{changing-background}{Changing the background\ldots}}
\qi[{\makebox[15ex][l]{others\ldots}}]{\tw{draft, leqno, fleqn, openbib, 10pt, 11pt, 12pt} are passed on to the article class.  Font size options are only included for potential font or package compatibility, since page size is set relative to line height. Other article-class options are not relevant.}
}
\ctext[c]{0.045}{0.195}{0}{\ninc{1}}
\ctext[c]{0.29}{0.345}{0}{\ninc{2}}
\ctext[c]{0.92}{0.35}{0}{\ninc{3}}
\btext[br]{0.95}{0.91}{0.25}{%
\textbf{Notes}

\qi[\ninc{1}~~]{\twbs{ffpage} is used to set the page dimensions. In this example the page is 10 lines high and has aspect ratio 1 (it is square).}

\qi[\ninc{2}~~]{Because all of the text is input as command arguments, including inadvertent white space can cause discrepancies in the layout. When in doubt, terminate lines with \%.}

\qi[\ninc{3}~~]{Note that the \twbs{btext} content sits on top of the \twbs{ctext} content. Content is drawn in the order you enter it, which allows you to control overlap.}
}


%---------------------------------------
\newcommand{\MN}[1]{\makebox[25em][l]{~~\twbs{#1}}}%    MacroName
\normalpage{Command Summary}{\makesection{Command Summary}%
\footnotesize%
\textbf{Coordinate system.} The top left corner is (0,0) and the bottom right corner is (1,1).

\textbf{Essential commands} (creating pages and adding content). Here, \tw{L}, \tw{R}, \tw{x}, and \tw{width} are all fractions of the paper width, and \tw{y} is a fraction of the paper height. \tw{RP} is the \tw{pstricks} the reference point of the box, e.g. \tw{tl} (default) for top left, \tw{r} for right center.\\
\qi[\MN{ffpage\{height\}\{aspect\}}]
   {Use once in the preamble to set page dimensions.}
\qi[\MN{normalpage[L][R]\{title\}\{content\}}]
   {Create a new page with background, header, and footer.}
\qi[\MN{blankpage}]
   {Create a new page with only the background. Header or footer can be added with \twbs{drawheader\{title\}} or \twbs{drawfooter}.}
\qi[\MN{ctext[RP]\{x\}\{y\}\{width\}\{content\}}]
   {``Custom text:'' place \tw{content} in a minipage of the given \tw{width} at (\tw{x},\tw{y}).}
\qi[\MN{btext[RP][style]\{x\}\{y\}\{width\}\{content\}}]
   {``Boxed text:'' just like \twbs{ctext}, but the minipage is placed inside a framed box.}
\qi[\MN{putfig[RP]\{x\}\{y\}\{width\}\{file\}}]
   {Puts graphics \tw{file} at (x,y).}
\qi[\MN{dtext[L][R]\{content\}}]
   {``Default text:'' can be used to add the default text area to a \twbs{blankpage}.}

\textbf{Customize the style} (modify with \twbs{renewcommand} in the preamble to change appearance)\\
\qi[\MN{drawbackground}]
   {Used by \twbs{normalpage} and \twbs{blankpage} to draw the background. }
\qi[\MN{drawheader\{title\}}]
   {Used by \twbs{normalpage} to create the header. Or to add one manually to blank pages.}
\qi[\MN{drawfooter}]
   {Used by \twbs{normalpage} to create the footer. Or to add one manually to blank pages.}
\qi[\MN{dtextleftedge}]
   {Alias for a number in [0,1] specifying the left edge of the \twbs{dtext} region.}
\qi[\MN{dtextrightedge}]
   {Alias for a number in [0,1] specifying the right edge of the \twbs{dtext} region.}
\qi[\MN{dtexttopedge}]
   {Alias for a number in [0,1] specifying the top edge of the \twbs{dtext} region.}
\qi[\MN{dtextinclude}]
   {Alias for commands to add just before \tw{content} in every \twbs{dtext} minipage.}
\qi[\MN{ctextinclude}]
   {Alias for commands to add just before \tw{content} in every \twbs{dtext} minipage.}
\qi[\MN{btextinclude}]
   {Alias for commands to add just before \tw{content} in every \twbs{btext} minipage.}
\qi[{\makebox[25em][l]{~~\tw{btextboxstyle}}}]
   {Sets the default style of \twbs{btext} boxes. Do not use \twbs{renewcommand} for this one. Instead, use \twbs{newpsstyle\{btextboxstyle\}\{param\_value\_pairs\}}.}

\textbf{Convenience commands} (not required, but could aid ease-of-use)\\
\qi[\MN{gridon, \twbs{}gridoff}]
   {Turn the alignment grid on or off at the next page. Overrides \tw{showgrid} option.}
\qi[\MN{makesection[targ\_name]\{toc\_listing\}}]
   {Creates a phantom section for use in a table of contents. Optionally creates a hypertarget for internal linking as well.}
\qi[\MN{makesubsection[targ\_name]\{toc\_listing\}}]
   {Same as \twbs{makesection}, but makes a phantom subsection instead.}
\qi[\MN{qi[bullet]\{item\}}]
   {Creates a ``list-item-like'' layout with \tw{bullet} on the left and \tw{item} on the right.}
\qi[\MN{qitemi,\twbs{}qitemii,\twbs{}qitemiii}]
   {Defines default \tw{bullet} used by \twbs{qi}, \twbs{qii}, \twbs{qiii}.}
\qi[\MN{qii\{item\},\twbs{}qiii\{item\}}]
   {Alias for \twbs{qi[\twbs{}qitemii]\{item\}} and \twbs{qi[\twbs{}qitemiii]\{item\}}}
}


%---------------------------------------
\blankpage\makesection{Essentials}%
\drawfooter%
\psframe[fillstyle=solid,
         fillcolor=white,
         framearc=0.025](.025, 0.06)(.975, 0.94)
\ctext[c]{0.5}{0.225}{0.7}{%
\centering \Huge Essentials}
\ctext[t]{0.5}{0.375}{0.55}{%
This section covers the main commands used to create pages (slides) and add content: \twbs{ffpage}, \twbs{normalpage}, \twbs{blankpage}, \twbs{ctext}, \twbs{btext}, and \twbs{putfig}.  
}


%---------------------------------------
\normalpage[0.05][0.6]{Setting the page size}{\makesubsection{Setting the page size}%
To control the page dimensions, use \emphtwbs{ffpage\{height\}\{aspect\}}. This command should appear early in the preamble (right after \twbs{documentclass} would make sense).  It is a macro that uses the facilities of the \tw{geometry} package to set the page dimensions. 

Both \tw{height} and \tw{aspect} are numbers (not \TeX\ lengths).  \tw{height} is the number of lines tall to make the page, and \tw{aspect} is the aspect ratio (width/height) of the page. 
For example, the page size for this document was set using \twbs{ffpage\{35\}\{1.3333\}}, which means:\par
\qi{The page is 35 lines tall.  The height of a line is measured by \twbs{baselineskip}. The boxes at the left side of this page are all \twbs{baselineskip}  tall, and show that the page is in fact 35 lines high. For  a real presentation a  height of 25 lines or so is probably more suitable.}\par
\qi{The aspect ratio is 1.3333, yielding a 4:3 page.}

To ensure that the origin of the coordinate system is at the top left corner of the page, the lengths \twbs{topskip} and \twbs{parindent} are both set to 0pt by the class.  They can't be changed globally. Instead, if you want to change paragraph formatting or other aspects of the style of text in \twbs{dtext}, \twbs{ctext}, or \twbs{btext} boxes, use the method described in the \hyperlink{styling-boxes}{Styling dtext, ctext, and btext} section.
}
\psgrid[xunit=1.1em,
        yunit=-\baselineskip,
        subgriddiv=1](0,0)(1,35)
\ctext{0}{0}{.02}{1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
                  21 22 23 24 25 26 27 28 29 30 31 32 33 34 35}
\btext[tr]{0.96}{0.12}{0.275}{%
The \textbf{coordinate system} used to position material on the page is the same regardless of the page size. The top left corner is (0,0) and the bottom right corner is (1,1).

A few points are shown on this page with their coordinates, for illustration.  From these points we can see:

\qi{The top left corner of the \twbs{dtext} region for this presentation is set to (0.05, 0.13).}

\qi{This page was created with the command \twbs{normalpage[0.05][0.6]\{Setting the page size\}\{To control the page dimensions...\}}. This set the \twbs{dtext} region of this page to occupy the horizontal part of the page from 0.05 to 0.6. }

\qi{The footer of this presentation is vertically positioned at the 0.975 point of the page.}
}
\pscircle*[linecolor=red](0.05,0.13){.5ex}
\ctext[b]{0.05}{0.125}{0.1}{\red\centering (0.05, 0.13)}
\pscircle*[linecolor=red](0.6,0.5){.5ex}
\ctext[l]{0.61}{0.5}{0.1}{\red (0.6, 0.5)}
\pscircle*[linecolor=red](0.5,0.975){.5ex}
\ctext[b]{0.5}{0.965}{0.1}{\red\centering (0.5, 0.975)}


%---------------------------------------
\normalpage[0.15][0.7]{Creating normal pages}{\makesubsection{Creating normal pages}%
A ``normal'' page is one with a header, a footer, a background, and a default text area.  Such a page is created with the command \emphtwbs{normalpage[L][R]\{title\}\{content\}}.

The command carries out the following operations:

\qi{A \twbs{newpage} is used to create a new page.}
\qi{\twbs{drawbackground} is used to draw the background.}
\qi{\twbs{drawheader\{title\}} is used to draw the header with the supplied \tw{title}.}
\qi{\twbs{drawfooter} is used to draw the footer.}
\qi{\twbs{dtext[L][R]\{content\}} is used to put \tw{content} on the page.}

The \tw{content} is placed in a minipage, so it can contain any \LaTeX\ commands that will work in a minipage (that is, almost anything). 

Optional arguments \tw{L} and \tw{R} are numbers between zero and one, giving the horizontal coordinates of the left and right edges of the text area. 

Changing \tw{L} and \tw{R} makes it easy to make room on the slide for placing figures or other content. For this page, \tw{L} was set to 0.15, and \tw{R} was set to 0.7.

If the optional arguments are omitted, the text's left and right edges will be set to default values, which are held in the class-defined aliases \twbs{dtextleftedge} and \twbs{dtextrightedge}.  The class sets these values to 0.05 and 0.95, respectively, but you can change the them in the preamble using \twbs{renewcommand}.
}
\psline[linecolor=red]{<->}(0,0.7)(0.15,0.7)
\ctext[b]{0.075}{0.695}{0.1}{\red\centering 0.15}
\psline[linecolor=red]{<->}(0.7,0.7)(1,0.7)
\ctext[b]{0.85}{0.695}{0.1}{\red\centering 0.3}
\btext[tr]{0.96}{0.12}{0.2}{%
It is possible to use \tw{pstricks} commands directly to draw items on the page. 

The red lines on this page were made with, e.g.\\
\twbs{psline[linecolor=red]\{<->\}\%
(0,0.7)(0.15,0.7)}

Any such commands will use the page's coordinate system if they are placed outside of a \twbs{normalpage}, \twbs{ctext}, or \twbs{btext} command.
}


%---------------------------------------
\normalpage{Creating blank pages}{\makesubsection{Creating blank pages}%
Blank pages, such as the main title page and section title pages in this document, can be created using \emphtwbs{blankpage}. This command takes no arguments.

The main purpose of \twbs{blankpage} is for the creation of title pages.  It could also be useful for special pages where the header and/or footer aren't desired, e.g. for pages with large images or tables.

All the command does is use \twbs{newpage} to create a new page and \twbs{drawbackground} to draw the background.  If you want a different background for your blank pages you can draw it over top of the default background on a page-by-page basis. 

You may also add the elements you want manually after creating a blank page, using \twbs{drawheader}, \twbs{drawfooter}, and \twbs{dtext}. 

The following two code chunks will produce the same result:
}
\begin{SaveVerbatim}{TempVerb}
\blankpage%
\drawheader{title}%
\drawfooter%
\dtext{content}
\end{SaveVerbatim}
\begin{SaveVerbatim}{TempVerbB}
\normalpage{title}{content}
\end{SaveVerbatim}
\ctext{0.1}{0.475}{0.4}{\footnotesize\blue\BUseVerbatim{TempVerb}}
\ctext{0.4}{0.475}{0.4}{\footnotesize\blue\BUseVerbatim{TempVerbB}}


%---------------------------------------
\normalpage{Adding \twbs{ctext} and \twbs{btext}}{\makesubsection{Adding ctext and btext}%
If you prefer to put all of your slides' content in a single minipage and use standard \LaTeX\ methods of controlling where things go, you do not need to bother with the \twbs{ctext} or \twbs{btext} commands.  When you use 

\qi[~~~]{\twbs{normalpage\{title\}\{content\}}}

to produce a page, the \tw{content} is placed in a minipage.  So you can place text, lists, tables, graphics, and so on as you wish in the normal way.  You could create an entire presentation this way using only \twbs{normalpage}.

The point of the \twbs{ctext} (``custom text'') and \twbs{btext} (``boxed text'') commands is to make it easier for you to place (possibly boxed) minipages at the location of your choosing.  This is convenient once you start placing figures and annotations beside or on top of your main content.  The syntax for these two commands is the same except \twbs{btext} takes an extra optional argument:

\qi[~~~]{\emphtwbs{ctext[RP]\{x\}\{y\}\{width\}\{content\}}\\
  \emphtwbs{btext[RP][style]\{x\}\{y\}\{width\}\{content\}}}

The required arguments \tw{x}, \tw{y}, and \tw{width} are numbers between 0 and 1 that determine the minipage's placement and width.  Optional argument \tw{[RP]} is the reference point used by \tw{pstricks} to place the box.  It is a string of one or two characters: \tw{t}, \tw{b}, or \tw{B} for vertical placement, \tw{l} or \tw{r} for horizontal placment. The default is \tw{tl}, which places the box such that it's top left corner is at (\tw{x},\tw{y}). See the \tw{pstricks} documentation for more detail.

The optional argument \tw{style} for \twbs{btext} allows you to specify \tw{pstricks}-style graphics parameters to control the box's style.  A document-wide default style for the \twbs{btext} boxes can be set in the preamble: see \hyperlink{styling-boxes}{Styling dtext, ctext, and btext}.
}
\ctext[bl]{0}{0.9}{0.4}{\red This red text was placed using\\ 
\twbs{ctext[bl]\{0\}\{0.9\}\{0.4\}\{\twbs{}red This red text...\}}.
The blue dot shows the location of the reference point.}
\pscircle*[linecolor=blue](0,0.9){3pt}
\btext[t][linecolor=red,linearc=0,fillcolor=pink]{0.7}{0.75}{0.36}{This box was made using\\
\twbs{btext[t][linecolor=red,linearc=0,fillcolor=pink]\\
\{0.7\}\{0.8\}\{0.36\}\{This box was made...\}}.\\
The box follows the document-wide default style, except for the graphics parameters we've changed in the optional argument. The blue dot shows the reference point.}
\pscircle*[linecolor=blue](0.7,0.75){3pt}


%---------------------------------------
\normalpage[0.6][0.95]{Adding graphics}{\makesubsection{Adding graphics}%
One option for adding graphics to the presentation is to use \twbs{includegraphics} inside the \tw{content} argument of a \twbs{normalpage}, \twbs{ctext}, or \twbs{btext} command.  This will put the graphic into the minipage in the usual way. 

Another option is to use the command \emphtwbs{putfig[RP]\{x\}\{y\}\{width\}\{file\}}, where \tw{file} is the path/name of a graphics file to include. The other arguments are exactly the same as those of \twbs{ctext} and \twbs{btext}.  Using \twbs{putfig} allows you to place the figure using the page's coordinate system.

For example, on this page:

\qi{\twbs{normalpage} was used with optional arguments to place this main text region on the right half of the page.}

\qi{\twbs{putfig} was used to locate the figure with the center of its top edge at (0.3, 0.35).}

\qi{\twbs{ctext} was used to place the caption text with the center of its top edge at (0.3, 0.55).}
}
\putfig[t]{0.3}{0.35}{0.5}{figure.pdf}
\ctext[t]{0.3}{0.55}{0.3}{\small\centering A function that is unimodal, but still has a local minimum.}


%---------------------------------------
\blankpage\makesection{Customizing the Style}%
\drawfooter%
\psframe[fillstyle=solid,
         fillcolor=white,
         framearc=0.025](.025, 0.06)(.975, 0.94)
\ctext[c]{0.5}{0.225}{0.7}{%
\centering \Huge Customizing the Style}
\ctext[t]{0.5}{0.375}{0.55}{%
The previous section described how to create pages and place content on a page. This section covers how to control the look of the presentation.
}


%---------------------------------------
\begin{SaveVerbatim}{TempVerb}
\renewcommand{\drawheader}[1]{%
  \ctext{0.05}{0.05}{0.9}{\LARGE\red Hello, World! #1}
  \pscircle(0.5,0.5){1em}}
\end{SaveVerbatim}
\normalpage{Changing the background, header, and footer}{\makesubsection[changing-background]{Changing the background, header, and footer}%
There is, of course, a price to be paid for the freedom to design the slides yourself: you have to have an idea what you want and the skills to produce it. In the \tw{ffslides} class, the commands \emphtwbs{drawbackground}, \emphtwbs{drawheader\{title\}}, and \emphtwbs{drawfooter} are used to produce the background, header, and footer, respectively. You can redefine these in the preamble (using \twbs{renewcommand}) to get the design you want. 

\qi[Please note:~~]{%
\qi{You can include arbitrary commands in any of these command definitions, including commands to draw \tw{pstricks} objects, or \twbs{ctext} and \twbs{btext} commands to place text.}
\qi{The \twbs{drawheader} command takes one argument, while \twbs{drawbackground} and \twbs{drawfooter} take none.}
\qi{On a normal page, the background is drawn first, then the header, then the footer.}
\qi{Any of these commands can place content anywhere on the page.  The ``fancy logo'' in the upper right of this presentation, for example, could be drawn as part of the header, the background, or even the footer.}
\qi{The commands use the same coordinate system used throughout the class.}}

For example placing the following definition

~~~{\footnotesize\blue\BUseVerbatim{TempVerb}}

in the preamble would cause every page with a header to show {\LARGE\red Hello, World! } before the page title, and to include a circle with radius 1em at the center of the page.

For drawing backgrounds and adding graphical flourishes to the design, there are essentially two approaches consistent with the design of the class:

\qi[\hspace*{1em}1.~~]{Use the extensive capabilities of the \tw{pstricks} packages to draw the design you want, or}
\qi[\hspace*{1em}2.~~]{Use an external program of your choice to create the background as a graphics file and add it to the design using \twbs{includegraphics} or \twbs{putfig}.}

The \tw{pstricks} packages are well documented and should be sufficient for most designs.
}
\ctext[c]{0.0325}{0.268}{0}{\ninc{1}}
\btext[tr]{0.99}{0.52}{0.14}{\qi[\ninc{1}~~]{The ``Please note:'' list was created using nested \twbs{qi} quick items.  See page \pageref{qipage}.}}



%---------------------------------------
\normalpage{Styling \twbs{dtext}, \twbs{ctext}, and \twbs{btext}}{\makesubsection[styling-boxes]{Styling dtext, ctext, and btext}%
\textbf{Changing \twbs{dtext} positioning.} If you create a standard page using \twbs{normalpage\{title\}\{content\}}, your \tw{content} is placed in a \twbs{dtext} minipage with left, right, and top edges given by \emphtwbs{dtextleftedge}, \emphtwbs{dtextrightedge}, and \emphtwbs{dtexttopedge}.  Each of these commands is an alias for a number between 0 and 1.  You can redefine them in the preamble to change where the default text area is shown.  For eample, 

~~~{\footnotesize\blue\twbs{renewcommand\{dtexttopedge\}\{0.2\}}}

will cause your text region's top edge to be 20\% of the page height down from the top of the page.  Tweaking the \twbs{dtext} location like this is usually necessary to get your text area to look appropriate for your header and background.

\textbf{Changing the default format of text.} The commands \emphtwbs{dtextinclude}, \emphtwbs{ctextinclude}, and \emphtwbs{btextinclude} are placed just before the content of each of the corresponding minipages.  By default each of these are empty, but you can use \twbs{renewcommand} in the preamble to add any code you like.  The main purpose of this is to let you set document-wide defaults for font size, color, and paragraph formatting in each type of box.  For example, adding

~~~{\footnotesize\blue\twbs{renewcommand\{ctextinclude\}%
\{\twbs{small}\twbs{red}\twbs{setlength\{\twbs{parskip}\}\{1ex\}\}}}}

in the preamble will cause all \twbs{ctext} minipages you create to have small red text and a \twbs{parskip} of 1ex.

\textbf{Changing the look of \twbs{btext} boxes.} The visual style of \twbs{btext} boxes is set by parameter-value pairs (``graphics parameters'' in \tw{pstricks} parlance), and the defaults can't be set by \twbs{renewcommand}. Instead we use \tw{pstricks}'s ability to save sets of graphics parameters to a named style.  To change the default characteristics of all \twbs{btext} boxes, include \emphtwbs{newpsstyle\{btextboxstyle\}\{<param\_value\_pairs>\}} in the preamble. For example,

~~~{\footnotesize\blue\twbs{newpsstyle\{btextboxstyle\}\{linecolor=red,fillstyle=solid,fillcolor=green\}}}

would set all \twbs{btext} boxes to have a red outline and green background by default.
}



%---------------------------------------
\normalpage{Re-using your designs}{\makesubsection[re-using-designs]{Re-using your designs}%
The code for drawing the background, header, and footer can be located in external files, and added to the presentation using document class options.  This gives slide designs a certain degree of portability and makes it easier to re-use your creations across documents.  

To use this functionality, create some or all of the text files as shown here:

~~\begin{tabular}{p{0.3\textwidth}p{0.55\textwidth}}
File name & File contents \\\hline
\tw{bground-<name>.txt} & \twbs{newcommand\{\twbs{drawbackground\}\{~<commands>~\}}} \\
\tw{header-<name>.txt} & \twbs{newcommand\{\twbs{drawheader\}[1]\{~<commands>~\}}} \\
\tw{footer-<name>.txt} & \twbs{newcommand\{\twbs{drawfooter\}\{~<commands>~\}}} \\\hline
\end{tabular}\\[1ex]

Place the files alongside your source file so \TeX\ can find them. Then specify the \tw{<name>} part of the file names in the class options to control which files get used.
 
For example:

\qi{\raggedright{\footnotesize\blue\twbs{documentclass[mystyle1]\{ffslides\}}} Creates a document with background defined in \tw{bground-mystyle1.txt}, header defined in \tw{header-mystyle1.txt}, and footer defined in \tw{footer-mystyle1.txt}, if those files can be found.}
\qi{\raggedright{\footnotesize\blue\twbs{documentclass[mystyle1,mystyle2]\{ffslides\}}} Creates a document with background defined in \tw{bground-mystyle1.txt}, and header/footer defined in \tw{header-mystyle2.txt}, \tw{footer-mystyle2.txt}, if those are the files present.}

In this way the user can change change designs on the fly, or mix and match the background/headers/footers from different designs they may have. But the class will use the first background, header, or footer files it finds that match any optional argument(s), so the exact behaviour depends on which files are present.   

These features are far from a full, robust ``theming'' system, but such functionality was not a goal of the class's design.  The ability to store headers/footers/backgrounds externally was included as a convenience to the user who develops two or three favorite layouts  they like to use for different purposes.}




%---------------------------------------
\blankpage\makesection{Other Features}%
\drawfooter%
\psframe[fillstyle=solid,
         fillcolor=white,
         framearc=0.025](.025, 0.06)(.975, 0.94)
\ctext[c]{0.5}{0.225}{0.7}{%
\centering \Huge Other Features}
\ctext[t]{0.5}{0.375}{0.55}{%
This section describes a few features that have been included in the class purely for convenience---the class can be used perfectly well without them.  It could be skipped on first reading, and in any case the choice to use these features or not is completely up to the user.    
}


%---------------------------------------
\gridon
\normalpage[0.05][0.6]{Alignment grid}{\makesubsection{Alignment grid}%
If you choose to add annotations, figures, or objects to your slides using \twbs{ctext}, \twbs{btext}, \twbs{putfig}, or the many \tw{pstricks} commands, you will have to enter page coordinates to place the material.  An alignment grid, like the one on this page, can speed up this process.

It is a $100\times 100$ grid. In the class's coordinate system, (where the page is viewed as a unit square), the grid has major divisions every 0.1 and minor divisions every 0.01, in both directions.

The grid can be turned on or off:

\qi{Globally for the whole document, using the \tw{showgrid} class option (include the option to show the grid on all pages; leave it out to not show the grid).}

\qi{Locally, using commands \emphtwbs{gridon} and \emphtwbs{gridoff}. These commands will control grid visibility on the \emph{next} new page after their appearance, so they would normally be placed in between page creation commands.  They take precedence over the class option.}
 
The default color of the grid is a named color called \tw{ffgridcolor}.  The color can be redefined in the preamble, using \twbs{newrgbcolor\{ffgridcolor\}\{<R G B>\}}.
}
\btext[tr]{0.96}{0.12}{0.275}{
The grid appears on top of the background, header, and footer, but underneath other page contents.
}
\gridoff

%---------------------------------------
\normalpage{Sections and Hyperlinks}{\makesubsection{Hyperlinks}%
The usual \LaTeX\ sectioning commands don't make a lot of sense in a presentation, where page breaking is done manually and different users might have different ideas about how to visually demarcate different ``sections'' of a talk.  Hence the \tw{ffslides} class is not designed with the use of sectioning commands in mind.  In particular, users wanting ``section numbers'' in their slide titles will have to either enter them manually or devise their own way to use \LaTeX\ counters.

Still, it is occasionally useful to include a table of contents (as in this document), and also nice to be able to provide PDF hyperlinks between sections.  Two commands have been included in the class to provide these abilities:

\qi[~~~]{\emphtwbs{makesection[targ\_name]\{toc\_listing\}}\\
  \emphtwbs{makesubsection[targ\_name]\{toc\_listing\}}}

Either of these commands can be entered after a page creation command to achieve the following:

\qi{Create a hypertarget with name \tw{targ\_name} that can be used to link to that page elsewhere (using the \twbs{hyperlink} command)}
\qi{Create a phantom section or subsection (depending on which command was used) with name \tw{toc\_listing}.  The phantom section won't change the document's appearance, but it will show up in the table of contents if the \twbs{tableofcontents} command is used to produce one.}

The hyperlinking functionality depends on the \tw{hyperref} package, which is loaded automatically by the document class.  See that package's documentation for how to use \twbs{hypertarget} and \twbs{hyperlink}.
}



%---------------------------------------
\normalpage{\twbs{qi}: quick item}{\makesubsection{Quick items}\label{qipage}%
The \LaTeX\ list-making environments (\tw{itemize}, \tw{enumerate}, and \tw{description}) are very useful, and can be customized as you like (especially if you use the \tw{enumitem} package).  Nevertheless, when preparing a presentation one may still wish for a simple structure to make ``list-item-like'' content layouts that allow the bullet/number/description and the spacing to be adjusted on an \emph{ad hoc} basis as you go.  

That is the purpose of the \twbs{qi} macro. It creates an arrangement like the following (boxes added to aid visualization):

\qi[\fbox{\textbf{left side}, typeset in ``LR-mode.''}]
   {\fbox{\parbox[t]{34em}{\textbf{right side}, typeset in a minipage, top-aligned, with width     equal to the remainder of the line width.\\
    It can contain anything that can go in a minipage,\\
    \qi[\fbox{including}]{\fbox{\parbox[t]{28em}{additional nested \twbs{qi} commands if one sees         the need to use them.}}}
}}}

This simple structure and the fact that you can nest commands means that you can quickly produce a variety of list-like or even table-like arrangements without needing other methods. The command's syntax is: 

\begin{tabular}{ll}
\emphtwbs{qi[<left\_side>]\{<right\_side>\}} & (the main command) \\
\emphtwbs{qii\{<right\_side>\}} & (an alias for \twbs{qitem[\twbs{qitemii}]\{<right\_side>\}})\\
\emphtwbs{qiii\{<right\_side>\}} & (an alias for \twbs{qitem[\twbs{qitemiii}]\{<right\_side>\}})\\
\end{tabular}

The optional \tw{<left\_side>} argument can be anything, but there are three pre-defined commands that you can use on the left side to produce something equivalent to an \tw{enumerate} environment: \emphtwbs{qitemi}, \emphtwbs{qitemii}, and \emphtwbs{qitemiii}. You can redefine these in the preamble to set your own bullets. By default they are set to \twbs{labelitemi}, \twbs{labelitemii}, and \twbs{labelitemiii}, to mimic the \tw{enumerate} environment. 

The default value of \tw{<left\_side>} is \twbs{qitemi}.  Commands \twbs{qii} and \twbs{qiii} are just shortcuts for making quick items with the default second- and third-level bullets.

Clearly, \twbs{qi} can be used to quickly produce bulleted items without bothering to use \tw{itemize} environments (or to set up their spacing and formatting). But other uses are possible.  The next page gives some exaples.
}


%---------------------------------------
%%%verbatim part%%%
\begin{SaveVerbatim}{TempVerb}
\textbf{Example 1}

\qi{We are producing a list}
\qii{It has bullets at different levels}
\qiii{Its spacing is compact.}
\qi{Now it is over.}

\textbf{Example 2}

\qi[$\alpha$~~]{This example has an outer list with inter-item
                spacing equal to the document's paragraph spacing.}

\qi[$\beta$~~]{It also has custom bullets\\
  \qi[$~~\Rightarrow$~]{With an inner list.}\\
  \qi[$~~\Rightarrow$~]{Made using quick items nested inside the 
                        right side of item $\beta$.}}

\qi[$\gamma$~~]{Now it, too, is over.}

\textbf{Example 3}

\qi[\parbox{10ex}{~~\emph{term}}]{One could use quick items for 
                                  layouts like this.}
\qi[\parbox{10ex}{~~\emph{word}}]{Of course \texttt{tabular} is 
                          the standard way, but with quick items 
                          we can build it line by line.}
\qi[\parbox{10ex}{~~\emph{saying}}]{And we use a single command 
                                    for everything.}
\end{SaveVerbatim}
%%%end verbatim part%%%
\normalpage[0.05][0.4]{\twbs{qi}: quick item (continued)}{%
\textbf{Example 1}

\qi{We are producing a list}
\qii{It has bullets at different levels}
\qiii{Its spacing is compact.}
\qi{Now it is over.}

\textbf{Example 2}

\qi[$\alpha$~~]{This example has an outer list with inter-item
                spacing equal to the document's paragraph spacing.}

\qi[$\beta$~~]{It also has custom bullets\\
  \qi[$~~\Rightarrow$~]{With an inner list.}\\
  \qi[$~~\Rightarrow$~]{Made using quick items nested inside the 
                        right side of item $\beta$.}}

\qi[$\gamma$~~]{Now it, too, is over.}

\textbf{Example 3}

\qi[\parbox{10ex}{~~\emph{term}}]{One could use quick items for 
                                  layouts like this.}
\qi[\parbox{10ex}{~~\emph{word}}]{Of course \texttt{tabular} is 
                          the standard way, but with quick items 
                          we can build it line by line.}
\qi[\parbox{10ex}{~~\emph{saying}}]{And we use a single command 
                                    for everything.}
}
\btext[tr]{0.96}{0.13}{0.5}{%
The lists at left were made using the following code:

~~\BUseVerbatim{TempVerb}
}


%---------------------------------------
\blankpage\makesection{Appendices}%
\drawfooter%
\psframe[fillstyle=solid,
         fillcolor=white,
         framearc=0.025](.025, 0.06)(.975, 0.94)
\ctext[c]{0.5}{0.225}{0.7}{%
\centering \Huge Appendices}
\ctext[t]{0.5}{0.375}{0.55}{%
Here we collect some additional information.  

A1, Tips and tricks, gives a few usage tips.  That slide is arranged to suggest how one could use the class to produce a research poster as a single-slide presentation with \twbs{ctext} or \twbs{btext} minipages arranged on the page.  

A2 is included for the sake of completeness.  It lists commands and lengths that are only used internally, by the class.  It would only be of interest to those reading the class definition file.
}


%---------------------------------------
%%%verbatim section%%%
\begin{SaveVerbatim}{TempVerb}
\ctext[tl]{0.66}{0.595}{0}{%            %Make zero-width "container box"
  \psframe[style=btextboxstyle](0,0)(0.3,0.325)              %Draw a box
  \psline{<->}(0,0)(.1,.1)              %A line from (0,0) to (0.1,0.1)
  \btext[t]{0.1}{0.1}{.15}{\centering Nested btext}
  \ctext{0.1}{0.15}{0.15}{\small\red Nested ctext: units stay the same,
                          but the origin shifts.}}
\end{SaveVerbatim}
%%%end verbatim section
\normalpage{A1: Tips and tricks}{\makesubsection{tips and tricks}}%
\newpsstyle{posterbox}{fillcolor=white,linecolor=black}%
\newcommand{\pheading}[1]{{\centering\large#1\\[0.5ex]}\scriptsize\black}%
\btext[tl][style=posterbox]{0.03}{0.11}{0.28}{
\pheading{Creating a poster}
If we wanted to use \tw{ffslides} to make a poster, we could set the page to have a large height relative to the text.  here we've just used \twbs{scriptsize} to shrink the text. 

It's common to lay out posters as a sequence of panels.  The class's \twbs{btext} command is suitable for this. Inside each box we're working in a minipage, so we can use (almost) all of the usual \LaTeX\ facilities.

It is possible to nest \twbs{ctext}, \twbs{btext}, \twbs{qi}, and \twbs{putfig} commands inside a \twbs{btext}, so we can lay out a panel in a poster in a similar way to laying out a slide in a presentation.  One caveat: the coordinate system changes when nesting.  See the ``nesting boxes'' panel.
}
\btext[tl][style=posterbox]{0.03}{0.495}{0.595}{%
\pheading{Nesting boxes}
Normally in a presentation, \twbs{btext}, \twbs{ctext}, and \twbs{putfig} are not put inside \tw{content} argument of a \twbs{normalpage}.  This ensures that the coordinate system is the same for all items put on the page.  

Nesting these commands is possible, however, and might be advantageous in certain situations, e.g.:\\
\qi{When there is a graph or equation that has several annotations placed on top, nesting all of them inside a \twbs{ctext} or \twbs{btext} allows the whole group's location to be controlled by a single set of coordinates.}
\qi{When making a presentation, where everyhing in a panel is viewed as a group and might need to be moved around the poster together.}

The only complication to remember is that once you are in a minipage, the \TeX\ ``current point'' is no longer fixed at the top left corner of the page. So the $(0,0)$ point will be shifted to wherever the current point is. For example, the shaded box to the right was created with code:

\BUseVerbatim{TempVerb}
}
\btext[tr][style=posterbox]{0.965}{0.11}{0.28}{
\pheading{Including \tw{verbatim} text}
Verbatim environments and the \twbs{verb} command do not work when used in the arguments to a command.  Since all page content in the \tw{ffslides} class appears in command arguments, this is a problem.  

There are various workarounds for this problem, that one can find by searching on the internet.\\ \qi{Some suggestions may be found here: \url{http://www.tex.ac.uk/FAQ-verbwithin.html}}
\qi{see \twbs{psverbboxtrue} and \twbs{pslongbox} in the pstricks documentation}.

The solution that was used in this document was to use package \tw{fancyvrb}.  This provides a \tw{SaveVerbatim} environment that can be used (outside of any command arguments) to save verbatim code chunks to a name.  Then this name can be used inside the command argument with, for example, the \twbs{BUseVerbatim} command. See the \tw{fancyvrb} documentation for more.
}
\btext[tl][style=posterbox]{0.345}{0.11}{0.28}{
\psbezier[linecolor=red,linewidth=1pt,showpoints=false]
         {->}(0.1,0.2)(0.12,0.1)(0.15,0.22)(0.2,0.12)
\pheading{Direct use of \tw{pstricks}}
\tw{pstricks} has commands for producing lines, curves, and shapes with control over line colors, fills, and much more.  Some of these are useful for creating ``callout'' types of annotations on your slides.  For example the \twbs{psbezier} command produces Bezier curves:\\[8ex]

\tw{pstricks} commands \tw{rput} and \tw{uput} are also useful for placing objects and/or labels at specified locations.\\[4ex]
}
\ctext[tl]{0.66}{0.595}{0}{%            %Make zero-width "container box"
  \psframe[style=btextboxstyle](0,0)(0.3,0.325)              %Draw a box
  \psline{<->}(0,0)(.1,.1)              %A line from (0,0) to (0.1,0.1)
  \btext[t]{0.1}{0.1}{.15}{\centering Nested btext}
  \ctext{0.1}{0.15}{0.15}{\small\red Nested ctext: units stay the same,
                          but the origin shifts.}}


%---------------------------------------
\normalpage{A2: Internal Commands and Lengths}{\makesubsection{Internal commands and lengths}%
The following material could be an addendum to the command summary.  It lists all of the internal commands and lengths that are used by the class, transparently to the user.  Unless you are digging into the structure of the class definition \tw{ffslides.cls}, there should be no need to know these items.

\footnotesize%
\textbf{Internal commands} (used by the class, not normally needed by the user)\\
\qi[\MN{showgrid}]{Used to put the alignment grid on top of the background}
\textbf{Lengths} (used by the class, not for direct modification by the user)\\
\qi[\MN{pgheight}]
   {Used to set page height.}
\qi[\MN{pgwidth}]
   {Used to set page width.}
\qi[\MN{dtextwidth}]
   {Used in \twbs{dtext}.}
\qi[\MN{qitemwidth}]
   {Used in \twbs{qi}.}
\qi[\MN{qbulletwidth}]
   {Used in \twbs{qi}.}
\qi[\MN{labeliwidth}]
   {Used in \twbs{qi}.}
\qi[\MN{labeliiwidth}]
   {Used in \twbs{qi}.}
\qi[\MN{labeliiwidth}]
   {Used in \twbs{qi}.}
\qi[\MN{labeliiiwidth}]
   {Used in \twbs{qi}.}
\qi[\MN{qparskip}]
   {Used in \twbs{qi}.}
\qi[\MN{outercapheight}]
   {Used in \twbs{qi}.}
\qi[\MN{qgapheight}]
   {Used in \twbs{qi}.}
}





\end{document}




