chore: update docs to include 0.13.0 changes

This commit is contained in:
Matias Fontanini 2025-04-25 05:32:57 -07:00
parent a894105b9b
commit 232fc34fce
6 changed files with 112 additions and 9 deletions

View File

@ -16,6 +16,7 @@
- [Themes](./features/themes/introduction.md) - [Themes](./features/themes/introduction.md)
- [Definition](./features/themes/definition.md) - [Definition](./features/themes/definition.md)
- [PDF export](./features/pdf-export.md) - [PDF export](./features/pdf-export.md)
- [Slide transitions](./features/slide-transitions.md)
- [Speaker notes](./features/speaker-notes.md) - [Speaker notes](./features/speaker-notes.md)
- [Configuration](./configuration/introduction.md) - [Configuration](./configuration/introduction.md)
- [Options](./configuration/options.md) - [Options](./configuration/options.md)

View File

@ -61,13 +61,25 @@ defaults:
If you would like your presentation to be left or right aligned instead of centered when the terminal is too wide, you If you would like your presentation to be left or right aligned instead of centered when the terminal is too wide, you
can use the `max_columns_alignment` key: can use the `max_columns_alignment` key:
```yaml ```yaml
defaults: defaults:
max_columns: 100 max_columns: 100
# Valid values: left, center, right
max_columns_alignment: left max_columns_alignment: left
``` ```
## Maximum presentation height
The `max_rows` and `max_rows_alignment` properties are analogous to `max_columns*` to allow capping the maximum number
of rows:
```yaml
defaults:
max_rows: 100
# Valid values: top, center, bottom
max_rows_alignment: left
```
## Incremental lists behavior ## Incremental lists behavior
By default, [incremental lists](../features/commands.md) will pause before and after a list. If you would like to change By default, [incremental lists](../features/commands.md) will pause before and after a list. If you would like to change
@ -81,6 +93,27 @@ defaults:
pause_after: true pause_after: true
``` ```
# Slide transitions
Slide transitions allow animating your presentation every time you move from a slide to the next/previous one. The
configuration for slide transitions is the following:
```yaml
transition:
# how long the transition should last.
duration_millis: 750
# how many frames should be rendered during the transition
frames: 45
# the animation to use
animation:
style: <style_name>
```
See the [slide transitions page](../features/slide-transitions.md) for more information on which animation styles are
supported.
# Key bindings # Key bindings
Key bindings that _presenterm_ uses can be manually configured in the config file via the `bindings` key. The following Key bindings that _presenterm_ uses can be manually configured in the config file via the `bindings` key. The following
@ -94,6 +127,16 @@ bindings:
# the keys that cause the presentation to move backwards. # the keys that cause the presentation to move backwards.
previous: ["h", "k", "<left>", "<page_up>", "<up>"] previous: ["h", "k", "<left>", "<page_up>", "<up>"]
# the keys that cause the presentation to move "fast" to the next slide. this will ignore:
#
# * Pauses.
# * Dynamic code highlights.
# * Slide transitions, if enabled.
next_fast: ["n"]
# same as `next_fast` but jumps fast to the previous slide.
previous_fast: ["p"]
# the key binding to jump to the first slide. # the key binding to jump to the first slide.
first_slide: ["gg"] first_slide: ["gg"]
@ -130,6 +173,8 @@ default won't apply anymore and only what you've defined will be used.
# Snippet configurations # Snippet configurations
The configurations that affect code snippets in presentations.
## Snippet execution ## Snippet execution
[Snippet execution](../features/code/execution.md#executing-code-blocks) is disabled by default for security reasons. [Snippet execution](../features/code/execution.md#executing-code-blocks) is disabled by default for security reasons.
@ -232,15 +277,29 @@ speaker_notes:
always_publish: true always_publish: true
``` ```
# Presentation exports
The configurations that affect PDF exports.
## PDF export size ## PDF export size
The size of exported PDFs can be configured via the `export.dimensions` key: The size of exported PDFs can be configured via the `export.dimensions` key:
```yaml ```yaml
export: export:
dimensions: dimensions:
columns: 80 columns: 80
rows: 30 rows: 30
``` ```
See [the PDF export page](../features/pdf-export.md) for more information. See [the PDF export page](../features/pdf-export.md) for more information.
## Pause behavior
By default pauses will be ignored in generated PDF files. If instead you'd like every pause to generate a new page in
the export, set the `export.pauses` attribute:
```yaml
export:
pauses: new_slide
```

View File

@ -30,6 +30,7 @@ Code highlighting is supported for the following languages:
| java | ✓ | | java | ✓ |
| javascript | ✓ | | javascript | ✓ |
| json | | | json | |
| julia | ✓ |
| kotlin | ✓ | | kotlin | ✓ |
| latex | | | latex | |
| lua | ✓ | | lua | ✓ |
@ -140,6 +141,18 @@ language: rust
``` ```
~~~ ~~~
If you'd like to include only a subset of the file, you can use the optional fields `start_line` and `end_line`:
~~~markdown
```file +exec +line_numbers
path: snippet.rs
language: rust
# Only shot lines 5-10
start_line: 5
end_line: 10
```
~~~
## Showing a snippet without a background ## Showing a snippet without a background
Using the `+no_background` flag will cause the snippet to have no background. This is useful when combining it with the Using the `+no_background` flag will cause the snippet to have no background. This is useful when combining it with the

View File

@ -5,8 +5,8 @@ Presentations can be converted into PDF by using [weasyprint](https://pypi.org/p
to install extra dependencies for the tool to work. to install extra dependencies for the tool to work.
> [!note] > [!note]
> If you were using _presenterm-export_ before, that tool already required _weasyprint_ so it is already installed in > If you were using _presenterm-export_ before it was deprecated, that tool already required _weasyprint_ so it is
> whatever virtual env you were using and there's nothing to be done. > already installed in whatever virtual env you were using and there's nothing to be done.
After you've installed _weasyprint_, run _presenterm_ with the `--export-pdf` parameter to generate the output PDF: After you've installed _weasyprint_, run _presenterm_ with the `--export-pdf` parameter to generate the output PDF:
@ -15,7 +15,8 @@ After you've installed _weasyprint_, run _presenterm_ with the `--export-pdf` pa
presenterm --export-pdf examples/demo.md presenterm --export-pdf examples/demo.md
``` ```
The output PDF will be placed in `examples/demo.pdf`. The output PDF will be placed in `examples/demo.pdf`. Alternatively you can use the `--output` flag to specify where you
want the output file to be written to.
> [!note] > [!note]
> If you're using a separate virtual env to install _weasyprint_ just make sure you activate it before running > If you're using a separate virtual env to install _weasyprint_ just make sure you activate it before running
@ -28,3 +29,7 @@ By default, the size of each page in the generated PDF will depend on the size o
If you would like to instead configure the dimensions by hand, set the `export.dimensions` key in the configuration file If you would like to instead configure the dimensions by hand, set the `export.dimensions` key in the configuration file
as described in the [settings page](../configuration/settings.md#pdf-export-size). as described in the [settings page](../configuration/settings.md#pdf-export-size).
## Pause behavior
See the [settings page](../configuration/settings.md#pause-behavior) to learn how to configure the behavior of pauses in
generated PDFs.

View File

@ -0,0 +1,24 @@
# Slide transitions
Slide transitions allow animating your presentation every time you move from a slide to the next/previous one. See the
[configuration page](../configuration/settings.md) to learn how to configure transitions.
The following animations are supported:
## `fade`
Fade the current slide into the next one.
[![asciicast](https://asciinema.org/a/RvxLw0FHOopjdF4ixWbCkWuSw.svg)](https://asciinema.org/a/RvxLw0FHOopjdF4ixWbCkWuSw)
## `slide_horizontal`
Slide horizontally to the next/previous slide.
[![asciicast](https://asciinema.org/a/T43ttxPWZ8TsM2auTqNZSWrmZ.svg)](https://asciinema.org/a/T43ttxPWZ8TsM2auTqNZSWrmZ)
## `collapse_horizontal`
Collapse the current slide into the center of the screen horizontally.
[![asciicast](https://asciinema.org/a/VB8i3kGMvbkbiYYPpaZJUl2dW.svg)](https://asciinema.org/a/VB8i3kGMvbkbiYYPpaZJUl2dW)

View File

@ -163,7 +163,7 @@ using another brace. e.g. `{{potato}} farms` will be displayed as `{potato} farm
#### Footer images #### Footer images
Besides text, images can also be used in the left and center positions. This can be done by specifying an `image` key Besides text, images can also be used in the left/center/right positions. This can be done by specifying an `image` key
under each of those attributes: under each of those attributes:
```yaml ```yaml
@ -173,7 +173,8 @@ footer:
image: potato.png image: potato.png
center: center:
image: banana.png image: banana.png
right: "{current_slide} / {total_slides}" right:
image: apple.png
# The height of the footer to adjust image sizes # The height of the footer to adjust image sizes
height: 5 height: 5
``` ```