docbook-apps

  • 1.  positioning toc

    Posted 02-09-2010 15:00
    Hello all.

    I am rather new to docbook and in the middle of taking one step at a
    time to the final result. Basically, I am working on a system for
    producing and maintaining operating instructions in several different
    languages.

    Right now I'm stuck though. My idea is to produce a single pdf file
    (docbook xsl -> fo -> pdf) that can contain up to 12 translations. I
    am rather close to what I want, but the thing that gives me headaches
    is the toc. On page 2, I have a basic toc with a list of languages
    including page numbers only (no problem here). I was able to
    accomplish that by adding the following snippet to my customization
    layer:

    <xsl:template match="article" mode="toc">
    <xsl:param name="toc-context" select="."/>
    <xsl:call-template name="toc.line"/>
    </xsl:template>

    But I also want a toc generated at the beginning of each article that
    is part of the xml document. And I have no clue how to do that. Google
    was not my friend this time, I am afraid. If there is anybody willing
    to share some ideas, I would be delighted.

    Here is the basic outline of my source XML document:

    <part>

    <subtitle>
    <itemizedlist>
    <listitem lang="en">Operating instructions</listitem>
    <listitem lang="de">Bedienungsanleitung</listitem>
    ...
    </itemizedlist>
    </subtitle>


    <subtitle>Some subtitle</subtitle>


    <subtitle></subtitle>
    <para></para>
    ...




    <subtitle>Some subtitle</subtitle>


    <subtitle></subtitle>
    <para></para>
    ...


    </part>

    Thank you.
    /frank




  • 2.  AW: [docbook-apps] positioning toc

    Posted 02-09-2010 21:11
    Hi,

    perhaps that link can help you:

    http://docbook.sourceforge.net/release/xsl/current/doc/html/generate.toc.htm
    l
    see also

    http://docbook.sourceforge.net/release/xsl/current/doc/html/generate.section
    .toc.level.html

    Kind Regards

    Alexander Rabenstein

    -----Ursprüngliche Nachricht-----
    Von: Frank Arensmeier [mailto:frank@nikemedia.se]
    Gesendet: Dienstag, 9. Februar 2010 16:00
    An: docbook-apps@lists.oasis-open.org
    Betreff: [docbook-apps] positioning toc

    Hello all.

    I am rather new to docbook and in the middle of taking one step at a
    time to the final result. Basically, I am working on a system for
    producing and maintaining operating instructions in several different
    languages.

    Right now I'm stuck though. My idea is to produce a single pdf file
    (docbook xsl -> fo -> pdf) that can contain up to 12 translations. I
    am rather close to what I want, but the thing that gives me headaches
    is the toc. On page 2, I have a basic toc with a list of languages
    including page numbers only (no problem here). I was able to
    accomplish that by adding the following snippet to my customization
    layer:

    <xsl:template match="article" mode="toc">
    <xsl:param name="toc-context" select="."/>
    <xsl:call-template name="toc.line"/>
    </xsl:template>

    But I also want a toc generated at the beginning of each article that
    is part of the xml document. And I have no clue how to do that. Google
    was not my friend this time, I am afraid. If there is anybody willing
    to share some ideas, I would be delighted.

    Here is the basic outline of my source XML document:

    <part>

    <subtitle>
    <itemizedlist>
    <listitem lang="en">Operating
    instructions</listitem>
    <listitem lang="de">Bedienungsanleitung</listitem>
    ...
    </itemizedlist>
    </subtitle>


    <subtitle>Some subtitle</subtitle>


    <subtitle></subtitle>
    <para></para>
    ...




    <subtitle>Some subtitle</subtitle>


    <subtitle></subtitle>
    <para></para>
    ...


    </part>

    Thank you.
    /frank


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





  • 3.  Re: AW: [docbook-apps] positioning toc

    Posted 02-09-2010 21:38
    Hello.

    Thank you. Tweaking the parameter "generate.toc" did it!

    /frank
    9 feb 2010 kl. 22.11 skrev Alexander Rabenstein:

    > Hi,
    >
    > perhaps that link can help you:
    >
    > http://docbook.sourceforge.net/release/xsl/current/doc/html/generate.toc.htm
    > l
    > see also
    >
    > http://docbook.sourceforge.net/release/xsl/current/doc/html/generate.section
    > .toc.level.html
    >
    > Kind Regards
    >
    > Alexander Rabenstein
    >
    > -----Ursprüngliche Nachricht-----
    > Von: Frank Arensmeier [mailto:frank@nikemedia.se]
    > Gesendet: Dienstag, 9. Februar 2010 16:00
    > An: docbook-apps@lists.oasis-open.org
    > Betreff: [docbook-apps] positioning toc
    >
    > Hello all.
    >
    > I am rather new to docbook and in the middle of taking one step at a
    > time to the final result. Basically, I am working on a system for
    > producing and maintaining operating instructions in several different
    > languages.
    >
    > Right now I'm stuck though. My idea is to produce a single pdf file
    > (docbook xsl -> fo -> pdf) that can contain up to 12 translations. I
    > am rather close to what I want, but the thing that gives me headaches
    > is the toc. On page 2, I have a basic toc with a list of languages
    > including page numbers only (no problem here). I was able to
    > accomplish that by adding the following snippet to my customization
    > layer:
    >
    > <xsl:template match="article" mode="toc">
    > <xsl:param name="toc-context" select="."/>
    > <xsl:call-template name="toc.line"/>
    > </xsl:template>
    >
    > But I also want a toc generated at the beginning of each article that
    > is part of the xml document. And I have no clue how to do that. Google
    > was not my friend this time, I am afraid. If there is anybody willing
    > to share some ideas, I would be delighted.
    >
    > Here is the basic outline of my source XML document:
    >
    > <part>
    >
    > <subtitle>
    > <itemizedlist>
    > <listitem lang="en">Operating
    > instructions</listitem>
    > <listitem lang="de">Bedienungsanleitung</listitem>
    > ...
    > </itemizedlist>
    > </subtitle>
    >

    >
    > <subtitle>Some subtitle</subtitle>
    >

    >
    > <subtitle></subtitle>
    > <para></para>
    > ...
    >

    >

    >

    >
    > <subtitle>Some subtitle</subtitle>
    >

    >
    > <subtitle></subtitle>
    > <para></para>
    > ...
    >

    >

    > </part>
    >
    > Thank you.
    > /frank
    >
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-
    > open.org
    >
    >
    >