asciidoctor / asciidoctor-bibtex

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

Only inserts Latex code #79

Closed phylor closed 3 years ago

phylor commented 3 years ago

Thank you for this project! It looks really useful.

I'm having trouble getting it to work. The problem is that in the output documents there is Latex code instead of rendered output.

This is the output generated:

image

I guess it's probably obvious what I'm doing wrong?

Test files used

references.bib:

@book{dbi,
  author={Alina Wheeler},
  title={Designing Brand Identity},
  year={2013},
  publisher={Hoboken, New Jersey}
}

test.adoc:

= Test Document
:bibtex-file: references.bib
:bibtex-format: bibtex

Some text cite:[dbi]

[bibliography]
== Bibliography
bibliography::[]

Commands used for generation

asciidoctor -r asciidoctor-bibtex test.adoc
# asciidoctor-pdf shows the same behavior as `asciidoctor`
asciidoctor-pdf -r asciidoctor-bibtex test.adoc

Versions used:

$ asciidoctor --version
Asciidoctor 2.0.10 [https://asciidoctor.org]
Runtime Environment (ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)

$ gem info asciidoctor-bibtex
asciidoctor-bibtex (0.8.0)
ProgramFan commented 3 years ago

THe problem lies here:

= Test Document
:bibtex-file: references.bib
:bibtex-format: bibtex

Remove bibtex-format or set it to asciidoc can lead you to what you want. More details can be found in the README.

phylor commented 3 years ago

@ProgramFan Thank you very much for the quick response! Works like a charm now.

I wrongly assumed that bibtex-format describes the input format of the bibliography file. That probably doesn't make any sense though :slightly_smiling_face: