What steps will reproduce the problem? 1. input: markdown or HTML with some images wide enough (≈ 500 px) 2. output: standalone LaTeX 3. compile output with pdflatex
What is the expected output? What do you see instead?
All images fit page width and don't go beyond the right margin, but some images (those ≈ 500 px wide and more) go beyond the right margin.
What version of the product are you using? On what operating system?
Pandoc 1.4 on Linux.
Please provide any additional information below.
I think this can be fixed if pandoc defines \maxwidth length in the preamble as described in TeX FAQ (http://www.tex.ac.uk/cgi-bin/texfaq2html?label=grmaxwidth) and includes all images as
\includegraphics[width=\maxwidth]{...}
Document example to reproduce the problem is attached.
- pandoc-img-width.tar 20KB
Comment #1
Posted on Feb 3, 2010 by Helpful Dogs/All images fit page width and don't go beyond/All images should fit page and should not go beyond/
Comment #2
Posted on Mar 18, 2010 by Grumpy DogHere's why I'm reluctant to apply this. As far as possible, I'd like pandoc to convert to clean, simple LaTeX that can be used in fragment mode, without any particular header. If I made all images depend on a custom macro, people who use pandoc to create LaTeX fragments might not be happy.
Comment #3
Posted on Mar 18, 2010 by Helpful DogAnd what about standalone mode? Pandoc generates a custom preabmula already.
Comment #4
Posted on Apr 10, 2010 by Grumpy DogFixed in commit e365c5950b1b6ee85123d4b376025a6bb0697f7d thanks to a patch from batterseapower. (This patch does all the work in the document header, redefining \includegraphics, so fragments are completely unaffected.)
Comment #5
Posted on Feb 18, 2011 by Quick GiraffeThank you very much.
It was very important for me, so I updated my debian lenny pandoc version to use the 1.6.1 version
Status: Fixed
Labels:
Type-Defect
Priority-Medium