| 1 |
%% This is part of the OpTeX project, see http://petr.olsak.net/optex |
| 2 |
|
| 3 |
\slides % OpTeX slides style activated |
| 4 |
|
| 5 |
\catcode`<=13 % special printing of <text> |
| 6 |
\def<#1>{\hbox{$\langle$\it#1\/$\rangle$}} |
| 7 |
\everyintt={\catcode`\<=13} |
| 8 |
|
| 9 |
\hyperlinks\Blue\Blue % hyperlinks are used in the title page |
| 10 |
\backgroundpic{op-slides-bg.png} % background picture |
| 11 |
|
| 12 |
\verbchar` % inline verbatim |
| 13 |
\enquotes % English quotes \"..." |
| 14 |
|
| 15 |
\slideshow %------------------------------------------------------------ |
| 16 |
|
| 17 |
|
| 18 |
\tit \OpTeX/ slides |
| 19 |
|
| 20 |
\subtit Petr Olšák\nl [email protected] |
| 21 |
|
| 22 |
\subtit\rm \url{http://petr.olsak.net/optex} |
| 23 |
|
| 24 |
\pg; %------------------------------------------------------------------ |
| 25 |
|
| 26 |
\sec Basics |
| 27 |
|
| 28 |
* A simple document looks like: |
| 29 |
|
| 30 |
\begtt |
| 31 |
\slides % style initialized |
| 32 |
%\wideformat % 16:9 |
| 33 |
\slideshow % partially uncovering ideas |
| 34 |
|
| 35 |
\sec First slide |
| 36 |
text |
| 37 |
\pg; |
| 38 |
|
| 39 |
\sec Second slide |
| 40 |
text |
| 41 |
\pg. |
| 42 |
\endtt |
| 43 |
|
| 44 |
* If `\slideshow` is missing or commented out then |
| 45 |
\"partially uncovering ideas" (see later) are deactivated. It is useful |
| 46 |
for printing. |
| 47 |
* The `\slideshow` must be the last command in the declaration part of the |
| 48 |
document. |
| 49 |
* By default, the slides have A5 landscape format. |
| 50 |
You can declare `\wideformat`. Then the height is the same |
| 51 |
but width is 263\,mm, i.\,e.~the ratio width:height is 16:9. |
| 52 |
|
| 53 |
\pg; %------------------------------------------------------------------ |
| 54 |
|
| 55 |
\sec Title slide |
| 56 |
|
| 57 |
* Title of the document (used at the first slide) is created |
| 58 |
by `\tit Title` (terminated by end of line). |
| 59 |
* The `\subtit Author name etc.`\ (terminated by end of line) |
| 60 |
can be used after `\tit` at the first slide. |
| 61 |
* You can use `\nl` for a new line in paragraphs or titles. |
| 62 |
|
| 63 |
\sec Default design |
| 64 |
|
| 65 |
* The paragraph texts are ragged right. |
| 66 |
* Titles, subtitles, and section titles are centered. |
| 67 |
* The `\sec` and `\secc` are printed without numbers. |
| 68 |
* No paragraph indentation, a little vertical space between paragraphs. |
| 69 |
* The Heros font family (aka Helvetica) is initialized as default.\nl |
| 70 |
Sans-serif FiraMath font for math typesetting is used.\nl |
| 71 |
If `\fontfam[<famname>]` precedes `\slides` then it rewrites default. |
| 72 |
* The items in lists are started by a blue square (`\type X` and `\type x` ). |
| 73 |
|
| 74 |
\pg; %------------------------------------------------------------------ |
| 75 |
|
| 76 |
\sec One slide (one page) |
| 77 |
|
| 78 |
* Top-level item list is activated by default. The asterisk `*` opens |
| 79 |
new item at the top-level list. |
| 80 |
* Nested items lists (second and more level) should be created in |
| 81 |
the `\begitems`\dots`\enditems` environments. |
| 82 |
* Each slide (page) must be terminated by `\pg;` command. |
| 83 |
* The last slide must be terminated by `\pg.` command or by `\bye`. |
| 84 |
|
| 85 |
\begtt |
| 86 |
\sec My ideas |
| 87 |
|
| 88 |
* First idea |
| 89 |
* Second idea |
| 90 |
\begitems |
| 91 |
* First sub-idea |
| 92 |
* Second sub-idea |
| 93 |
\enditems |
| 94 |
* Final idea |
| 95 |
\endtt |
| 96 |
|
| 97 |
* Note: each page is processed in a group, so: put your own definitions |
| 98 |
(if~exist) before `\slideshow` or use `\global` assignment. |
| 99 |
|
| 100 |
\pg; %------------------------------------------------------------------ |
| 101 |
|
| 102 |
\sec Partially uncovering ideas |
| 103 |
|
| 104 |
* The control sequence `\pg` must be followed by:\pg+ |
| 105 |
\begitems |
| 106 |
* the character `;` -- normal next page,\pg+ |
| 107 |
* the character `.` -- the end of the document,\pg+ |
| 108 |
* the character `+` -- next page keeps the same text |
| 109 |
and a next text is added (usable for partially uncovering of ideas).\pg+ |
| 110 |
\enditems |
| 111 |
|
| 112 |
* Summary: |
| 113 |
\begtt |
| 114 |
\pg; ... next page |
| 115 |
\pg. ... the end of the document |
| 116 |
\pg+ ... uncover next text on the same page |
| 117 |
\endtt |
| 118 |
\pg+ |
| 119 |
|
| 120 |
* When `\slideshow` is not declared then `\pg+` is deactivated.\pg+ |
| 121 |
* The `\pg+` creates a new \"virtual page", so the current paragraph is |
| 122 |
terminated. |
| 123 |
|
| 124 |
\pg; %------------------------------------------------------------------ |
| 125 |
|
| 126 |
\sec Example with partially uncovering ideas |
| 127 |
|
| 128 |
The previous page was created by: |
| 129 |
|
| 130 |
\begtt |
| 131 |
\sec Partially uncovering ideas |
| 132 |
|
| 133 |
* The control sequence `\pg` must be followed by:\pg+ |
| 134 |
|
| 135 |
\begitems |
| 136 |
* the character `.` -- normal next page,\pg+ |
| 137 |
* the character `;` -- the end of the document,\pg+ |
| 138 |
* the character `+` -- next ... \pg+ |
| 139 |
\enditems |
| 140 |
|
| 141 |
* Summary |
| 142 |
... |
| 143 |
* When `\slideshow` is not declared |
| 144 |
then `\pg+` is deactivated.\pg+ |
| 145 |
* The `\pg+` creates a new \"virtual page", |
| 146 |
so the current paragraph is terminated. |
| 147 |
\pg; |
| 148 |
\endtt |
| 149 |
|
| 150 |
\pg; %------------------------------------------------------------------ |
| 151 |
|
| 152 |
\sec Notes to `\slideshow` |
| 153 |
|
| 154 |
* When `\slideshow` is active then references created by `\ref` |
| 155 |
point to the first uncovering \"virtual" page where the destination is |
| 156 |
and references created by `\pgref` point to the last \"virtual" page. |
| 157 |
* If the text overfulls the page (slide) then it follows to the next page without |
| 158 |
saying explicitly `\pg;`. But `\slideshow` cannot work in this case.\pg+ |
| 159 |
* If `\slideshow` then each part of page between two `\pg`'s or between |
| 160 |
`\slideshow` and the first `\pg` is processed in a local group. |
| 161 |
* If not `\slideshow` then the document is not separated to groups. |
| 162 |
This can create different results. So, you can put `\slideopen` command |
| 163 |
instead of `\slideshow`. Then local groups are opened exactly as when |
| 164 |
`\slideshow` is used but `\slideshow` is not activated. Example: |
| 165 |
|
| 166 |
\begtt |
| 167 |
\slides |
| 168 |
\def\foo...{...} % global definitions. |
| 169 |
%\slideshow |
| 170 |
\slideopen % opens group for first page. |
| 171 |
... first page |
| 172 |
\pg; % closes group and opens group for second page. |
| 173 |
... second page |
| 174 |
\pg. % closes group of the last page. |
| 175 |
\endtt |
| 176 |
|
| 177 |
\pg; %------------------------------------------------------------------ |
| 178 |
|
| 179 |
\sec More about design |
| 180 |
|
| 181 |
* You can use `\backgroundpic{<image-file>}` for putting an image to the background. |
| 182 |
* You can re-declare `\footline` or re-define internal macros for design as |
| 183 |
you wish. |
| 184 |
* The TeXGyre Heros font is used as default text font, the FiraMath is used |
| 185 |
for math. |
| 186 |
* If you want to use another text font fmaily, use `\fontfam` |
| 187 |
{\em before} `\slides` command. |
| 188 |
* If you want to use different math font, use |
| 189 |
`\loadmath{[font]}` before `\fontfam` (if used) and before `\slides`. For example: |
| 190 |
|
| 191 |
\begtt |
| 192 |
\loadmath{[Asana-Math]} % Math font: Asana |
| 193 |
\fontfam[Termes] % Text font: Termes |
| 194 |
\slides |
| 195 |
... |
| 196 |
\endtt |
| 197 |
|
| 198 |
* You can put the images or text wherever using `\putimage` or `\puttext` |
| 199 |
macros... |
| 200 |
|
| 201 |
\pg; %------------------------------------------------------------------ |
| 202 |
|
| 203 |
\sec Putting images and texts wherever |
| 204 |
|
| 205 |
* `\puttext <right> <up> {<text>}` puts a <text> to the desired place: |
| 206 |
It moves the current point <right> and <up>, puts the <text> and returns |
| 207 |
back, so the typesetting continues from previous position. The parameters |
| 208 |
<right> and <up> are dimensions. For example |
| 209 |
|
| 210 |
\begtt |
| 211 |
\puttext 0mm 50mm {\Red HELLO} |
| 212 |
\endtt |
| 213 |
|
| 214 |
\puttext 0mm 50mm {\Red HELLO} |
| 215 |
prints red HELLO, as shown here.\pg+ |
| 216 |
|
| 217 |
* `\putpic <right> <up> <width> <height> {<image-file>}` |
| 218 |
puts the image with desired <width> and <height> at the position like |
| 219 |
`\puttext` puts the text.\pg+ |
| 220 |
|
| 221 |
\putpic .8\hsize 20mm 30mm \nospec {op-ring.png} |
| 222 |
* The ring above is the result of |
| 223 |
|
| 224 |
\begtt |
| 225 |
\putpic .8\hsize 20mm 30mm \nospec {op-ring.png} |
| 226 |
\endtt |
| 227 |
% |
| 228 |
used at beginning of this paragraph.\pg+ |
| 229 |
* Use `\nospec` for <width> or <height> of the image if you don't want to specify both |
| 230 |
dimensions (because you don't want to change the image aspect ratio). |
| 231 |
|
| 232 |
\pg; %------------------------------------------------------------------ |
| 233 |
|
| 234 |
\sec Limits of the \code{\\pg+} sequence |
| 235 |
|
| 236 |
* The \code{\\pg+} sequence (partially uncovering ideas) cannot be used inside |
| 237 |
a~group. |
| 238 |
* The exception is the nested environment `\begitems...\enditems`. |
| 239 |
* The `\pg+` always finalizes the current paragraph. |
| 240 |
It is impossible to hide only a part of the horizontal mode.\pg+ |
| 241 |
|
| 242 |
\sec The \code{\\layers}\,...\code{\\endlayers} environment |
| 243 |
|
| 244 |
If you really need something unsupported by `\pg+` then you can use |
| 245 |
|
| 246 |
\begtt \catcode`\<=13 |
| 247 |
\layers <number> |
| 248 |
<layered text> |
| 249 |
\endlayers |
| 250 |
\endtt |
| 251 |
|
| 252 |
* The `\layers` opens <number> following pages with the same |
| 253 |
surrounding text. The counter `\layernum` is incremented from one to |
| 254 |
<number> . The <layered text> should use `\layernum` including |
| 255 |
conditions like `\ifnum\layernum` or `\ifcase\layernum`. |
| 256 |
See next page... |
| 257 |
|
| 258 |
\pg; %------------------------------------------------------------------ |
| 259 |
|
| 260 |
\sec Example of \code{\\layers} environment |
| 261 |
|
| 262 |
The `\slides` style provides a shortcut `\use` and a macro `\pshow` (means |
| 263 |
partially show): |
| 264 |
|
| 265 |
\begtt |
| 266 |
\def\use#1#2{\ifnum\layernum#1\relax#2\fi} |
| 267 |
\def\pshow#1{\use{=#1}\Red \use{<#1}\Transparent \ignorespaces} |
| 268 |
\endtt |
| 269 |
`\use{=<num>}{<something>}` does <something> only if `\layernum=<num>`.\kern-1em |
| 270 |
|
| 271 |
The `{\pshow<num> <text>}` prints <text> in Red when current layer is equal |
| 272 |
to <num> or it prints <text> normally when the current layer is greater than <num>. |
| 273 |
The transparent (invisible) text is used in other cases. |
| 274 |
|
| 275 |
The following dance: |
| 276 |
\layers 3 |
| 277 |
{\pshow2 Second text.} {\pshow3 Third text.} {\pshow1 First text.} |
| 278 |
\endlayers |
| 279 |
\pg+ |
| 280 |
|
| 281 |
was generated by |
| 282 |
|
| 283 |
\begtt |
| 284 |
\layers 3 |
| 285 |
{\pshow2 Second text.} {\pshow3 Third text.} {\pshow1 First text.} |
| 286 |
\endlayers |
| 287 |
\endtt |
| 288 |
|
| 289 |
\pg+ |
| 290 |
* The <layered text> is treated as a macro parameter. So, you cannot use verbatim |
| 291 |
nor `\sec` titles here. Maximal one `\layers` environment can be per one |
| 292 |
page (terminated by `\pg+` or `\pg;` or `\pg.`). |
| 293 |
|
| 294 |
\pg; %------------------------------------------------------------------ |
| 295 |
|
| 296 |
\sec Comparison \OpTeX/ slides with Beamer\fnote{\url{http://www.ctan.org/pkg/beamer}} |
| 297 |
|
| 298 |
The \LaTeX{} package {\bf\Blue Beamer} gives much more features and many themes |
| 299 |
are prepared for Beamer, {\bf\Red but} |
| 300 |
\pg+ |
| 301 |
* the user of Beamer is forced to {\em program} his/her document using |
| 302 |
dozens of \code{\\begin{foo}} and \code{\\end{foo}} and many other |
| 303 |
programming constructions,\pg+ |
| 304 |
* plain \TeX{} gives you a possibility to simply |
| 305 |
{\em write} your document with minimal markup. The result is more compact. |
| 306 |
You can concentrate on the contents of your document, not on the |
| 307 |
programming syntax.\pg+ |
| 308 |
* User needs to read 250 pages of doc for understanding Beamer,\pg+ |
| 309 |
* on the other hand, you need to read only eleven |
| 310 |
slides\fnote{this twelfth slide isn't counted} |
| 311 |
and you are ready to use {\bf\Blue\OpTeX/ slides}. |
| 312 |
|
| 313 |
\pg; %------------------------------------------------------------------ |
| 314 |
|
| 315 |
\null |
| 316 |
\vskip2cm |
| 317 |
\centerline{\typosize[35/40]\bf Thanks for your attention}\pg+ |
| 318 |
|
| 319 |
\vskip2cm |
| 320 |
\centerline{\Blue\typosize[60/70]\bf Questions?} |
| 321 |
|
| 322 |
\pg. %----------------------------- THE END ---------------------------- |
| 323 |
|