1- ## Introduction
1+ # Introduction
22
33This guide teaches you how to use _ presenterm_ . At this point you should have already installed _ presenterm_ , otherwise
44visit the [ installation] ( installation.html ) guide to get started.
55
6- ### Quick start
6+ ## Quick start
77
88Download the demo presentation and run it using:
99
10- ``` shell
10+ ``` bash
1111git clone https://github.com/mfontanini/presenterm.git
1212cd presenterm
1313presenterm examples/demo.md
1414```
1515
16- ## Presentations
16+ # Presentations
1717
1818A presentation in _ presenterm_ is a single markdown file. Every slide in the presentation file is delimited by a line
1919that contains a single HTML comment:
@@ -25,7 +25,24 @@ that contains a single HTML comment:
2525Presentations can contain most commonly used markdown elements such as ordered and unordered lists, headings, formatted
2626text (** bold** , _ italics_ , ~ strikethrough~ , ` inline code ` , etc), code blocks, block quotes, tables, etc.
2727
28- ### Images
28+ ## Colored text
29+
30+ ` span ` HTML tags can be used to provide foreground and/or background colors to text. Currently only the ` style `
31+ attribute is supported, and only the CSS attributes ` color ` and ` background-color ` can be used to set the foreground and
32+ background colors respectively. Colors used in both CSS attributes can refer to [ theme palette
33+ colors] ( themes.html#color-palette ) by using the ` palette:<name> ` or ` p:<name ` syntaxes.
34+
35+ For example, the following will use ` ff0000 ` as the foreground color and whatever the active theme's palette defines as
36+ ` foo ` :
37+
38+ ``` markdown
39+ <span style =" color : #ff0000 ; background-color : palette:foo" >colored text!</span >
40+ ```
41+
42+ > [ !note]
43+ > Keep in mind ** only ` span ` tags are supported** .
44+
45+ ## Images
2946
3047![ ] ( ../assets/demo-image.png )
3148
@@ -34,19 +51,20 @@ protocol](https://iterm2.com/documentation-images.html), the [kitty graphics
3451protocol] ( https://sw.kovidgoyal.net/kitty/graphics-protocol/ ) , or [ sixel] ( https://saitoha.github.io/libsixel/ ) . Some of
3552the terminals where at least one of these is supported are:
3653
37- * kitty
38- * iterm2
39- * wezterm
40- * foot
54+ * [ kitty] ( https://sw.kovidgoyal.net/kitty/ )
55+ * [ iterm2] ( https://iterm2.com/ )
56+ * [ WezTerm ] ( https://wezfurlong.org/ wezterm/index.html )
57+ * [ foot] ( https://codeberg.org/dnkl/foot )
4158
42- Note that sixel support is experimental so it needs to be explicitly enabled via the ` sixel ` configuration flag:
59+ Sixel support is experimental so it needs to be explicitly enabled via the ` sixel ` configuration flag:
4360
44- ``` shell
61+ ``` bash
4562cargo build --release --features sixel
4663```
4764
48- > ** Note** : this feature flag is only needed if your terminal emulator only supports sixel. Many terminals support the
49- > kitty or iterm2 protocols so this isn't necessary.
65+ > [ !note]
66+ > This feature flag is only needed if your terminal emulator _ only_ supports sixel. Many terminals support the kitty or
67+ > iterm2 protocols so using this flag is often not required to get images to render successfully.
5068
5169---
5270
@@ -60,7 +78,7 @@ Things you should know when using image tags in your presentation's markdown are
6078* If your terminal does not support any of the graphics protocol above, images will be rendered using ascii blocks. It
6179 ain't great but it's something!
6280
63- #### Image size
81+ ### Image size
6482
6583The size of each image can be set by using the ` image:width ` or ` image:w ` attributes in the image tag. For example, the
6684following will cause the image to take up 50% of the terminal width:
@@ -72,22 +90,22 @@ following will cause the image to take up 50% of the terminal width:
7290The image will always be scaled to preserve its aspect ratio and it will not be allowed to overflow vertically nor
7391horizontally.
7492
75- #### Protocol detection
93+ ### Protocol detection
7694
77- By default the image protocol to be used will be automatically detected. In cases where this detection fails (e.g. when
78- running inside ` tmux ` ), you can set it manually via the ` --image-protocol ` parameter or by setting it in the [ config
95+ By default the image protocol to be used will be automatically detected. In cases where this detection fails, you can
96+ set it manually via the ` --image-protocol ` parameter or by setting it in the [ config
7997file] ( configuration.html#preferred-image-protocol ) .
8098
81- ## Extensions
99+ # Extensions
82100
83101Besides the standard markdown elements, _ presenterm_ supports a few extensions.
84102
85- ### Introduction slide
103+ ## Introduction slide
86104
87105By setting a front matter at the beginning of your presentation, you can configure the title, sub title, and author of
88106your presentation and implicitly create an introduction slide:
89107
90- ``` markdown
108+ ``` yaml
91109---
92110title : My first presentation
93111sub_title : (in presenterm!)
@@ -97,12 +115,12 @@ author: Myself
97115
98116All of these attributes are optional so you're not forced to set them all.
99117
100- #### Multiple authors
118+ ### Multiple authors
101119
102120If you're creating a presentation in which there's multiple authors, you can use the ` authors ` key instead of ` author `
103121and list them all this way:
104122
105- ``` markdown
123+ ``` yaml
106124---
107125title : Our first presentation
108126authors :
@@ -111,21 +129,22 @@ authors:
111129---
112130```
113131
114- ### Slide titles
132+ ## Slide titles
115133
116134Any [ setext header] ( https://spec.commonmark.org/0.30/#setext-headings ) will be considered to be a slide title and will
117135be rendered in a more slide-title-looking way. By default this means it will be centered, some vertical padding will be
118136added and the text color will be different.
119137
120- ~~~
138+ ~~~ markdown
121139Hello
122140===
123141~~~
124142
125- > Note: see the [ themes] ( themes.html ) section on how to customize the looks of slide titles and any other element in a
143+ > [ !note]
144+ > See the [ themes] ( themes.html ) section on how to customize the looks of slide titles and any other element in a
126145> presentation.
127146
128- ### Pauses
147+ ## Pauses
129148
130149Pauses allow the sections of the content in your slide to only show up when you advance in your presentation. That is,
131150only after you press, say, the right arrow will a section of the slide show up. This can be done by the ` pause ` comment
@@ -135,7 +154,7 @@ command:
135154<!-- pause -->
136155```
137156
138- ### Ending slides
157+ ## Ending slides
139158
140159While other applications use a thematic break (` --- ` ) to mark the end of a slide, _ presenterm_ uses a special
141160` end_slide ` HTML comment:
@@ -150,7 +169,7 @@ This makes the end of a slide more explicit and easy to spot while you're editin
150169If you really would prefer to use thematic breaks (` --- ` ) to delimit slides, you can do that by enabling the
151170[ ` end_slide_shorthand ` ] ( configuration.html#end_slide_shorthand ) options.
152171
153- ### Jumping to the vertical center
172+ ## Jumping to the vertical center
154173
155174The command ` jump_to_middle ` lets you jump to the middle of the page vertically. This is useful in combination
156175with slide titles to create separator slides:
@@ -170,7 +189,7 @@ Farming potatoes
170189
171190This will create a slide with the text "Farming potatoes" in the center, rendered using the slide title style.
172191
173- ### Explicit new lines
192+ ## Explicit new lines
174193
175194The ` newline ` /` new_line ` and ` newlines ` /` new_lines ` commands allow you to explicitly create new lines. Because markdown
176195ignores multiple line breaks in a row, this is useful to create some spacing where necessary:
187206bye
188207```
189208
190- ### Incremental lists
209+ ## Incremental lists
191210
192211Using ` <!-- pause --> ` in between each bullet point a list is a bit tedious so instead you can use the
193212` incremental_lists ` command to tell _ presenterm_ that ** until the end of the current slide** you want each individual
@@ -207,7 +226,7 @@ bullet point to appear only after you move to the next slide:
207226* all at once
208227```
209228
210- ## Key bindings
229+ # Key bindings
211230
212231Navigation within a presentation should be intuitive: jumping to the next/previous slide can be done by using the arrow
213232keys, _ hjkl_ , and page up/down keys.
@@ -219,30 +238,32 @@ Besides this:
219238* Jumping to a specific slide: ` <slide-number>G ` .
220239* Exit the presentation: ` <ctrl>c ` .
221240
222- ### Configuring key bindings
241+ You can check all the configured keybindings by pressing ` ? ` while running _ presenterm_ .
242+
243+ ## Configuring key bindings
223244
224245If you don't like the default key bindings, you can override them in the [ configuration
225246file] ( configuration.html#key-bindings ) .
226247
227- ## Modals
248+ # Modals
228249
229250_ presenterm_ currently has 2 modals that can provide some information while running the application. Modals can be
230251toggled using some key combination and can be hidden using the escape key by default, but these can be configured via
231252the [ configuration file key bindings] ( configuration.html#key-bindings ) .
232253
233- ### Slide index modal
254+ ## Slide index modal
234255
235256This modal can be toggled by default using ` control+p ` and lets you see an index that contains a row for every slide in
236257the presentation, including its title and slide index. This allows you to find a slide you're trying to jump to
237258quicklier rather than scanning through each of them.
238259
239260[ ![ asciicast] ( https://asciinema.org/a/1VgRxVIEyLrMmq6OZ3oKx4PGi.svg )] ( https://asciinema.org/a/1VgRxVIEyLrMmq6OZ3oKx4PGi )
240261
241- ### Key bindings modal
262+ ## Key bindings modal
242263
243- The key bindings modal displays the key bindings for each of the supported actions.
264+ The key bindings modal displays the key bindings for each of the supported actions and can be opened by pressing ` ? ` .
244265
245- ## Hot reload
266+ # Hot reload
246267
247268Unless you run in presentation mode by passing in the ` --present ` parameter, _ presenterm_ will automatically reload your
248269presentation file every time you save it. _ presenterm_ will also automatically detect which specific slide was modified
0 commit comments