image width for html and LaTeX

Victor Volle's Avatar

Victor Volle

16 Nov, 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 18 Nov, 2015 05:51 PM

    fletcher's Avatar

    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

09 Nov, 2018 04:49 PM
09 Nov, 2018 04:46 PM
09 Nov, 2018 04:44 PM
11 Oct, 2018 02:59 AM
22 Apr, 2018 11:04 PM

Recent Articles