pandoc-latex-template icon indicating copy to clipboard operation
pandoc-latex-template copied to clipboard

Pandoc 3.2.1 introduced new LaTex macro \pandocbounded

Open sonic-martin opened this issue 8 months ago • 11 comments

Explain the problem.

Pandoc introduced in release 3.2.1 new LaTex macro \pandocbounded which custom templates needs to provide:

LaTeX writer:

New method for ensuring images don’t overflow (#9660). 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. Users should attend to the following 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.

pandoc readme.md -o doc.pdf --template=eisvogel

with readme.md:

# Reproducer
![image](picture.png "Random test image")

Pandoc version?

Pandoc 3.2.1 using the pandoc:extra docker image.

Reproducer

See https://github.com/sonic-martin/pandoc3.2.1-eisvogel-reproducer

sonic-martin avatar Jun 25 '24 12:06 sonic-martin