Controlling format of inline xrefs without xreflabel
Posted by oddhack on Mar 03, 2018; 12:04am
URL: https://discuss.asciidoctor.org/Controlling-format-of-inline-xrefs-without-xreflabel-tp6208.html
If I say something like:
----
* [Anchor1] Some text
Link to <<Anchor1>>
----
I see rendered HTML like:
----
* Some text
Link to [Anchor1]
----
The user manual says "It’s possible to customize the text that will be used in the cross reference link (called xreflabel). If not defined, Asciidoctor does it best to find suitable text (the solution differs from case to case). In case of an image, the image caption will be used. In case of a section header, the text of the section’s title will be used.". It doesn't seem to say anything about how "suitable text" is found for inline links like this - although I infer that it takes the anchor name and puts square brackets around it.
Is there a way to suppress the square brackets without adding explicit xreftext? If it was just a couple of links that would be one thing to write <<Anchor1,Anchor1>>, but I have ca. 1300 xrefs to about 1/3 that number of anchors in one document alone, and all that replication is tedious and wasteful.
Jon