OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] setting note(admonition) property.


Hi Anmol,
If you want to better understand how attribute-sets work, I would suggest you read this section:

http://www.sagehill.net/docbookxsl/AttributeSets.html

To better understand what XSL-FO properties are available and what they do, you need a good XSL-FO reference. See Appendix D of the standard, for example:

http://www.w3.org/TR/xsl/

or the W3C Schools reference:

http://www.w3schools.com/xslfo/xslfo_reference.asp

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net

On 3/31/2014 11:02 AM, anmol gupta wrote:
Hi,

Points 1,2 and 3 mentioned below were used to set properties of note

I found xsl customization for note on the link:

http://www.sagehill.net/docbookxsl/CustomAdmonitions.html

1.

<xsl:template name="nongraphical.admonition">
   <xsl:variable name="id">
     <xsl:call-template name="object.id"/>
   </xsl:variable>

   <fo:block space-before.minimum="0.8em"
             space-before.optimum="1em"
             space-before.maximum="1.2em"
             start-indent="0.25in"
             end-indent="0.25in"
             *border-top="0.5pt solid black"
             border-bottom="0.5pt solid black"
             padding-top="4pt"
             padding-bottom="4pt"*
             id="{$id}">
     <xsl:if test="$admon.textlabel != 0 or title">
       <fo:block keep-with-next='always'
                 xsl:use-attribute-sets="admonition.title.properties">
          <xsl:apply-templates select="." mode="object.title.markup"/>
       </fo:block>
     </xsl:if>

     <fo:block xsl:use-attribute-sets="admonition.properties">
       <xsl:apply-templates/>
     </fo:block>
   </fo:block>
</xsl:template>

Questions: what does this the text in the <xsl:if
test="$admon.textlabel"...> imply?

What properties of the admonition.tittle.properties and
admonition,properties are taken? i mean what does this syntax about
them explain?

2. Then i had written following code note title:

<xsl:attribute-set name="admonition.title.properties">
     <xsl:attribute name="font-size">13pt</xsl:attribute>
     <xsl:attribute name="color">#eeeeec</xsl:attribute>
     <xsl:attribute name="font-weight">bold</xsl:attribute>
     <xsl:attribute name="hyphenate">true</xsl:attribute>
     <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
</xsl:attribute-set>

Question: What if i want the title to be bold and italics both?

What does "hyphenate" and  "keep-with-next.within-column" do?

3. for note body:

<xsl:attribute-set name="admonition.properties">
     <xsl:attribute name="background-color">#eeeeec</xsl:attribute>

        <xsl:attribute name="text-indent">1em</xsl:attribute>

</xsl:attribute-set>

Finally, I want to use points 2 and 3 in point 1 itself. And define
all the properties in just one single block i.e. point 1

Please help me understand this.

Thanks and Regards,

Anmol



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]