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

11 Dec, 2022 09:57 PM
11 Dec, 2022 07:57 PM
26 Sep, 2022 02:40 AM
21 Jul, 2022 10:22 AM
11 Jan, 2022 02:33 PM

Recent Articles