docbook-apps

  • 1.  adminitions - notes - line break after "Note"

    Posted 12-18-2006 13:18
    Helo everybody,



    I'm looking for a way to have no line break after the "Note" in a <note>.

    I also want to change the fontsize and font of "Note".



    I'm looking into admon.xsl, but i'm kinda lost.





    Thanks in advance

    Hinrich




  • 2.  Re: [docbook-apps] adminitions - notes - line break after "Note"

    Posted 12-18-2006 13:45
    On Monday 18 December 2006 15:18, Hinrich Aue wrote:
    > I’m looking for a way to have no line break after the „Note” in a <note>.

    In your customization layer change the graphical.admonition template

    here is an example where I put a blue rectangle around the entire admonition

    <xsl:template name="graphical.admonition">
    <xsl:variable name="id">
    <xsl:call-template name="object.id"/>
    </xsl:variable>
    <xsl:variable name="graphic.width">
    <xsl:apply-templates select="." mode="admon.graphic.width"/>
    </xsl:variable>
    <fo:block id="{$id}"
    xsl:use-attribute-sets="graphical.admonition.properties"
    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 blue" border-bottom="0.5pt solid blue"
    border-left="0.5pt solid blue" border-right="0.5pt solid blue"
    padding-top="4pt" padding-bottom="4pt" padding-left="4pt"
    padding-right="4pt">
    <fo:list-block
    provisional-distance-between-starts="{$graphic.width} + 18pt"
    provisional-label-separation="18pt">
    <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
    <fo:block>
    <fo:external-graphic width="auto" height="auto"
    content-width="{$graphic.width}">
    <xsl:attribute name="src">
    <xsl:call-template name="admon.graphic"/>
    </xsl:attribute>
    </fo:external-graphic>
    </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
    <xsl:if test="$admon.textlabel != 0 or title">
    <fo:block
    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:list-item-body>
    </fo:list-item>
    </fo:list-block>
    </fo:block>
    </xsl:template>



    > I also want to change the fontsize and font of “Note”.


    In your custom layer change the admonition.title.properties attribute set

    Here is an example where I set thfont family.

    <xsl:attribute-set name="admonition.title.properties">
    <xsl:attribute name="font-size">14pt</xsl:attribute>
    <xsl:attribute name="font-weight">bold</xsl:attribute>
    <xsl:attribute name="font-family">sans-serif</xsl:attribute>
    <xsl:attribute name="hyphenate">false</xsl:attribute>
    <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
    </xsl:attribute-set>
    >  
    > I’m looking into admon.xsl, but i’m kinda lost.

    Hope this helps,




    --
    Ask me about the Monkey.

    Sean Wheller
    Technical Author
    sean@inwords.co.za
    +27-84-854-9408
    http://www.inwords.co.za



  • 3.  AW: [docbook-apps] adminitions - notes - line break after "Note"

    Posted 12-18-2006 14:02
    I already changed the note to show a line before and after.
    But what I'm looking for is the line break after "Note".
    Where does it come from?

    Thanks though, now I can change the font and site :)

    Hinrich Aue




  • 4.  Re: AW: [docbook-apps] adminitions - notes - line break after "Note"

    Posted 12-18-2006 14:12
    On Monday 18 December 2006 16:01, Hinrich Aue wrote:
    > I already changed the note to show a line before and after.
    > But what I'm looking for is the line break after "Note".
    > Where does it come from?

    Not sure I am understanding, but I suspect you want the Note to be left of the
    text. Like such

    Note Some text. Some text. Some text. Some text. Some text. Some text.
    Some text. Some text. Some text. Some text.

    In which case you can take the fo:list-block out and arrange the layout of the
    admonition as you like. The line break is being generated because the admon
    text label is part of the fo:list-block structures. If you can figure the
    XSL:FO you can do nice things with admons in FO output.

    Hope this helps.

    --
    Ask me about the Monkey.

    Sean Wheller
    Technical Author
    sean@inwords.co.za
    +27-84-854-9408
    http://www.inwords.co.za



  • 5.  AW: AW: [docbook-apps] adminitions - notes - line break after "Note"

    Posted 12-18-2006 14:22
    Not exactly,

    I want:

    Note some text some text some text some text some text some text
    some text some text some text some text some text some text some text

    Note in another font of course....

    I know I can do funky stuff, but I'm completely new.
    I'm starting to understand things, but it takes a while.

    The FO book is underway.......

    Hinrich


    -----Ursprüngliche Nachricht-----
    Von: Sean Wheller [mailto:sean@inwords.co.za]
    Gesendet: Montag, 18. Dezember 2006 15:12
    An: Hinrich Aue
    Cc: docbook-apps@lists.oasis-open.org
    Betreff: Re: AW: [docbook-apps] adminitions - notes - line break after
    "Note"

    On Monday 18 December 2006 16:01, Hinrich Aue wrote:
    > I already changed the note to show a line before and after.
    > But what I'm looking for is the line break after "Note".
    > Where does it come from?

    Not sure I am understanding, but I suspect you want the Note to be left of
    the
    text. Like such

    Note Some text. Some text. Some text. Some text. Some text. Some text.
    Some text. Some text. Some text. Some text.

    In which case you can take the fo:list-block out and arrange the layout of
    the
    admonition as you like. The line break is being generated because the admon
    text label is part of the fo:list-block structures. If you can figure the
    XSL:FO you can do nice things with admons in FO output.

    Hope this helps.

    --
    Ask me about the Monkey.

    Sean Wheller
    Technical Author
    sean@inwords.co.za
    +27-84-854-9408
    http://www.inwords.co.za

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org




  • 6.  AW: AW: [docbook-apps] adminitions - notes - line break after "Note"

    Posted 12-18-2006 14:52
    I forgot the line break....

    Note some text some text some text some text some text some text some text
    some text some text some text some text some text some text

    with "Note" bold and in a different font.

    I believe the problem is the

    "object.title.markup" in:

    <xsl:if test="$admon.textlabel != 0 or title">
    <fo:block keep-with-next.within-column='always'
    xsl:use-attribute-sets="admonition.title.properties">
    <xsl:apply-templates select="." mode="object.title.markup"/>
    </fo:block>
    </xsl:if>

    But I cannot find the definition in the stylesheets. So I guess it is a
    FO-defined makro or something.
    I there a reference documentation for this? I've been googling for a while
    but haven't found anything.

    Hinrich


    -----Ursprüngliche Nachricht-----
    Von: Sean Wheller [mailto:sean@inwords.co.za]
    Gesendet: Montag, 18. Dezember 2006 15:12
    An: Hinrich Aue
    Cc: docbook-apps@lists.oasis-open.org
    Betreff: Re: AW: [docbook-apps] adminitions - notes - line break after
    "Note"

    On Monday 18 December 2006 16:01, Hinrich Aue wrote:
    > I already changed the note to show a line before and after.
    > But what I'm looking for is the line break after "Note".
    > Where does it come from?

    Not sure I am understanding, but I suspect you want the Note to be left of
    the
    text. Like such

    Note Some text. Some text. Some text. Some text. Some text. Some text.
    Some text. Some text. Some text. Some text.

    In which case you can take the fo:list-block out and arrange the layout of
    the
    admonition as you like. The line break is being generated because the admon
    text label is part of the fo:list-block structures. If you can figure the
    XSL:FO you can do nice things with admons in FO output.

    Hope this helps.

    --
    Ask me about the Monkey.

    Sean Wheller
    Technical Author
    sean@inwords.co.za
    +27-84-854-9408
    http://www.inwords.co.za

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org




  • 7.  Re: AW: AW: [docbook-apps] adminitions - notes - line break after "Note"

    Posted 12-18-2006 14:56
    On Monday 18 December 2006 16:51, Hinrich Aue wrote:
    > I forgot the line break....
    >
    > Note some text some text some text some text some text some text some text
    > some text some text some text some text some text some text
    >
    > with "Note" bold and in a different font.
    >
    > I believe the problem is the
    >
    > "object.title.markup" in:
    >
    > <xsl:if test="$admon.textlabel != 0 or title">
    >         <fo:block keep-with-next.within-column='always'
    >                 xsl:use-attribute-sets="admonition.title.properties">
    >                 <xsl:apply-templates select="."
    > mode="object.title.markup"/> </fo:block>
    > </xsl:if>
    >
    > But I cannot find the definition in the stylesheets. So I guess it is a
    > FO-defined makro or something.
    > I there a reference documentation for this? I've been googling for a while
    > but haven't found anything.

    Not sure actually. I think
    xsl:use-attribute-sets="admonition.title.properties" will cause the whole
    block to be formatted in the same font, normally bold.
    --
    Ask me about the Monkey.

    Sean Wheller
    Technical Author
    sean@inwords.co.za
    +27-84-854-9408
    http://www.inwords.co.za



  • 8.  AW: AW: AW: [docbook-apps] adminitions - notes - line break after "Note"

    Posted 12-18-2006 16:23
    I tried fiddling with the arrangement of the blocks.
    But the "object.title.markup" seems to put the "Notes" in his own block and
    I cannot change the behaviour. It's seems to be defined in
    common/gentext.xsl. But the line break has to be defined somewhere...

    Can I simply print the word "Note" in a special font instead of calling
    "object.title.markup" in admon.xsl?

    Hinrich




  • 9.  Re: AW: AW: [docbook-apps] adminitions - notes - line break after "Note"

    Posted 12-18-2006 16:44
    On 12/18/06, Hinrich Aue <hinrich.aue@lci-software.com> wrote:
    > I tried fiddling with the arrangement of the blocks.
    > But the "object.title.markup" seems to put the "Notes" in his own block and
    > I cannot change the behaviour. It's seems to be defined in
    > common/gentext.xsl. But the line break has to be defined somewhere...
    >
    > Can I simply print the word "Note" in a special font instead of calling
    > "object.title.markup" in admon.xsl?

    The "line break" you're referring to is coming from an fo:block.
    Here's my suggestion to get you started:

    Try switching to a wrapping fo:block under the list-item-body and then
    fo:inline below it (to remove the "line break")

    In fo/admon.xsl:

    <xsl:template name="graphical.admonition">
    ...
    <fo:list-item-body start-indent="body-start()">
    <fo:block xsl:use-attribute-sets="admonition.properties">
    <xsl:if test="$admon.textlabel != 0 or title">
    <fo:inline xsl:use-attribute-sets="admonition.title.properties">
    <xsl:apply-templates select="." mode="object.title.markup"/>
    </fo:inline>
    </xsl:if>
    <fo:inline>
    <xsl:apply-templates/>
    </fo:inline>
    </fo:block>
    </fo:list-item-body>


    ------ gives, essentially:
    <fo:list-block provisional-distance-between-starts="36pt +
    18pt" provisional-label-separation="18pt">
    <fo:list-item>
    <fo:list-item-label end-indent="label-end()">
    <fo:block>
    <fo:external-graphic width="auto" height="auto"
    content-width="36pt" src="url(images/note.png)"/>
    </fo:block>
    </fo:list-item-label>
    <fo:list-item-body start-indent="body-start()">
    <fo:block>
    <fo:inline font-size="14pt" font-weight="bold"
    hyphenate="false"
    keep-with-next.within-column="always">note/title</fo:inline>
    <fo:inline>
    <fo:block space-before.optimum="1em"
    space-before.minimum="0.8em" space-before.maximum="1.2em">Text inside
    note/para</fo:block>
    </fo:inline>
    </fo:block>
    </fo:list-item-body>
    </fo:list-item>
    </fo:list-block>

    The problem with this, of course, is that when you hit the note/para,
    you'll still get an fo:block. [I've run into this sort of problem in a
    bunch of places and haven't found a good solution...] If you know
    exactly what markup will occur inside your notes, you could alter
    those elements to not produce fo:blocks.

    HTH,
    Keith