Matias Fontanini 54bddaf017
Some checks failed
Deploy docs / build-and-deploy (push) Has been cancelled
Merge checks / Checks (push) Has been cancelled
Merge checks / Validate nix flake (push) Has been cancelled
Merge checks / Validate bat assets (push) Has been cancelled
Merge checks / Validate JSON schemas (push) Has been cancelled
feat: allow specifying start/end lines in file snippet type (#565)
This adds new optional `start_line` and `end_line` properties when using
a `file` type snippet, which allow specifying the line range to be used.

Caveats:

* The line selection is applied before highlighting so if you truncate
the file in a place that should be highlighted in some way because of
something that came before (e.g. multi line comments) it won't be
highlighted appropriately. This can be fixed but requires changing a few
things and I think this should not be hit very often.
* Using `+line_numbers` will always start at 1. In the future I may add
a property like `preserve_line_numbers` but again this would require
changing a few things (the same ones as the point above) so I kept it
this way for now.

Example:

~~~markdown
```file +line_numbers
language: rust
path: scripts/foo.rs
start_line: 3
end_line: 20
```
~~~

Closes #562
2025-04-23 19:33:16 -07:00
2023-08-27 14:14:02 -07:00
2023-10-08 07:25:02 -07:00
2023-08-27 14:14:02 -07:00

presenterm

crates-badge brew-badge nix-badge arch-badge scoop-badge

presenterm lets you create presentations in markdown format and run them from your terminal, with support for image and animated gifs, highly customizable themes, code highlighting, exporting presentations into PDF format, and plenty of other features. This is how the demo presentation looks like when running in the kitty terminal:

Check the rest of the example presentations in the examples directory.

Documentation

Visit the documentation to get started.

Features

See the introduction page to learn more.

Presenterm in Action

Here are some talks and demos that feature presenterm:

Gave a talk using presenterm? We would love to feature it here! Open a PR or issue to get it added.

Languages
Rust 99.2%
Shell 0.4%
Nix 0.2%
JavaScript 0.2%