Login  Register

Re: asciidoctor cross reference formatting

Posted by mojavelinux on Oct 18, 2019; 11:41pm
URL: https://discuss.asciidoctor.org/asciidoctor-cross-reference-formatting-tp7253p7254.html

You need to specify reftext. Section titles have implied reftext. Other blocks don't.

It would look something like:

[[apple-pie,Apple Pie]]
A paragraph about apple pie.

or

[#apple-pie,reftext=Apple Pie]
A paragraph about apple pie.

Read about <<apple-pie>>.

Best,

-Dan

On Fri, Oct 18, 2019 at 3:09 PM instinctive [via Asciidoctor :: Discussion] <[hidden email]> wrote:
My cross references are surrounded by brackets: <<apple>> => [apple].
How can I get rid of those square brackets? I just want the anchor text!

Thank you!

$ asciidoctor --version
Asciidoctor 1.5.6.1 [http://asciidoctor.org]
Runtime Environment (ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:- ex:UTF-8)
$ cat apple.adoc
[[apple]]A paragraph about apples.

A paragraph about <<apple>> pie.
$ asciidoctor apple.adoc
$ grep apple apple.html
<p>A paragraph about apples.</p>
<p>A paragraph about [apple] pie.</p>


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/asciidoctor-cross-reference-formatting-tp7253.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