Why Pandoc does not retrieve the image file?

前端 未结 4 1046
时光说笑
时光说笑 2021-02-01 23:33

On RStudio version 0.98.501 I had a long .Rmd file which was easily converted to html once I clicked KnitHtml button. The Knitting process, as I understand, created several fold

4条回答
  •  甜味超标
    2021-02-02 00:05

    While there are multiple correct solutions above, I'd like to add that a common cause of this error is syntactical, when the author accidentally wraps the file name in the markdown in quotes:

    ![my image]("my_image.png")
    

    This will result in pandoc being unable to locate the file. I find this mistake to be easy to make in knitr, since we are intertwining R scripts with markdown.

    The correct way to insert the image is:

    ![my image](my_image.png)
    

提交回复
热议问题