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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
|
<[autotemplate]
usepackage={beamerthemeWarsaw}
usepackage=[utf8]{inputenc}
usepackage=[german]{babel}
usepackage=[T1]{fontenc}
title={What's new in 0.7}
subtitle={nowiki, code, autotemplate}
author={Kai Dietrich}
[autotemplate]>
== Overview ==
==== What's new in 0.7 ====
There are 4 major changes in wiki2beamer 0.7
# @$\backslash$end\{frame\}@ is no longer detected automatically
#* @$\backslash$end\{frame\}@ detection causes semantic misinterpretations in various situations
#* @[frame]>@ is the preferred notation anyway, use it
# the new @<[nowiki] [nowiki]>@ environment allows you the escape from wiki2beamer completly
# the new @<[code] [code]>@ environment allows you to write !animated! code listings
# @autotemplate@ support
== Nowiki-Escaping ==
==== @nowiki@-Environment ====
Sometimes you really don't want wiki2beamer to get in your way.
That's where @nowiki@ steps in:
Use it like an environment to disable all wiki2beamer action in between:
<[nowiki]
{\tt
$<$[nowiki] \\
me@you.com you@me.com \\
{}[nowiki]$>$
}
[nowiki]>
result without nowiki (notice the changed font):
me@you.com you@me.com
result with nowiki:
<[nowiki]
me@you.com you@me.com
[nowiki]>
== Animated Listings ==
=== Introduction ===
==== ====
\centering
Animated Listings:\\
@<[code] [code]>@
==== The Problem ====
It's a common problem to put source code listings on beamer slides and talk about them to the
audience. To support your talk you will often need to pup-up or partially hide some code.
Doing this in plain \LaTeX{} can be a pain in the ass and a time-consuming task if you don't know
exactly how to do it from the beginning. Also beamer has some problems with verbatim environments
inside slides, so if you've ever tried, you will have given up most certainly.
\vspace{1em}
wiki2beamer solves all these problems by putting together the @listings@-package with some clever
code generation. See what's coming\ldots
=== Syntax ===
==== The Basic Syntax ====
<[code][style=basic,language=java]
==== Title ==== //usual frame title
<\[code\]\[key=value,key=value\] //opens a code block
//the key=value list is passed
//directly to lstlistings
class Fooo {} //some code
\\[ //\[ and \] have special meanings, to use them
\\] //in the listing, escape them with a \
\[code\]> //closes the code block
[code]>
==== Syntax For Animations ====
<[code][style=basic,language=java]
<\[code\]
some code that appears from start to end |
\[<2>some code that only appears on slide 2\] |
\[<2-4>some code that appears on slides 2, 3 and 4\] |
\[<2,3>some code that appears on slides 2 and 3\] |
\[<1-2,4>some code that appears on slides 1, 2 and 4\] |
\[\[<2>some code \]\[<4>some other code\]\] |
//on slide 1 and 3 the empty space
//will be filled with whitespaces
\[code\]>
[code]>
==== Animation Syntax Example in Action ====
This is the output:
<[code][style=basic]
some code that appears from start to end |
[<2>some code that only appears on slide 2] |
[<2-4>some code that appears on slides 2, 3 and 4] |
[<2,3>some code that appears on slides 2 and 3] |
[<1-2,4>some code that appears on slides 1, 2 and 4] |
[[<2>some code ][<4>some other code]] |
[code]>
==== Behind the scenes ====
What wiki2beamer does is:
* generate a sequence of listings from the [code] block
* give names to the listings
* put them at the position before the first frame
* put references to the listings in an @overprint-onslide@ on the frame
If you want to find out how this looks, take a look at the @.tex@ output of this presentation.
=== Hello World Example ===
==== Overview ====
So here's how you create animated listings:
# @$\backslash$usepackage\{listings\}@
# write a style definition for @listings@
# write your code, reference to the style
# animate it
==== Defining a style for @listings@ ====
<[code][style=basic,language=TeX,title=\tiny template.tex]
\lstdefinestyle{basic}{%
captionpos=t,%
basicstyle=\footnotesize\ttfamily,%
numberstyle=\tiny,%
numbers=left,%
frame=single,%
showspaces=false,%
showstringspaces=false,%
showtabs=false,%
%
keywordstyle=\color{blue},%
identifierstyle=,%
commentstyle=\color{gray},%
stringstyle=\color{magenta}%
}
[code]>
==== Writing the code ====
<[code][style=basic,language=TeX]
<\[code\]\[style=basic,language=java,title=HelloWorld.java\]
class HelloWorld {
public static void main(String args\\[\\]) {
System.out.println("Hello World!");
}
}
\[code\]>
[code]>
==== Animating the code ====
<[code][style=basic,language=TeX]
<\[code\]\[style=basic,language=java,title=HelloWorld.java\]
class HelloWorld {
\[<2-3>public static void main(String args\\[\\]) {\]
\[<3> System.out.println("Hello World!");\]
\[<2,3>}\]
}
\[code\]>
[code]>
==== The result ====
<[code][style=basic,language=java,title=HelloWorld.java]
class HelloWorld {
[<2-3>public static void main(String args\[\]) {]
[<3> System.out.println("Hello World!");]
[<2,3>}]
}
[code]>
=== Delaying Animations ===
==== Showing Animated Code later ====
Q: The animation always starts on overlay 1. What can I do to start it later?\\
A: Use @$\backslash$uncover<\ldots>\{\}@
\uncover<2->{
<[code][style=basic,language=java]
\uncover<2->{
[<2-3><\[code\]\[style=basic,language=java\]][<3>
class HelloWorld {
public static void main(String args\[\]) {
System.out.println("Hello World!");
}
}]
[<2-3>\[code\]>]
}
[code]>
}
== Autotemplates ==
=== Introduction ===
==== ====
\centering
Autotemplate-Support
@<[autotemplate] [autotemplate]>@
==== The Problem ====
For \LaTeX beginners it's quite an obstacle to create the template needed to
compile wiki2beamers output. Wouldn't it be nice if wiki2beamer could produce
a complete all-in-one @.tex@ file without the need for a seperate template?
\vspace{1em}
wiki2beamer 0.7 can do exactly that. Let's see how it works\ldots
==== The Solution ====
Put a @<[autotemplate] [autotemplate]>@ section at the beginnung of the
wiki2beamer-file. Wiki2beamer will then put a minimal environment around your
content with all the usepackages and functionality it needs. It will also
provide you with a listings style called "basic".
<[code][style=basic,language=TeX,title=\tiny body.txt]
<\[autotemplate\]
\[autotemplate\]>
==== first slide ====
[code]>
Done.
No really, thats it.
Unless ofcourse you want to have usefull content on your first slide.
=== Syntax ===
==== key=value Commands ====
tuning the default template:
<[code][style=basic,language=TeX,title=\tiny body.txt]
<\[autotemplate\]
%some personal information for the titleframe
title={My Random Talk}
subtitle={about some random stuff}
author={James T. Kork}
usepackage={beamerthemeWarsaw}
\[autotemplate\]>
[code]>
The format of the @autotemplate@ environment is a simple @key=value@ format.
Any unknown key is interpreted as a command, the value is then appended.\\
@date=\{$\backslash$today\}@ becomes @$\backslash$date\{$\backslash$today\}@.
=== Semantics ===
==== defaults ====
wiki2beamer has some some defaults that you can either accept or overwrite.
The default template looks something like:
<[code][style=basic,language=TeX,title=\tiny defaults.txt]
<\[autotemplate\]
documentclass={beamer}
usepackage={listings}
usepackage={color}
usepackage={wasysym}
date={\today}
lstdefinestyle={basic}{...}
titleframe=True
\[autotemplate\]>
[code]>
The @titleframe@-key is special, it tells wiki2beamer to generate the
title frame on it's own.
==== key-handling ====
Keys are handled differently:
# keys that can only have one value (last one use)
#* @documentclass@
#* @titleframe@
# keys that can have multiple values
#* all unknown keys
#* @usepackage@
@usepackage@ is special in a way that only the last
occurence of the package counts (you can give multiple option-sets ala
@usepackage=[utf8]\{inputenc\}@\\
@usepackage=[latin1]\{inputenc\}@\\
Latin1 will be the option passed to inputenc in the \LaTeX{} output.
==== ====
\centering\huge
Please spread the word! :-) %
|