Hi Benjamin,

thanks a bunch, that makes my life much easier.

Best regards, Lars

2015-08-04 13:48 GMT+02:00 Kallauch, Benjamin (EEIN) <
[email protected]>:

> Hi Lars,
>
>
>
> I’d suggest the following (which holds at least for the FO formatting):
>
>
>
> First, insert (thus: create) an XSL parameter in your customization layer:
>
>
>
> <xsl:param name="default.image.scale" select="'0.4'"/>
>
>
>
>
>
> Second, modify the image.scale template to acknowledge the parameter:
>
>
>
> <xsl:template name="image.scale">
>
>             <xsl:choose>
>
>                   <xsl:when test="$ignore.image.scaling != 0">0</xsl:when>
>
>                   <xsl:when test="@contentwidth or @contentdepth">1.0</
> xsl:when>
>
>                   <xsl:when test="@scale">
>
>                         <xsl:value-of select="@scale div 100.0"/>
>
>                   </xsl:when>
>
>                   <xsl:otherwise>
>
>                         <xsl:value-of select="$default.image.scale"/>
>
>                   </xsl:otherwise>
>
>             </xsl:choose>
>
> </xsl:template>
>
>
>
> Regards, Benjamin
>
>
>
> *Von:* Lars Vogel [mailto:[email protected]]
> *Gesendet:* Dienstag, 4. August 2015 13:14
> *An:* DocBook Apps
> *Betreff:* [docbook-apps] Default for scale factor for images
>
>
>
> Hi,
>
>
>
> for my screenshots I typically add a scale factor of 40 to make the images
> size well.
>
>
>
> <para>
>
>                         <mediaobject>
>
>                                    <imageobject>
>
>                                                <imagedata
> fileref="./images/application_model_ui_elements.png" scale="40" />
>
>                                    </imageobject>
>
>                                    <textobject>
>
>                                                <phrase>Application Model
> UI Elements</phrase>
>
>                                    </textobject>
>
>                         </mediaobject>
>
>             </para>
>
>
>
> Is there a general parameter for this? My desired behavior would be that I
> can define a default for all imageobject which do not specify this
> parameter but override it for individual imageobject via this parameter.
>
>
>
> Best regards, Lars
>

Reply via email to