This avoids an empty block for documents that lack metadata
information. The empty block causes problems if `#set page`
is used, as it will cause a page break.
Closes#11529.
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.
Rename the text style we use to represent `Code` inlines from
`Source_20_Text` to `Source_Text`.
This is the same name LibreOffice Writer uses so it will be recognized
by the Character Styles section of the Styles menu.
Closes#3390.
The show rule we used for definition lists created problems when
typst was run with `--pdf-standard=ua-1`. This patch fixes things,
and also prevents definition list items from breaking across pages.
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>
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>
Previously we included it unconditionally, even if this
meant giving it an empty value. This seems at best redundant,
since the empty value is the default. At worst, it adds clutter
and according to some sources may prevent the use of browser defaults.
I believe that the justification for including these attributes
even with empty values is not a good one; see commit 07d51d9
for the original change. On my reading, the HTML spec does not
require the presence of the attribute on the html element; it
only says that if the attribute is present, it must have an
empty string or valid BCP 47 language tag as its value.
See also #11324.
Previously the template turned any `keywords` defined in Pandoc metadata
into empty objects due to a misnomer in a loop variable. This in turn
was rejected by the Typst compiler as invalid syntax, making document
generation with keywords impossible.
`bbcode` is now supported as an output format, as well as variants
`bbcode_fluxbb` (FluxBB), `bbcode_phpbb` (phpBB), `bbcode_steam` (Hubzilla),
`bbcode_hubzilla` (Hubzilla), and `bbcode_xenforo` (xenForo).
[API change]
Adds a new module Text.Pandoc.Writers.BBCode, exporting a number of functions.
Also exports `writeBBCode`, `writeBBCodeSteam`, `writeBBCodeFluxBB`,
`writeBBCodePhpBB`, `writeBBCodeHubzilla`, `writeBBCodeXenforo` from
Text.Pandoc.Writers.
This improves on commit e13aa5c015,
which worked only for recent versions of longtable.
For older versions, we need to define a dummy counter `none`.
Closes#11201. Thanks to @priiduonu for the solution.
A template change in 3.8 added a show rule for links which
causes them to disappear except in special cases.
This change fixes the problem.
Closes#11194.
beamer uses pdfstring for the pdfinfo which can't handle soul strikeouts.
Therefore, the title, subtitle and author contents need to be put inside
texorpdfstring to deal with both the pdfinfo as well as the formatting.
Fixes#11168.
See #11171. Previously the native typst highlighting was
always used, regardless of the setting of `--syntax-highlighting`.
With this change, `--syntax-highlighting=none` and
`--syntax-highlighting=<style name>` (with skylighting) will work.
Completes #10525.
Support for vimdoc, documentation format used by vim in its help pages.
Relies heavily on definition lists and precise text alignment to generate tags.
New template variables supported: `thanks`, `abstract-title`, `linestretch`, `mathfont`,
`codefont`, `linkcolor`, `filecolor`, `citecolor`.
Closes#9956, #11076.
(This is a new version of f000fa168b which
was reverted.)
The `SOURCE_DATE_EPOCH` environment variable is used to trigger
reproducible PDF compilation, i.e., PDFs that are identical down to the
byte level for repeated runs.
Closes: #6539
See #11019. Previously, centering tables in `reference.docx` would leave
the header row left-aligned. Why the OOXML 'standard' would allow table
elements to be aligned differently from the rest of the table in the
first place is anyone's guess.
The `nocite` metadata field can now be used to supply additional
citations that don't appear in the text, just as with citeproc and
LaTeX's bibtex and natbib.
Closes: #10680
This implements the changes suggested in #9956, with the exception of
the filecolor/urlcolor one. These would require adding some regex to
guess the link types. This is theoretically possible to do, but it
wasn't clear to me that this is a good thing to put in a default
template. Happy to adjust if you have thoughts on this.
Closes#9956.
Some things to note:
I'm converting colors by passing them as content, as I was seeing pandoc
escape # if that was included.
I set the default fonts for math and code ("raw") to fonts that are
bundled with Typst. These need not be those fonts if there are more
familiar pandoc preferences.