docbook-apps

  • 1.  Re: [docbook-apps] line breaking in programlistings

    Posted 11-23-2010 13:54
    I have following in my stylesheet:




    <xsl:attribute-set name="monospace.verbatim.properties">
    <xsl:attribute name="font-family">Courier</xsl:attribute>
    <xsl:attribute name="font-size">8pt</xsl:attribute>
    <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
    <xsl:attribute name="wrap-option">wrap</xsl:attribute>
    <xsl:attribute name="hyphenation-character">​_</xsl:attribute>
    </xsl:attribute-set>

    Is this correct?




    Am 23.11.2010 14:23, schrieb Maxime Bégnis:
    > Hello Lwam,
    >
    > I guess you are talking about FO output.
    > I do this by adding zero width spaces where I want the line breaking to
    > happen :
    >
    > tx​_pteswepricecalculator​_supplarea
    >
    > Note that you may need to setup some things in your XSL as described in
    > http://www.sagehill.net/docbookxsl/FittingText.html
    >
    > I would like to hear about a higher-level way to do it, if there is one.
    >
    > cheers
    >
    > [NeoDoc] NeoDoc
    > Maxime Bégnis
    > Développeur
    > maxime@neodoc.biz
    > Tél: 09.54.96.99.55 - Fax: 09.59.96.99.55
    > http://www.neodoc.fr/
    > 5, rue de la Touloubre
    > 13770 Venelles
    >
    > Le 22/11/2010 15:02, Lwam Berhane a écrit :
    >> Hello!
    >> how can I break e.g tx_pteswepricecalculator_supplarea at the
    >> underscores? Are there any similiarities to LaTex?
    >> In LaTeX it works like this:
    >> tx_"-pteswepricecalculator_"-supplyarea
    >>
    >>
    >>
    >> Best regards Lwam
    >>


    --
    Gruß Lwam Berhane



    punkt.de GmbH TYPO3-Internet-Dienstleistungen-Beratung
    Kaiserallee 13a Tel.: 0721 9109-0 Fax: -100
    76133 Karlsruhe info@punkt.de http://punkt.de/
    AG Mannheim 108285 Gf: Jürgen Egeling



  • 2.  Re: [docbook-apps] line breaking in programlistings

    Posted 11-23-2010 14:03
    Hi,

    >I have following in my stylesheet:
    > [...]
    > <xsl:attribute name="hyphenation-character">​_</xsl:attribute>

    This looks wrong to me: I think, there is only one character allowed. Your
    code looks like there are two characters available, the Zero Width Space and
    an underscore. Maybe try to remove the underscore?


    Tom



  • 3.  Re: [docbook-apps] line breaking in programlistings

    Posted 11-23-2010 17:19
    Hello,

    The zero width space is to be inserted inside the programlisting in your
    XML, it is here to allow the FO processor to insert a line break(it is
    considered as a space) :

    <programlisting>
    tx​_pteswepricecalculator​_supplarea
    </programlisting>

    The "hyphenation-character" is the character that will be inserted by
    the processor before a line break decided by it.
    If you want a "\" to be inserted, it would be :


    <xsl:attribute-set name="monospace.verbatim.properties">
    <xsl:attribute name="font-family">Courier</xsl:attribute>
    <xsl:attribute name="font-size">8pt</xsl:attribute>
    <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
    <xsl:attribute name="wrap-option">wrap</xsl:attribute>
    <xsl:attribute name="hyphenation-character">\</xsl:attribute>
    </xsl:attribute-set>

    which will(or should, I seem to remember having problems with that)
    produce in the output :
    tx_pteswepricecalculator\
    _supplarea

    otherwise if you don't want any character :
    <xsl:attribute name="hyphenation-character"></xsl:attribute>

    I hope this helps, let me know.

    Le 23/11/2010 14:53, Lwam Berhane a écrit :
    > I have following in my stylesheet:
    >
    >
    >
    >
    > <xsl:attribute-set name="monospace.verbatim.properties">
    > <xsl:attribute name="font-family">Courier</xsl:attribute>
    > <xsl:attribute name="font-size">8pt</xsl:attribute>
    > <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
    > <xsl:attribute name="wrap-option">wrap</xsl:attribute>
    > <xsl:attribute name="hyphenation-character">​_</xsl:attribute>
    > </xsl:attribute-set>
    >
    > Is this correct?
    >
    >
    >
    >
    > Am 23.11.2010 14:23, schrieb Maxime Bégnis:
    >> Hello Lwam,
    >>
    >> I guess you are talking about FO output.
    >> I do this by adding zero width spaces where I want the line breaking to
    >> happen :
    >>
    >> tx​_pteswepricecalculator​_supplarea
    >>
    >> Note that you may need to setup some things in your XSL as described in
    >> http://www.sagehill.net/docbookxsl/FittingText.html
    >>
    >> I would like to hear about a higher-level way to do it, if there is one.
    >>
    >> cheers
    >>
    >> [NeoDoc] NeoDoc
    >> Maxime Bégnis
    >> Développeur
    >> maxime@neodoc.biz
    >> Tél: 09.54.96.99.55 - Fax: 09.59.96.99.55
    >> http://www.neodoc.fr/
    >> 5, rue de la Touloubre
    >> 13770 Venelles
    >>
    >> Le 22/11/2010 15:02, Lwam Berhane a écrit :
    >>> Hello!
    >>> how can I break e.g tx_pteswepricecalculator_supplarea at the
    >>> underscores? Are there any similiarities to LaTex?
    >>> In LaTeX it works like this:
    >>> tx_"-pteswepricecalculator_"-supplyarea
    >>>
    >>>
    >>>
    >>> Best regards Lwam
    >>>
    >
    >