Commit Graph
17531 Commits
Author SHA1 Message Date
John MacFarlane 501d7cc02d Updated AUTHORS.md. pandoc-lua-engine-0.3 3.2.1 pandoc-cli-3.2.1 2024-06-24 12:47:00 -07:00
John MacFarlane d0e77eb576 stack.yaml - bump versions for tls, toml-parser 2024-06-24 12:44:09 -07:00
John MacFarlane f5b43c10d3 Bump pandoc version bound in pandoc-lua-engine. 2024-06-24 12:38:38 -07:00
John MacFarlane d8be1feb32 Update manual date and man pages. 2024-06-24 12:37:25 -07:00
John MacFarlane d44060477d Bump pandoc to 3.2.1, update changelog. 2024-06-24 12:30:23 -07:00
John MacFarlane ea74c90aff Update pandoc-cli to 3.2.1, bump dependency versions 2024-06-24 12:30:15 -07:00
John MacFarlane 7ca6a2b776 Update pandoc-lua-engine to 0.3 2024-06-24 12:29:52 -07:00
John MacFarlane 8f91958f47 Use typst 0.5.0.4. 2024-06-24 11:47:02 -07:00
John MacFarlane 8bdea3f331 Use djot 0.1.2.1. 2024-06-24 11:47:02 -07:00
John MacFarlane c5efa6b600 Use citeproc 0.8.1.1. 2024-06-24 11:47:02 -07:00
TomBen 442dad1f0a Remove pkg-config installation step in nightly workflow 2024-06-24 10:03:01 -07:00
John MacFarlane 45568ad069 Add skylighting to stack.yaml. 2024-06-24 10:02:00 -07:00
John MacFarlane bbcbf8b378 Use released skylighting-core 0.14.2. 2024-06-23 23:10:20 -07:00
John MacFarlane fd9cb5e103 Allow tasty-quickcheck 0.11 2024-06-23 22:17:01 -07:00
John MacFarlane 26b25a4428 LaTeX writer: new method for ensuring images don't overflow.
Previously we relied on graphicx internals and made global
changes to Gin to force images to be resized if they exceed
textwidth.  This approach is brittle and caused problems
with `\includesvg` (see #9660).

The new approach uses a new macro `\pandocbounded` that is
now defined in the LaTeX template. (Thanks here to Falk Hanisch in
https://github.com/mrpiggi/svg/issues/60.)

The LaTeX writer has been changed to enclose `\includegraphics`
and `\includesvg` commands in this macro when they don't explicitly
specify a width or height.

In addition, the writer now adds `keepaspectratio` to the
`\includegraphics` or `\includesvg` options if `height` is specified
without width, or vice versa. Previously, this was set in the preamble
as a global option.

Compatibility issues:

- If custom templates are used with the new LaTeX writer, they will have
  to be updated to include the new `\pandocbounded` macro, or an error
  will be raised because of the undefined macro.

- Documents that specify explicit dimensions for an image may render
  differently, if the dimensions are greater than the line width or
  page height. Previously pandoc would shrink these images to fit,
  but the new behavior takes the specified dimensions literally.
  In addition, pandoc previously always enforced `keepaspectratio`,
  even when width and height were both specified, so images with
  width and height specified that do not conform to their intrinsic
  aspect ratio will appear differently.

Closes #9660.
2024-06-23 16:12:37 -07:00
John MacFarlane 965de61edb Markdown writer: fix bug with block quotes in lists.
Closes #9908.
2024-06-23 14:33:58 -07:00
TomBen 07602dedae Update macOS version in GitHub workflows to macos-12 2024-06-23 09:56:09 -07:00
John MacFarlane b07c05a1e5 OpenXML writer: be craftier in adding East Asian font hints.
In some cases we need to break up a long text run including
both western and East Asian text, so that the punctuation in
the western text doesn't become double-wide.

Closes #9817.
2024-06-22 21:37:06 -07:00
John MacFarlane bee5b1fcd1 HTML writer: ensure URI escaping needed for html4.
Unicode characters need not be escaped for html5, and still won't be.

See #9905.
2024-06-22 18:48:55 -07:00
John MacFarlane 2b60b1a1bc RST reader: Support :cite: role with citeproc.
This patch supports a subset of the functionality of the
sphinxcontrib-bibtex extension to Sphinx. See
<https://sphinxcontrib-bibtex.readthedocs.io/en/latest/quickstart.html>.

Closes #9904.
2024-06-21 23:30:27 -07:00
John MacFarlane 7de74f3404 Add command test for #9358. 2024-06-21 11:15:04 -07:00
John MacFarlane 7786b72584 LaTeX reader: fix parsing of dimensions beginning with ..
E.g., `\kern.1pt`.

Closes #9902.
2024-06-21 11:14:31 -07:00
John MacFarlane 59781abef4 MANUAL: Add a note that column widths aren't supported in pptx...
for Divs with class `columns`. See #9890.
2024-06-19 14:42:15 -07:00
John MacFarlane 34aeb289c9 Textile reader: don't let spans begin right after a symbol.
Closes #9878.
2024-06-18 13:24:59 -07:00
Albert Krewinkel 1e8799ca60 doc/custom-writers.md: document the separator arg of Writer.Blocks
Mention that the default `Writer.Blocks` function in
`pandoc.scaffolding.Writer` takes a separator as an optional second
argument.
2024-06-18 09:13:05 +02:00
John MacFarlane 532bbc875b Use latest commonmark-extensions.
This fixes `auto_identifiers` and `ascii_auto_identifiers`
extensions so that they substitute aliases for emojis,
as documented.

See #9876.
2024-06-17 19:57:33 -07:00
John MacFarlane 80ad2f09d3 Use latest emojis release. 2024-06-17 18:52:18 -07:00
John MacFarlane 97b3056f4e Make gfm_auto_identifiers work as advertised.
It is supposed to replace emojis with their aliases,
but previously this only worked when the emojis were
in a specially marked span.

Note that this change doesn't affect `commonmark` (or `gfm`)
because the relevant code is in commonmark-hs. This will also
need updating.

See #9876.
2024-06-17 13:41:31 -07:00
John MacFarlane fde7908091 Markdown writer: don't print extra caption when using implicit_figures. 2024-06-12 23:00:58 -07:00
John MacFarlane 94975a4e3c Docx reader: improve handling of captions.
- Turn captioned images into Figure elements. Closes #9391.
- Improve the logic for associating elements with captions.
  Closes #9358.
- Ensure that captions that can't be associated with an
  element aren't just silently dropped. Closes #9610.
2024-06-12 22:31:33 -07:00
John MacFarlane b2f0d8e799 Docx reader: rename TblCaption to Capt.
We'll use this for image captions as well. Word does not really
distinguish these.
2024-06-12 10:27:32 -07:00
John MacFarlane 7e89a47f2e T.P.ImageSize: don't prefer exif width/height when they conflict...
...with width/height.  That was a mistaken call in #6936.
Usually when these values disagree, it is because the image
has been resized by a tool that leaves the original exif values
the same, so the width/height metadata are more likely to be
correct that exif width/height.

Closes #9871.
2024-06-11 16:44:23 -07:00
Albert Krewinkel e6f298f19f doc/lua-filters.md: Fix outdated docs
Documentation of math and quoting related functions and fields was
updated. The docs had been outdated since at least pandoc 2.17.
2024-06-11 16:45:24 +02:00
John MacFarlane cd9753d4af LaTeX writer/template: specify language option for selnolig...
...and only include it if `english` or `german` is used.

Since 3d8f011, the babel language is not specified as a
class option any more; so now we need to explicitly specify
the language option when we load `selnolig`.  Only `german`
and `english` are valid, so we construct the variable
`selnolig-langs` in the writer and include `selnolig` if it
is nonempty.

This should restore proper ligature suppression when
lualatex is used.

Closes #9863. Supersedes #9864.

Thanks to @fkohrt for the initial fix.
2024-06-10 19:33:43 -07:00
John MacFarlane c9a3f5466e SelfContained: strip CRs from XML before base64 encoding for data uri.
This is motivated mainly by the desire to get tests to work on Windows.
2024-06-10 12:48:35 -07:00
John MacFarlane f2092f82ff SelfContained: only create svg elements for SVG images when...
...the image has the class `inline-svg`. Otherwise just use a
`data` URI as we do with other images.

Closes #9787.
2024-06-10 10:59:16 -07:00
John MacFarlane 71e17b83b9 Use dev skylighting-core. 2024-06-10 09:16:11 -07:00
John MacFarlane 8e227ab059 LaTeX template: put babel-lang in options to beamer.
This is required to make beamer use proper localized terms for
things like "Section." Closes #9868.
2024-06-10 08:57:05 -07:00
Albert Krewinkel 7b85353780 doc/lua-filters.md: correct return type of pandoc.layout.render. 2024-06-10 07:28:00 +02:00
Albert Krewinkel d416619298 doc/lua-filters.md: Document operators of the "Doc" type. 2024-06-10 07:10:15 +02:00
Albert Krewinkel da4a55a985 lua-filters: auto-generate docs for pandoc.layout module. 2024-06-09 22:19:57 +02:00
Albert Krewinkel 042eb1782a CI: bump remaining actions/checkout from v3 to v4 2024-06-09 17:04:11 +02:00
Albert Krewinkel b91d3beaff stack.yaml: bump resolver to lts-22.24.
This shortens the list of extra-deps.
2024-06-09 16:30:33 +02:00
Albert Krewinkel 2cc9defda4 Lua: split Init module into more modules.
The module has grown unwieldy and is therefore split into three internal
Haskell modules, `Init`, `Module`, and `Run`.
2024-06-09 16:10:38 +02:00
John MacFarlane 684668db1e Fix --toc-depth with beamer output.
Previously only top-level sections were ever included in the TOC,
regardless of the setting of `--toc-depth`.

Closes #9861.
2024-06-08 17:35:00 -07:00
Albert KrewinkelandCarsten Gips 9af5b1ca8b Lua: add function pandoc.template.get.
The function allows to specify a template with the same argument value
that would be used with the `--template` command line parameter.

Closes: #9854

Co-authored-by: Carsten Gips <cagix@hsbi.de>
2024-06-08 08:42:47 -07:00
Albert Krewinkel 11a2f78cda PandocMonad: convert IOErrors to warnings when fetching absolute paths (#9859) 2024-06-08 08:40:42 -07:00
Albert Krewinkel 7db19d8cd4 Update more copyright dates to 2024. 2024-06-08 16:46:42 +02:00
Albert Krewinkel c290ffbaff Fix misplaced span. 2024-06-08 14:48:15 +02:00
Albert Krewinkel 6a88abae3d Lua: keep CommonState object in the registry
The state is an internal value and should be treated as such. The
`PANDOC_STATE` global is merely a copy; unsetting the global no longer
breaks the Lua engine.
2024-06-08 14:39:58 +02:00