image width for html and LaTeX

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. Why not just use inches or cm?

    Fletcher

  2. fletcher closed this discussion on 31 Oct, 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

Recent Discussions

Recent Articles