jgm / pandoc

Universal markup converter
https://pandoc.org
Other
33.31k stars 3.31k forks source link

typst writer creates a #bibliography for each --bibliography (but typst doesn't support multiple #bibliography calls) #8937

Closed wlupton closed 1 year ago

wlupton commented 1 year ago

The typst writer appears to carry over the --bibliography options unchanged into the output file, e.g.,

% cat cite.md 
@RFC1149
% pandoc cite.md --bibliography tr-069-biblio-csl.bib --bibliography ietf-biblio-csl.bib -s -o cite-pandoc.typ
% tail -5 cite-pandoc.typ 
#cite("RFC1149")

#bibliography("tr-069-biblio-csl.bib")

#bibliography("ietf-biblio-csl.bib")

typst doesn't currently permit multiple #bibliography calls but it does permit the argument to be an array, so I think that this would be preferable.

#bibliography(("tr-069-biblio-csl.bib", "ietf-biblio-csl.bib"))

I'm using pandoc 3.1.4.

wlupton commented 1 year ago

Thanks! And all done via the typst template too. Nice.