On Fri, Feb 12, 2016 at 10:07 PM, Keith Packard <[email protected]>
wrote:

>    image::micropeak-back.jpg[width="4.5in"]
>
> then the resulting html renders with a width of 4 pixels.
>

That's indeed true, but HTML alone simply doesn't support other units.
Shifting 4.5in to the inline style attribute breaks the image scaling on
mobile devices. So it's best either to not specify it or convert the inches
value to pixels by multiplying by 96 as defined by
https://www.w3.org/TR/css3-values/#absolute-lengths.

Of course, there are print backends to consider (e.g., PDF). The way this
was always handled in AsciiDoc was to use the scaledwidth attribute, which
is sort of an ill-defined alias for printwidth.

image::micropeak-back.jpg[scaledwidth=4.5in]

The scaledwidth is only used in the DocBook output, and is intended to be
passed on the dblatex or FOP engine. In Asciidoctor PDF, we've introduced
the pdfwidth attribute for this purpose so the intent is more clear (see
https://github.com/asciidoctor/asciidoctor-pdf/issues/76).

-Dan


-- 
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to