diff options
Diffstat (limited to 'example/demo.rst')
-rw-r--r-- | example/demo.rst | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/example/demo.rst b/example/demo.rst new file mode 100644 index 0000000..bafd9ba --- /dev/null +++ b/example/demo.rst | |||
@@ -0,0 +1,149 @@ | |||
1 | .. This is an RST comment. | ||
2 | The following directives, when used at the top of the file, set default | ||
3 | values for all slides: | ||
4 | |||
5 | This sets the transition style. Values are: 'dissolve', 'pan', or | ||
6 | 'cut'. The optional argument of 'duration' sets the duration of | ||
7 | the transition in seconds (0.4 seconds by default). The same | ||
8 | syntax may be used within a slide to override the transition for | ||
9 | that slide alone. | ||
10 | |||
11 | .. transition:: dissolve | ||
12 | :duration: 0.4 | ||
13 | |||
14 | This disables display of the title. Each slide must still have a | ||
15 | title, and it will be used by the presenter console, but it will | ||
16 | not be displayed on the slide. The same syntax may be used within | ||
17 | a slide to hide the title of that individual slide. | ||
18 | |||
19 | .. hidetitle:: | ||
20 | |||
21 | .. Slides are defined one at a time by starting a new top-level | ||
22 | section: | ||
23 | |||
24 | Presentty | ||
25 | ========= | ||
26 | .. container:: handout | ||
27 | |||
28 | Content that is placed in a container called "handout" will not be | ||
29 | displayed with the slides, but will be displayed on the presenter's | ||
30 | console. | ||
31 | |||
32 | Presentty is a console presentation system based where slides are | ||
33 | authored in reStructuredText. | ||
34 | |||
35 | Bullet Lists | ||
36 | ============ | ||
37 | It is able to display lists of items: | ||
38 | |||
39 | * Pork | ||
40 | |||
41 | * Eastern North Carolina | ||
42 | * Lexington | ||
43 | |||
44 | * Ribs | ||
45 | * Brisket | ||
46 | |||
47 | |||
48 | Progressive Display | ||
49 | =================== | ||
50 | Bullet lists may include a *progressive* display: | ||
51 | |||
52 | .. container:: progressive | ||
53 | |||
54 | * Red Leicester | ||
55 | * Tilsit | ||
56 | * Caerphilly | ||
57 | |||
58 | |||
59 | Table | ||
60 | ===== | ||
61 | |||
62 | === === | ||
63 | p !p | ||
64 | === === | ||
65 | T F | ||
66 | F T | ||
67 | === === | ||
68 | |||
69 | Dissove Transition | ||
70 | ================== | ||
71 | Transitions may be "dissolve," where one slide cross-fades into the next... | ||
72 | |||
73 | Pan Transition | ||
74 | ============== | ||
75 | .. transition:: pan | ||
76 | |||
77 | ...or "pan," where the slides appear horizontally adjacent and move | ||
78 | right to left... | ||
79 | |||
80 | Cut Transition | ||
81 | ============== | ||
82 | .. transition:: cut | ||
83 | |||
84 | ...or "cut," where they abruptly change from one to the next. | ||
85 | |||
86 | Syntax Highligting | ||
87 | ================== | ||
88 | Pygments is used to provide syntax highlighting of code in almost any | ||
89 | language: | ||
90 | |||
91 | .. code:: python | ||
92 | |||
93 | class UrwidTranslator(nodes.GenericNodeVisitor): | ||
94 | def depart_Text(self, node): | ||
95 | if self.stack and isinstance(self.stack[-1], 'string'): | ||
96 | # a comment | ||
97 | if self.attr: | ||
98 | t = (self.attr[-1], node.astext()) | ||
99 | else: | ||
100 | t = node.astext() | ||
101 | self.stack[-1].append(t) | ||
102 | visit_literal_block = visit_textelement | ||
103 | |||
104 | Cowsay | ||
105 | ====== | ||
106 | .. cowsay:: Presentty is a console-based presentation program where | ||
107 | reStructuredText is used to author slides. | ||
108 | |||
109 | | If cowsay is installed, it can easily | ||
110 | | be used to display text. | ||
111 | |||
112 | Figlet | ||
113 | ====== | ||
114 | .. container:: handout | ||
115 | |||
116 | Cowsay and figlet are non-standard directives and will not appear | ||
117 | if the RST file is rendered with a program other than presentty. | ||
118 | If you want to ensure that the content appears in all forms, you | ||
119 | may wish to run the respective commands manually and copy the | ||
120 | output into a quoted block in the RST file. | ||
121 | |||
122 | .. figlet:: FIGLET | ||
123 | |||
124 | | If figlet is installed, it can be | ||
125 | | used to provide large text. | ||
126 | |||
127 | ANSI Art | ||
128 | ======== | ||
129 | .. hidetitle:: | ||
130 | .. container:: handout | ||
131 | |||
132 | Note that the ansi directive is specific to presentty, and so if an | ||
133 | RST file that includes it is rendered with another program, | ||
134 | included ANSI files will not appear. | ||
135 | |||
136 | .. ansi:: ansi.ans | ||
137 | |||
138 | Images | ||
139 | ====== | ||
140 | .. container:: handout | ||
141 | |||
142 | The standard sphinx image directive can be used to include bitmap | ||
143 | images (such as JPEG or PNG files) which will be automatically | ||
144 | converted to ANSI art for display. This feauter requires that PIL | ||
145 | or Pillow (Python Image Library) and jp2a be installed. | ||
146 | |||
147 | .. image:: gg.jpg | ||
148 | |||
149 | "Golden Gate Bridge" by Kevin Cole (CC-BY: https://flic.kr/p/7L2Rdu) | ||