Certain environments in LaTeX will trigger math mode and can't
occur within math mode: e.g., `align` or `equation`. Previously
we "downshifted" these, parsing an `align` environment as a
Math element with `aligned`, and an `equation` environment as a
regular display math element. With this shift, we put these in
Math inlines but retain the original environments.
This works because:
1) texmath handles these environments just fine,
2) and so does MathJax;
3) when writing LaTeX we detect these environments in Math elements
and emit them verbatim instead of putting them in `$..$` or
`$$..$$`.
Closes#9711. Closes#9296.
Typst allows things like `smallcaps` to be applied to block-level
content like headings. This produces a type mismatch in pandoc,
so before processing the output of typst-hs, we transform it,
pulling the block-level elements outside of the inline-level
elements.
Closes#11017.
Some of the readers (e.g. djot) add "wrapper" divs to hold attributes
for elements that have no slot for attributes in the pandoc AST. With
this change, the HTML reader "unwraps" these wrappers so that the
attributes go on the intended elements.
Closes#11014.
Previously, the first line of a definition details item always used a
colon and three spaces instead of respecting the tab-stop setting, which
could lead to round-tripping issues.
Likewise, the indentation of continuation paragraphs in definition lists
now matches the two-characters leader of the first line for Markua
output.
Fixes: #10890
Omit the wrapper sourceCode divs added by pandoc around code blocks.
More intelligently identify which class to use for the one class
allowed in GFM code blocks. If there is a class of form `language-X`,
use `X`; otherwise use the first class other than `sourceCode`.
Closes#10926.
If the `four_space_rule` extension is not enabled,
figure out the indentation needed for child blocks dynamically,
by looking at the first nonspace content after the `:` marker.
Previously the four-space rule was always obeyed.
Remove the old `compact_definition_lists` extension. This was
neded to preserve backwards compatibility after pandoc 1.12
was released, but at this point we can get rid of it.
T.P.Extensions: remove `Ext_compact_definition_lists` constructor
for `Extension` [API change].
Fix tight/loose detection for definition lists, to conform to
the documentation.
Closes#10889.
Fix headings with colspans. If the heading contains a colspan, we still
need to include information in the header line about the colspecs.
Fix headerless tables. The top line should encode colspan information.
Closes#10855.
In commit 9190b19fc, we began to use the ID prefix for the <aside>
holding the footnotes. In commit 41da8ad9e, we started to use a
<section> for this instead and the ID-prefix functionality was lost.
This commit resumes using the ID prefix in the ID of this element so
that multiple documents can be combined into one without ID conflicts.
0d2114e introduced a bug where Markdown writer would ignore attributes
on the figure if it has class or key-value attributes set.
This commit fixes that and adds a regression test.
Closes#10867
This handles row and colspans. Partially addresses #6344.
It also ensures that cells won't wrap text in places where it
wouldn't normally wrap, even if this means making the cells wider
than requested by the colspec. (Closes#9001. Closes 7641.)
Parameters are different, so this is a breaking [API change].
Markdown, RST, and Muse writers have been adjusted to
use the new `gridTable`.
Previously inline TeX was handled in a way that was different
from org's own export, and that could lead to information loss.
This was particularly noticeable for inline math environments
such as `equation`. Previously, an `equation` environment
starting at the beginning of a line would create a raw block,
splitting up the paragraph containing it (see #10836).
On the other hand, an `equation` environment not at the beginning
of a line would be turned into regular inline elements
representing the math. (This would cause the equation number to
go missing and in some cases degrade the math formatting.)
Now, we parse all of these as raw "latex" inlines, which will be
omitted when converting to formats other than LaTeX (and other
formats like pandoc's Markdown that allow raw LaTex).
Closes#10836.
Allows using `-t plain+four_space_rule` to emulate the output of pandoc
before #7172. This is useful for users that use pandoc e.g. to
autoformat commit messages.