Issue with pandoc-citeproc when rendering the f1000 article Rmd file from BiocWorkFlowTools
1
0
Entering edit mode
@lcolladotor
Last seen 16 days ago
United States

Hi,

I am running into a pandoc-citeproc error when using BiocWorkflowTools' template Rmd file for an F1000 article. I updated both pandoc and pandoc-citeproc using brew, thinking that it could help with the error but it didn't. https://github.com/jgm/pandoc-citeproc/issues/265 could be related. Obviously, it doesn't seem to be a problem in the Bioc machines, though I couldn't figure out which pandoc and pandoc-citeproc versions you are using based on the BiocWorkflowTools vignette.

I don't see the error if I remove the "bibliography" line in the YAML. So I can keep writing my workflow for now and worry about the citations later.

Best,

Leo

 

> rmarkdown::draft("MyArticle.Rmd", template="f1000_article", package="BiocWorkflowTools")
> rmarkdown::render('MyArticle/MyArticle.Rmd')

processing file: MyArticle.Rmd
  |.........                                                        |  14%
  |...................                                              |  29%
label: firstCodeChunk
  |............................                                     |  43%
  |.....................................                            |  57%
  |..............................................                   |  71%
  |........................................................         |  86%
  |.................................................................| 100%
  ordinary text without R code

output file: MyArticle.knit.md

/usr/local/bin/pandoc +RTS -K512m -RTS MyArticle.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output MyArticle.tex --template /Library/Frameworks/R.framework/Versions/3.4/Resources/library/BiocWorkflowTools/rmarkdown/templates/f1000_article/resources/template.tex --highlight-style tango --latex-engine pdflatex --variable documentclass=extarticle --variable fontsize=9pt --variable papersize=a4 --variable citationoptions=numbers --variable tables=yes --standalone --bibliography sample.bib --filter /usr/local/bin/pandoc-citeproc 
pandoc-citeproc: when expecting a product (:*:), encountered Object instead
pandoc: Error running filter /usr/local/bin/pandoc-citeproc
Filter returned error status 1
Error: pandoc document conversion failed with error 83
> system('pandoc -v')
pandoc 1.19.2.1
Compiled with pandoc-types 1.17.0.5, texmath 0.9, skylighting 0.1.1.4
Default user data directory: /Users/lcollado/.pandoc
Copyright (C) 2006-2016 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
> system('pandoc-citeproc --version')
pandoc-citeproc 0.5
> options(width = 120)
> devtools::session_info()
Session info ----------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.4.0 (2017-04-21)
 system   x86_64, darwin15.6.0        
 ui       AQUA                        
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/New_York            
 date     2017-06-15                  

Packages --------------------------------------------------------------------------------------------------------------
 package           * version date       source        
 backports           1.1.0   2017-05-22 CRAN (R 3.4.0)
 base              * 3.4.0   2017-04-21 local         
 BiocWorkflowTools   1.2.0   2017-04-25 Bioconductor  
 bookdown            0.4     2017-05-20 CRAN (R 3.4.0)
 compiler            3.4.0   2017-04-21 local         
 datasets          * 3.4.0   2017-04-21 local         
 devtools            1.13.2  2017-06-02 CRAN (R 3.4.0)
 digest              0.6.12  2017-01-27 CRAN (R 3.4.0)
 evaluate            0.10    2016-10-11 CRAN (R 3.4.0)
 graphics          * 3.4.0   2017-04-21 local         
 grDevices         * 3.4.0   2017-04-21 local         
 highr               0.6     2016-05-09 CRAN (R 3.4.0)
 htmltools           0.3.6   2017-04-28 CRAN (R 3.4.0)
 httr                1.2.1   2016-07-03 CRAN (R 3.4.0)
 knitr               1.16    2017-05-18 CRAN (R 3.4.0)
 magrittr            1.5     2014-11-22 CRAN (R 3.4.0)
 memoise             1.1.0   2017-04-21 CRAN (R 3.4.0)
 methods           * 3.4.0   2017-04-21 local         
 R6                  2.2.1   2017-05-10 CRAN (R 3.4.0)
 Rcpp                0.12.11 2017-05-22 CRAN (R 3.4.0)
 rmarkdown           1.5     2017-04-26 CRAN (R 3.4.0)
 rprojroot           1.2     2017-01-16 CRAN (R 3.4.0)
 stats             * 3.4.0   2017-04-21 local         
 stringi             1.1.5   2017-04-07 CRAN (R 3.4.0)
 stringr             1.2.0   2017-02-18 CRAN (R 3.4.0)
 tools               3.4.0   2017-04-21 local         
 utils             * 3.4.0   2017-04-21 local         
 withr               1.0.2   2016-06-20 CRAN (R 3.4.0)
 yaml                2.1.14  2016-11-12 CRAN (R 3.4.0)
