Pandoc used to emit a `header` class on the `tr` element that forms the table header. This is no longer needed, because `head > tr` will do the same thing.
Similarly, pandoc used to emit `even` and `odd` classes on `tr`s, allowing striped styling. This is no longer needed, because one can use e.g. `tbody tr:nth-child(2n)`.
We now omit these classes, which have a good chance of conflicting with classes used for other things.
Closes#9325.
This extends support for fine-grained properties in Typst.
If the `typst:no-figure` class is present on a Table, the table will not be placed in a figure.
If the `typst:figure:kind` attribute is present, its value will be used for the figure's `kind`.
These features are documented in `doc/typst-property-output.md`.
Closes#9777.
Fixes#7473
Previously, `figclass`es weren't being extracted correctly.
`figclass` and `align` annotations are now implemented following the rst docs: these options apply to the figure while other options are passed onto the underlying image.
Previously a Div with an identifier derived from the filename
would be added around the contents of each file. This caused
problems for "chunking" files into chapters, e.g. in EPUB.
We no longer add the surrounding Div. This cooperates better with
chunking. Note, however, that if you have relied on the old
behavior to link to the beginning of the contents of a file using
its filename as identifier, that will no longer work.
Closes#8741.
The Typst writer will pass on specially marked attributes as raw Typst
parameters on selected elements. This allows extensive customization
using filters.
An attribute with key `typst:PROP` will set the PROP parameter on
the corresponding Typst element.
An attribute with key `typst:text:PROP` will set a parameter on a Typst
`#set text()` rule or a text element.
The feature has been implemented for the following elements:
* span text
* div and div text
* table and table text
* table cell and table cell text
It would be possible to support more elements in the future.
A separate document has been added that provides extensive
documentation and examples of the use of this feature.
This applies to both fenced and HTML-ish varieties.
Otherwise we face an exponential performance problem with
backtracking.
This also accords with the behavior of the `fenced_divs`
extension in commonmark.
A warning is issued when a div is implicitly closed.
Closes#9635.
soul commands (`ul`, `hl`, `st`) are very fragile and the math
must be handled specially. In #9597 we improved this for strikethrough
but omitted the other soul environments. This patch generalizes the
fix and a related fix for verbatim (#1294, #5529).
- Link text cannot contain formatting (e.g., `//` is not italics).
Closes#9630.
- An explicitly empty link text (`[[url|]]`) works the same as an omitted
link text. Closes#9632.
Previously the parser just failed if the column width
specified in `p{}` wasn't a multiple of `\linewidth`.
This led to cases where content was skipped.
Now we treat these as ColWidthDefault and silently
parse the table.
A future improvement could be to guess relative column
widths from the dimensions specified, based on a default
line width.
Closes#9579.
Make tokenization sensitive to `\makeatletter`/`\makeatother`.
Previously we just always treated `@` as a letter. This led
to bad results, e.g. with the sequence `\@`. E.g.,
`a\@ b` would parse as "ab" and `a\@b` as "a".
Closes#9555.
Screen readers don't seem to pay attention to an alt attribute on
svg. But they do read the aria-label. So if there's an alt
attribute, we copy its contents to aria-label, unless there is
already an aria-label. This will make pandoc's output with
`--embed-resources` more accessible.
Closes#9525.
Our recent relaxing of escaping (#9386) caused problems for
things like emphasized `-` characters that were rendered using
`#strong[-]#`. This now gets rendered as `#strong[\-]`.
Closes#9478.
If you used `lang: de-DE` but then had a span or div with `lang=de`, the
preamble would try to load `ngerman` twice, leading to an error.
This fix ensures that a language is only loaded once.
Closes#9472.
Associate with `\cref` and `\Cref` the reference-type `ref+label` and
`ref+Label`. So far we don't do anything fancy with these.
Also, associate with `\vref` `ref` instead of `ref+page`.
See #7463.
Emit `form: "prose"` or `form: "year"` qualifiers if the citation
is author-in-text or suppress-author.
Strip initial comma from suffix, since typst will add an extra
one.
Closes#9452.
The first (and often only) `<aside id=footnotes>` block remains
unchanged, however any additional blocks from `--reference-location` are
distinguished as `#footnotes-2`, `#footnotes-3`, and so on. No other
existing writer seems to implement per-section IDs, including HTML4.
Outer divs have longer fences. This aids clarity for the reader,
making it easier to see where the div ends. It also makes the
output compatible with some other implementations, e.g.
micromark, which require different-width fences for nesting.
Closes#9450.