diff --git a/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc b/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc --- a/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc +++ b/documentation/content/en/books/fdp-primer/asciidoctor-primer/_index.adoc @@ -219,7 +219,7 @@ ==== [[asciidoctor-links-internal]] -=== Internal link +=== Links to another book or article To point to another book or article the Asciidoctor variables should be used. For example, if we are in the `cups` article and we want to point to `ipsec-must` these steps should be used. @@ -240,6 +240,43 @@ + extref:{ipsec-must}[IPSec-Must article] +[NOTE] +==== +The `extref` macro is defined as an extension. +It is designed to render the correct link across the different outputs +==== + +=== Links to the same file or to another file in the same book + +Books are structured in different directories to keep a sane layout. +To create a link from one subdirectory of a book to another subdirectory of the +same book, use the `crossref` macro: +.... +crossref:doc-build[documentation-makefile] +.... +And this would be rendered as + +crossref:doc-build[documentation-makefile, This link] + +[NOTE] +==== +The `crossref` macro is defined as an extension. +It is designed to render the correct link across the different outputs +==== + +[NOTE] +==== +Use the `crossref` macro for intra-document links too. +Although it might be inconvenient to write the name of the current document, +it ensures the correct link is renderedacross the different outputs +==== + +[WARNING] +==== +Do not use neither the `xref` macro nor its shortcut `<<` `>>`. +They do not work well in all output formats. +==== + [[asciidoctor-images-icons]] == Images and Icons