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 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810
|
<[autotemplate]
title={The wiki2beamer example}
[autotemplate]>
== Introduction ==
==== Welcome ====
Welcome to the wiki2beamer example presentation. We will do our best to
document and demonstrate all features of wiki2beamer in this file. It is not
meant to be a reference though, that will be the man page wiki2beamer(1).
==== Design goals ====
Wiki2beamer was written to make typesetting presentations with \LaTeX and
beamer easier. \LaTeX beamer can create beautiful presentations but it's
a very verbose language and most of the simple tasks like using frames or
bullet lists take an awfull amount of code that looks really complicated.
This often scares away beginners and
fellow colleagues from even starting with \LaTeX. This is where wiki2beamer
steps in. It's designed to make the start easier and not remove any of the
powers of the language.
== Basic usage ==
=== Commandline ===
==== Commandline usage ====
Wiki2beamer is written in python and known to work on python 2.3 up to 2.6.
You can use it on Windows too, if you have the python interpreter installed
properly.
On *nix environments you would simple use it like this:
<[code][style=basic]
wiki2beamer example.txt > example.tex
[code]>
On Windows you would have to call the python interpreter with the wiki2beamer
script:
<[code][style=basic]
python wiki2beamer example.txt > example.tex
[code]>
=== The big picture ===
==== The big picture ====
A latex beamer document consists (like any latex document) of some introductory
style definitions and the document body. In plain latex it looks like this:
<[code][style=basic]
\documentclass{beamer}
%do some style-magic here
\begin{document}
%insert your presentation here (body)
\end{document}
[code]>
wiki2beamer can produce both: only the body content of the presentation or a complete document.
==== body-only ====
If you want full control over all the fancy stuff you can do with latex, you
can use wiki2beamer to generate a .tex that that you can include with
@\textbackslash input\{filename.tex\}@.
<[code][style=basic]
\documentclass{beamer}
\begin{document}
\input{w2b-output.tex}
\end{document}
[code]>
This is the default mode of operation.
==== autotemplate ====
If you want wiki2beamer to generate a complete document with header, you can
use the autotemplate feature. It's a special environment in wiki2beamer
syntax and must be the first element in the input file. It has a simple
@key=\{value\}@ syntax. For a full reference see the man page.
<[code][style=basic]
<\[autotemplate\]
title={The Title}
author={Mr. Foo Bar}
date={1970-01-01}
titleframe=False
\[autotemplate\]>
[code]>
If the autotemplate environment is used, a default titleframe is generated. If
you want that disabled, you can switch it with the titleframe option.
=== Structure and frames ===
==== Structure and frames ====
As most wiki-dialects, wiki2beamer supports the famous
<[center]
@==== title ====@
[center]>
syntax. When these markings start at the beginning of a line, wiki2beamer
expands them to open a frame.
==== Structure and frames ====
The following heading markups exist:
--1em--
@== title ==@ --> opens a section
--1em--
@=== title ===@ --> opens a subsection
--1em--
@==== title ====@ --> opens a frame
--1em--
Frames will be closed automatically when a new sectioning or frame markup
appears. Frames can also be closed with an optional @[frame]>@ marking
(usually only needed to write advanced LaTeX code between frames).
[frame]>
% now you can put your fancy LaTeX code here (outside of a frame)
=== Lists ===
==== Lists ====
Probably one of the most used text elements in presentations
are:
* bullet
* lists
and
# numbered
# lists
==== Bullet Lists ====
Bullet lists can be created by prepending one or many @*@ before a line
<[code][style=basic]
* A simple bullet list
* with two items
[code]>
Bullet list can also be multi-level:
<[code][style=basic]
* A more complex bullet list
** with a sublist
** and another sublist
*** here
[code]>
==== Bullet Lists (output) ====
* A simple bullet list
* with two items
* A more complex bullet list
** with a sublist
** and another sublist
*** here
==== Numbered Lists ====
The same works for numbered lists
<[code][style=basic]
# first item
# second item
## with two subitems
## and onother
### subsubitem
# third item
[code]>
==== Numbered Lists (output) ====
# first item
# second item
## with two subitems
## and onother
### subsubitem
# third item
==== Mixed Lists ====
Numbered and bullet lists can be mixed:
<[code][style=basic]
# first item
#* with a sub-list
#*# one numbered subsub-item
#*# another numbered subsub-item
#* and a lone bullet
# second item
[code]>
==== Mixed Lists (output) ====
# first item
#* with a sub-list
#*# one numbered subsub-item
#*# another numbered subsub-item
#* and a lone bullet
# second item
=== Text markup ===
==== Text markup ====
Text can be formatted with some markups. Some markups can be escaped with a
\textbackslash.
\begin{tabular}{|l|l|l|}
\hline
markup & output & escaping \\\hline
\hline
<[nowiki]
\texttt{'''bold text'''}
[nowiki]>
& '''bold text''' & \\\hline
<[nowiki]
\texttt{''italic text''}
[nowiki]>
& ''italic text'' & \\\hline
<[nowiki]
\texttt{@teletype text@}
[nowiki]>
& @teletype text@ & \textbackslash@ \\\hline
<[nowiki]
\texttt{!alerted text!}
[nowiki]>
& !alerted text! & \textbackslash! \\\hline
<[nowiki]
\texttt{\_color\_colored text\_}
[nowiki]>
& _blue_blue text_ & \\\hline
\end{tabular}
==== Text substitutions ====
There are some simple text replacements you can use:
--2em--
\begin{tabular}{|l|l|l|}
\hline
markup & output & escaping \\\hline
\hline
<[nowiki]
\texttt{-->}
[nowiki]>
& --> & \\\hline
<[nowiki]
\texttt{<--}
[nowiki]>
& <-- & \\\hline
<[nowiki]
\texttt{==>}
[nowiki]>
& ==> & \\\hline
<[nowiki]
\texttt{<==}
[nowiki]>
& <== & \\\hline
<[nowiki]
\texttt{:-)}
[nowiki]>
& :-) & \\\hline
<[nowiki]
\texttt{:-(}
[nowiki]>
& :-( & \\\hline
\end{tabular}
==== Footnotes ====
You can also use footnotes on your slides(((This is such a footnote.))).
--2em--
<[code][style=basic]
...your slides(((This is such a footnote.))).
[code]>
=== Environments ===
==== Environments ====
One of the basic building blocks of LaTeX syntax are environments. In plain
LaTeX you open, give options and close them with the following notation:
<[code][style=basic]
\begin{someenv}\[option=foo\]
...
\end{someenv}
[code]>
wiki2beamer provides a shorter syntax that looks like this:
<[code][style=basic]
<\[someenv\]\[option=foo\]
...
\[someenv\]>
[code]>
==== Environment example ====
Some of the most used environments probably is:
--1em--
<[nowiki]
\texttt{
<[center]
some centered text
[center]>
}
[nowiki]>
--1em--
output:
--1em--
<[center]
some centered text
[center]>
==== LaTeX vs. wiki2beamer environments ====
The default case is that wiki2beamer doesn't care about the name of the
environment and just passes it on to LaTeX.
For these default environments wiki2beamer doesn't track
open and close tags.
--1em--
There are a few exceptions where wiki2beamer knows and parses the
environments:
* @[nowiki]@ (escaping from wiki2beamer)
* @[code]@ (code listings)
* @[autotemplate]@ (autotemplate header)
=== Escaping ===
==== Escaping from wiki2beamer ====
Everything wiki2beamer doesn't know, it doesn't touch. But what if it knows
something that you want it to leave untouched?
For some of the most common notations we already have escaping with a
\textbackslash. If there isn't an escape, you can use the generic
@[nowiki]@ environment.
<[code][style=basic]
<\[nowiki\]
'''text that isn't bold'''
\[nowiki\]>
[code]>
Notice that the [nowiki] tags start and end at the beginning of a line.
==== Escaping (output) ====
<[nowiki]
'''text that isn't bold'''
[nowiki]>
=== Code ===
==== Code ====
One of the great strengths of LaTeX is the ability to typeset and highlight
sourcecode. Doing that manually is a very tedious task in visual presentation
tools. In LaTeX code listings are realized with the @listings@ package that
provides a new @\textbackslash lstlisting@ environment.
--1em--
In wiki2beamer we have a convenient @[code]@ environment.
==== Code ====
The basic usage is:
<[code][style=basic]
<\[code\]
... your listing here ...
\[code\]>
[code]>
The @lstlisting@ environment in the background provides options, e.g. you can
configure the highlighting:
<[code][style=basic]
<\[code\]\[style=basic,language=C,title=code example\]
if ( a == b ) { return 0; }
\[code\]>
[code]>
Inside @[code]@ environments, wiki2beamer processing is mostly disabled. The
only characters with a special meaning are @[@ and @]@ which have to be
escaped with a \textbackslash.
==== Code (output) ====
<[code][style=basic,language=C,title=code example]
if ( a == b ) { return 0; }
[code]>
=== Layout ===
==== Vertical Space ====
You can insert vertical space between two paragraphs with the
<[center]
<[nowiki]
\texttt{--length--}
[nowiki]>
[center]>
notation where ''length'' can be a valid latex length expression (e.g. @1cm@, @1pt@, @1em@ or even
@0.2\textbackslash textwidth@). This space will be squeezed by latex when the
page is full. To really force LaTeX to insert a space, use the
alternative
<[center]
<[nowiki]
\texttt{--*length--}
[nowiki]>
[center]>
notation.
==== Columns ====
Latex beamer can devide the current frame into collumns.
In wiki2beamer this can be done with the following notation:
<[code][style=basic]
<\[columns\]
\[\[\[width\]\]\]
this is the first column
\[\[\[width\]\]\]
this is the second column
\[columns\]>
[code]>
where ''width'' is a valid latex length expression.
==== Columns example ====
<[code][style=basic]
\centering
Text above the columns
<\[columns\]
\[\[\[0.4\textwidth\]\]\]
this is:
* the first column
* with a list
\[\[\[0.4\textwidth\]\]\]
this is:
* the second column
* with another list
\[columns\]>
\centering
Text below the columns
[code]>
==== Columns example (output) ====
\centering
Text above the columns.
<[columns]
[[[0.4\textwidth]]]
this is:
* the first column
* with a list
[[[0.4\textwidth]]]
this is:
* the second column
* with another list
[columns]>
\centering
Text below the columns.
=== Headers and Footers ===
==== Headers and Footers ====
Sometimes you want to repeat some latex code at the header and footer of your
presentation frames (e.g. to show logos or names). To make this easier you can
fill two special storage field @\@FRAMEHEADER=@ and @\@FRAMEFOOTER=@ with some
latex code. wiki2beamer will append or prepend this right after the frame
opening or frame closing in the resulting latex code.
@FRAMEHEADER=\begin{flushright}This is a generated FRAMEHEADER\end{flushright}
@FRAMEFOOTER=\vfill \begin{flushright}This is a generated FRAMEFOOTER\end{flushright}
==== Frame with generated header/footer ====
This is the text of the frame
%deleting header and footer
@FRAMEHEADER=
@FRAMEFOOTER=
== Graphics ==
==== Including graphics ====
LaTeX can include graphics with the @\textbackslash includegraphics@ command.
To ease the use, wiki2beamer provides a simple syntax.
simple:
<[code][style=basic]
<<<graphicsfile.png>>>
[code]>
advanced:
<[code][style=basic]
<<<graphicsfile.png,option=foo>>>
[code]>
For a documentation of available options, take a look at the graphix package
documentation.
==== Graphics example ====
<[code][style=basic]
<<<db-rg1024.png,height=0.5\textheight>>>
[code]>
==== Graphics example (output) ====
<<<db-rg1024.png,height=0.5\textheight>>>
== Animation ==
=== How it works ===
==== Animation ====
LaTeX beamer provides facilities for generating
simple animated slides. Wiki2beamer provides some
shortcuts on top of the beamer class.
--1em--
LaTeX beamer has the notion of animation layers:
Whenever a frame contains an animation, it will consist of
consecutive numbered animation layers.
==== Layer specs ====
Whenever you animate something, you can specify that it should
appear or disappear on a certain animation layer. The notations
can look like this:
--1em--
\begin{tabular}{ll}
@<n>@ & a single layer ''n'' \\
@<n,m>@ & two layers ''n'' and ''m'' \\
@<n-m>@ & all layers between ''n'' and ''m'' \\
@<n-m,k>@ & all layers between ''n'' and ''m'' plus layer ''k'' \\
\end{tabular}
=== Animating lists ===
==== Animating lists ====
To animate a wiki2beamer list, just add a spec after the @*@ or @\#@
characters:
<[code][style=basic]
* always there (layer 1-4)
*<2> only on layer 2
*<2-3> on layer 2-3
*<2,4> on layer 2 and 4
[code]>
==== Animating lists (output) ====
* always there (layer 1-4)
*<2> only on layer 2
*<2-3> on layer 2-3
*<2,4> on layer 2 and 4
=== Animating anything ===
==== Animating anything ====
LaTeX knows the two commands @\textbackslash uncover@ and
@\textbackslash only@.
--1em--
@uncover@ shows and element on the given layers
while otherwise just displaying an invisible placeholder box.
In wiki2beamer this is denotated as:
<[center]
<[nowiki]
\texttt{+$<$n-m$>$\{content\}}
[nowiki]>
[center]>
here's an example:
<[code][style=basic]
above
+<2>{uncovered}
below
[code]>
==== @uncover@ example (output) ====
above
+<2>{uncovered}
below
==== @only@ example ====
@only@ makes an element appear whithout having a placeholder box before.
In wiki2beamer this is denoted as:
<[center]
<[nowiki]
\texttt{-$<$n-m$>$\{content\}}
[nowiki]>
[center]>
here's the example:
<[code][style=basic]
above
-<2>{only on 2}
below
[code]>
==== @only@ example (output) ====
above
-<2>{only on 2}
below
==== animating graphics ====
Animating graphics is nothing special.
Here is the example:
<[code][style=basic]
+<1>{
<<<db-rg1024.png,width=0.4\textwidth>>>
}
+<2>{
<<<db-rg1024.png,width=0.4\textwidth>>>
}
[code]>
==== animating graphics (output) ====
<[center]
+<1>{
<<<db-rg1024.png,width=0.4\textwidth>>>
}
+<2>{
<<<db-rg1024.png,width=0.4\textwidth>>>
}
[center]>
=== Animating code ===
==== Animating code ====
When talking about code listings, you often want things to appear or
disappear, step by step. In wiki2beamer, you can do that with a simple
notation(((Try to do it without wiki2beamer, you'll feel the pain ;) ))).
<[code][style=basic]
<\[code\]
some normal code above
\[<2-4>some code only on layer 2-4\]
\[\[<2>some code on layer 2\]\[<4>replaced on layer 4\]\]
some normal code below
\[code\]>
[code]>
==== Animating code (output) ====
<[code][style=basic]
some normal code above
[<2-4>some code only on layer 2-4]
[[<2>some code on layer 2][<4>replaced on layer 4]]
some normal code below
[code]>
== Advanced usage ==
==== Advanced usage ====
<[center]
Tricks for the adept.
[center]>
=== Frame options ===
==== Frame options ====
LaTeX supports giving arguments to opening frames. It looks like:
<[code][style=basic]
\begin{frame}\[someoption\]
[code]>
Such options can be added in wiki2beamer by appending them to the frame
opening:
<[code][style=basic]
==== frametitle ====\[someoption]
[code]>
One example are fragile frames.
==== Fragile frames ====
For some features to work (eg. verbatim content), latex beamer needs a frame
marked as fragile. In plain \LaTeX this would look like:
<[code][style=basic]
\begin{frame}\[fragile\]
...
\end{frame}
[code]>
This can be realized with wiki2beamer by simply appending a @[fragile]@ tag to the
frame header:
<[code][style=basic]
==== a fragile frame ====\[fragile\]
...
[code]>
==== a fragile frame ====[fragile]
This is such a fragile frame with some \verb-V#rb/\t|m t<xt- .
=== Short section names ===[short sectioning]
==== Short section names ====
The same notation that applies for frame options
can be used with sections. This is used to asign a short name of the section
for the table of contents.
<[code][style=basic,basicstyle=\tiny\ttfamily]
=== some section name that is mich too long ===\[long section name\]
[code]>
=== selective editing ===
==== Selective editing ====
When LaTeX documents become large and contain many inputs (graphics), the latex
compiler tends to be slow -- to slow for the edit-compile cycle.
--1em--
To speed things up a bit, wiki2beamer allows you to select single frames for
editing.
<[center]
<[nowiki]
\texttt{!==== frame title ====}
[nowiki]>
[center]>
--1em--
When there is at least one selected frame, all frames that are not selected
will be ommited from the LaTeX output.
=== Managing input ===
==== Managing input ====
If you want to work with your colleagues on a single presentation
you can (and should) of course use your favourite version control system,
but you'd still have to resolve conflicts. To reduce the number of conflicts,
wiki2beamer can build presentations from multiple input files.
==== Mulitple inputs by commandline ====
The first way is to use the commandline to concatenate multiple input files:
--1em--
<[code][style=basic]
wiki2beamer header.txt dave.txt debby.txt > talk.tex
[code]>
>>>includefile.txt<<<
|