r-markdownpandocquartopandoc-citeproc

Include acronym with citation with R Markdown/Quarto (using pandoc)


Often when writing, I need to define an acronym with a citation. For example:

One popular statistic is the Bayesian Information Criterion (BIC; Schwarz, 1978).


Unfortunately, I cannot get this to render correctly with citeproc. Here are a few iterations I have tried:

One popular statistic is the Bayesian Information Criterion [BIC; @schwarz-1978].

One popular statistic is the Bayesian Information Criterion [BIC; Schwarz (1978)].


One popular statistic is the Bayesian Information Criterion (BIC; Schwarz [-@bic])

One popular statistic is the Bayesian Information Criterion (BIC; Schwarz (1978)).


One popular statistic is the Bayesian Information Criterion [BIC, @bic]

One popular statistic is the Bayesian Information Criterion (BIC, Schwarz, 1978).


The last example is the closest, but I have to use a comma after the acronym instead of a semi-colon. I believe this is because the semi-colon is normally used to separate citation keys, and in this case the first item is an acronym, not a citation key. Is it possible to include an acronym with a citation in this way?


Solution

  • You could try escaping the semi-colon.

    bib.bib Contents

    @article{bic,
      title={Estimating the dimension of a model},
      author={Schwarz, G.},
      journal={The Annals of Statistics},
      volume={6},
      pages={461-464},
      year={1978}
    }
    

    Quarto Contents

    ---
    title: "Citation Acronym Example"
    format: html
    editor: visual
    bibliography: bib.bib
    ---
    
    # Desired Output
    
    One popular statistic is the Bayesian Information Criterion (BIC; Schwarz, 1978).
    
    # Escaping Backslash
    
    One popular statistic is the Bayesian Information Criterion [BIC\; @bic]
    

    Result

    enter image description here

    Reprex files hosted with on GitHub