-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversion from Markdown to docx produces images of fixed size #976
Comments
I should mention this is version 1.11.1: $ pandoc --version
pandoc 1.11.1
Compiled with citeproc-hs 0.3.8, texmath 0.6.1.3, highlighting-kate 0.5.3.8.
Syntax highlighting is supported for the following languages:
actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
fortran, fsharp, gnuassembler, go, haskell, haxe, html, ini, java, javadoc,
javascript, json, jsp, julia, latex, lex, literatecurry, literatehaskell,
lua, makefile, mandoc, matlab, maxima, metafont, mips, modula2, modula3,
monobasic, nasm, noweb, objectivec, objectivecpp, ocaml, octave, pascal,
perl, php, pike, postscript, prolog, python, r, relaxngcompact, rhtml, ruby,
rust, scala, scheme, sci, sed, sgml, sql, sqlmysql, sqlpostgresql, tcl,
texinfo, verilog, vhdl, xml, xorg, xslt, xul, yacc, yaml
Default user data directory: /Users/ben/.pandoc
Copyright (C) 2006-2013 John MacFarlane
Web: http://johnmacfarlane.net/pandoc
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose. |
Confirmed the issue on my mac (with latest dev version of pandoc). Confirmed that imageSize from Text/Pandoc/ImageSize.hs is returning
but not on yours, which 'file' lists as
So perhaps (it has been a while since I worked on it), my algorithm Presumably this wouldn't be hard to fix. But for a workaround you might |
I'm using both Skitch and Photoshop to generate JPGs, and images from both sources have problems, so I'd expect this to be rather common. For a workaround, it looks like PNGs generated from both Skitch and Photoshop have no issues. Thanks! 😀 |
We have the same issue on ubuntu 12.04. |
Here's a description of the EXIF format: |
Reopening -- the patch above will only work with some EXIF headers. Working on something more robust. |
I'm having an issue where images included from markdown aren't sized appropriately; they appear to all be pinned to 1.67" square. This is easily reproducible:
$ pandoc -t docx -o test.docx ![Caption](a_400x100_image.jpg
Expected output: a document with an embedded image that, if too wide, is clamped to the margin area, but honors its original aspect ratio.
Actual output: a document that looks like this (screenshot from Word for Mac 2011):
Here's the image that's being included. It's 400x100 at 72dpi.
Is there some flag I can pass to bypass this behavior? It also happens if I round-trip to LaTeX, and the LaTeX output doesn't look like it's embedding any size information:
$ pandoc -f markdown -t latex ![Caption](a_400x100_image.jpg)
The output:
The text was updated successfully, but these errors were encountered: