Skip to content

Commit 3f683b8

Browse files
authored
chore: prepare for 0.15.0 changes (#686)
2 parents 50547ba + 77d8ad9 commit 3f683b8

14 files changed

Lines changed: 257 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,67 @@
1+
# v0.15.0 - 2025-07-13
2+
3+
## Breaking changes
4+
5+
* The behavior for "jump next fast" and "jump previous fast" keybindings (defaults to `n` and `p`) now jumps straight from one slide to the next/previous one ignoring pauses. Before this used to "reveal" all pauses when jumping forward before going to the next slide. This behavior was weird and unintuitive so now fast jumps go straight into the next/previous slides. The action of "showing all pauses on the current slide" can now be done by pressing `s` ([#678](https://github.com/mfontanini/presenterm/issues/678)).
6+
7+
## New features
8+
9+
* Allow specifying where a [snippet's execution output will go](https://mfontanini.github.io/presenterm/features/code/execution.html#output-placing) ([#658](https://github.com/mfontanini/presenterm/issues/658)).
10+
* Add `include` comment command to [import markdown files](https://mfontanini.github.io/presenterm/features/commands.html#including-external-markdown-files) ([#651](https://github.com/mfontanini/presenterm/issues/651)) ([#683](https://github.com/mfontanini/presenterm/issues/683)).
11+
* Allow [validating snippets without explicitly executing them](https://mfontanini.github.io/presenterm/features/code/execution.html#validating-snippets) by using `--validate-snippets` switch ([#645](https://github.com/mfontanini/presenterm/issues/645)) ([#637](https://github.com/mfontanini/presenterm/issues/637)).
12+
* Support iterm2 image protocol when running in tmux ([#661](https://github.com/mfontanini/presenterm/issues/661)).
13+
* Add support for [d2 diagrams](https://mfontanini.github.io/presenterm/features/code/d2.html) ([#657](https://github.com/mfontanini/presenterm/issues/657)).
14+
* Errors encountered when parsing markdown now always display the file, line, and column where the error was found, as well as the markdown line that caused the error ([#674](https://github.com/mfontanini/presenterm/issues/674)) ([#653](https://github.com/mfontanini/presenterm/issues/653)) ([#684](https://github.com/mfontanini/presenterm/issues/684)) ([#685](https://github.com/mfontanini/presenterm/issues/685)).
15+
* Superscript via `^this^` and `<sup>this</sup>` syntaxes is supported when using the kitty terminal. For other terminals we try to use unicode half block characters which cover a portion of the ASCII charset. ([#606](https://github.com/mfontanini/presenterm/issues/606))([#617](https://github.com/mfontanini/presenterm/issues/617) ) ([#665](https://github.com/mfontanini/presenterm/issues/665)).
16+
* Allow [alternative snippet executors](https://mfontanini.github.io/presenterm/features/code/execution.html#alternative-executors) for languages that support execution. This allows, for example, runnig rust code via `rust-script` or python code via `pytest` ([#614](https://github.com/mfontanini/presenterm/issues/614)).
17+
* Allow using env var `PRESENTERM_CONFIG_FILE` to point to the config file ([#663](https://github.com/mfontanini/presenterm/issues/663)) - thanks @Silver-Golden.
18+
* Set background color via OSC 11 to avoid having a colored edge around the presentation ([#623](https://github.com/mfontanini/presenterm/issues/623)) ([#624](https://github.com/mfontanini/presenterm/issues/624)) ([#627](https://github.com/mfontanini/presenterm/issues/627)).
19+
* Add support for markdown footnotes ([#616](https://github.com/mfontanini/presenterm/issues/616)).
20+
* Runtime errors are now centered rather than being left aligned with some fixed margin ([#638](https://github.com/mfontanini/presenterm/issues/638)).
21+
* Allow [configuring number of newlines](https://mfontanini.github.io/presenterm/features/commands.html#number-of-lines-in-between-list-items) in between list items ([#628](https://github.com/mfontanini/presenterm/issues/628)).
22+
* Allow 3 digit hex colors ([#609](https://github.com/mfontanini/presenterm/issues/609)) - thanks @peterc-s.
23+
* Allow [configuring font](https://mfontanini.github.io/presenterm/configuration/settings.html#pdf-font) used in PDF export ([#608](https://github.com/mfontanini/presenterm/issues/608)).
24+
* Added `uv` as an alternative executor for python code ([#662](https://github.com/mfontanini/presenterm/issues/662)) - thanks @JanNeuendorf.
25+
* Allow multiline slide titles ([#679](https://github.com/mfontanini/presenterm/issues/679)).
26+
* Add support for multiline slide titles ([#682](https://github.com/mfontanini/presenterm/issues/682)) - thanks @barr-israel.
27+
* Add support for multiline subtitle ([#680](https://github.com/mfontanini/presenterm/issues/680)) - thanks @barr-israel.
28+
* Add support for syntax highlighting and execution for F# ([#650](https://github.com/mfontanini/presenterm/issues/650)) - thanks @mnebes.
29+
* Use text style/colors in rust-script errors ([#644](https://github.com/mfontanini/presenterm/issues/644)).
30+
* Added `rust-script-pedantic` alternative executor for rust ([#640](https://github.com/mfontanini/presenterm/issues/640)).
31+
32+
## Fixes
33+
34+
* Consider rect start row when capping max terminal rows ([#656](https://github.com/mfontanini/presenterm/issues/656)).
35+
* Skip speaker notes slide on `skip_slide` ([#625](https://github.com/mfontanini/presenterm/issues/625)).
36+
* Don't loop on 0 bytes read when querying capabilities ([#620](https://github.com/mfontanini/presenterm/issues/620)).
37+
* Make code snippet language specifiers case insensitive ([#613](https://github.com/mfontanini/presenterm/issues/613)) - thanks @peterc-s.
38+
* Bump dependencies ([#681](https://github.com/mfontanini/presenterm/issues/681)) - thanks @barr-israel.
39+
40+
## Chore
41+
42+
* Refactored code to make it more easily testeable, and added lots of tests to ensure markdown is rendered as expected. This will hopefully reduce the number of errors found after each release ([#660](https://github.com/mfontanini/presenterm/issues/660)) ([#659](https://github.com/mfontanini/presenterm/issues/659)) ([#655](https://github.com/mfontanini/presenterm/issues/655)) ([#647](https://github.com/mfontanini/presenterm/issues/647)).
43+
* Bump rust version to 1.82 ([#611](https://github.com/mfontanini/presenterm/issues/611)).
44+
* Perform better validation around matching HTML tags ([#668](https://github.com/mfontanini/presenterm/issues/668)).
45+
* Don't run nightly job if the git hash hasn't changed ([#667](https://github.com/mfontanini/presenterm/issues/667)) ([#675](https://github.com/mfontanini/presenterm/issues/675)) ([#669](https://github.com/mfontanini/presenterm/issues/669)).
46+
* Display an error when using http(s) urls in image tags ([#666](https://github.com/mfontanini/presenterm/issues/666)).
47+
* Update Catppuccin themes to use palettes ([#672](https://github.com/mfontanini/presenterm/issues/672)) - thanks @jmcharter.
48+
49+
## Docs
50+
51+
* Add custom introduction slides example ([#633](https://github.com/mfontanini/presenterm/issues/633)).
52+
* Add mention of `winget` ([#621](https://github.com/mfontanini/presenterm/issues/621)) - thanks @DeveloperPaul123.
53+
* Fix incorrect note callout ([#610](https://github.com/mfontanini/presenterm/issues/610)) - thanks @Sacquer.
54+
* Add a note to export pdf using `uv` ([#646](https://github.com/mfontanini/presenterm/issues/646)) - thanks @PitiBouchon.
55+
* Clarify why no remote urls work with images ([#664](https://github.com/mfontanini/presenterm/issues/664)) - thanks @ryuheechul.
56+
57+
## ❤️ Sponsors
58+
59+
Thanks to the following users who supported _presenterm_ via a [github sponsorship](https://github.com/sponsors/mfontanini) in this release:
60+
61+
* [@0atman](https://github.com/0atman)
62+
* [@orhun](https://github.com/orhun)
63+
* [@gwpl](https://github.com/gwpl)
64+
165
# v0.14.0 - 2025-05-17
266

367
## New features

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.14.0"
7+
version = "0.15.0"
88
edition = "2021"
99

1010
[dependencies]

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Visit the [documentation][docs-introduction] to get started.
3030

3131
# Features
3232

33-
* Define your presentation in a single markdown file.
33+
* Presentations consist of one [or more][docs-include] markdown files.
3434
* [Images and animated gifs][docs-images] on terminals like _kitty_, _iterm2_, and _wezterm_.
3535
* [Customizable themes][docs-themes] including colors, margins, layout (left/center aligned content), footer for every
3636
slide, etc. Several [built-in themes][docs-builtin-themes] can give your presentation the look you want without
@@ -40,6 +40,7 @@ Visit the [documentation][docs-introduction] to get started.
4040
* [Selective/dynamic][docs-selective-highlight] code highlighting that only highlights portions of code at a time.
4141
* [Column layouts][docs-layout].
4242
* [mermaid graph rendering][docs-mermaid].
43+
* [d2 graph rendering][docs-d2].
4344
* [_LaTeX_ and _typst_ formula rendering][docs-latex].
4445
* [Introduction slide][docs-intro-slide] that displays the presentation title and your name.
4546
* [Slide titles][docs-slide-titles].
@@ -53,7 +54,7 @@ Visit the [documentation][docs-introduction] to get started.
5354

5455
See the [introduction page][docs-introduction] to learn more.
5556

56-
# Presenterm in action
57+
# presenterm in action
5758

5859
Here are some talks and demos that feature _presenterm_:
5960

@@ -73,6 +74,7 @@ Gave a talk using _presenterm_? We would love to feature it here! Open a PR or i
7374
[docs-font-sizes]: https://mfontanini.github.io/presenterm/features/introduction.html#font-sizes
7475
[docs-pauses]: https://mfontanini.github.io/presenterm/features/commands.html#pauses
7576
[docs-images]: https://mfontanini.github.io/presenterm/features/images.html
77+
[docs-include]: https://mfontanini.github.io/presenterm/features/commands.html#including-external-markdown-files
7678
[docs-themes]: https://mfontanini.github.io/presenterm/features/themes/introduction.html
7779
[docs-builtin-themes]: https://mfontanini.github.io/presenterm/features/themes/introduction.html#built-in-themes
7880
[docs-code-highlight]: https://mfontanini.github.io/presenterm/features/code/highlighting.html
@@ -81,6 +83,7 @@ Gave a talk using _presenterm_? We would love to feature it here! Open a PR or i
8183
[docs-slide-transitions]: https://mfontanini.github.io/presenterm/features/slide-transitions.html
8284
[docs-layout]: https://mfontanini.github.io/presenterm/features/layout.html
8385
[docs-mermaid]: https://mfontanini.github.io/presenterm/features/code/mermaid.html
86+
[docs-d2]: https://mfontanini.github.io/presenterm/features/code/d2.html
8487
[docs-latex]: https://mfontanini.github.io/presenterm/features/code/latex.html
8588
[docs-exports]: https://mfontanini.github.io/presenterm/features/exports.html
8689
[docs-key-bindings]: https://mfontanini.github.io/presenterm/configuration/settings.html#key-bindings

docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- [Execution](./features/code/execution.md)
1414
- [Mermaid diagrams](./features/code/mermaid.md)
1515
- [LaTeX and typst](./features/code/latex.md)
16+
- [D2](./features/code/d2.md)
1617
- [Themes](./features/themes/introduction.md)
1718
- [Definition](./features/themes/definition.md)
1819
- [Exports](./features/exports.md)

docs/src/configuration/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ custom themes, in the following directories:
1010

1111
The configuration file will be looked up automatically in the directories above under the name `config.yaml`. e.g. on
1212
Linux you should create it under `~/.config/presenterm/config.yaml`. You can also specify a custom path to this file
13-
when running _presenterm_ via the `--config-file` parameter or via the ``PRESENTERM_CONFIG_FILE`` environment variable.
13+
when running _presenterm_ via the `--config-file` parameter or the `PRESENTERM_CONFIG_FILE` environment variable.
1414

1515
A [sample configuration file](https://github.com/mfontanini/presenterm/blob/master/config.sample.yaml) is provided in
1616
the repository that you can use as a base.

docs/src/configuration/options.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,14 @@ options:
163163
---
164164
```
165165

166+
## list_item_newlines
167+
168+
The option allows configuring the number of newlines in between list items, the default being `1`. This cam also be set
169+
via the `list_item_newlines` comment command.
170+
171+
```yaml
172+
---
173+
options:
174+
list_item_newlines: 2
175+
---
176+
```

docs/src/configuration/settings.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,17 @@ mermaid:
267267
scale: 2
268268
```
269269

270+
## D2 scaling
271+
272+
[d2](https://d2lang.com/) graphs will use the default scaling when invoking the d2 CLI. If you'd like to change this
273+
use:
274+
275+
276+
```yaml
277+
d2:
278+
scale: 2
279+
```
280+
270281
## Enabling speaker note publishing
271282

272283
If you don't want to run _presenterm_ with `--publish-speaker-notes` every time you want to publish speaker notes, you
@@ -313,3 +324,18 @@ executed sequentially, you can use the `export.snippets` parameter:
313324
export:
314325
snippets: sequential
315326
```
327+
328+
## PDF font
329+
330+
The PDF export can be configured to use a specific font installed in your system. Use the following keys to do so:
331+
332+
```yaml
333+
export:
334+
pdf:
335+
fonts:
336+
normal: /usr/share/fonts/truetype/tlwg/TlwgMono.ttf
337+
italic: /usr/share/fonts/truetype/tlwg/TlwgMono-Oblique.ttf
338+
bold: /usr/share/fonts/truetype/tlwg/TlwgMono-Bold.ttf
339+
bold_italic: /usr/share/fonts/truetype/tlwg/TlwgMono-BoldOblique.ttf
340+
```
341+

docs/src/features/code/d2.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# D2
2+
3+
[D2](https://d2lang.com/) snippets can be converted into images automatically for any snippets tagged with the `d2`
4+
language and using a `+render` attribute:
5+
6+
~~~markdown
7+
```d2 +render
8+
my_table: {
9+
shape: sql_table
10+
id: int {constraint: primary_key}
11+
last_updated: timestamp with time zone
12+
}
13+
```
14+
~~~
15+
16+
17+
**This requires having [d2](https://github.com/terrastruct/d2) installed**.
18+
19+
Similar to [mermaid diagrams support](mermaid.md), d2 diagrams:
20+
21+
* Will take some time because of how slow the d2 tool is.
22+
* Can be scaled by using a `+width:<number>%` attribute in the snippet or by setting the `d2.scale` property in the
23+
config file, which is passed along to the `--scale` parameter to the d2 CLI.
24+
25+
## Theme
26+
27+
The theme of the rendered d2 diagrams can be changed through the `d2.theme` [theme](../themes/introduction.md)
28+
parameter. See the available themes in the [d2 docs](https://d2lang.com/tour/themes/).

docs/src/features/code/execution.md

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,56 @@ code execution is supported.
3030
> Run code in presentations at your own risk! Especially if you're running someone else's presentation. Don't blindly
3131
> enable snippet execution!
3232
33+
### Output placing
34+
35+
By default a snippet's output will always show up right below the snippet. However, if you wanted to show the output in
36+
a different place in a slide (e.g. another column) or even in another slide you can do this by:
37+
38+
1. Defining a snippet's identifier:
39+
40+
~~~markdown
41+
```bash +exec +id:foo
42+
echo hellow world
43+
```
44+
~~~
45+
46+
2. Referencing that identifier where you want the output to appear by using the `snippet_output` comment command:
47+
48+
~~~markdown
49+
<!-- snippet_output: foo -->
50+
~~~
51+
52+
A single snippet can be referenced multiple times in multiple slides, as long as the slide you're referencing it in
53+
comes after the snippet. The snippet will only be executed once, and every `snippet_output` command will display that
54+
single execution's output.
55+
56+
### Validating snippets
57+
58+
While you're developing your presentation you probably want to make sure the executable snippets you write in it are
59+
correct and don't contain any syntax errors. While you can do this by constantly pressing `<c-e>` every time you change
60+
a snippet, this is automatically done by _presenterm_ if you pass in the `--validate-snippets` flag.
61+
62+
When you pass in this flag, _presenterm_ will:
63+
64+
* Automatically run all `+exec`, `+exec_replace`, and `+validate` snippets as soon as your presentation starts. Note
65+
that the `+validate` flag is a special one that doesn't make a snippet executable but still validates it by running it
66+
during development.
67+
* Report an error if any of the snippets returns an exit code other than 0.
68+
* Re-run all snippets `+exec` and `+exec_repalce` snippets every time the presentation is reloaded.
69+
70+
In case you expect a snippet to return an exit code other than 0, you can use the `+expect:failure` flag. This will
71+
cause _presenterm_ to display an error if the snippet does not fail.
72+
73+
For example, the following defines a snippet that's not executable but that will be validated if `--validate-snippets`
74+
is passed in and will display an error if the snippet does not fail.
75+
76+
```rust +validate +expect:failure
77+
fn main() {
78+
let q = 42;
79+
let w = q + "foo"; // oops
80+
}
81+
```
82+
3383
## Executing and replacing
3484

3585
Similar to `+exec`, `+exec_replace` causes a snippet to be executable but:
@@ -43,7 +93,33 @@ This can be useful to run programs that generate some form of ASCII art that you
4393

4494
Because of the risk involved in `+exec_replace`, where code gets automatically executed when running a presentation,
4595
this requires users to explicitly opt in to it. This can be done by either passing in the `-X` command line parameter
46-
or setting the `snippet.exec_replace.enable` flag in your configuration file to `true`.
96+
or setting the `snippet.exec_replace.enable` flag in your configuration file to `true`.
97+
98+
## Alternative executors
99+
100+
Some languages support alternative executors. For example, `rust` code can be ran via
101+
[`rust-script`](https://rust-script.org/), which allows you to use external crates. These executors can be used by
102+
specifying `:<executor-name>` after `+exec` or `+exec_replace`.
103+
104+
For example, the following `rust` snippet will be executed using `rust-script`:
105+
106+
~~~markdown
107+
```rust +exec:rust-script
108+
# //! ```cargo
109+
# //! [dependencies]
110+
# //! time = "0.1.25"
111+
# //! ```
112+
# // The lines above will be hidden
113+
fn main() {
114+
println!("the time is {}", time::now().rfc822z());
115+
}
116+
```
117+
~~~
118+
119+
The supported alternative executors are:
120+
121+
* `rust-script` for `rust` snippets.
122+
* `pytest` and `uv` for `python` snippets.
47123

48124
## Code to image conversions
49125

@@ -121,5 +197,5 @@ is loaded. The languages that currently support this are _mermaid_, _LaTeX_, and
121197
block is transformed into an image, allowing you to define formulas as text in your presentation. This can be done by
122198
using the `+render` attribute on a code block.
123199

124-
See the [LaTeX and typst](latex.md) and [mermaid](mermaid.md) docs for more information.
200+
See the [LaTeX and typst](latex.md), [mermaid](mermaid.md), and [d2](d2.md) docs for more information.
125201

0 commit comments

Comments
 (0)