Skip to content
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

[LaTeX -> docx] All EPS images are resized/distorted to 120pt x 120pt #903

Closed
view715 opened this issue Jul 11, 2013 · 3 comments
Closed

Comments

@view715
Copy link

view715 commented Jul 11, 2013

Any EPS image included like

\includegraphics[width=116pt,height=50pt]{circles.eps}

or

\includegraphics{circles.eps}

gets the fixed dimensions "120ptx120pt" in the resulting docx file.

@jgm
Copy link
Owner

jgm commented Jul 13, 2013

Docx format requires you to include the image size. In the case of other image formats, pandoc looks inside the file to determine the image size. Presumably that is possibly too in the case of eps, in which case this could be added. But I'd need to look into the eps format more.

@jgm
Copy link
Owner

jgm commented Jul 13, 2013

The EPS spec is here:
http://partners.adobe.com/public/developer/en/ps/5002.EPSF_Spec.pdf
An EPS file contains a "bounding box" record, but the units seem to have no fixed meaning. (The spec just talks about the default postscript coordinate system, and suggests that this can vary.) I did see someone online saying that the units were points, which we could use.

@view715
Copy link
Author

view715 commented Jul 13, 2013

I just have found some interesting information in another spec:

http://partners.adobe.com/public/developer/en/illustrator/sdk/AI7FileFormat.pdf

"%%BoundingBox: llx lly urx ury
[Required] The %%BoundingBox comment specifies the imaginary box that
encloses all marks painted on the page. Specify the integer coordinates in the
default user coordinate system. Negative numbers are allowed."

So - what is the "default user coordinate system"?

"19.1.3 PAGE Resource
This resource contains the x and y coordinates of the document’s page origin
as specified by the Page tool in Adobe Illustrator. The coordinates are in the
default user coordinate system. In this system, the unit length along both axes
is 1/72 inch."

1/72 in = 1 pt. :-)

@jgm jgm closed this as completed in b2385d0 Jul 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants