问题
I'm using R 3.3.2 and Rstudio Version 1.0.44, here's the format of my RMarkdown file
---
title: "Sentiment Analysis"
output:
rmdformats::material:
highlight: kate
---
When I try to knit, I got the following error
pandoc: Could not fetch /tabsets.js /tabsets.js: openBinaryFile: does not exist (No such file or directory) Error: pandoc document conversion failed with error 67 In addition: Warning messages: 1: In sink() : no sink to remove 2: In sink() : no sink to remove 3: MathJax doesn't work with self_contained when not using the rmarkdown "default" template. Execution halted
I read some questions on Stack Overflow and added self contained: no
. I was able to knit the file and everything looks good on RStudio, but now I have new problems.
When I publish it on Rpubs, all the images were gone.
When I click on knit button, I'm only give the option to knit to material... is there a way for me to knit it to pdf?
I'm a little desperate to fix this problem, any tips/advice is greatly appreciated.
回答1:
First, instead of self contained: no, self_contained: no allowed me to knit to material locally.
However when publishing the RPubs the images and CSS are gone.
THis is because of how RPubs works, which is to put the document into an iframe.
If you push both a default html_document and a material document from the same Rmd to RPubs and View Source for the frame, you will see that they are completely different. The material page looks like pretty normal HTML and you can see that the image links will be broken because the path to the images are incomplete. For the standard html document on the other hand it has a massive amount of minified javascript that is handling all of these details.
I'm sure there is probably a way to make it work but it would involve reproducing a lot of code from the default html document.
回答2:
I had the same problem but this solution below worked for me. Just change your markdown top to below and it should work:
---
title: "Test Document"
output:
html_document:
self_contained: no
---
This is a temporary fix, which had been discussed here and given by one of the RStudio guys himself. [Here] (https://github.com/rstudio/rmarkdown/issues/228)
回答3:
I fixed this issue by removing the rmarkdown
package and reinstalling it into my C drive at C:/Program Files/R/R-3.6.1/library
. R was having issues going out to a drive starting with the characters \\
.
来源:https://stackoverflow.com/questions/41284863/pandoc-document-conversion-failed-with-error-67