khajavi / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

Limit width of images in LaTeX #213

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by s.astanin on 3 Feb 2010 at 1:23

Attachments:

GoogleCodeExporter commented 9 years ago
s/All images fit page width and don't go beyond/All images should fit page and 
should
not go beyond/

Original comment by s.astanin on 3 Feb 2010 at 1:26

GoogleCodeExporter commented 9 years ago
Here'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.

Original comment by fiddloso...@gmail.com on 18 Mar 2010 at 3:08

GoogleCodeExporter commented 9 years ago
And what about standalone mode? Pandoc generates a custom preabmula already.

Original comment by s.astanin on 18 Mar 2010 at 11:35

GoogleCodeExporter commented 9 years ago
Fixed 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.)

Original comment by fiddloso...@gmail.com on 10 Apr 2010 at 5:27

GoogleCodeExporter commented 9 years ago
Thank you very much. 

It was very important for me, so I updated my debian lenny pandoc version to 
use the 1.6.1 version

Original comment by filir...@gmail.com on 18 Feb 2011 at 1:33