-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathVimpoint_Documentation.vpt
1314 lines (763 loc) · 31.4 KB
/
Vimpoint_Documentation.vpt
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
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
!!!!! To view this file as a Vimpoint presentation, make sure the
!!!!! various plugins and syntax files are installed and then type:
!!!!!
!!!!! :Run
!!!!!
!!!!! while editing this file in Vim
=title The {{Vimpoint}}
Presentation System
=presenter Damian Conway
=info Thoughtstream
=duration 60 minutes
Vimpoint
* "Vimpoint" is a presentation system built entirely in Vim
* To use Vimpoint, you create a source file with a {{.vpt}} suffix
* Then compile it, creating a directory of slide files
* Then edit the slide files, which are syntax highlighted to form
a readable presentation
* Vimpoint can also produce handout files in HTML format
Vimpoint source files
* A Vimpoint source file uses a simple text markup notation
* With that notation, you can specify sections, headings, bullet
points, pauses and breaks in slides, intermissions in the
presentation, examples, hierarchical subpresentations,
and other navigational mechanisms
=break
* The marked-up source looks like this:
Headings always start on the left margin
* \**Bullet points\** normally start with asterisks
(like this line)
* Any line that begins with whitespace is (part of) an *\*example*\*:
for $indented (@lines) {
treat($indented, as => 'example'); \**# e.g. code blocks\**
}
=break
* Which is converted to...
Headings always start on the left margin
* **Bullet points** normally start with asterisks
(like this line)
* Any line that begins with whitespace is (part of) an **example**:
for $indented (@lines) {
treat($indented, as => 'example'); **# e.g. code blocks**
}
=break
* Any line beginning with an {{=}} is a **flow control directive**
(more on those shortly)
* Within headings, points, and examples, there are a small number
of simple mark-up conventions (more on those shortly too)
* If a heading contains an octothorpe ({{#}}), it is converted to a
heading number
* ...specifically, to the ordinal number of the heading within the
current section (more about sections shortly)
=break
* Any line that starts with a plus sign ({{+}}) followed by a
whitespace character is **not** displayed during the presentation
* However, such lines **are** added into any handouts
(hence the {{+}})
+ * Like this one is
+ (or isn't)
+
+ Note that you can prefix any valid Vimpoint source
+ with a '+', including directives, headings, and code blocks
* The plus sign and whitespace character are removed before
the line is processed for the handout
=break
* Any line may, alternatively, start with a minus sign ({{-}})
followed by a whitespace character
* Such lines are included in the presentation
(with the leading minus-space removed)
* But they are deleted from any handouts
(as suggested by the {{-}})
- * Like this one is
- (or isn't)
-
- Note that you can prefix any valid Vimpoint source
- with a '-', including directives, headings, and code blocks
=break
* {{+}} and {{-}} bullets can be used together to create a
presentation with concise bullet points, but detailed handouts:
Features of the language redesign
**- Cleaner, more concise syntax**
+ The language has been redesigned to minimize unnecessary and
unfathomable syntax, and hence to minimize unnecessary typing.
**- More readable**
+ The reduction of symbolic syntax, and the addition of carefully
chosen method names for most operations, also improves the
readability of the language.
**- Just as powerful**
+ Despite this reduction in syntax, the new version of the
language retains the full power of earlier version.
Directives
* Directives control the flow and navigation of the presentation
* Each is specified by an {{=}} in column 1
The {{=section}} directive
* This directive indicates a new section of the presentation
* It expects a heading for the section after the directive
* This heading can contain markup for code or emphasis
* For example:
=section Background
=section The Current \{{Identifier\}} Problem
=section The \**Proposed\** Solution
=section Implementation (\#1)
=break
* In a presentation, section headings are displayed
on a special slide
* In a handout, they are formatted specially
* Like so:
=section This A New Section
The {{=section}} directive
* If the section heading contains an octothorpe ({{#}}), it is
converted to the corresponding section number
* If a literal octothorpe is required,
escape it with a backslash ({{\\#}})
=break
* For example, these:
=section #. Background
=section Section #: The Current {{Identifier}} Problem
=section (#) The Proposed Solution
=section Part # - Implementation (\#1)
* ...produce the following section headings...
=section 1. Background
=section Section 2: The Current {{Identifier}} Problem
=section (3) The Proposed Solution
=section Part 4 - Implementation (\#1)
The {{=pause}} directive
* By default all bullet points are shown at once
* Like these are
* But a {{=pause}} directive causes the display of
subsequent points to be deferred until the next advance
=pause
* For example, there was a {{=pause}} before this point
=pause
* And before this one
The {{=autopause}} directive
* An {{=autopause}} causes Vimpoint to insert
a virtual {{=pause}}
* This pause is inserted into the blank line(s)
before every bullet point in the rest of the slide
=autopause
* For example, this slide has an {{=autopause}}
before this bullet point
* So the remaining points all appear...
* One...
* ...at...
* ...a time
=break
* If {{=autopause}} appears at the start of a presentation source file,
before the first slide title...
* ...then every slide is treated as having an implicit {{=autopause}}
=break
* Autopausing can be enabled at any point:
=autopause on
=autopause yes
=autopause enable
=autopause 1
=autopause
* ...or disabled:
=autopause off
=autopause no
=autopause disable
=autopause 0
The {{=autoslidepause}} directive
* A useful signposting technique within presentations is to put
a {{=pause}} before the content of each new slide
* That way, the audience sees the new slide's title without any
associated content
* This focuses their attention on the fact that
they're seeing a new slide
* This provides them with a useful navigation cue
=break
* Vimpoint does this automatically, but you can disable it
using the {{=autoslidepause}} directive:
=autoslidepause off
=autoslidepause no
=autoslidepause disable
=autoslidepause 0
* To re-enable the feature for later slides:
=autoslidepause on
=autoslidepause yes
=autoslidepause enable
=autoslidepause 1
=autoslidepause
=break
* For example, if we use {{=autoslidepause off}}...
=autoslidepause off
The {{=autoslidepause}} defective
* Then the next slide's content appears immediately
* (Notice how much harder it is to detect that
this is a different slide?)
* Then if we say {{=autoslidepause on}}...
=autoslidepause on
The {{=autoslidepause}} directive
* Then once again the slide title appears separately,
before any content appears
The {{=break}} directive
* A {{=break}} directive clears the bullet points currently
being displayed
* ...which causes subsequent bullet points to be displayed
from the top of the slide
* This makes it easy to create the effect of multiple slides
with a single title
=break
* For example, there was a {{=break}} before this point
=pause
* So the title stays the same, but the points restart from the top
=break
* There was another {{=break}} before this point
* Note that {{=break}} directives are ignored when rendering handouts
* So you get a single title with all the points neatly under it
The {{=animation}} directive
* The {{=animation}} directive enables a simple type of
frame-based animation
* It injects the equivalent of a {{=break}} into a slide,
but copies everything before the directive to the next slide
=animation
* For example.......
Work
=animation
* For example.......
Work---------> Earn
=animation
* For example.......
Work---------> Earn--------> Consume
=animation
* For example.......
Work---------> Earn--------> Consume...
^....................................:
=animation
* For example.......
Work---------> Earn--------> Consume...
^....................................:
|
|
V
DIE
=break
=animation keyframe
* Animation frames are displayed in a handout only if
they are specified with the {{keyframe}} option:
=animation
* This frame of the animation is not shown in the handout
=animation
* This frame of the animation is not shown in the handout either
=animation keyframe
* This frame of the animation **is** shown in the handout
The {{=example}} directive
* The {{=example}} directive can be used to incorporate
either an external example file, or an internal example text
* If used with a filename or filepath argument:
=example demo.c
=example ~/demos/eg.pl
* ...it incorporates the contents of that file
as the content to be shown on the next advance
=break
* Filenames that don't include a full path
are searched for in the following locations:
1. The current directory
2. An **example/** or **examples/** subdirectory of the current directory
3. A **demo/** or **demos/** subdirectory of the current directory
* For example:
=example demo.c
=example ~/.vimrc
=example subdemo.txt
=example subexample.txt
=example non/existent/file.py
* If the {{=example}} directive is specified without a file:
=example
* ...then any (indented) text following it assumed
to be the example, specified inline
=break
* The first line of an inline example is used to determine
the left margin of the entire example:
=example
#! /bin/sh
echo 'Hello, World!'
cat /usr/share/entire_planet.txt
* Which would produce:
=example
#! /bin/sh
echo 'Hello, World!'
cat /usr/share/entire_planet.txt
=break
* In the presentation, both inline and external examples
are rendered using a distinct colour scheme
* In handouts, examples are rendered in a fixed-width typeface,
with a surrounding border
The {{=active}} directive
* A variation on the {{=example}} directive,
the {{=active}} directive creates a live link to a file
* Normally, example files are copied into the slide set
* But if an example file is specified with {{=active}},
instead of copying the file, it is directly (soft-)linked
=active test.dat
=example
#! /usr/bin/perl -w
use strict;
use 5.010;
open my $fh, '>', 'test.dat' or die;
say {$fh} $_ for 1..10;
=active test.dat
The {{=target}} directive
* This directive creates a **jump target**
* While a presentation is running, hitting {{<TAB>}} will take you to
the next available jump target in the presentation sequence
* Hitting {{<SHIFT-TAB>}} will list the available targets, one at a time.
=break
* You can tab through the targets of a {{<SHIFT-TAB>}} list
forwards using {{<TAB>}}, or backwards using {{<SHIFT-TAB>}}.
* Hit {{<RETURN>}} to select the target you want.
* Hitting anything else cancels the jump
=break
* The {{=target}} directive is typically used to mark the start of your
conclusion slide(s)
* This makes it easy to "fast forward" to them if time runs short:
Conclusions
=target Out of time
* Presentations need planning, preparation, delivery,
and interaction
* Every one of those takes longer than you will expect
=break
=target Back to end of target slide
* The directive must have one or more non-whitespace characters
following it on the same line
* These characters document the purpose of the target
* They also provide sensible names within the multiple-targets list
The {{=link}} directive
* A {{<TAB>}} or {{<SHIFT-TAB>}} normally allows you to jump
to **any** {{=target}} that is not on the current page
* However, you can also limit the available jumps from a page
to a specified subset
* This subset is specified using {{=link}} directives
=break
* {{=link}} directives are specified with a {{=target}} label:
=link Conclusion
=link Back to end of target slide
=break
* If a particular slide has exactly one {{=link}} directive,
a {{<TAB>}} jumps directly to that target
(rather than to the next target in sequence)
* If a particular slide has one or more {{=link}} directives,
then a {{<TAB>}} acts like a {{<SHIFT-TAB>}},
allowing you to select which link to jump to
* The typical use is to specify a single {{=link}} on a page
then use it to skip ahead (via a single {{<TAB>}}) if necessary
* For example, this slide has a single {{=link}},
which will {{<TAB>}} it immediately to the conclusion
bypassing any intermediate targets
=link Conclusion
=target =link slide
* However you can also specify more than one {{=link}} on a slide,
in which case {{<TAB>}} and {{<SHIFT-TAB>}} will cycle through them
=break
* Links are also useful for controlled fast-forwarding
=break
* For example:
The Nitty-Gritty
* At this point we can delve into the implementation details
* Or we can skip ahead to the juicy applications
**=link The Juicy Applications**
Implementing the Quantum/Relativistic Lunchbox
* First, a little quantum mechanics...
* Now a {{<TAB>}} on the "Nitty-Gritty" slide will skip over
the nasty physics and straight to the "Juicy Applications" slide
Nested presentations
* The {{=link}} directive can also be used to create hierarchical
presentations
* If the link target is the name or path of a Vimpoint
presentation directory (i.e. ends in {{.vpp}}):
=link Mathematical_Primer.vpp
=link Implementation_Details.vpp
=link A_Longer_Example.vpp
* ...then you can {{<TAB>}} or {{<SHIFT-TAB>}} into one of those
presentations (which will be run in a separate window tab)
* When you exit the nested presentation (by closing the window tab)
you are returned to the original slide
=break
* For example, this slide has the following link:
=link nested.vpp
* ...so a {{<TAB>}} here drills you down into that presentation
=link nested.vpp
The {{=selector}} directive
* You can also specify links that have a visual representation
* This is most often used to show a list of sub-presentations
and select one or more
* The {{=selector}} directive expects a link target, followed by some text
* It converts the text to a bullet point and remaps the first character of the
text so that that character jumps to the corresponding link target
=break
* For example:
=selector Basic_Features.vpp 1. Basic features
=selector Data_Structures.vpp 2. Data structures
=selector Control_Structures.vpp 3. Control structures
=selector Error_Handling.vpp 4. Error handling
=selector Conclusion 5. Conclusion
=break
* These directives create a series of links that can be activated
by pressing the keys {{1}} through {{5}}
* When one of these keys is pressed, the corresponding link text is
highlighted
* To confirm the jump you then press {{<ENTER>}}
(or {{<ESC>}} to cancel the selection)
* For example:
=break
* (Try pressing one of the numbers, then {{<ENTER>}})
=selector Basic_Features.vpp 1. Basic features
=selector Data_Structures.vpp 2. Data structures
=selector Control_Structures.vpp 3. Control structures
=selector Error_Handling.vpp 4. Error handling
=selector Conclusion 5. Conclusion
The {{=title}} directive
* The {{=title}} directive specifies the title of the entire presentation
* For example:
=title The Vimpoint Presentation System
* The specified title is used for the autogenerated title slide
* ...and for any {{=intermission}} slides
=break
* Titles can be specified on multiple lines:
=title The Vimpoint
Presentation System
* The specified information is displayed on
the autogenerated title slide
* ...and in any {{=intermission}} slides
The {{=presenter}} directive
* The {{=presenter}} directive specifies the name of the presenter
* The specified information is displayed on the autogenerated
title slide
* ...and in any {{=intermission}} slides
The {{=info}} directive
* The {{=info}} directive specifies extra information
about the presentation
* For example, the affiliation of the presenter:
=presenter Dr Damian Conway
=info Thoughtstream
=break
* Or a caveat regarding the presentation:
=title How To Increase Your Income By 1000%
=info Note: This presentation does not consititute
financial or legal advice. Consult a
qualified financial advisor before
trying any of the following suggestions.
* The specified information is displayed immediately below the
presenter details on the autogenerated title slide
The {{=duration}} directive
* The {{=duration}} directive specifies how long the presentation is
scheduled to run:
=duration 60 seconds
=duration 30 minutes
=duration 1 hour
* If you specify a duration without a unit, "minutes" are assumed:
=duration 45
=break
* If the presentation has a specified duration, Vimpoint will
display a progress meter at the bottom of the window
* This meter consists of a solid line
(representing the entire length of the presentation)...
* ...with a growing dashed line just above it
(representing what percentage of the presentation has been seen)...
* ...plus a single dot somewhere on the line
(representing what percentage of the presentation
**should** have been seen by now)
=pause
* Like so: **______________________________. **
=break
* The dot represents the presenter's time goal
* So the idea is to keep the end of the dashed line
"at or ahead" of the dot/goal:
=animation keyframe
where we should be
|
V
Will finish early: **_______________.____ **
=animation
where we should be
|
V
Will finish on time: **_______________. **
=animation
where we should be
|
V
Need to talk faster: **____________ . **
=break
* The progress indicator is normally displayed using the
{{VimpointProgress}} highlight (dark blue, by default)
* However, in the last two minutes of a presentation, it is displayed
using the {{VimpointProgressFinish}} highlight (red by default)
* This is intended to serve as a warning that you need to finish up
The {{=intermission}} directive
* The {{=intermission}} directive inserts a slide that contains only the
title of the presentation
* (As specified by the presentation's {{=title}} directive)
* ...or else just the word "Intermission"
* This is useful for marking an intermission in a presentation
=intermission
* It's also handy to insert a "discussion gap" in
a series of demonstrations
* If the directive is followed by a time specification:
=intermission 5 min
=intermission 60 sec
=intermission 1 hr
* ...the intermission slide also includes a count-down timer
indicating how much of the intermission remains
=intermission 10s
* During a timed intermission, you can adjust the countdown
using the {{-}} and {{+}} keys
* They add or subtract one minute to the current "time remaining"
=intermission 10s
* Pressing any other key during the intermission terminates
the countdown immediately and carries out the key's action
* Typically then, to cancel the intermission, you just press
{{<DOWN>}} or {{<SPACE>}} to move on to the next slide
Markup and rendering conventions
* Titles are always auto-centred in the presentation,
and displayed in bold
* In the handouts, titles are also bold,
but are left-justified
=break
* The text of bullet points is set in a normal-weight text
* Text can be emphasized (in titles, points, or code)
by **surrounding** it with double asterisks:
* Text can be emphasized (in titles, points, or code)
by \**surrounding\** it with double asterisks:
* In the presentation, emphasized text is rendered **with underlining**
* In the handout, it is rendered **in italics**
=break
* To specify a literal double asterisk (\**), escape it with a backslash:
* To specify a literal asterisk (\\\**), escape it with a backslash:
* To specify a literal backslash (\\), escape it with another backslash
* To specify a literal backslash (\\\\), escape it with another backslash
=break
* Code can be inlined in points or titles by surrounding it
with double braces
* For example, {{$this->inlined('code')}} is produced with:
* For example, {{$this->inlined('code')}} is produced with:
* In the presentation such text is {{$rendered->in}} a distinct colour
* In the handout, it is {{$rendered->in}} a fixed-width typeface
=break
* To produce literal double braces (\{{...\}}),
escape them with backslashes:
* To produce literal braces (\\{{...\\}}),
escape them with backslashes:
=break
* Text emphasis markers also work inside code markup (and vice versa):
* You can emphasize {{**$inlined**->code()}} fragments like so:
* You can emphasize {{\**$inlined\**->code()}} fragments like so:
* Or you can emphasize **{{$inlined}}**{{->code()}} fragments like so:
* You can emphasize both \**{{$inlined}}\**{{->code()}} fragments:
=break
* Asterisks also emphasize within indented code blocks:
**if** ( size < rows \** 2 )
error_ref = okay;
**elseif**
error_ref = overflow;
**endif**
=break
* Note that this implies that literal double asterisks (e.g. for an
exponentiation operator) always have to be escaped anywhere
inside code:
=animation
* The {{size}} must be less than {{rows \\\** 2}}:
\**if\** ( size < rows \\\** 2 )
error_ref = okay;
\**elseif\**
error_ref = overflow;
\**endif\**
=animation keyframe
* The {{size}} must be less than {{rows **\\\*\*** 2}}:
\**if\** ( size < rows **\\\*\*** 2 )
error_ref = okay;
\**elseif\**
error_ref = overflow;
\**endif\**