riboseinc / asciidoctor-bibliography

Citations in AsciiDoc
MIT License
28 stars 8 forks source link

Errors with asciidoctor-pdf #111

Open bwklein opened 4 years ago

bwklein commented 4 years ago

When I try to run the following command: asciidoctor-pdf -r asciidoctor-bibliography sample-default.adoc I see these errors:

asciidoctor: ERROR: failed to parse formatted text: Hello this is from the paper <a anchor="bibliography-default-Lane12a">&lsqb;1&rsqb;</a>, <a anchor="bibliography-default-Lane12b">&lsqb;2&rsqb;</a>
asciidoctor: ERROR: failed to parse formatted text: <a anchor="bibliography-default-Anderson04">&lsqb;3&rsqb;</a>
asciidoctor: ERROR: failed to parse formatted text: <a anchor="bibliography-default-Anderson04">&lsqb;3, P. 10&rsqb;</a>
asciidoctor: ERROR: failed to parse formatted text: <a anchor="bibliography-default-Anderson04">&lsqb;3, Ch. 10&rsqb;</a>
asciidoctor: ERROR: failed to parse formatted text: <a anchor="bibliography-default-Anderson04">&lsqb;3, P. 10&rsqb;</a>
asciidoctor: ERROR: failed to parse formatted text: <a anchor="bibliography-default-Lane12a">&lsqb;1, P. 42&rsqb;</a>, <a anchor="bibliography-default-Lane12b">&lsqb;2, Op. 12&rsqb;</a>

Do I need to do anything special for asciidoctor-pdf to work?

If I run the normal asciidoctor command asciidoctor -r asciidoctor-bibliography sample-default.adoc it works as expected and I get the correct html file.

ungive commented 3 years ago

Works fine for me (more than one year later).

sonrad10 commented 3 years ago

I encountered this error as well after changing from Harvard to IEEE style, so I did some looking into it and found this thread.

TLDR: the problem is that asciidoctor-pdf doesn't support the escaped square brackets used by asciidoctor-bibliography (&lsqb; and &rsqb;) and instead requires them to be written in their numeric forms (&#91 and &#93;)