Quantcast

Problems indexing < character with asciidoctor-pdf

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problems indexing < character with asciidoctor-pdf

apnadkarni
This post was updated on .
Writing docs for a programming language, I want to index the "<" character. No problem with asciidoctor-fopub, but with asciidoctor-pdf, all the following attempts give parse errors.

This is a `<` indexterm:[<, index text] test.
This is a `<` indexterm:[\<, index text] test.
This is a `<` indexterm:["<", index text] test.
This is a `<` indexterm:[{lt}, index text] test.

Error is: Failed to parse formatted text: <

What's the magic required for this to work with asciidoctor-pdf? I much prefer its output to fopub.

As an aside indexterm2: does work but I really need indexterm:

Thanks in advance,

/Ashok

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problems indexing < character with asciidoctor-pdf

mojavelinux
Administrator
Ashok,

I missed a case where the index term text needs to be escaped. I've applied a fix for alpha.15.

The first example you provided is the correct one and it now works with the fix I made in https://github.com/asciidoctor/asciidoctor-pdf/pull/762.

You'll be happy to know that this is only a warning. The index still renders correctly with alpha.14.

Cheers,

-Dan

On Sun, Feb 26, 2017 at 6:55 AM, apnadkarni [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Writing docs for a programming language, I want to index the "<" character. No problem with asciidoctor-fopub, but with asciidoctor-pdf, all the following attempts give parse errors.

This is a `<` indexterm:[<, index text] test.
This is a `<` indexterm:[\<, index text] test.
This is a `<` indexterm:["<", index text] test.
This is a `<` indexterm:[{lt}, index text] test.

Error is: Failed to parse formatted text: <

What's the magic required for this to work with asciidoctor-pdf? I much prefer its output to fopub.

Thanks in advance,

/Ashok




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Problems-indexing-character-with-asciidoctor-pdf-tp5306.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
Loading...