Debian Codegraph @

texmf-dist/doc/latex/ffslides/ffslides-doc.tex

raw
1 % This is documentation for the ffslides class.
2 %
3 % Available options:
4 % showgrid Puts a 100x100 grid (with color ffgridcolor) over the
5 % background.
6 % <name> If option <name> is entered, then a file matching
7 % bground-<name>.txt is read to produce the background.
8 % Files matching header-<name>.txt or footer-<name>.txt
9 % are read to define the header or footer, respectively.
10 % More than one such option can be specified, but only
11 % the first match of each kind is used.
12 % draft, leqno Passed on to article class on which ffslides is based.
13 % fleqn, openbib Passed on to article class.
14 % 10pt, 11pt, 12pt Passed on to article class (only need to set this for
15 % font or package compatibility).
16 \documentclass[example]{ffslides}
17 %
18 %
19 %##############################################################################
20 %### BEGIN SET UP VISUAL STYLE ###
21 %##############################################################################
22
23 %=== Change page size/dimensions ===
24 % Use \ffpage{<lines_tall>}{<aspect_ratio>} To specify page dimensions. E.g.
25 % use 1.3333 for 4:3 pages, 1.7778 for 16:9 pages.
26 \ffpage{35}{1.3333}
27
28
29 %=== Set up fonts ===
30 % It is not necessary to put anything here, but this is a good place to put any
31 % font-related preamble lines. For convenience here are some (not all) packages
32 % that allow selection of different matched text + math fonts.
33 % \usepackage{fourierNC} %-New Century Schoolbook + Fourier math
34 \usepackage{newcent} %-Century Schoolbook
35 % \usepackage{mathptmx} %-Times
36 % \usepackage{bookman} %-bookman
37 % \usepackage{mathpple} %-palatino
38 % \usepackage{mathpazo} %-palatino
39 % \usepackage{arev} %-arev
40
41
42
43 %=== Load needed packages ===
44 % Packages pstricks, geometry, lastpage, twoopt, and graphics are loaded with
45 % the class. Here, load any packages you need to make your design (e.g. pst-*
46 % packages for additional pstricks capabilities).
47 \usepackage{pst-slpe} %-used for drawing background.
48
49
50 %=== Define colors ===
51 % Define any colors you will need. Use the pstricks facilities, e.g.:
52 % \newrgbcolor{<name>}{R G B}
53 % \newgray{<name>}{graylevel}
54 % Use name ffgridcolor to change the color of the alignment grid (if using
55 % option showgrid, or the \gridon command)
56 \newrgbcolor{docbgcolor1}{0.4 0.08 0.08} %used with "example"background option
57 \newrgbcolor{docbgcolor2}{0.73 0.47 0.47} %used with "example"background option
58 \newrgbcolor{dochfcolor}{.995 .996 .6} %used with "example" header/footer option
59 \newrgbcolor{deepblue}{.2 .2 .5}
60 \newgray{faintgray}{0.92}
61
62
63 %=== Redefine the background ===
64 % If not using the default background or setting the background through the
65 % class options, customize the background with
66 % \renewcommand{\drawbackground}{<code>}
67
68
69
70 %=== Redefine the header ===
71 % If not using the default header or the class option, customize the header with
72 % \renewcommand{\drawheader}[1]{<code>}. Remember that this command takes one
73 % argument (the slide title).
74
75
76
77
78 %=== Redefine the footer ===
79 % If not using the default footer or the class option, customize the footer with
80 % \renewcommand{\drawfooter}{<code>}.
81
82
83
84
85 %=== Control the dtext, ctext, and btext regions ===
86 % Use \renewcommand to change from the defaults.
87 % * For dtext, you may change \dtexttopedge, \dtextleftedge, \dtextrightedge,
88 % and \dtextinclude.
89 % * For ctext, you may change \ctextinclude.
90 % * For btext, you may change \btextboxinclude and you can change the default
91 % box style using \newpsstyle{btextboxstyle}{<pstricks parameters list>}
92 % The "include" macros are inserted just before the contents of their respective
93 % boxes, so they can be used to set default colors, line spacing, \parskip, and
94 % so on for the contents of each type of box.
95 \newpsstyle{btextboxstyle}{linecolor=deepblue,
96 %linestyle=none,
97 framesep=1ex,
98 fillcolor=faintgray,
99 fillstyle=solid,
100 cornersize=absolute,
101 linearc=0.15,
102 shadow=true,
103 shadowcolor=gray}
104 \renewcommand{\btextinclude}{\scriptsize\deepblue}
105 \renewcommand{\dtexttopedge}{0.13}
106
107
108 %=== Change default bullets for \qi, \qii, \qiii ===
109 % Use \renewcommand to re-define \qitemi, \qitemii, or \qitemiii to specify
110 % what is to appear by default in the "bullet" or "left side" of the \qi, \qii,
111 % and \qiii structures. By default these mimic the default bullets in an
112 % itemize list. These commands are purely optional.
113
114
115
116
117 %##############################################################################
118 %### END SET UP VISUAL STYLE ###
119 %##############################################################################
120
121 %=== Place your own macros below this line ====================================
122
123
124 % A few potentially useful packages are listed here for convenience:
125 %\usepackage{setspace} %use, e.g., \begin{spacing}{2.5} blahblah \end{spacing}
126 %\usepackage{bbding} %dingbat fonts e.g. for bullets
127 %\usepackage{amsmath}
128 %\usepackage{amssymb}
129 %\usepackage[normalem]{ulem} %better underlines and other text decoration
130 %\usepackage{multicol} %multi-column in a minipage (e.g. for contents, refs)
131 %\usepackage{enumitem} %easier control of lists
132
133 %\usepackage{multicol} %multi-column in a minipage
134 %\setlength{\multicolsep}{-\baselineskip} %remove skip before multicol environment.
135 %\setlength{\columnsep}{1.5em}
136
137 \usepackage{bbding} %for "up to contents" footer arrow.
138 \usepackage{tocloft} %formatting of TOC
139 \usepackage{fancyvrb} %for SaveVerbatim environment.
140 \hypersetup{linkcolor=black,
141 colorlinks=true,
142 urlcolor=black,
143 citecolor=black
144 }
145
146 % Shortcuts for writing typewriter text (verbatim doesn't work inside minipages)
147 \newcommand{\tw}[1]{\texttt{#1}}
148 \newcommand{\twbs}[1]{\texttt{\textbackslash #1}}
149
150 % For main command description pages
151 \newcommand{\emphtwbs}[1]{{\blue\textbf{\twbs{#1}}}}
152
153 % For writing a digit inside a circle
154 \newlength{\digitheight}
155 \newlength{\digitwidth}
156 \newcommand{\ninc}[1]{%
157 \scriptsize%
158 \settoheight{\digitheight}{#1}%
159 \settowidth{\digitwidth}{#1}%
160 \makebox[1.5\digitheight][c]{\deepblue#1%
161 \pscircle[linecolor=deepblue,linewidth=0.1pt]
162 (-0.5\digitwidth,0.5\digitheight){.75\digitheight}}%
163 }
164
165
166 %##############################################################################
167 %### BEGIN DOCUMENT ###
168 %##############################################################################
169
170 \begin{document}
171
172
173 %---------------------------------------
174 \blankpage
175 \psframe[fillstyle=solid,
176 fillcolor=white,
177 framearc=0.025](.025, 0.06)(.975, 0.94)
178 \ctext[c]{0.5}{0.2}{0.7}{%
179 \centering \Huge ffslides: freeform slides and more based on the article class}
180 \ctext[t]{0.5}{0.3}{0.55}{%
181 {\centering Mark A. Wolters\\
182 \today\\[2\parskip]}
183
184 \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:
185
186 \qi[1.~~]{Freedom to specify the page dimensions relative to the text size.}
187 \qi[2.~~]{Freedom to design the elements of the slides (header, footer, background) as you like.}
188 \qi[3.~~]{Freedom to place text, graphics, or annotations anywhere on the page you like, in any order you like.}
189
190 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.
191
192 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.
193 }
194
195
196 %---------------------------------------
197 \normalpage[0.05][0.5]{Table of Contents}{\hypertarget{Contents}{}%
198 \renewcommand{\contentsname}{}% %-Gets rid of the redundant "Contents" title.
199 \setlength{\cftbeforetoctitleskip}{-1ex} %-move the whole thing up
200 \setlength{\cftaftertoctitleskip}{0pt} %-spacing after the (blank) title
201 \setlength{\cftbeforesecskip}{0pt} %-controls spacing in toc.
202 \tableofcontents
203 }
204 \ctext[c]{0.955}{0.135}{0}{\ninc{1}}
205 \ctext[c]{0.495}{0.11}{0}{\ninc{2}}
206 \ctext[c]{0.26}{0.17}{0}{\ninc{3}}
207 \btext[tr]{0.95}{0.13}{0.3}{%
208 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.
209
210 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:
211
212 \qi[\ninc{1}~~]{This box was created with command\\
213 \texttt{\twbs{btext}[tr]\{0.95\}\{0.13\}\{0.3\}\{\%\\
214 \hspace*{2em}This document...\\
215 \}}
216 }
217
218 \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}:\\
219 \texttt{\twbs{normalpage}[0.05][0.5]\{Table of Contents\}\{...\}}
220 }
221
222 \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.
223 }
224
225 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.
226 }
227
228
229 %---------------------------------------
230 \normalpage[0.05][0.48]{Should I Use this Class?}{\makesection{Should I Use this Class?}{}%
231 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.
232
233 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.
234
235 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.
236
237 This was achieved by a simple strategy and heavy use of the package \tw{pstricks}.
238 }
239 \ctext[tl]{0.52}{0.13}{0.43}{%
240 Here are the main ideas implemented in the class:
241
242 \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.}
243 \qi{The user can define commands to draw the page background, header, and footer. These are automatically generated on each new slide.}
244 \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.}
245 \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.}
246
247 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.
248 }
249
250
251 %---------------------------------------
252 \normalpage[0.05][0.48]{Should I Use this Class? (continued)}{%
253 Consequences of the class's design:
254
255 \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.
256
257 \qi{You can use your favorite packages and \LaTeX\ tricks to achieve many custom effects.}
258 \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.}
259 \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.}}
260
261 \qi[2.~~]{The number of new commands you will need to learn to use the class is fairly small.
262
263 \qi{The hope is that you will spend more time learning generally-useful \LaTeX\ techniques than studying the manual of a presentation package.}}
264
265 \qi[3.~~]{There is no built-in functionality for fancy things like animated slides, speaker notes, and so on.}
266 }
267 \ctext{0.52}{0.13}{0.43}{%
268 \qi[4.~~]{Using the package will necessarily involve tweaking the coordinates of the objects you place on the slides.
269
270 \qi{Depending on your patience level, an editor with a live/instant preview will be either a major bonus or a necessity.}}
271
272 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.
273
274 After you are familiar with the class these two pages can (hopefully) act as a reference guide while you're working.
275
276 The pages following the command summary explain how to use the class in more detail.
277
278 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.
279 }
280
281 %---------------------------------------
282 \begin{SaveVerbatim}{TempVerb}
283 \documentclass{ffslides}
284 \ffpage{10}{1}
285 \begin{document}
286
287 \blankpage
288 \ctext[t]{0.5}{0.3}{0.5}{%
289 \centering Blank page, title page}
290
291 \normalpage{Slide title}{%
292 This text is shown in a ``dtext'' minipage}
293 \ctext{0.2}{0.6}{0.5}{%
294 And this is in a ``ctext'' minipage}
295 \btext{0.5}{0.4}{0.4}{%
296 This is in a ``btext'' minipage}
297
298 \end{document}
299 \end{SaveVerbatim}
300 \normalpage{Quick Start}{\makesection{Quick Start}%
301 \footnotesize \textbf{A minimal document.} Here is the code for a document with two pages, and what the typeset pages look like.
302
303 ~~~{\footnotesize\blue\BUseVerbatim{TempVerb}}
304 }
305 \putfig{0.5}{0.2}{0.2}{tiny_example_1.pdf}
306 \putfig{0.71}{0.2}{0.2}{tiny_example_2.pdf}
307 \ctext{0.05}{0.575}{0.5}{\footnotesize%
308 \textbf{Class options.} Use \twbs{documentclass[\textless options\textgreater]\{ffslides\}} to specify options. Available options are:
309
310 \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}.}
311 \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}}
312 \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.}
313 }
314 \ctext[c]{0.045}{0.195}{0}{\ninc{1}}
315 \ctext[c]{0.29}{0.345}{0}{\ninc{2}}
316 \ctext[c]{0.92}{0.35}{0}{\ninc{3}}
317 \btext[br]{0.95}{0.91}{0.25}{%
318 \textbf{Notes}
319
320 \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).}
321
322 \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 \%.}
323
324 \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.}
325 }
326
327
328 %---------------------------------------
329 \newcommand{\MN}[1]{\makebox[25em][l]{~~\twbs{#1}}}% MacroName
330 \normalpage{Command Summary}{\makesection{Command Summary}%
331 \footnotesize%
332 \textbf{Coordinate system.} The top left corner is (0,0) and the bottom right corner is (1,1).
333
334 \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.\\
335 \qi[\MN{ffpage\{height\}\{aspect\}}]
336 {Use once in the preamble to set page dimensions.}
337 \qi[\MN{normalpage[L][R]\{title\}\{content\}}]
338 {Create a new page with background, header, and footer.}
339 \qi[\MN{blankpage}]
340 {Create a new page with only the background. Header or footer can be added with \twbs{drawheader\{title\}} or \twbs{drawfooter}.}
341 \qi[\MN{ctext[RP]\{x\}\{y\}\{width\}\{content\}}]
342 {``Custom text:'' place \tw{content} in a minipage of the given \tw{width} at (\tw{x},\tw{y}).}
343 \qi[\MN{btext[RP][style]\{x\}\{y\}\{width\}\{content\}}]
344 {``Boxed text:'' just like \twbs{ctext}, but the minipage is placed inside a framed box.}
345 \qi[\MN{putfig[RP]\{x\}\{y\}\{width\}\{file\}}]
346 {Puts graphics \tw{file} at (x,y).}
347 \qi[\MN{dtext[L][R]\{content\}}]
348 {``Default text:'' can be used to add the default text area to a \twbs{blankpage}.}
349
350 \textbf{Customize the style} (modify with \twbs{renewcommand} in the preamble to change appearance)\\
351 \qi[\MN{drawbackground}]
352 {Used by \twbs{normalpage} and \twbs{blankpage} to draw the background. }
353 \qi[\MN{drawheader\{title\}}]
354 {Used by \twbs{normalpage} to create the header. Or to add one manually to blank pages.}
355 \qi[\MN{drawfooter}]
356 {Used by \twbs{normalpage} to create the footer. Or to add one manually to blank pages.}
357 \qi[\MN{dtextleftedge}]
358 {Alias for a number in [0,1] specifying the left edge of the \twbs{dtext} region.}
359 \qi[\MN{dtextrightedge}]
360 {Alias for a number in [0,1] specifying the right edge of the \twbs{dtext} region.}
361 \qi[\MN{dtexttopedge}]
362 {Alias for a number in [0,1] specifying the top edge of the \twbs{dtext} region.}
363 \qi[\MN{dtextinclude}]
364 {Alias for commands to add just before \tw{content} in every \twbs{dtext} minipage.}
365 \qi[\MN{ctextinclude}]
366 {Alias for commands to add just before \tw{content} in every \twbs{dtext} minipage.}
367 \qi[\MN{btextinclude}]
368 {Alias for commands to add just before \tw{content} in every \twbs{btext} minipage.}
369 \qi[{\makebox[25em][l]{~~\tw{btextboxstyle}}}]
370 {Sets the default style of \twbs{btext} boxes. Do not use \twbs{renewcommand} for this one. Instead, use \twbs{newpsstyle\{btextboxstyle\}\{param\_value\_pairs\}}.}
371
372 \textbf{Convenience commands} (not required, but could aid ease-of-use)\\
373 \qi[\MN{gridon, \twbs{}gridoff}]
374 {Turn the alignment grid on or off at the next page. Overrides \tw{showgrid} option.}
375 \qi[\MN{makesection[targ\_name]\{toc\_listing\}}]
376 {Creates a phantom section for use in a table of contents. Optionally creates a hypertarget for internal linking as well.}
377 \qi[\MN{makesubsection[targ\_name]\{toc\_listing\}}]
378 {Same as \twbs{makesection}, but makes a phantom subsection instead.}
379 \qi[\MN{qi[bullet]\{item\}}]
380 {Creates a ``list-item-like'' layout with \tw{bullet} on the left and \tw{item} on the right.}
381 \qi[\MN{qitemi,\twbs{}qitemii,\twbs{}qitemiii}]
382 {Defines default \tw{bullet} used by \twbs{qi}, \twbs{qii}, \twbs{qiii}.}
383 \qi[\MN{qii\{item\},\twbs{}qiii\{item\}}]
384 {Alias for \twbs{qi[\twbs{}qitemii]\{item\}} and \twbs{qi[\twbs{}qitemiii]\{item\}}}
385 }
386
387
388 %---------------------------------------
389 \blankpage\makesection{Essentials}%
390 \drawfooter%
391 \psframe[fillstyle=solid,
392 fillcolor=white,
393 framearc=0.025](.025, 0.06)(.975, 0.94)
394 \ctext[c]{0.5}{0.225}{0.7}{%
395 \centering \Huge Essentials}
396 \ctext[t]{0.5}{0.375}{0.55}{%
397 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}.
398 }
399
400
401 %---------------------------------------
402 \normalpage[0.05][0.6]{Setting the page size}{\makesubsection{Setting the page size}%
403 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.
404
405 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.
406 For example, the page size for this document was set using \twbs{ffpage\{35\}\{1.3333\}}, which means:\par
407 \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
408 \qi{The aspect ratio is 1.3333, yielding a 4:3 page.}
409
410 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.
411 }
412 \psgrid[xunit=1.1em,
413 yunit=-\baselineskip,
414 subgriddiv=1](0,0)(1,35)
415 \ctext{0}{0}{.02}{1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
416 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35}
417 \btext[tr]{0.96}{0.12}{0.275}{%
418 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).
419
420 A few points are shown on this page with their coordinates, for illustration. From these points we can see:
421
422 \qi{The top left corner of the \twbs{dtext} region for this presentation is set to (0.05, 0.13).}
423
424 \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. }
425
426 \qi{The footer of this presentation is vertically positioned at the 0.975 point of the page.}
427 }
428 \pscircle*[linecolor=red](0.05,0.13){.5ex}
429 \ctext[b]{0.05}{0.125}{0.1}{\red\centering (0.05, 0.13)}
430 \pscircle*[linecolor=red](0.6,0.5){.5ex}
431 \ctext[l]{0.61}{0.5}{0.1}{\red (0.6, 0.5)}
432 \pscircle*[linecolor=red](0.5,0.975){.5ex}
433 \ctext[b]{0.5}{0.965}{0.1}{\red\centering (0.5, 0.975)}
434
435
436 %---------------------------------------
437 \normalpage[0.15][0.7]{Creating normal pages}{\makesubsection{Creating normal pages}%
438 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\}}.
439
440 The command carries out the following operations:
441
442 \qi{A \twbs{newpage} is used to create a new page.}
443 \qi{\twbs{drawbackground} is used to draw the background.}
444 \qi{\twbs{drawheader\{title\}} is used to draw the header with the supplied \tw{title}.}
445 \qi{\twbs{drawfooter} is used to draw the footer.}
446 \qi{\twbs{dtext[L][R]\{content\}} is used to put \tw{content} on the page.}
447
448 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).
449
450 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.
451
452 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.
453
454 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}.
455 }
456 \psline[linecolor=red]{<->}(0,0.7)(0.15,0.7)
457 \ctext[b]{0.075}{0.695}{0.1}{\red\centering 0.15}
458 \psline[linecolor=red]{<->}(0.7,0.7)(1,0.7)
459 \ctext[b]{0.85}{0.695}{0.1}{\red\centering 0.3}
460 \btext[tr]{0.96}{0.12}{0.2}{%
461 It is possible to use \tw{pstricks} commands directly to draw items on the page.
462
463 The red lines on this page were made with, e.g.\\
464 \twbs{psline[linecolor=red]\{<->\}\%
465 (0,0.7)(0.15,0.7)}
466
467 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.
468 }
469
470
471 %---------------------------------------
472 \normalpage{Creating blank pages}{\makesubsection{Creating blank pages}%
473 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.
474
475 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.
476
477 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.
478
479 You may also add the elements you want manually after creating a blank page, using \twbs{drawheader}, \twbs{drawfooter}, and \twbs{dtext}.
480
481 The following two code chunks will produce the same result:
482 }
483 \begin{SaveVerbatim}{TempVerb}
484 \blankpage%
485 \drawheader{title}%
486 \drawfooter%
487 \dtext{content}
488 \end{SaveVerbatim}
489 \begin{SaveVerbatim}{TempVerbB}
490 \normalpage{title}{content}
491 \end{SaveVerbatim}
492 \ctext{0.1}{0.475}{0.4}{\footnotesize\blue\BUseVerbatim{TempVerb}}
493 \ctext{0.4}{0.475}{0.4}{\footnotesize\blue\BUseVerbatim{TempVerbB}}
494
495
496 %---------------------------------------
497 \normalpage{Adding \twbs{ctext} and \twbs{btext}}{\makesubsection{Adding ctext and btext}%
498 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
499
500 \qi[~~~]{\twbs{normalpage\{title\}\{content\}}}
501
502 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}.
503
504 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:
505
506 \qi[~~~]{\emphtwbs{ctext[RP]\{x\}\{y\}\{width\}\{content\}}\\
507 \emphtwbs{btext[RP][style]\{x\}\{y\}\{width\}\{content\}}}
508
509 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.
510
511 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}.
512 }
513 \ctext[bl]{0}{0.9}{0.4}{\red This red text was placed using\\
514 \twbs{ctext[bl]\{0\}\{0.9\}\{0.4\}\{\twbs{}red This red text...\}}.
515 The blue dot shows the location of the reference point.}
516 \pscircle*[linecolor=blue](0,0.9){3pt}
517 \btext[t][linecolor=red,linearc=0,fillcolor=pink]{0.7}{0.75}{0.36}{This box was made using\\
518 \twbs{btext[t][linecolor=red,linearc=0,fillcolor=pink]\\
519 \{0.7\}\{0.8\}\{0.36\}\{This box was made...\}}.\\
520 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.}
521 \pscircle*[linecolor=blue](0.7,0.75){3pt}
522
523
524 %---------------------------------------
525 \normalpage[0.6][0.95]{Adding graphics}{\makesubsection{Adding graphics}%
526 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.
527
528 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.
529
530 For example, on this page:
531
532 \qi{\twbs{normalpage} was used with optional arguments to place this main text region on the right half of the page.}
533
534 \qi{\twbs{putfig} was used to locate the figure with the center of its top edge at (0.3, 0.35).}
535
536 \qi{\twbs{ctext} was used to place the caption text with the center of its top edge at (0.3, 0.55).}
537 }
538 \putfig[t]{0.3}{0.35}{0.5}{figure.pdf}
539 \ctext[t]{0.3}{0.55}{0.3}{\small\centering A function that is unimodal, but still has a local minimum.}
540
541
542 %---------------------------------------
543 \blankpage\makesection{Customizing the Style}%
544 \drawfooter%
545 \psframe[fillstyle=solid,
546 fillcolor=white,
547 framearc=0.025](.025, 0.06)(.975, 0.94)
548 \ctext[c]{0.5}{0.225}{0.7}{%
549 \centering \Huge Customizing the Style}
550 \ctext[t]{0.5}{0.375}{0.55}{%
551 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.
552 }
553
554
555 %---------------------------------------
556 \begin{SaveVerbatim}{TempVerb}
557 \renewcommand{\drawheader}[1]{%
558 \ctext{0.05}{0.05}{0.9}{\LARGE\red Hello, World! #1}
559 \pscircle(0.5,0.5){1em}}
560 \end{SaveVerbatim}
561 \normalpage{Changing the background, header, and footer}{\makesubsection[changing-background]{Changing the background, header, and footer}%
562 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.
563
564 \qi[Please note:~~]{%
565 \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.}
566 \qi{The \twbs{drawheader} command takes one argument, while \twbs{drawbackground} and \twbs{drawfooter} take none.}
567 \qi{On a normal page, the background is drawn first, then the header, then the footer.}
568 \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.}
569 \qi{The commands use the same coordinate system used throughout the class.}}
570
571 For example placing the following definition
572
573 ~~~{\footnotesize\blue\BUseVerbatim{TempVerb}}
574
575 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.
576
577 For drawing backgrounds and adding graphical flourishes to the design, there are essentially two approaches consistent with the design of the class:
578
579 \qi[\hspace*{1em}1.~~]{Use the extensive capabilities of the \tw{pstricks} packages to draw the design you want, or}
580 \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}.}
581
582 The \tw{pstricks} packages are well documented and should be sufficient for most designs.
583 }
584 \ctext[c]{0.0325}{0.268}{0}{\ninc{1}}
585 \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}.}}
586
587
588
589 %---------------------------------------
590 \normalpage{Styling \twbs{dtext}, \twbs{ctext}, and \twbs{btext}}{\makesubsection[styling-boxes]{Styling dtext, ctext, and btext}%
591 \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,
592
593 ~~~{\footnotesize\blue\twbs{renewcommand\{dtexttopedge\}\{0.2\}}}
594
595 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.
596
597 \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
598
599 ~~~{\footnotesize\blue\twbs{renewcommand\{ctextinclude\}%
600 \{\twbs{small}\twbs{red}\twbs{setlength\{\twbs{parskip}\}\{1ex\}\}}}}
601
602 in the preamble will cause all \twbs{ctext} minipages you create to have small red text and a \twbs{parskip} of 1ex.
603
604 \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,
605
606 ~~~{\footnotesize\blue\twbs{newpsstyle\{btextboxstyle\}\{linecolor=red,fillstyle=solid,fillcolor=green\}}}
607
608 would set all \twbs{btext} boxes to have a red outline and green background by default.
609 }
610
611
612
613 %---------------------------------------
614 \normalpage{Re-using your designs}{\makesubsection[re-using-designs]{Re-using your designs}%
615 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.
616
617 To use this functionality, create some or all of the text files as shown here:
618
619 ~~\begin{tabular}{p{0.3\textwidth}p{0.55\textwidth}}
620 File name & File contents \\\hline
621 \tw{bground-<name>.txt} & \twbs{newcommand\{\twbs{drawbackground\}\{~<commands>~\}}} \\
622 \tw{header-<name>.txt} & \twbs{newcommand\{\twbs{drawheader\}[1]\{~<commands>~\}}} \\
623 \tw{footer-<name>.txt} & \twbs{newcommand\{\twbs{drawfooter\}\{~<commands>~\}}} \\\hline
624 \end{tabular}\\[1ex]
625
626 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.
627
628 For example:
629
630 \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.}
631 \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.}
632
633 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.
634
635 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.}
636
637
638
639
640 %---------------------------------------
641 \blankpage\makesection{Other Features}%
642 \drawfooter%
643 \psframe[fillstyle=solid,
644 fillcolor=white,
645 framearc=0.025](.025, 0.06)(.975, 0.94)
646 \ctext[c]{0.5}{0.225}{0.7}{%
647 \centering \Huge Other Features}
648 \ctext[t]{0.5}{0.375}{0.55}{%
649 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.
650 }
651
652
653 %---------------------------------------
654 \gridon
655 \normalpage[0.05][0.6]{Alignment grid}{\makesubsection{Alignment grid}%
656 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.
657
658 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.
659
660 The grid can be turned on or off:
661
662 \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).}
663
664 \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.}
665
666 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>\}}.
667 }
668 \btext[tr]{0.96}{0.12}{0.275}{
669 The grid appears on top of the background, header, and footer, but underneath other page contents.
670 }
671 \gridoff
672
673 %---------------------------------------
674 \normalpage{Sections and Hyperlinks}{\makesubsection{Hyperlinks}%
675 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.
676
677 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:
678
679 \qi[~~~]{\emphtwbs{makesection[targ\_name]\{toc\_listing\}}\\
680 \emphtwbs{makesubsection[targ\_name]\{toc\_listing\}}}
681
682 Either of these commands can be entered after a page creation command to achieve the following:
683
684 \qi{Create a hypertarget with name \tw{targ\_name} that can be used to link to that page elsewhere (using the \twbs{hyperlink} command)}
685 \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.}
686
687 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}.
688 }
689
690
691
692 %---------------------------------------
693 \normalpage{\twbs{qi}: quick item}{\makesubsection{Quick items}\label{qipage}%
694 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.
695
696 That is the purpose of the \twbs{qi} macro. It creates an arrangement like the following (boxes added to aid visualization):
697
698 \qi[\fbox{\textbf{left side}, typeset in ``LR-mode.''}]
699 {\fbox{\parbox[t]{34em}{\textbf{right side}, typeset in a minipage, top-aligned, with width equal to the remainder of the line width.\\
700 It can contain anything that can go in a minipage,\\
701 \qi[\fbox{including}]{\fbox{\parbox[t]{28em}{additional nested \twbs{qi} commands if one sees the need to use them.}}}
702 }}}
703
704 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:
705
706 \begin{tabular}{ll}
707 \emphtwbs{qi[<left\_side>]\{<right\_side>\}} & (the main command) \\
708 \emphtwbs{qii\{<right\_side>\}} & (an alias for \twbs{qitem[\twbs{qitemii}]\{<right\_side>\}})\\
709 \emphtwbs{qiii\{<right\_side>\}} & (an alias for \twbs{qitem[\twbs{qitemiii}]\{<right\_side>\}})\\
710 \end{tabular}
711
712 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.
713
714 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.
715
716 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.
717 }
718
719
720 %---------------------------------------
721 %%%verbatim part%%%
722 \begin{SaveVerbatim}{TempVerb}
723 \textbf{Example 1}
724
725 \qi{We are producing a list}
726 \qii{It has bullets at different levels}
727 \qiii{Its spacing is compact.}
728 \qi{Now it is over.}
729
730 \textbf{Example 2}
731
732 \qi[$\alpha$~~]{This example has an outer list with inter-item
733 spacing equal to the document's paragraph spacing.}
734
735 \qi[$\beta$~~]{It also has custom bullets\\
736 \qi[$~~\Rightarrow$~]{With an inner list.}\\
737 \qi[$~~\Rightarrow$~]{Made using quick items nested inside the
738 right side of item $\beta$.}}
739
740 \qi[$\gamma$~~]{Now it, too, is over.}
741
742 \textbf{Example 3}
743
744 \qi[\parbox{10ex}{~~\emph{term}}]{One could use quick items for
745 layouts like this.}
746 \qi[\parbox{10ex}{~~\emph{word}}]{Of course \texttt{tabular} is
747 the standard way, but with quick items
748 we can build it line by line.}
749 \qi[\parbox{10ex}{~~\emph{saying}}]{And we use a single command
750 for everything.}
751 \end{SaveVerbatim}
752 %%%end verbatim part%%%
753 \normalpage[0.05][0.4]{\twbs{qi}: quick item (continued)}{%
754 \textbf{Example 1}
755
756 \qi{We are producing a list}
757 \qii{It has bullets at different levels}
758 \qiii{Its spacing is compact.}
759 \qi{Now it is over.}
760
761 \textbf{Example 2}
762
763 \qi[$\alpha$~~]{This example has an outer list with inter-item
764 spacing equal to the document's paragraph spacing.}
765
766 \qi[$\beta$~~]{It also has custom bullets\\
767 \qi[$~~\Rightarrow$~]{With an inner list.}\\
768 \qi[$~~\Rightarrow$~]{Made using quick items nested inside the
769 right side of item $\beta$.}}
770
771 \qi[$\gamma$~~]{Now it, too, is over.}
772
773 \textbf{Example 3}
774
775 \qi[\parbox{10ex}{~~\emph{term}}]{One could use quick items for
776 layouts like this.}
777 \qi[\parbox{10ex}{~~\emph{word}}]{Of course \texttt{tabular} is
778 the standard way, but with quick items
779 we can build it line by line.}
780 \qi[\parbox{10ex}{~~\emph{saying}}]{And we use a single command
781 for everything.}
782 }
783 \btext[tr]{0.96}{0.13}{0.5}{%
784 The lists at left were made using the following code:
785
786 ~~\BUseVerbatim{TempVerb}
787 }
788
789
790 %---------------------------------------
791 \blankpage\makesection{Appendices}%
792 \drawfooter%
793 \psframe[fillstyle=solid,
794 fillcolor=white,
795 framearc=0.025](.025, 0.06)(.975, 0.94)
796 \ctext[c]{0.5}{0.225}{0.7}{%
797 \centering \Huge Appendices}
798 \ctext[t]{0.5}{0.375}{0.55}{%
799 Here we collect some additional information.
800
801 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.
802
803 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.
804 }
805
806
807 %---------------------------------------
808 %%%verbatim section%%%
809 \begin{SaveVerbatim}{TempVerb}
810 \ctext[tl]{0.66}{0.595}{0}{% %Make zero-width "container box"
811 \psframe[style=btextboxstyle](0,0)(0.3,0.325) %Draw a box
812 \psline{<->}(0,0)(.1,.1) %A line from (0,0) to (0.1,0.1)
813 \btext[t]{0.1}{0.1}{.15}{\centering Nested btext}
814 \ctext{0.1}{0.15}{0.15}{\small\red Nested ctext: units stay the same,
815 but the origin shifts.}}
816 \end{SaveVerbatim}
817 %%%end verbatim section
818 \normalpage{A1: Tips and tricks}{\makesubsection{tips and tricks}}%
819 \newpsstyle{posterbox}{fillcolor=white,linecolor=black}%
820 \newcommand{\pheading}[1]{{\centering\large#1\\[0.5ex]}\scriptsize\black}%
821 \btext[tl][style=posterbox]{0.03}{0.11}{0.28}{
822 \pheading{Creating a poster}
823 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.
824
825 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.
826
827 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.
828 }
829 \btext[tl][style=posterbox]{0.03}{0.495}{0.595}{%
830 \pheading{Nesting boxes}
831 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.
832
833 Nesting these commands is possible, however, and might be advantageous in certain situations, e.g.:\\
834 \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.}
835 \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.}
836
837 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:
838
839 \BUseVerbatim{TempVerb}
840 }
841 \btext[tr][style=posterbox]{0.965}{0.11}{0.28}{
842 \pheading{Including \tw{verbatim} text}
843 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.
844
845 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}}
846 \qi{see \twbs{psverbboxtrue} and \twbs{pslongbox} in the pstricks documentation}.
847
848 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.
849 }
850 \btext[tl][style=posterbox]{0.345}{0.11}{0.28}{
851 \psbezier[linecolor=red,linewidth=1pt,showpoints=false]
852 {->}(0.1,0.2)(0.12,0.1)(0.15,0.22)(0.2,0.12)
853 \pheading{Direct use of \tw{pstricks}}
854 \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]
855
856 \tw{pstricks} commands \tw{rput} and \tw{uput} are also useful for placing objects and/or labels at specified locations.\\[4ex]
857 }
858 \ctext[tl]{0.66}{0.595}{0}{% %Make zero-width "container box"
859 \psframe[style=btextboxstyle](0,0)(0.3,0.325) %Draw a box
860 \psline{<->}(0,0)(.1,.1) %A line from (0,0) to (0.1,0.1)
861 \btext[t]{0.1}{0.1}{.15}{\centering Nested btext}
862 \ctext{0.1}{0.15}{0.15}{\small\red Nested ctext: units stay the same,
863 but the origin shifts.}}
864
865
866 %---------------------------------------
867 \normalpage{A2: Internal Commands and Lengths}{\makesubsection{Internal commands and lengths}%
868 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.
869
870 \footnotesize%
871 \textbf{Internal commands} (used by the class, not normally needed by the user)\\
872 \qi[\MN{showgrid}]{Used to put the alignment grid on top of the background}
873 \textbf{Lengths} (used by the class, not for direct modification by the user)\\
874 \qi[\MN{pgheight}]
875 {Used to set page height.}
876 \qi[\MN{pgwidth}]
877 {Used to set page width.}
878 \qi[\MN{dtextwidth}]
879 {Used in \twbs{dtext}.}
880 \qi[\MN{qitemwidth}]
881 {Used in \twbs{qi}.}
882 \qi[\MN{qbulletwidth}]
883 {Used in \twbs{qi}.}
884 \qi[\MN{labeliwidth}]
885 {Used in \twbs{qi}.}
886 \qi[\MN{labeliiwidth}]
887 {Used in \twbs{qi}.}
888 \qi[\MN{labeliiwidth}]
889 {Used in \twbs{qi}.}
890 \qi[\MN{labeliiiwidth}]
891 {Used in \twbs{qi}.}
892 \qi[\MN{qparskip}]
893 {Used in \twbs{qi}.}
894 \qi[\MN{outercapheight}]
895 {Used in \twbs{qi}.}
896 \qi[\MN{qgapheight}]
897 {Used in \twbs{qi}.}
898 }
899
900
901
902
903
904 \end{document}
905
906
907
908