Commit Graph

18331 Commits

Author SHA1 Message Date
John MacFarlane 4e922ad20f Use latest dev pandoc-types. 2025-07-30 19:49:49 -07:00
John MacFarlane 3e5babbb43 Fix mistaken attempt to fix #11006.
Update the test so it reflects the right output, and fix the
solution.

Really closes #11006.
2025-07-30 12:49:18 -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
John MacFarlane 4066a9d483 Asciidoc writer: handle lists with sublists following continuations.
These require an additional blank line in some cases.
Closes #11006.
2025-07-29 18:37:07 -07:00
John MacFarlane f5262d88e4 TikiWiki reader: Use getVerbosity instead of getCommonState. 2025-07-29 17:24:19 -07:00
R. N. West (Nat) 9d56205784 docs: Don't encourage returning tables of filters from Lua filters (#11000)
See #10995. Use the `Pandoc:walk` method instead.
2025-07-29 16:16:38 -07:00
Albert Krewinkel de7f732be8 HTML styles: prefix default styles with informative CSS comment (#11002)
Closes #8819
2025-07-29 14:28:08 -07:00
John MacFarlane e4b6196636 LaTeX writer: be more conservative about using \url.
We only use it when the URL is all ASCII, since the `\url` macro
causes problems when used with some non-ASCII characters.

Closes #8802.
2025-07-29 14:25:23 -07:00
John MacFarlane ce6ef5cad0 ImageSize: Add Point and Pica as constructors of ImageSize.
[API change]

This will prevent unnecessary conversion of units.

Closes #8957.
2025-07-29 10:30:44 -07:00
John MacFarlane 39a2fd4308 Text.Pandoc.Class: Add stManager to CommonState.
[API change]

This allows us to cache the HTTP client manager and reuse it for
many requests, instead of creating it again (an expensive
operation) for each request.  (The documentation for `newManager`
advises sharing a single manager between requests.)

This fixes a memory leak and performance issue in files with
a large number of remote images.  Closes #10997.
2025-07-28 23:17:50 -07:00
Carlos Scheidegger 6893b38a6e Markdown writer: use fenced divs even with empty attributes.
Previously fenced divs were not used in this case, causing the writer to fall back to raw HTML.

Closes #10955.
2025-07-27 11:27:41 -07:00
John MacFarlane bfbf67ca5d Org writer: don't wrap link descriptions.
Org doesn't reliable display these as links if they have hard breaks.

Closes #9000.
2025-07-27 11:17:06 -07:00
John MacFarlane 8735bc03d8 Docx reader: fix stringToInteger.
It previously converted things like `11ccc` to an integer;
now it requires that the whole string be parsable as an integer.

Closes #9184.
2025-07-27 10:43:46 -07:00
John MacFarlane caa2193912 Ensure that the default template for xml is null. 2025-07-26 22:45:11 -07:00
John MacFarlane 9b06dc0075 MANUAL.txt: add xml as input/output format. 2025-07-26 22:45:11 -07:00
John MacFarlane 8f6eed7c72 Associate the .xml extension with the XML reader and writer. 2025-07-26 22:45:11 -07:00
massifrg fe3684632b New xml format exactly representing a Pandoc AST.
This adds a reader and writer for an XML format equivalent to `native`
and `json`.

XML schemas for validation can be found in `tools/pandoc-xml.*`.

The format is documented in `doc/xml.md`.

API changes:

- Add module Text.Pandoc.Readers.XML, exporting `readXML`.
- Add module Text.Pandoc.Writers.XML, exporting `writeXML`.

A new unexported module Text.Pandoc.XMLFormat is also added.
2025-07-26 22:45:11 -07:00
Albert Krewinkel cf11339c1d PDF: Improve error readability when pdf-engine is not supported.
Each supported engine is now printed on a line of its own.
2025-07-25 08:22:25 +02:00
Albert Krewinkel 3dfb25bb6c PDF: allow pdflatex-dev and lualatex-dev as PDF engines
These are the development versions of the LaTeX binaries; installable,
e.g., with `tlmgr install latex-base-dev`.

Closes: #10991
2025-07-25 08:19:27 +02:00
Albert Krewinkel 37b446a54c T.P.PDF: clean up makePDF 2025-07-25 07:53:57 +02:00
John MacFarlane 270fbd54f8 Use latest dev citeproc.
This solves the problem of unwanted capitalization of names
at the beginning of citations in footnotes.

Closes #10983.
2025-07-24 14:51:11 -07:00
John MacFarlane 912f4c7977 Revert a test case that changed due to a reverted citeproc change. 2025-07-24 14:51:11 -07:00
Sean Soon 937e20da0e DocBook reader: Add rowspan support. (#10981) 2025-07-24 23:07:50 +02:00
Ryan Gibb b84fa66fcb Org reader: Recognize "fast access" characters in TODO state definitions (#10990) 2025-07-24 22:40:08 +02:00
Christopher Kenny 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
John MacFarlane ebf41dd539 Fix stack.yaml. 2025-07-23 23:32:48 -07:00
John MacFarlane a4872aa223 Use dev texmath. 2025-07-23 18:46:12 -07:00
John MacFarlane 00e02e110b Use latest dev citeproc. 2025-07-23 16:08:34 -07:00
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