image width for html and LaTeX

Victor Volle's Avatar

Victor Volle

Nov 16, 2015 @ 10:44 PM

I am looking for the best way to set images widths/heights that work for LaTeX as well as HTML.

When I set an image width like, e.g.:

    [image1]: image1.png "foo" width=150px

in LaTeX a width of 150pt (not 150px) is generated:

    \includegraphics[keepaspectratio,width=150pt,height=0.75\textheight]

on the other hand, if I use `width="0.75\textwidth"` this will be copied as a "style" attrbute in HTML.

Is there a solution to have the images roughly the same size in HTML as well as in LaTeX?

  1. Support Staff 1 Posted by fletcher on Nov 18, 2015 @ 05:51 PM

    fletcher's Avatar

    Why not just use inches or cm?

    Fletcher

  2. fletcher closed this discussion on Oct 31, 2017 @ 08:27 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac