aboutsummaryrefslogtreecommitdiff
path: root/test/command/7181.md
AgeCommit message (Collapse)Author
2025-05-26LaTeX writer: include alt option in `\includegraphics`.John MacFarlane
Closes #6095.
2024-06-23LaTeX writer: new method for ensuring images don't overflow.John MacFarlane
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.
2022-03-29LaTeX writer: support `page`,`trim`,`clip` attributes on images.John MacFarlane
These are actually supported by `\includegraphics`, though this is not well documented. See https://tex.stackexchange.com/questions/7938/pdflatex-includegraphics-and-multi-page-pdf-files Partially addresses #7181.