Login  Register

Re: Paragraph label breaks cross reference label in paragraph title

Posted by TheElderCat on Jul 10, 2018; 8:58pm
URL: https://discuss.asciidoctor.org/Paragraph-label-breaks-cross-reference-label-in-paragraph-title-tp6414p6415.html

I'm no expert and still learning about AsciidDoctor, but I suspect the problem lies in the order in which your refs appear.
I think maybe when the adoc is parsed, AsciiDoctor comes across your <<OtherLabel>> tag and expects the [[OtherLabel, Other Item]] tag to which it refers to appear next. But actually it comes across the [[figurelabel]] tag instead.

It works correctly, when you swap the order in which they appear.

= Test Document

== Original version

This text refers to <<OtherLabel>> as does the title text below.

[[figurelabel]]
.Explanation of something that refers to <<OtherLabel>>.
Just plain text.

[[OtherLabel, Other Item]]
Here is an other item.


== Order in which they appear is swapped

This text refers to <<OtherLabel>> as does the title text below.

[[OtherLabel, Other Item]]
Here is an other item.

[[figurelabel]]
.Explanation of something that refers to <<OtherLabel>>.
Just plain text.