This introduces a new `defaults.max_columns_alignment` that can have
values `left`, `center`, and `right`. This works along with
`max_columns` and allows specifying how to align the presentation if the
terminal size is greater than it. Before this change, this would behave
like `max_columns_alignment: center` does now so that's the default if
not set.
e.g. setting this to `left` will cause look like this on a wide
terminal:

After the change to allow images in footers, the error message when the
footer is malformed was useless. This implements a custom deserializer
to have proper error messages since the derive macro was getting
confused.
This introduces a `palette.classes` entry in the theme that allows
defining a class (a background and foreground color pair). This can then
be referenced when using spans by using the `class` html attribute.
As an example. the following presentation:
~~~markdown
---
theme:
override:
palette:
classes:
bokita:
foreground: yellow
background: dark_blue
footer:
style: template
left: "<span class=\"bokita\">hello</span>"
---
hi <span class="bokita">hello</span>
~~~
Renders liks:

After #442 you could no longer use braces unless it was to refer to a
variable. This PR softens that restriction by letting you use double
braces as an "escaped brace" to let you use them anywhere.
e.g. this footer "{title} {{potato}}" will render as "<title>
{{potato}}"
This allows styling the template footer using markdown, including colors
from the theme palette. If the front matter contains the `title` entry
and that contains markdown, it is also rendered as expected.
Example:
~~~markdown
---
theme:
override:
footer:
style: template
left: "_how_ to <span style=\"color: red\">chop</span> **onions**"
---
~~~

This allows using markdown syntax in the presentation's title, meaning
you can use bold, italics, color, etc. This currently looks wrong if you
use the `{title}` formatted in the footer but this will be fixed in a
follow up PR that will allow footers to be styled the same way as well.
Example presentation:
~~~markdown
---
title: "**Hi** _mom_ <span style=\"color: red\">how are you</span>?"
---
~~~

This cleans up the way themes are handled and splits them into 2 sets of
types: types that are meant to define the .yaml themes and another one
that's used during rendering. This:
* Prevents us from dealing with `Option` and using `unwrap_or/_default`
all over the place since we run defaults once during the .yaml >
"runtime" theme types conversion.
* Allows fallible code where there shouldn't be: there's cases like
footer images that forced error checking in weird spots, like when
creating the footer render just to ensure images use a valid path.
* Allows us to not deal with color palette lookup errors since we can
resolve those once.
* Allows us to not have to be extra careful to resolve all palette
colors or face runtime errors and instead enforce this in compile time.
e.g. now a new `RawColor` type has a `Palette` variant, but the real
`Color` one doesn't. Markdown parsing deals with `RawColor` but we are
forced to resolve them into `Color` because we can't print `RawColor`s.
After #458 most components were allowed to have a font size except a
couple. This expands that list to include code execution components (the
separator bar and the output).
This code has turned quite gore after all these changes and will be
refactored soon. Markdown tables still don't respect the font size but
that should hopefully be easier after the refactor.
This makes ordered lists that don't start at 1 to respect the number
they're prefixed with. e.g.
```markdown
5. hi
6. mom
```
Will be now rendered as expected, whereas before it would show indexes
1. and 2. for each item.
Fixes#457
This extends the font size capabilities introduced in #438 by allowing
the user to specify the font size in the form of a comment command
anywhere in the presentation. This command changes the size of the font
for the remainder of the slide.
Currently this doesn't work in cases like executable snippets, but I'll
fix that when I have more time.
Example presentation:
~~~markdown
test
> this is
> small
<!-- font_size: 2 -->
test
> this is
> large
```rust
fn greet() -> &'static str {
"hi mom"
}
```
~~~

This fixes an issue where we're inside tmux but `allow-passthrough` is
disabled, which manifests in presenterm getting stuck on startup because
tmux never forwards the escape codes sent to query for terminal
capabilities to the terminal, hence we never get an answer. The fix here
is to spawn a thread that will wait a second and if after that time we
still haven't received an answer it will make a device status report
query without the passthrough prefix, meaning tmux (if under tmux) will
answer it, and will wake the main thread up.
Fixes#455
Includes https://github.com/orhun/sixel-rs/pull/6 to fix build on
aarch64 and riscv64.
If possible, please make a new release so downstream maintainers like
Arch Linux RISC-V won't need to maintain this patch for an extended
period. :P