Commit Graph
18303 Commits
Author SHA1 Message Date
John MacFarlane 521bbb2e0c Fix CI again. 2025-07-23 16:07:09 -07:00
John MacFarlane 84bda29902 CI: another stab at preventing ghc 9.10, 9.12 from erroring. 2025-07-23 15:25:15 -07:00
John MacFarlane 54aef76773 CI: don't warn on unused imports in ghc 9.10+.
For now I want to avoid having to put in lots of CPP.
2025-07-23 15:20:34 -07:00
John MacFarlane 1778cc29a6 Ensure that all modules have explicit export lists. 2025-07-23 14:20:01 -07:00
John MacFarlane fb28952bec Revise Makefile and CI treatment of --ghc-options.
Previously we set `--ghc-options` in Makefile and CI; but this
overrides the ghc-options set in the pandoc.cabal file.

Better to add options one-by-one using `--ghc-option`.

We no longer use GHC_OPTIONS and just put these extra options
in CABAL_OPTIONS.
2025-07-23 14:10:43 -07:00
John MacFarlane 7ec7efeee7 Use latest dev citeproc.
Closes #10983 by allowing `nocase` spans to be used to suppress
capitalization of initial word in a footnote.
2025-07-23 14:10:43 -07:00
Albert Krewinkel 01a305af58 Lua: add function pandoc.path.exists.
The functions allows to check the existence of file-system objects.
2025-07-23 19:31:03 +02:00
John MacFarlane b683726447 Makefile: add -Wall to ghc options. 2025-07-23 09:09:50 -07:00
John MacFarlane 655ad77de1 Fix CI so that -Wall -Werror works again!
We were only getting the return status for the tests, apparently,
from `cabal test`. So now we run `cabal build` separately.
2025-07-23 08:54:52 -07:00
John MacFarlane b84ab366e6 Fix incomplete pattern matches from new ImageType constructor. 2025-07-23 08:51:49 -07:00
John MacFarlane ad1a7b69c7 T.P.ImageSize: support avif images.
[API change] New Avif constructor on ImageType.

Closes #10979.
2025-07-22 22:54:22 -07:00
John MacFarlane edd48fceb1 Djot writer: fix duplicate attributes before section headings.
Closes #10984.
2025-07-22 20:44:19 -07:00
Albert Krewinkel a45878ff1e Markdown writer: match indents in definition items
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
2025-07-22 19:07:08 +02: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 20950fdfab Fixed cabal.project stanza for citeproc. 2025-07-20 19:19:15 -07:00
John MacFarlane e037059a3a Fix a test. 2025-07-20 17:50:41 -07:00
John MacFarlane 8d9e124878 Use latest dev citeproc. 2025-07-20 16:24:26 -07:00
John MacFarlane 498ef4bf24 Fix pandoc-citeproc-64 test.
It was meant to test subsequent author substitution, but the
new chicago-author-date doesn't do this. So we use a different CSL.
2025-07-20 15:30:14 -07:00
John MacFarlane c9c0328179 Fix citeproc-87 test.
When we updated to the latest chicago-author-date.csl, this test
no longer tested what it was supposed to; so we use a different csl.
2025-07-20 15:29:55 -07: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
Albert Krewinkel 9893fe8c65 Lua: add normalize function to *Pandoc* objects
This function performs a normalization of Pandoc documents. E.g.,
multiple successive spaces are collapsed, and tables are normalized such
that all rows and columns contain the same number of cells.

Closes: #10356
2025-07-19 15:42:37 +02:00
John MacFarlane 826f487818 Typst writer: set lang attribute in Divs.
Closes #10965.
2025-07-14 11:52:22 -07:00
John MacFarlane ee4c9352ee Remove code duplication around version info.
Text.Pandoc.App.CommandLineOptions and pandoc-cli/src/pandoc.hs
had similar code for generating version information.

To avoid duplication, we now export `versionInfo` from
Text.Pandoc.App [API change]. (The function is reexported from the
non-public module Text.Pandoc.App.CommandLineOptions.)  This function
has three parameters that can be filled in when it is called by
pandoc-cli.

This change will make it simpler to revise version information.
2025-07-13 22:47:11 -07:00
John MacFarlane cff9ace0db Revert "Export copyrightMessage from Text.Pandoc.App module."
This reverts commit 2cf9b55421.
2025-07-13 22:46:10 -07:00
John MacFarlane 2cf9b55421 Export copyrightMessage from Text.Pandoc.App module.
Export `copyrightMessage` from the unexported module
Text.Pandoc.App.CommandLineOptions
and reexport from Text.Pandoc.App [API change].

