Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have chapter links in adoc? #3

Open
unfa opened this issue May 10, 2018 · 4 comments
Open

Can we have chapter links in adoc? #3

unfa opened this issue May 10, 2018 · 4 comments
Labels
question Further information is requested

Comments

@unfa
Copy link
Collaborator

unfa commented May 10, 2018

I am wondering how can or should we handle self-linking.

Say we briefly mention Macro Learn in a chapter about user interface - it'd be good to add a reference linking to the chapter devoted to Macro Learn if the user wants to go there.

I think that ideal references would work in two ways:

Provide textual information that the user can process and execute himself ("More in chapter 8.3") and provide a hypertext link that will let him jump there immediately or open the relevant chapter in a new browser tab.

I don't know how can we do this in Asciidoc. Any ideas?

@fundamental fundamental added the question Further information is requested label May 10, 2018
@fundamental
Copy link
Member

I think you're looking for http://asciidoctor.org/docs/user-manual/#internal-cross-references . There might be some more work to expand upon this though.

@unfa
Copy link
Collaborator Author

unfa commented May 10, 2018

Yeah, I tried using that, but it doesn't seem to do what I wanted.
I would guess that from the level of Manual.adoc all references placed in chapter files should be interpreted like they are in a single document. I tried this:

 TIP: you can learn more about this in the <<Global Settings>> chapter.

trying to reference a chapter name in Settings.adoc:

 === Global Settings
 image::imgs/Selection_422.png[]

But it links me back to the top of the document instead. I probably didn't do it right.

@fundamental
Copy link
Member

fundamental commented May 10, 2018 via email

@celestehorgan
Copy link

https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#links

By default, most "cross references" are actually cross references within the same .adoc file. To cross reference to another adoc file's section, you need to be using Asciidoctor.

To make this work, we'd need to create an anchor link to the section in Settings.adoc :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants