asciidoctor / asciidoctor-bibtex

Add bibtex citation support for asciidoc documents
Other
69 stars 27 forks source link

Citations text malformed if used with asciidoctor-latex #40

Closed marcotama closed 5 years ago

marcotama commented 5 years ago

I want to write a document with both formulas and references, so I am using asciidoctor-bibtex and asciidoctor-latex together. I am compiling using

asciidoctor-latex -r asciidoctor-bibtex -a stylesheet=asciidoctor.css -a stylesdir=styles/ -b html "mydoc.adoc"

This mostly works fine, but the citations text, instead of having the usual style [1] show the "code" of my reference with extra square brackets, e.g. [[sutton2011reinforcement]].

My document is something like:

:last-update-label!:
:xrefstyle: short
:source-highlighter: coderay
:bibtex-file: references.bib
:bibtex-style: ieee
= Title

This is a reference I want to cite cite:[sutton2011reinforcement], and this is an equation I want to show:
\[
P(A) = \frac{50}{20}
\]

== Bibliography
bibliography::[]

Am I using the two packages the wrong way? Are they even compatible? Can I work around the issue?

Thanks for the support!

marcotama commented 5 years ago

I am using Asciidoctor 1.5.8, but I am not sure how to find which version of asciidoctor-latex and asciidoctor-bibtex I am using.

ProgramFan commented 5 years ago

Unfortunately asciidoctor-latex does not support asciidoctor 2.0 and is not compatible with asciidoctor-bibtex master any more.

ProgramFan commented 5 years ago

It looks like an issue in asciidoctor-latex, since asciidoctor-bibtex never inserts strings as [[XXX]] into the AST.