> 
BiocWorkflowTools rmarkdown • 1.9k views
ADD COMMENT
3
Entering edit mode
Andrzej Oleś ▴ 750
@andrzej-oles-5540
Last seen 4.0 years ago
Heidelberg, Germany

Hi Leo,

there seems to be a problem with version compatibility between pandoc and pandoc-citeproc as described in the issue you linked. Apparently your pandoc-citeproc version is outdated, as on my linux machine I have a much more recent version of pandoc-citeproc 0.10.1 vs. yours 0.5 even though I use only pandoc 1.17.2. Did you try the solutions mentioned in https://github.com/jgm/pandoc-citeproc/issues/265?

Cheers,

Andrzej

ADD COMMENT
0
Entering edit mode

Thanks Andrzej! I removed pandoc-citeproc and pandoc with brew and installed them via the binary file at https://github.com/jgm/pandoc/releases/latest. That lead to another error:

> rmarkdown::render('MyArticle/MyArticle.Rmd')

processing file: MyArticle.Rmd
  |.........                                                        |  14%
  |...................                                              |  29%
  |............................                                     |  43%
  |.....................................                            |  57%
  |..............................................                   |  71%
  |........................................................         |  86%
  |.................................................................| 100%
  ordinary text without R code

output file: MyArticle.knit.md

/usr/local/bin/pandoc +RTS -K512m -RTS MyArticle.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output MyArticle.tex --template /Library/Frameworks/R.framework/Versions/3.4/Resources/library/BiocWorkflowTools/rmarkdown/templates/f1000_article/resources/template.tex --highlight-style tango --latex-engine pdflatex --variable documentclass=extarticle --variable fontsize=9pt --variable papersize=a4 --variable citationoptions=numbers --variable tables=yes --standalone --bibliography sample.bib --filter /usr/local/bin/pandoc-citeproc 
/usr/local/bin/pandoc +RTS -K512m -RTS MyArticle.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output MyArticle.tex --template /Library/Frameworks/R.framework/Versions/3.4/Resources/library/BiocWorkflowTools/rmarkdown/templates/f1000_article/resources/template.tex --highlight-style tango --latex-engine pdflatex --variable documentclass=extarticle --variable fontsize=9pt --variable papersize=a4 --variable citationoptions=numbers --variable tables=yes --standalone --bibliography sample.bib --filter /usr/local/bin/pandoc-citeproc 
/bin/sh: pdflatex: command not found
Error: Failed to compile MyArticle.tex.

Which is weird. Anyhow, using RStudio's knit button it does work (it finds the correct pdflatex path). Actually, I don't get that error when using the terminal either. I only get it when using the R GUI.

/usr/local/bin/pandoc +RTS -K512m -RTS MyArticle.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output MyArticle.tex --template /Library/Frameworks/R.framework/Versions/3.4/Resources/library/BiocWorkflowTools/rmarkdown/templates/f1000_article/resources/template.tex --highlight-style tango --latex-engine /Library/TeX/texbin/pdflatex --variable documentclass=extarticle --variable fontsize=9pt --variable papersize=a4 --variable citationoptions=numbers --variable tables=yes --standalone --bibliography sample.bib --filter /usr/local/bin/pandoc-citeproc 
output file: MyArticle.knit.md

/usr/local/bin/pandoc +RTS -K512m -RTS MyArticle.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output MyArticle.tex --template /Library/Frameworks/R.framework/Versions/3.4/Resources/library/BiocWorkflowTools/rmarkdown/templates/f1000_article/resources/template.tex --highlight-style tango --latex-engine /Library/TeX/texbin/pdflatex --variable documentclass=extarticle --variable fontsize=9pt --variable papersize=a4 --variable citationoptions=numbers --variable tables=yes --standalone --bibliography sample.bib --filter /usr/local/bin/pandoc-citeproc 
Latexmk: This is Latexmk, John Collins, 19 Jan. 2017, version: 4.52c.

Output created: MyArticle.pdf

I also re-installed MacTex and added the bin files to my path, but that didn't seem to help with the pdflatex issue. In any case, I have a working solution now ^^.

## TeX -- ~/.bashrc file
export PATH="/Library/TeX/texbin:$PATH"

Best,

Leo

ADD REPLY

Login before adding your answer.

Traffic: 667 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6