docbook-apps

  • 1.  How to reduce size of text in a

    Posted 02-22-2007 14:56
    I want to be able to change the font-size of text in a <para>
    element, e.g <para size="Small">qwerty asdfgh</para>
    How do I do this please?
    --
    Ron Catterall, Phd, DSc email:
    ron@catterall.net
    Prolongacion de Hidalgo 140 http://catterall.net/
    San Felipe del Agua tel: +52 951 520 1821
    Oaxaca 68020 Mexico fax: +1 530 348 8309



  • 2.  Re: [docbook-apps] How to reduce size of text in a

    Posted 02-22-2007 20:19
    
    
    OK, I figured it out -


    <xsl:template match="para">
     
    <fo:block xsl:use-attribute-sets="normal.para.spacing">
     
    <xsl:attribute name="font-size">
      
    <xsl:choose>
        
    <xsl:when test="@size = 'Less'">85%</xsl:when>
        
    <xsl:when test="@size = 'Small'">75%</xsl:when>
        
    <xsl:when test="@size = 'Smaller'">65%</xsl:when>
        
    <xsl:otherwise>100%</xsl:otherwise>
      
    </xsl:choose>
     
    </xsl:attribute>
       
    <xsl:call-template name="anchor"/>
       
    <xsl:apply-templates/>
     
    </fo:block>
    </xsl:template>


    Thanks anyway.  perhaps it might be of use to someone.


    I want to be able to change the font-size of text in a <para> element, e.g <para size="Small">qwerty asdfgh</para>
    How do I do this please?


    Ron Catterall, Phd, DSc       email: ron@catterall.net
    Prolongacion de Hidalgo 140http://catterall.net/
    San Felipe del Aguatel: +52 951 520 1821
    Oaxaca      68020Mexicofax: +1 530 348 8309


  • 3.  Re: [docbook-apps] How to reduce size of text in a

    Posted 02-22-2007 21:42
    
    
    Not quite.  How do I add the attribute 'size' to the DTD for the element 'para' so the source using <para size="Small"> will validate OK. I have a local-adds entity which does this for 'literallayout' using

    <!ENTITY % local.literallayout.attrib "size CDATA #IMPLIED" >
    What is the equivalent for para ?

    <!ENTITY % local.para.attrib "size CDATA #IMPLIED" >

    doesn't work.

    OK, I figured it out -


    <xsl:template match="para">
     
    <fo:block xsl:use-attribute-sets="normal.para.spacing">
     
    <xsl:attribute name="font-size">
      
    <xsl:choose>
        
    <xsl:when test="@size = 'Less'">85%</xsl:when>
        
    <xsl:when test="@size = 'Small'">75%</xsl:when>
        
    <xsl:when test="@size = 'Smaller'">65%</xsl:when>
        
    <xsl:otherwise>100%</xsl:otherwise>
      
    </xsl:choose>
     
    </xsl:attribute>
       
    <xsl:call-template name="anchor"/>
       
    <xsl:apply-templates/>
     
    </fo:block>
    </xsl:template>


    Thanks anyway.  perhaps it might be of use to someone.


    I want to be able to change the font-size of text in a <para> element, e.g <para size="Small">qwerty asdfgh</para>
    How do I do this please?


    --
    Ron Catterall, Phd, DSc       email: ron@catterall.net
    Prolongacion de Hidalgo 140http://catterall.net/
    San Felipe del Aguatel: +52 951 520 1821
    Oaxaca      68020Mexicofax: +1 530 348 8309
    --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


    Ron Catterall, Phd, DSc       email: ron@catterall.net
    Prolongacion de Hidalgo 140http://catterall.net/
    San Felipe del Aguatel: +52 951 520 1821
    Oaxaca      68020Mexicofax: +1 530 348 8309