Search code examples
rr-markdownpandoc-citeproc

rmarkdown and pandoc reference problems


I have the following rmarkdown file to render (just an example of the full article):

---
title: 'Some Title'
author: 'Author Surname'
biliography: ab.bib
csl: abnt_italico.csl
output:
  bookdown::word_document2:
    fig_width: 4
    fig_height: 3
    fig_caption: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Introdução 

 Some text [@la01] some text

#References

My ab.bib is:

@incollection{la01,
  title = {Videogames and {{Literacies}}},
  booktitle = {The {{Routledge Handbook}} of {{Literacy Studies}}},
  author = {Abrams, Sandra Schamroth},
  editor = {Rowsell, Jennifer and Pahl, Kate},
  year = {2015},
  pages = {251--266},
  publisher = {{Routledge Handbooks Online}},
  doi = {10.4324/9781315717647.ch16},
  file = {/Volumes/GoogleDrive/My Drive/biblioteca_digital/pdf_categorizados/abrams_2015_.pdf},
  isbn = {978-0-415-81624-3 978-1-315-71764-7 978-1-317-51061-1},
  keywords = {Literacy,Multimodality,SFL,Systemic Functional Linguistics,Systemic-Functional Linguistics,Videogames},
  language = {en}
}

Despite of the fact that my *bib file and my csl file are in the same directory as my Rmd file, I have the following error:

==> rmarkdown::render('/Volumes/GoogleDrive/My Drive/Profissional/Pesquisa/Artigos/livro_kleber_2020/artigo/v01_livro.Rmd',  encoding = 'UTF-8');


processing file: v01_livro.Rmd
  |.......................                                               |  33%
  ordinary text without R code

  |...............................................                       |  67%
label: setup (with options) 
List of 1
 $ include: logi FALSE

  |......................................................................| 100%
  ordinary text without R code


output file: v01_livro.knit.md

pandoc-citeproc: reference la01 not found
/usr/local/bin/pandoc +RTS -K512m -RTS v01_livro.utf8.md --to docx --from markdown+autolink_bare_uris+tex_math_single_backslash+smart --output v01_livro.docx --highlight-style tango --lua-filter /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rmarkdown/rmd/lua/pagebreak.lua 

Output created: v01_livro.docx

No list of references is generated whatsoever. Could anyone tell me if there is anything wrong?

Update I also tried with no success:


title: 'Some Title'
author: 'Author Surname'
biliography: 'ab.bib'
csl: 'abnt_italico.csl'
output:
  bookdown::word_document2:
    fig_width: 4
    fig_height: 3
    fig_caption: true
---

Solution

  • It seems you don't indicate the correct path in the header.

    You said that "bib file and my csl file are in the same directory as my Rmd file", so, the correct header have to include :

    bibliography: ./ab.bib  
    csl: ./abnt_italico.csl 
    # please, note the './' characters, for both, and the absence of quoting marks (" or '). 
    

    PS : you don't have to quote bibliography: ./ab.bib and csl: ./abnt_italico.csl : correct header-style is like the first code-sample you provided, not the second one (your update).

    Excellent day