Hi,

this is for sure not the first instance of numbering chemical structure
automatically during docbook transformation for print. But I can not
find an example to learn from.

I have the following example (of about 100 structures in my book). I
want have these structures numbered with a bold number and
automatically. I was told by Thomas Schaitle, this can be done by xsl.
In "docbook xsl", I do not find an example. Chemical structures in my
book are characterized by property="chemical". What is needed is

 1. make a individual number for each structure
 2. avoid numbering doubly if a structure is shown again
 3. generate the xreflabel with this number that the xref references
    find a target.

BTW, if I generate an xreflabel by hand then these structures are
correctly numbered. However, to be able to change the sequential
arrangement of structures and still have the structures labeld
sequentially, it is desirable to number them automatically. Please give
me an example how to proceed. I have attached the svg file with the
structure.

Regards

Bernhard

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://docbook.org/xml/5.1/rng/docbook.rng";
schematypens="http://relaxng.org/ns/structure/1.0";?>
<?xml-model href="http://docbook.org/xml/5.1/sch/docbook.sch";
type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron";?>
<section xmlns="http://docbook.org/ns/docbook";
    xmlns:xlink="http://www.w3.org/1999/xlink"; version="5.1">
    <title/>
    <para>polycyclic steran (<xref linkend="chem.steran"
role="chem.ref"/>)</para>
    <table xml:id="Ch06.F.steran" frame="all" rowsep="0" colsep="0"
xreflabel="Kap6.F:Steran">
        <title>Sterane Backbone</title>
        <tgroup cols="1" align="center">
            <colspec colname="c1" colnum="1" colwidth="4cm" align="center"/>
            <tbody>
                <row>
                    <entry><emphasis
role="chemname">Steran</emphasis></entry>
                </row>
                <row>
                    <entry><inlinemediaobject property="chemical"
xml:id="chem.steran">
                        <imageobject>
                            <imagedata fileref="../bkchem/steran.svg"
width="3.8cm"/>
                        </imageobject>
                    </inlinemediaobject></entry>
                </row>
                <row>
                    <entry align="right" valign="top"><xref
linkend="chem.steran"/></entry>
                </row>
            </tbody>
        </tgroup>
    </table>
   
</section>


-- 
spitzhalde9
D-79853 lenzkirch
[email protected]
www.b-kleine.com, www.urseetal.net
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to