This avoids the need for a duplicated version in pandoc-cli, which can
now depend on the library's exported version.
2025-07-13 12:33:32 -07:00
John MacFarlane 2e3cb483e9 Use hardcoded string "pandoc" for program name in --version.
Per GNU guidelines:
https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html
2025-07-13 12:23:56 -07:00
John MacFarlane 9d7996ea2b Update --version copyright dates.
Closes #10961.
2025-07-13 09:05:53 -07:00
Sean Soon 2b31cb4a4b doc/lua-filters.md: Add example on using pandoc.Table constructor. (#10956) 2025-07-10 09:46:07 +02:00
John MacFarlane 07e9ef87cc PDF: Use utf8ToText for LaTeX log messages. 2025-07-09 19:02:15 -04:00
John MacFarlane ca2c82133f PDF: make images from MediaBag available in tmp dir...
for every PDF engine, not just LaTeX/ConTeXt.

This is part of the fix for #10911.
2025-07-07 20:27:24 -04:00
John MacFarlane 55f0f88d83 CI: use windows-2022. windows-2019 is no longer provided. 2025-07-06 16:37:21 -04:00
Albert Krewinkel 6b81649771 Lua: add more UTF-8-aware file operations to pandoc.system.
Functions that expect UTF-8-encoded filenames should make it easier to
write platform-independent scripts, as the encoding of the actual
filename depends on the system.

Additionally, this also adds a generalized method to run commands, and
functions to retrieve XDG directory names.

The new functions are `command`, `copy`, `read_file`, `remove`,
`rename`, `times`, `write_file`, `xdg`.
2025-06-30 09:56:08 -06:00
Albert Krewinkel bffdd13038 pandoc-lua-engine: Allow hslua-2.4.0 in the tests 2025-06-25 17:06:55 +02:00
Albert Krewinkel 2de6f2eb83 doc/lua-filters: fix docs for pandoc.Cite. 2025-06-23 13:02:20 +02:00
Albert Krewinkel d3f2fcc5f8 pandoc-lua-engine: Allow hslua-2.4. 2025-06-23 13:02:19 +02:00
John MacFarlane b57d3f9b4d Markdown writer: better handling of pandoc-generated code blocks.
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.
2025-06-20 13:42:31 -07:00
Albert Krewinkel e2f67395a0 Typst writer: rename *numbering* variable to *section-numbering*.
This is the name expected by the default template.
2025-06-18 17:27:10 -07:00
John MacFarlane 103c26aab1 Add TODO comment to cabal.project. 2025-06-17 07:52:40 -07:00
John MacFarlane c6e418268f Fix compiler warning. 2025-06-16 17:56:59 -07:00
John MacFarlane 94a9643ef9 DocBook writer: Fixed compiler warning. 2025-06-16 17:30:52 -07:00
John MacFarlane c476f4749d DocBook writer: use startingnumber instead of override...
for start numbers on ordered lists.

Also remove legacy support for override on listitem in the
reader.

See #10912.
2025-06-16 13:15:12 -07:00
John MacFarlane 3d124e5d39 DocBook reader: be sensitive to startingnumber attribute...
on ordered lists.  Closes #10912.
2025-06-16 12:44:24 -07:00
Erik Post 6218393698 doc/extras.md: Fix link to pandoc-mode 2025-06-16 10:46:09 -07:00
John MacFarlane 332fffb89a LaTeX reader: support \ifmmode.
Closes #10915
2025-06-16 10:39:58 -07:00
John MacFarlane 6c3eebbb44 Update flake.nix to include zlib.dev. 2025-06-16 10:39:58 -07:00
John MacFarlane ae68554538 Fix docx golden tests for East Asian default style changes. 2025-06-10 18:11:24 -07:00
TomBen 0a697c101b Update East Asia font theme in styles.xml to minorEastAsia 2025-06-10 18:08:06 -07:00
TomBen 7b03847ec5 Update language settings in styles.xml for East Asia to Simplified Chinese 2025-06-10 18:08:06 -07:00
John MacFarlane f3b23afc94 Docx reader: don't add highlighting if highlight color is "none."
Closes #10900.
2025-06-08 13:17:46 -07:00
John MacFarlane 58daa8e2e8 ANSI writer: make --wrap=none work properly.
Closes #10898.
2025-06-05 14:39:16 -07:00