1

I have moved this question over to SO, because it involves Pandoc, citeproc, and CSL, but not biblatex. Please answer there if you can.

I have a biblatex file produced automatically by R that contains citations for R packages. The document will be processed by Pandoc using the --citeproc option; that package uses CSL styles. For example, it contains

@Manual{R-tables,
  title = {tables: Formula-Driven Table Generation},
  author = {Duncan Murdoch},
  note = {R package version 0.9.21},
  url = {https://dmurdoch.github.io/tables/},
  year = {2023},
}

I would like the reference list using this to include everything, but so far all the CSL styles I've tried skip the note, so I get something like

Murdoch, Duncan. 2023. Tables: Formula-Driven Table Generation. https://dmurdoch.github.io/tables/.

when I would like it to look like

Murdoch, Duncan. 2023. Tables: Formula-Driven Table Generation. R package version 0.9.21. https://dmurdoch.github.io/tables/.

Can anyone suggest how to find CSL styles that display the note like that?

EDITED to add:

I've found a solution that's good enough as a workaround, but I'm still interested in the answer to my question. If I change note to edition the display looks okay to me. But how would I search for styles showing a particular field next time this comes up?

EDITED again:

A comment asked for a self-contained demonstration. I've attached one below. The original was written in R Markdown, but I've simplified it to plain Markdown. Put the text below into test.md and the .bib entry above into packages.bib, then run

pandoc test.md --output test.html --citeproc 

and you should get output that looks like this:

screenshot

---
bibliography: packages.bib
---

The citation

This is a citation of the tables package [@R-tables].

References

I think this probably doesn't actually involve biblatex, but my understanding is that Pandoc is supposed to emulate it. So maybe I'm asking this question in the wrong place, or with the wrong tags. But anyway, any suggestions would be appreciated.

  • 2
    What styles have you tried? Are you using biblatex or bibtex? – Dai Bowen Jun 13 '23 at 16:47
  • Welcome to TeX.SE. – Mico Jun 13 '23 at 16:54
  • I've tried apa and american-statistical-association and a few others. I'm using Pandoc to emulate biber/biblatex. – user2554330 Jun 13 '23 at 16:54
  • If I load the biblatex package with the option style=american-statistical-association, I get the following error message: Package biblatex Info: ... file 'american-statistical-association.dbx' not found.. – Mico Jun 13 '23 at 16:57
  • 1
    @Mico I think these are CSL styles passed to pandoc that then get implemented with biblatex. They're not biblatex styles. – Alan Munn Jun 13 '23 at 16:58
  • @AlanMunn: yes, exactly. – user2554330 Jun 13 '23 at 16:59
  • @AlanMunn - Many thanks for providing this clarification. – Mico Jun 13 '23 at 16:59
  • 1
    @user2554330 Can you please add a short, but compilable test document? I do get the note with apa – samcarter_is_at_topanswers.xyz Jun 13 '23 at 16:59
  • @samcarter_is_at_topanswers.xyz: That's very interesting. I have added a simplified example, and it makes me feel that I might not be asking this in the right place. It's definitely a CSL question, but maybe not a biblatex question after all. – user2554330 Jun 13 '23 at 17:42
  • 1
    @user2554330 pandoc does not use biblatex at all. It will hardcode the text of the references at the end of the tex file and not use any bibliography tools at all. You should better aks this at stackoverflow. Latex knowledge won't help you with that. – samcarter_is_at_topanswers.xyz Jun 13 '23 at 18:57
  • 4
    I’m voting to close this question as this is not a latex problem. Pandoc will hard code the references at the end of the tex file. Changing them will need some intervention at a point before the tex file is created. – samcarter_is_at_topanswers.xyz Jun 13 '23 at 18:59
  • I agree it should be closed. I'll try SO. I am advised by the website not to delete it, but I won't object if those of you who can vote to close do so. – user2554330 Jun 13 '23 at 19:29

1 Answers1

1

(too long for a comment, hence posted as an answer)

I don't think it's correct to claim that the note field is "unusual".

If I load biblatex with no options at all, I get a formatted bib entry that's close to what the OP says they desire and includes the contents of the note field.

enter image description here

I suppose one could add suitable instructions to display the name if the format "Surname, GivenName", to display the publication year immediated after the author field, and to suppress the URL: prefix.

\documentclass{article}

\begin{filecontents}[overwrite]{mybib.bib} @Manual{R-tables, title = {Tables: Formula-Driven Table Generation}, author = {Duncan Murdoch}, note = {R~package version 0.9.21}, url = {https://dmurdoch.github.io/tables/}, year = {2023}, } \end{filecontents}

\usepackage{biblatex} \addbibresource{mybib.bib} \usepackage{xurl}

\begin{document} \cite{R-tables}

\printbibliography \end{document}

Mico
  • 506,678
  • Thanks. As my recent edits show, I'm probably not really using biblatex, just an (imperfect) Pandoc emulation of it. – user2554330 Jun 13 '23 at 17:44
  • does your example use a CSL style? If so, can you tell me which one, and I'll try it out. – user2554330 Jun 13 '23 at 17:47
  • 1
    @user2554330 biblatex does not use CSL, it uses biblatex styles. There is no straightforward mapping in either direction (https://tex.stackexchange.com/q/69267). biblatex, supports what you want so either the CSL does not support this or citeproc does an imperfect implementation of it, but the problem isn't on the TeX end of things. If you can work with the LaTeX source (pandoc can generate tex) as Mico shows here what you want is very simple (and can possibly be done even better as biblatex supports the likes of a version key for @manual). – Dai Bowen Jun 13 '23 at 19:04