How to link to an appendix

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to link to an appendix

Ams627
I want to say something like:

The current schema for these files is reproduced is reproduced in Appendix A.

Appendix A should be a hyperlink - but I want it to navigate to whichever appendix the schema is actually defined in. I.e. it might not always be Appendix A if I add other appendices before it.

I tried:

The current schema for these files is reproduced in <<Appendix-IPD>> it is subject to change.

[[Appendix-IPD]]
[appendix]
== Product data schema

The schema for product data files is shown below:
[source,xml]
----
<?xml version="1.0" encoding="UTF-8"?>
....
----

However, this produces "the title of the appendix section is reproduced in Product data schema".

What's the correct way to do this?

Thanks

A





Reply | Threaded
Open this post in threaded view
|

Re: How to link to an appendix

Andrew Carver
It looks like the key here is to set the :xrefstyle: document attribute: To get the appendix-numbering to show in the xref link-text, the attribute must be something besides its default value (i.e., "basic").

For the format you're after, set it to "short":

:xrefstyle: short

https://asciidoctor.org/docs/user-manual/#customizing-the-cross-reference-text
Reply | Threaded
Open this post in threaded view
|

Re: How to link to an appendix

mojavelinux
Administrator
Exactly.

-Dan

On Fri, Jun 15, 2018 at 10:01 AM, Andrew Carver [via Asciidoctor :: Discussion] <[hidden email]> wrote:
It looks like the key here is to set the :xrefstyle: document attribute: To get the appendix-numbering to show in the xref link-text, the attribute must be something besides its default value (i.e., "basic").

For the format you're after, set it to "short":

:xrefstyle: short

https://asciidoctor.org/docs/user-manual/#customizing-the-cross-reference-text



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/How-to-link-to-an-appendix-tp6388p6389.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux