Skip to content

Commit 5eb2391

Browse files
authored
chore: 0.10.0 changes (#435)
2 parents 55dcee4 + c51ce7d commit 5eb2391

20 files changed

+407
-138
lines changed

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
# v0.10.0 - 2025-02-02
2+
3+
# New features
4+
5+
* Support for presentation speaker notes ([#389](https://github.com/mfontanini/presenterm/issues/389)) ([#419](https://github.com/mfontanini/presenterm/issues/419)) ([#421](https://github.com/mfontanini/presenterm/issues/421)) ([#425](https://github.com/mfontanini/presenterm/issues/425)) - thanks @dmackdev.
6+
* Add support for colored text via inline `span` HTML tags ([#390](https://github.com/mfontanini/presenterm/issues/390)).
7+
* Add a color palette in themes to allow reusing colors across the theme and using predefined colors inside `span` tags ([#427](https://github.com/mfontanini/presenterm/issues/427)).
8+
* Add support for github/gitlab style markdown alerts ([#423](https://github.com/mfontanini/presenterm/issues/423)) ([#430](https://github.com/mfontanini/presenterm/issues/430)).
9+
* Allow using `+image` on code blocks to consume their output as an image ([#429](https://github.com/mfontanini/presenterm/issues/429)).
10+
* Allow multiline comment commands ([#424](https://github.com/mfontanini/presenterm/issues/424)).
11+
* Allow auto rendering mermaid/typst/latex code blocks ([#418](https://github.com/mfontanini/presenterm/issues/418)).
12+
* Allow capping max columns on presentation ([#417](https://github.com/mfontanini/presenterm/issues/417)).
13+
* Automatically detect kitty support, including when running inside tmux ([#406](https://github.com/mfontanini/presenterm/issues/406)).
14+
* Use kitty image protocol in ghostty ([#405](https://github.com/mfontanini/presenterm/issues/405)).
15+
* Force color output in rust, c, and c++ compiler executions ([#401](https://github.com/mfontanini/presenterm/issues/401)).
16+
* Add graphql code highlighting ([#385](https://github.com/mfontanini/presenterm/issues/385)) - thanks @GV14982.
17+
* Add tcl code highlighting ([#387](https://github.com/mfontanini/presenterm/issues/387)) - thanks @jtplaarj.
18+
* Add Haskell executor ([#414](https://github.com/mfontanini/presenterm/issues/414)) - thanks @feature-not-a-bug.
19+
* Add C# to code executors ([#399](https://github.com/mfontanini/presenterm/issues/399)) - thanks @giggio.
20+
* Add R to executors ([#393](https://github.com/mfontanini/presenterm/issues/393)) - thanks @jonocarroll.
21+
22+
# Fixes
23+
24+
* Check for `term_program` before `term` to determine emulator ([#420](https://github.com/mfontanini/presenterm/issues/420)).
25+
* Allow jumping back to column in column layout ([#396](https://github.com/mfontanini/presenterm/issues/396)).
26+
* Ignore comments that start with `vim:` prefix ([#395](https://github.com/mfontanini/presenterm/issues/395)).
27+
* Respect `+no_background` on a `+exec_replace` block ([#383](https://github.com/mfontanini/presenterm/issues/383)).
28+
29+
# Docs
30+
31+
* Document tmux active session bug ([#402](https://github.com/mfontanini/presenterm/issues/402)).
32+
* Add notes on running `bat` directly ([#397](https://github.com/mfontanini/presenterm/issues/397)).
33+
134
# v0.9.0 - 2024-10-06
235

336
## Breaking changes

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = ["Matias Fontanini"]
44
description = "A terminal slideshow presentation tool"
55
repository = "https://github.com/mfontanini/presenterm"
66
license = "BSD-2-Clause"
7-
version = "0.9.0"
7+
version = "0.10.0"
88
edition = "2021"
99

1010
[dependencies]

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Visit the [documentation][guide-introduction] to get started.
4646
* [Pause][guide-pauses] portions of your slides.
4747
* [Custom key bindings][guide-key-bindings].
4848
* [Automatically reload your presentation][guide-hot-reload] every time it changes for a fast development loop.
49+
* [Define speaker notes][guide-speaker-notes] to aid you during presentations.
4950

5051
See the [introduction page][guide-introduction] to learn more.
5152

@@ -69,6 +70,7 @@ See the [introduction page][guide-introduction] to learn more.
6970
[guide-pdf-export]: https://mfontanini.github.io/presenterm/guides/pdf-export.html
7071
[guide-key-bindings]: https://mfontanini.github.io/presenterm/guides/configuration.html#key-bindings
7172
[guide-hot-reload]: https://mfontanini.github.io/presenterm/guides/basics.html#hot-reload
73+
[guide-speaker-notes]: https://mfontanini.github.io/presenterm/guides/speaker-notes.html
7274
[bat]: https://github.com/sharkdp/bat
7375
[syntect]: https://github.com/trishume/syntect
7476

config.sample.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,24 @@ snippet:
4141
# enable code snippet execution. Use at your own risk!
4242
enable: true
4343

44+
exec_replace:
45+
# enable code snippet automatic execution + replacing the snippet with its output. Use at your own risk!
46+
enable: true
47+
4448
render:
4549
# the number of threads to use when rendering `+render` code snippets.
4650
threads: 2
4751

52+
speaker_notes:
53+
# The endpoint to listen for speaker note events.
54+
listen_address: "127.0.0.1:59418"
55+
56+
# The endpoint to publish speaker note events.
57+
publish_address: "127.0.0.1:59418"
58+
59+
# Whether to always publish speaker notes even when `--publish-speaker-notes` is not set.
60+
always_publish: false
61+
4862
bindings:
4963
# the keys that cause the presentation to move forwards.
5064
next: ["l", "j", "<right>", "<page_down>", "<down>", " "]

docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [Configuration](./guides/configuration.md)
1212
- [Code highlighting](./guides/code-highlight.md)
1313
- [PDF export](./guides/pdf-export.md)
14+
- [Speaker notes](./guides/speaker-notes.md)
1415
- [Mermaid](./guides/mermaid.md)
1516
- [LaTeX and typst](./guides/latex.md)
1617

docs/src/assets/demo.gif

27 KB
Loading

docs/src/guides/basics.md

Lines changed: 58 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
## Introduction
1+
# Introduction
22

33
This guide teaches you how to use _presenterm_. At this point you should have already installed _presenterm_, otherwise
44
visit the [installation](installation.html) guide to get started.
55

6-
### Quick start
6+
## Quick start
77

88
Download the demo presentation and run it using:
99

10-
```shell
10+
```bash
1111
git clone https://github.com/mfontanini/presenterm.git
1212
cd presenterm
1313
presenterm examples/demo.md
1414
```
1515

16-
## Presentations
16+
# Presentations
1717

1818
A presentation in _presenterm_ is a single markdown file. Every slide in the presentation file is delimited by a line
1919
that contains a single HTML comment:
@@ -25,7 +25,24 @@ that contains a single HTML comment:
2525
Presentations can contain most commonly used markdown elements such as ordered and unordered lists, headings, formatted
2626
text (**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
3451
protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/), or [sixel](https://saitoha.github.io/libsixel/). Some of
3552
the 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
4562
cargo 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

6583
The size of each image can be set by using the `image:width` or `image:w` attributes in the image tag. For example, the
6684
following 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:
7290
The image will always be scaled to preserve its aspect ratio and it will not be allowed to overflow vertically nor
7391
horizontally.
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
7997
file](configuration.html#preferred-image-protocol).
8098

81-
## Extensions
99+
# Extensions
82100

83101
Besides the standard markdown elements, _presenterm_ supports a few extensions.
84102

85-
### Introduction slide
103+
## Introduction slide
86104

87105
By setting a front matter at the beginning of your presentation, you can configure the title, sub title, and author of
88106
your presentation and implicitly create an introduction slide:
89107

90-
```markdown
108+
```yaml
91109
---
92110
title: My first presentation
93111
sub_title: (in presenterm!)
@@ -97,12 +115,12 @@ author: Myself
97115

98116
All of these attributes are optional so you're not forced to set them all.
99117

100-
#### Multiple authors
118+
### Multiple authors
101119

102120
If you're creating a presentation in which there's multiple authors, you can use the `authors` key instead of `author`
103121
and list them all this way:
104122

105-
```markdown
123+
```yaml
106124
---
107125
title: Our first presentation
108126
authors:
@@ -111,21 +129,22 @@ authors:
111129
---
112130
```
113131

114-
### Slide titles
132+
## Slide titles
115133

116134
Any [setext header](https://spec.commonmark.org/0.30/#setext-headings) will be considered to be a slide title and will
117135
be rendered in a more slide-title-looking way. By default this means it will be centered, some vertical padding will be
118136
added and the text color will be different.
119137

120-
~~~
138+
~~~markdown
121139
Hello
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

130149
Pauses allow the sections of the content in your slide to only show up when you advance in your presentation. That is,
131150
only 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

140159
While 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
150169
If 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

155174
The command `jump_to_middle` lets you jump to the middle of the page vertically. This is useful in combination
156175
with slide titles to create separator slides:
@@ -170,7 +189,7 @@ Farming potatoes
170189

171190
This 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

175194
The `newline`/`new_line` and `newlines`/`new_lines` commands allow you to explicitly create new lines. Because markdown
176195
ignores multiple line breaks in a row, this is useful to create some spacing where necessary:
@@ -187,7 +206,7 @@ mom
187206
bye
188207
```
189208

190-
### Incremental lists
209+
## Incremental lists
191210

192211
Using `<!-- 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

212231
Navigation within a presentation should be intuitive: jumping to the next/previous slide can be done by using the arrow
213232
keys, _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

224245
If you don't like the default key bindings, you can override them in the [configuration
225246
file](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
230251
toggled using some key combination and can be hidden using the escape key by default, but these can be configured via
231252
the [configuration file key bindings](configuration.html#key-bindings).
232253

233-
### Slide index modal
254+
## Slide index modal
234255

235256
This modal can be toggled by default using `control+p` and lets you see an index that contains a row for every slide in
236257
the presentation, including its title and slide index. This allows you to find a slide you're trying to jump to
237258
quicklier 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

247268
Unless you run in presentation mode by passing in the `--present` parameter, _presenterm_ will automatically reload your
248269
presentation file every time you save it. _presenterm_ will also automatically detect which specific slide was modified

0 commit comments

Comments
 (0)