This fixes an issue where centered text that overflowed had the lines 2+
start at the same column as the first one rather than being centered.
Fixes#545
Headings were being added an extra space if they had an empty string
configured as the prefix. This worked correctly if the prefix was `null`
but not if it was "".
Fixes#541
This sets no background for typst renders in the terminal-light and
terminal-dark built in themes. This requires a reasonably recent version
of typst (probably 0.12+) as they changed the meaning of `none` as a
fill background at some point around then.
This fixes an issue where a presentation with a `theme.path` in the
front matter that pointed to a theme that contained an `extends`
wouldn't have its `extends` respected.
Similar to `max_columns` this adds a `max_rows` and `max_rows_alignment`
(valid values are `top`, `center`, `bottom`, the default is `center`)
that cap the vertical presentation size and aligns it accordingly.
This includes images when transitioning between slides; this was the one
detail remaining after #528. This could probably be made a bit more
efficient as it currently causes us to potentially read the image from
disk and decode it. In practice I don't know if it matters though so I'd
rather have this merged now and look at optimizations in the future if
needed.
In this implementation, images are turned into ascii via the ascii
printer and that is used during the transition. I don't think it's
viable/makes sense to print the actual image that many times just for
the transition.
Relates to #364https://github.com/user-attachments/assets/1f5d13df-d928-4789-87ee-b73824728609
This adds support for the first slide transition animation that swaps
between slides horizontally. This is still a work in progress; it's
functional but is missing a few things like dealing with images. The
configuration currently looks like the following, but it will likely be
changed slightly once another type of transition is supported (will
happen before next release).
```yaml
transition:
duration_millis: 750
animation:
style: slide_horizontal
```
This looks like the following:
https://github.com/user-attachments/assets/9475caf9-0538-4ffd-8858-115aac348bd1
Relates to #364
## Summary
Adds a new command-line option (`--output`/`-o`) allowing users to
specify custom output paths when exporting presentations to PDF.
Previously, presenterm automatically generated PDFs in the same location
as the input file.
## Motivation
This feature simplifies multi-theme exports without requiring manual
file renaming or temporary copies. It enables clean parallel exports
with different themes (light/dark) to distinct output files.
### Before:
```bash
generate_pdf() {
local dir="$1"
local theme="$2"
cd "$dir" || exit
# Generate PDF then rename immediately
"$PRESENTERM_PATH" -e -t "$theme" --export-temporary-path "$TEMP_DIR" slide.md
mv slide.pdf "slide_${theme}.pdf"
cd - >/dev/null || exit
}
```
### After:
```bash
generate_pdf() {
local dir="$1"
local theme="$2"
cd "$dir" || exit
# Directly specify output file with theme name
"$PRESENTERM_PATH" -e -t "$theme" --output "slide_${theme}.pdf" slide.md
cd - >/dev/null || exit
}
```
## Example Usage
```
presenterm --export-pdf --output my-slides.pdf presentation.md
```
@mfontanini my rust skills are literally nil, I just copy pasted base on
your code.
This change adds a new command-line option (--output/-o) that allows users
to specify a custom output path when exporting presentations to PDF.
Previously, presenterm would automatically generate the PDF file at the same
location as the input presentation file with a .pdf extension. With this
change, users can now explicitly set the destination path.
- Added the export_output CLI option in main.rs
- Modified the export_pdf function to accept custom output path
- Updated the PDF export documentation to explain the new option
Example usage:
presenterm --export-pdf --output my-slides.pdf presentation.md
This adds a `--export-temporary-path` that allows using some specific
path to store intermediate files used when exporting to pdf (currently
an html and a css file) rather than using a temporary path. This helps
debugging #516 but is also generally useful.