This allows us to use units like inches for image sizes, rather than pixels.
Signed-off-by: Keith Packard <[email protected]> -- 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.
>From 8953d986acd347e053a2fddb47f2f43bb0e8ea65 Mon Sep 17 00:00:00 2001 From: Keith Packard <[email protected]> Date: Fri, 12 Feb 2016 19:04:10 -0800 Subject: [PATCH 1/5] xhtml11: use 'style' to set image width/height This allows us to use units like inches for image sizes, rather than pixels. Signed-off-by: Keith Packard <[email protected]> --- xhtml11.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xhtml11.conf b/xhtml11.conf index 96de5bf..87ab469 100644 --- a/xhtml11.conf +++ b/xhtml11.conf @@ -80,7 +80,7 @@ ${passtext}$ [image-inlinemacro] <span class="image{role? {role}}"> <a class="image" href="{link}"> -{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"} /> +{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}" style="{width? width:{width}}{height? height:{height}}" {title? title="{title}"} /> {data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"}{title? title="{title}"} {data-uri#}{sys:"{python}" -u -c "import mimetypes,sys; print 'src=\x22data:'+mimetypes.guess_type(r'{target}')[0]+';base64,';"} {data-uri#}{sys3:"{python}" -u -c "import base64,sys; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}" /> @@ -91,8 +91,8 @@ ${passtext}$ <div class="imageblock{style? {style}}{role? {role}}{unbreakable-option? unbreakable}"{id? id="{id}"}{align? style="text-align:{align};"}{float? style="float:{float};"}> <div class="content"> <a class="image" href="{link}"> -{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"} /> -{data-uri#}<img alt="{alt={target}}"{width? width="{width}"}{height? height="{height}"} +{data-uri%}<img src="{imagesdir=}{imagesdir?/}{target}" alt="{alt={target}}" style="{width? width:{width}}{height? height:{height}}" /> +{data-uri#}<img alt="{alt={target}}" style="{width? width:{width}}{height? height:{height}"} {data-uri#}{sys:"{python}" -u -c "import mimetypes,base64,sys; print 'src=\x22data:'+mimetypes.guess_type(r'{target}')[0]+';base64,'; base64.encode(sys.stdin,sys.stdout)" < "{eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}"}" /> {link#}</a> </div> -- 2.7.0
