docbook-apps

  • 1.  Pdf double endnote issue

    Posted 03-25-2021 21:50
    This is a test docbook file that shows a good ePub output but double (and weird) endnote issue with pdf output:




    xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1">
    <info>

    </info>
    <sect1>

    <para>This links to first endnote[<xref linkend="Ref1"/>]</para>
    <para>This links to second endnote[<xref linkend="Ref2"/>]</para>
    <sect2>

    <para>
    <orderedlist>
    <listitem>
    <para xml:id="Ref1"> www.google.com </para>
    </listitem>
    <listitem>
    <para xml:id="Ref2">Doe, J. "This is a Docbook". Journal of everything XML. 2021:1(1):1-2.</para>
    </listitem>
    </orderedlist>
    </para>
    </sect2>
    </sect1>





  • 2.  Re: [docbook-apps] Pdf double endnote issue

    Posted 03-25-2021 23:43
    The solution to this problem is to move the xml:id attributes from the
    para elements up to their respective listitem elements. You want the
    xref to generate the listitem number.

    The xref element uses its target element to generate the link text, but
    a para is not considered appropriate for generated text because it could
    be very long.  The stylesheet recognizes that problem and issues this
    warning:

    WARNING: xref to <para id="Ref1"> has no generated text. Trying
    its ancestor elements.

    but then it doesn't seem to handle the attempt properly in this case.

    Bob Stayton
    bobs@sagehill.net

    On 3/25/2021 2:50 PM, Philo Calhoun wrote:
    >
    > > <http://docbook.org/xml/5.1/rng/docbook.rng>"
    > schematypens="http://relaxng.org/ns/structure/1.0
    > <http://relaxng.org/ns/structure/1.0>"?>
    > > <http://docbook.org/xml/5.1/sch/docbook.sch>" type="application/xml"
    > schematypens="http://purl.oclc.org/dsdl/schematron
    > <http://purl.oclc.org/dsdl/schematron>"?>
    > <articlexmlns="http://docbook.org/ns/docbook
    > <http://docbook.org/ns/docbook>"
    > xmlns:xlink="http://www.w3.org/1999/xlink
    > <http://www.w3.org/1999/xlink>"version="5.1">
    > <info>
    >
    > </info>
    > <sect1>
    >
    > <para>This links to first endnote[<xreflinkend="Ref1"/>]</para>
    > <para>This links to second endnote[<xreflinkend="Ref2"/>]</para>
    > <sect2>
    >
    > <para>
    > <orderedlist>
    > <listitem>
    > <paraxml:id="Ref1"> www.google.com <http://www.google.com> </para>
    > </listitem>
    > <listitem>
    > <paraxml:id="Ref2">Doe, J. "This is a Docbook". Journal of everything
    > XML. 2021:1(1):1-2.</para>
    > </listitem>
    > </orderedlist>
    > </para>
    > </sect2>
    > </sect1>
    >
    >