Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add notes on running bat directly #397

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/src/guides/code-highlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,20 @@ block is transformed into an image, allowing you to define formulas as text in y
using the `+render` attribute on a code block.

See the [LaTeX and typst](latex.html) and [mermaid](mermaid.html) docs for more information.

### Adding highlighting syntaxes for new languages

_presenterm_ uses the syntaxes supported by [bat](https://github.com/sharkdp/bat) to highlight code snippets, so any
languages supported by _bat_ natively can be added to _presenterm_ easily. Please create a ticket or use
[this](https://github.com/mfontanini/presenterm/pull/385) as a reference to submit a pull request to make a syntax
officially supported by _presenterm_ as well.

If a language isn't natively supported by _bat_ but you'd like to use it, you can follow
[this guide in the bat docs](https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions) and
invoke _bat_ directly in a presentation:

~~~markdown
```bash +exec_replace
bat --color always script.py
```
~~~
4 changes: 2 additions & 2 deletions docs/src/guides/pdf-export.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ simply run _presenterm_ with the `--export-pdf` parameter to generate the output
presenterm --export-pdf examples/demo.md
```

The output PDF will be placed in `examples/demo.pdf`. The size of each page will depend on the size of your terminal so
make sure to adjust accordingly before running the command above.
The output PDF will be placed in `examples/demo.pdf`. **The size of each page will depend on the size of your terminal**
so make sure to adjust accordingly before running the command above.

> Note: if you're using a separate virtual env to install _presenterm-export_ just make sure you activate it before
> running _presenterm_ with the `--export-pdf` parameter.
Expand Down
Loading