This change allows users to style images in InDesign bysetting the
`object-style` attribute in a pandoc Image, which is mapped to the
AppliedObjectStyle attribute in the Rectangle element around
an Image element in the resulting ICML.
RevealJS defaults scrollProgress to 'auto', but the writer was
setting it to true. Use lookupMeta to distinguish between
MetaBool True, MetaBool False, and unset (defaulting to 'auto').
The template uses a helper variable scrollProgressAuto since
pandoc templates cannot distinguish a MetaString "auto" from
MetaBool True in a single variable.
Remove quotes from scrollActivationWidth (should be a number,
not a string). Use $if/$else$ guard for scrollSnap so that
`false` renders as a boolean literal rather than the string
'false'. Add /nowrap to scrollSnap and scrollLayout.
This borrows a test case taken mostly from #11394 by @mcanouil
but the code is fresh. The behavior is similar to what we
have with the HTML and LaTeX writers.
Obsoletes #11394.
Co-authored by @mcanouil and Claude Opus 4.6.
These commands allow separating the footnote mark from its content,
useful in tables, minipages, and other contexts where \footnote
cannot be used directly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Closes#11450.
Instead of using an SVG with a link containing the data URI
(the solution of #10460), we can now simply produce a `bytes`
object with the requisite bytes. Typst figures out the format
automatically.
Closes#11420.
When using `--syntax-highlighting=idiomatic` with reveal.js output,
pandoc now generates HTML compatible with reveal.js's built-in
highlight.js plugin:
- Code blocks use `<pre><code class="language-X">` format
- The template loads highlight.js CSS, JS, and RevealHighlight plugin
- Theme defaults to "monokai", configurable via `highlightjs-theme`
variable
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This refactors the writer to use Text.DocLayout combinators (vcat, hcat,
literal, blankline, cr, chomp) for building output, following the pattern
used by other text format writers (RST, Markdown, Man). This enables
better control over line spacing and paragraph separation.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add `pdfstandard` metadata variable for specifying PDF standards
(PDF/A, PDF/X, PDF/UA) in LaTeX output. Uses LaTeX's \DocumentMetadata
command which requires LuaLaTeX.
- PDF version requirements are automatically inferred, but can be explicitly
overridden.
- Automatic tagging for standards that require it (ua-1, ua-2, a-2a, a-3a).
- Warning for unsupported standards
- Documentation in MANUAL.txt (Variables for LaTeX, Accessible PDFs)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
These were being parsed as inline notes. Now we disallow an
inline note followed by attributes, as this is almost certainly
meant to be a span.
Closes#11409.
Previously we would export leading and trailing space inside
elements like emphasis or ulink so they appeared outside the
resulting pandoc Inline (Emph or Link). This is not really
motivated; DocBook and XML in general treats leading and trailing
whitespace in this context as significant.
These spaces may casue problems for some output formats, e.g.
asciidoc, but these issues should be addressed in the
corresponding writers, as they are in the Markdown writer,
using Text.Pandoc.Writers.Shared.delimited.
Closes#11398.
`<mark>`, `<var>`, `<samp>`, and `<kbd>` now produce Code or Span
elements with classes, which can be handled by multiple output
formats, instead of simply being parsed as raw HTML tags.
Closes#11299.
Also escape the `#` character.
Closes#11362.
An alternative solution, raised in #11362, would be to
rely less on escaping and simply always use doubled delimiters.
However, there would still be a need for escaping, since one
might use a literal `##` (for example)>
MediaWiki format supports [magic
words](https://www.mediawiki.org/wiki/Help:Magic_words). These are
basically built-in templates. This commit introduces support for behavior
switches, which is one of the three types of magic words. They add
a field to metadata without producing any text.
Signed-off-by: botantony <antonsm21@gmail.com>
Subfigures are now wrapped inside a `<fig-group>` element. Furthermore,
figure content that isn't allowed as children of `<fig>` elements, such
as raw text, gets wrapped in `<p>` elements to ensure schema-conform
XML production.
Fixes: #11342
When the `reset-citation-positions` class is added to
a top-level heading, `--citeproc` will reset position
information at that point in the document. This is needed
in order to ensure that the first citation in a chapter
to a work that has been cited in a previous chapter will
not be in abbreviated form.
Requires a dependency on a development version of citeproc.
This is a cleaner fix to #10643 than the reverted commit 7fe8c92.
Styles are not stripped, but with this change they will not
interfere with inline parsing.
Closes#11246.
This reverts some old code giving special treatment to lines
ending in hyphens; I don't understand why it was there, because
rst2html does not seem to do this.
Closes#11323.
MediaWiki, for example, will parse a code block containing
formatting as a sequence of Code elements separated by
LineBreaks. For this we now use a texinfo example block.
Closes#11312.
This PR aims to handle a common run field instruction (fieldInstr)
from docx format : REF, specifically those with the "link" switch \h.
In word software, you can create REF field instruction with the
Cross-reference button. You can create cross-reference to
many things such as Equation, Table, Title...
The ANSI writer is now able to keep track of row spans and apply them in rows.
[API change] T.P.Writers.Shared:
Add functions `insertCurrentSpansAtColumn`, `takePreviousSpansAtColumn`
and `decrementTrailingRowSpans` for applying and keeping track of
RowSpans over multiple rows.
Fixes: #10149
Previously, a math environment with extra space before the
`\end` would get rendered with a blank line, which LaTeX
treats as a paragraph break.
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
Fix `rawTeXParser`. Make macro expansion in raw LaTeX depend on
the setting of the `latex_macros` extension. Previously macros
were always expanded, even in raw TeX in markdown. In addition,
there was previously a bug that caused content to be garbled
in certain cases.
Closes#11253.
Handle `ifstrequal` at a lower level, like the other `if` commands.
See #11253.