commit: eda9eff6a5393887b56679df3ff9c4107e1e4674 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sat Jan 11 19:44:54 2020 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Wed Jan 15 21:28:46 2020 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=eda9eff6
devbook-guide: Update section on intra-document references. Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> appendices/devbook-guide/text.xml | 25 +++++++++++++++++-------- 1 file 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><uri link="#doc_chap1">Chapter -One</uri></c>. To point to <uri link="#doc_chap1_sect2">section two of -Chapter One</uri>, type <c><uri link="#doc_chap1_sect2">section two of -Chapter One</uri></c>. To refer to figure 3 in chapter 1, type -<c><uri link="#doc_chap1_fig3">figure 1.3</uri></c>. Or, to refer -to <uri link="#doc_chap2_pre2">code listing 2 in chapter 2</uri>, type -<c><uri link="#doc_chap2_pre2">code listing 2.2</uri></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><uri link="::ebuild-writing/file-format/">Ebuild File +Format</uri></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><uri link="::quickstart/#First Ebuild">First Ebuild</uri></c>. +</p> + +<p> +If the link target's chapter (or section etc.) title is to be used as the link +text, an empty <c><uri></c> element can be used. As a matter of fact, +I could have written the two examples above in more compact form: +<c><uri link="::ebuild-writing/file-format/"/></c> and +<c><uri link="::quickstart/#First Ebuild"/></c> render as +<uri link="::ebuild-writing/file-format/"/> and +<uri link="::quickstart#First Ebuild"/>, respectively. </p> </body>