aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2020-01-11 20:44:54 +0100
committerUlrich Müller <ulm@gentoo.org>2020-01-15 22:28:46 +0100
commiteda9eff6a5393887b56679df3ff9c4107e1e4674 (patch)
tree2e01049bb81b2974432758614b4d77e7e9654856 /appendices
parentxsl/lang.highlight.c.xsl: Define the myPos variable. (diff)
downloaddevmanual-eda9eff6a5393887b56679df3ff9c4107e1e4674.tar.gz
devmanual-eda9eff6a5393887b56679df3ff9c4107e1e4674.tar.bz2
devmanual-eda9eff6a5393887b56679df3ff9c4107e1e4674.zip
devbook-guide: Update section on intra-document references.
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'appendices')
-rw-r--r--appendices/devbook-guide/text.xml25
1 files changed, 17 insertions, 8 deletions
diff --git a/appendices/devbook-guide/text.xml b/appendices/devbook-guide/text.xml
index 0f0a3ad..3b583f2 100644
--- a/appendices/devbook-guide/text.xml
+++ b/appendices/devbook-guide/text.xml
@@ -469,14 +469,23 @@ admonitions. A definition list comprises:
<p>
GuideXML makes it really easy to reference other parts of the document using
-hyperlinks. You can create a link pointing to <uri link="#doc_chap1">Chapter
-One</uri> by typing <c>&lt;uri link="#doc_chap1"&gt;Chapter
-One&lt;/uri&gt;</c>. To point to <uri link="#doc_chap1_sect2">section two of
-Chapter One</uri>, type <c>&lt;uri link="#doc_chap1_sect2"&gt;section two of
-Chapter One&lt;/uri&gt;</c>. To refer to figure 3 in chapter 1, type
-<c>&lt;uri link="#doc_chap1_fig3"&gt;figure 1.3&lt;/uri&gt;</c>. Or, to refer
-to <uri link="#doc_chap2_pre2">code listing 2 in chapter 2</uri>, type
-<c>&lt;uri link="#doc_chap2_pre2"&gt;code listing 2.2&lt;/uri&gt;</c>.
+hyperlinks. You can create a link pointing to another chapter, like
+<uri link="::ebuild-writing/file-format/">Ebuild File Format</uri>, by typing
+<c>&lt;uri link="::ebuild-writing/file-format/"&gt;Ebuild File
+Format&lt;/uri&gt;</c>, i.e., two colons followed by the relative path from
+the root node. To refer to a section in another chapter, like
+<uri link="::quickstart/#First Ebuild">First Ebuild</uri>, type
+<c>&lt;uri link="::quickstart/#First Ebuild"&gt;First Ebuild&lt;/uri&gt;</c>.
+</p>
+
+<p>
+If the link target's chapter (or section etc.) title is to be used as the link
+text, an empty <c>&lt;uri&gt;</c> element can be used. As a matter of fact,
+I could have written the two examples above in more compact form:
+<c>&lt;uri link="::ebuild-writing/file-format/"/&gt;</c> and
+<c>&lt;uri link="::quickstart/#First Ebuild"/&gt;</c> render as
+<uri link="::ebuild-writing/file-format/"/> and
+<uri link="::quickstart#First Ebuild"/>, respectively.
</p>
</body>