问题
I tried to write an internal reference to another section in the same document. But references are not working. There is a reference, which is located in one section in my docbook-article
<xref linkend="id1</b>" endterm="Управление Роботом из программы short"/>
The part of another section in this article:
<section id="id1">
<title>Управление Роботом из программы
</title>
<titleabbrev id="id1 short"> Управление Роботом из программы
</titleabbrev>
<para>
...
</para>
</section>
How to write this reference correctly?
And how can I write a reference form one article to the separate section in another?
回答1:
If you want to use the titleabbrev
content as the cross-reference text, use the following markup:
<xref linkend="id1" endterm="short"/>
and
<section xml:id="id1">
<title>Управление Роботом из программы
</title>
<titleabbrev xml:id="short"> Управление Роботом из программы
</titleabbrev>
<para>
...
</para>
</section>
The cross-reference points to the section with an ID of id1
. The endterm value is the ID (short
) of the element whose content provides the cross-reference text.
Note that in DocBook 5, xml:id
is used instead of id
.
Regarding cross references between documents, read about olink
in "DocBook XSL: The Complete Guide": http://www.sagehill.net/docbookxsl/Olinking.html.
来源:https://stackoverflow.com/questions/25835654/internal-references-in-docbook-5