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

Output units in millimetres rather than centimetres #4012

Closed
adunning opened this issue Oct 31, 2017 · 5 comments
Closed

Output units in millimetres rather than centimetres #4012

adunning opened this issue Oct 31, 2017 · 5 comments

Comments

@adunning
Copy link
Contributor

Pandoc 2 converts any use of millimetres to centimetres; it would be cleaner and more idiomatic to reverse this. In my experience, millimetres are more common (though not universal) when metric is used in book design, since they mostly eliminate the need for decimals; A4 paper, for example, is usually described as 297 × 210 mm. Avoidance of decimals is desirable particularly because the separator varies by language (Pandoc does not recognize '29,7 cm').

Example (version 2.0.0.1):

pandoc << EOT
![image]

[image]: http://example.com/image.jpg {height=35mm}
EOT

Result:

<figure>
<img src="http://example.com/image.jpg" alt="image" style="height:3.5cm" /><figcaption>image</figcaption>
</figure>
@jgm
Copy link
Owner

jgm commented Oct 31, 2017

Sounds reasonable to me!

@jgm
Copy link
Owner

jgm commented Oct 31, 2017

In Text.Pandoc.ImageSize, we have:

data Dimension = Pixel Integer
               | Centimeter Double
               | Inch Double
               | Percent Double
               | Em Double

No Millimeter. That's why mm is converted.

@mb21 - can you recall whether there was a reason why we don't have Millimeter?

@mb21
Copy link
Collaborator

mb21 commented Oct 31, 2017

If I recall correctly, the reason was simply that in my personal experience cm felt more common. But I'm not in the printing business... and I don't mind either way. Maybe ask around on pandoc-discuss?

@jgm jgm closed this as completed in 0e57b8b Oct 31, 2017
@jgm
Copy link
Owner

jgm commented Oct 31, 2017

I've pushed a commit that leaves 'mm' alone.
It doesn't convert 'cm' to 'mm' ; that seems a bit intrusive.

@adunning
Copy link
Contributor Author

Thank you!

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

3 participants