Commit Graph
964 Commits
Author SHA1 Message Date
John MacFarlane dc4bcd23cc typst template: put title block in a conditional.
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.
2026-03-17 09:58:29 +01:00
John MacFarlane 5f245367d9 LaTeX template: properly handle keywords with commas.
These need to be put in an `\xmpquote{..}` command.
Closes #11528.
2026-03-16 17:34:01 +01:00
massifrgandGitHub 15ddf4124c ICML writer support for image object styles (#11498)
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.
2026-03-03 22:31:55 +01:00
Christophe DervieuxandJohn MacFarlane 7bd9dbecdc Revealjs writer: default scrollProgress to 'auto'.
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.
2026-02-25 11:45:30 +01:00
Christophe DervieuxandJohn MacFarlane bf96353c48 Revealjs template: fix type rendering of scroll-view options.
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.
2026-02-25 11:45:30 +01:00
John MacFarlane a56d98f9c4 HTML styles template: avoid duplicate code selector.
Consolidate two clauses. Closes #11484.
2026-02-23 17:36:50 +01:00
Gordon WoodhullandJohn MacFarlane e427b7795e typst: use both place and block for title
otherwise the title will be confined to the left column
2026-02-16 23:36:50 +01:00
Jan TojnarandJohn MacFarlane 598b77517c Odt writer: Modernize Preformatted Text & Source Text styles
Presumably, `font-family-generic` and `font-pitch` will allow to find
a replacement on systems that do not have `Courier New`.
2026-02-16 13:54:34 +01:00
Jan TojnarandJohn MacFarlane c8a64cadb3 Odt writer: Remove font size from inline source class
This matches what LibreOffice Writer is doing.

Also fixes literals inside headings being too small.

Fixes https://github.com/jgm/pandoc/issues/3390#issuecomment-595677619
2026-02-16 13:54:34 +01:00
Jan TojnarandJohn MacFarlane edd6865f1c Odt writer: Rename inline source class to match LibreOffice
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.
2026-02-16 13:54:34 +01:00
Sidney MauandGitHub ddf25d83ca Beamer template: add logooption variable (#11456).
Closes #11452.
2026-02-12 08:51:43 +01:00
Mickaël CanouilandGitHub 65f0b491c9 Typst template: improve accessibility of definition lists (#11436).
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.
2026-02-03 21:58:28 +01:00
John MacFarlaneandClaude Opus 4.5 f0991cfcbb Reveal.js writer: add idiomatic highlight.js support.
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>
2026-01-25 13:53:38 +00:00
e07a3f3454 LaTeX writer: Add PDF standard support via DocumentMetadata (#11407)
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>
2026-01-22 20:00:57 +01:00
Christophe DervieuxandGitHub 81f33bdaff Fix author prefix placeholder in JATS template (#11381)
Follow up on https://github.com/jgm/pandoc/pull/10622 that fix typo in other file
2026-01-06 16:29:03 +01:00
John MacFarlane 12ad483674 Typst template: disable hyphenation for title, subtitle.
Closes #11375.
2026-01-03 11:32:22 -05:00
John MacFarlane 7ced712014 HTML5 template: conditionally include lang attribute.
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.
2025-12-06 11:51:09 +01:00
har7anandGitHub bbedaadc4d Typst template: Fix keywords usage. (#11317)
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.
2025-12-02 09:56:10 +01:00
Asliddinbek AzizovichandGitHub 094061d946 Add reveal.js scroll view option to HTML writer (#11305)
* Add revealjs `scroll` view option to HTML writer
* Add `scrollSnap` option into default.revealjs

Closes #10052
2025-11-30 13:45:36 +01:00
repteeandGitHub c660bd3419 Add BBCode writer (#11242)
`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.
2025-11-05 12:49:46 +01:00
John MacFarlane cfc5ac447b Re-add columns to typst template.
This is a regression since 3.8.

Closes #11259.
2025-10-30 11:15:09 +01:00
John MacFarlane 8b4e72e969 Typst template: fix font for compatibility with typst 0.14.
Typst 0.14 doesn't permit an empty array for `font`.
Closes #11238.
2025-10-26 19:43:03 +01:00
Mickaël CanouilandGitHub ba64240f2c Typst template: fix syntax for bibliography inclusion (#11233)
Previously the syntax was wrong when multiple bibliography files were
specified.  Typst expects an array.
2025-10-23 11:31:57 +02:00
John MacFarlane 36cea7c978 Typst template: ensure that title block is properly centered.
Closes #11221.
2025-10-18 15:41:07 +02:00
John MacFarlane d8354618c4 LaTeX writer/template: small fix for unnumbered tables.
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.
2025-10-06 23:04:40 +02:00
John MacFarlane 9d452f801d Typst template: fix 3.8 regression in which links disappear.
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.
2025-10-04 19:26:59 +02:00
John MacFarlane 237b7a1a84 Remove coloring for a, a:visiting in epub.css.
This was causing links in iOS books app not to be distinguished in
any way (since underlining is not used there).

Closes #11174.
2025-09-28 15:57:28 +02:00
TuongNMandGitHub b62f2505b3 LaTeX writer: Fix strikeouts in beamer title (#11169)
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.
2025-09-28 15:52:33 +02:00
John MacFarlane 3ffd47af68 Typst writer: Fix syntax highlighting.
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.
2025-09-28 15:36:21 +02:00
John MacFarlane 95326e21e6 Add shorthands variable for LaTeX output.
If true, pandoc will allow language-specific shorthands
when loading babel.

Closes #11160.
2025-09-24 22:25:07 +02:00
repteeandGitHub a0cfb3fd31 Vimdoc writer (#11132)
Support for vimdoc, documentation format used by vim in its help pages.
Relies heavily on definition lists and precise text alignment to generate tags.
2025-09-15 12:45:28 +02:00
John MacFarlane f3c7a931b4 Update default.csl from new chicago-author-date.csl. 2025-09-02 12:42:16 +02:00
John MacFarlane 0cdb430110 LaTeX template: don't emit empty linkcolor= in hypersetup.
Closes #11098.
2025-09-02 09:39:39 +02:00
Christopher T. KennyandGitHub 6070ad29cd Add features to typst base template (take 2).
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.)
2025-09-02 09:25:39 +02:00
John MacFarlane 27851bbe9d LaTeX writer: include cancel package only if needed.
That is, only if there is math that contains `\cancel`,
`\bcancel`, or `\xcancel`.
2025-08-27 13:09:07 +02:00
Reuben ThomasandJohn MacFarlane 5e92187c88 common.latex: add RTL support for LuaTeX engine 2025-08-24 09:59:48 +02:00
John MacFarlane 4c69f288d9 Revert "Add features to typst base template."
This reverts commit f000fa168b.
2025-08-24 09:47:44 +02:00
Albert KrewinkelandJohn MacFarlane 7639e800c5 Org template: add #+options lines if necessary
The default template now adds `#+options` lines if non-default settings
are used for the `smart_quotes` and `special_strings` extensions.
2025-08-06 12:54:12 -07:00
Albert KrewinkelandJohn MacFarlane 3a185fb5d0 LaTeX writer: set pdf-trailer-id if SOURCE_DATE_EPOCH envvar is set
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
2025-08-06 12:48:59 -07:00
n.westandJohn MacFarlane 96fe83ecf1 reference.docx: don't left-align table header row
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.
2025-08-04 15:07:58 -07:00
Albert Krewinkel 6dae03f719 Typst writer: add native Typst support for nocite.
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
2025-07-30 11:59:41 +02:00
Albert KrewinkelandGitHub de7f732be8 HTML styles: prefix default styles with informative CSS comment (#11002)
Closes #8819
2025-07-29 14:28:08 -07:00
Christopher KennyandJohn MacFarlane f000fa168b Add features to typst base template.
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.
2025-07-24 10:45:28 -07:00
Albert Krewinkel f596612abd Typst: add support for custom and/or translated "Abstract" titles
Closes: #9724
2025-07-21 11:11:25 +02:00
John MacFarlane f4eca1f3fb Use latest dev citeproc and update the default CSL...
from the latest chicago-author-date.csl. (Note that this goes
from the 17th to the 18th edition.)

Update tests.
2025-07-20 00:12:15 -07:00
TomBenandJohn MacFarlane 0a697c101b Update East Asia font theme in styles.xml to minorEastAsia 2025-06-10 18:08:06 -07:00
TomBenandJohn MacFarlane 7b03847ec5 Update language settings in styles.xml for East Asia to Simplified Chinese 2025-06-10 18:08:06 -07:00
John MacFarlane f4c7fccd93 ConTeXt template: add command needed to get tagging working...
...on the most recent context versions.
See #10846.
2025-05-17 10:18:58 -07:00
John MacFarlane cf795b0cf5 Fix context writer/template to produce tagged PDFs.
As before, the `tagging` extension must be enabled.
We now add the command that tells ConTeXt to start tagging.

Closes #10846.
2025-05-15 11:37:50 -07:00
Andrew DunningandJohn MacFarlane 2196609989 Add footnote block text sample 2025-05-13 10:31:14 -07:00