juba / rmdformats

HTML output formats for RMarkdown documents
723 stars 140 forks source link

pandoc: Could not determine mime type Error #20

Closed happyshows closed 8 years ago

happyshows commented 8 years ago

Hi,

The following test Rmd is causing an error in pandoc on my linux box (pandoc version 1.12 knitr 1.14 rmarkdown 1.0 rmdformats 0.3).


---
title: "Test Report"
output:
  rmdformats::html_docco:
    self_contained: true

---

This is a Test

pandoc: Could not determine mime type for `/usr/lib64/R/library/rmdformats/templates/bootstrap-3.3.6/css/../fonts/glyphicons-halflings-regular.woff2'

however, if I turned self_contained to false, pandoc renders ok, but it lose the purpose of embedding object in rmd file.

Thanks.

happyshows commented 8 years ago

I just ran again, this time it show up as

pandoc: Could not determine mime type for `/usr/lib64/R/library/shiny/www/shared/bootstrap/css/../fonts/glyphicons-halflings-regular.woff2' Stack trace (innermost first): 51: pandoc_convert 50: convert 49: rmarkdown::render 48: download$func 1: runApp Error : pandoc document conversion failed with error 1

I'm using rmarkdown:render to generate html via Rmd file.

juba commented 8 years ago

You should upgrade your pandoc or RStudio version. woff2 fonts mime types should be supported in pandoc since about a year and a half :

https://github.com/jgm/pandoc/commit/7031748a434c0624ca2139e91da0ea8a5559169c

happyshows commented 8 years ago

Confirmed closure after I switched to use pandoc 1.17, thanks for pointing out the direction.

JiaxiangBU commented 5 years ago

Hi @juba, I have a similar issue, and I post this question on the Community.

The fonts is webp, and I find mime already includes this one.

I get this error.

output file: a20190125085659.knit.md

Could not determine mime type for `figure/shadow-bank01.webp'
错误: pandoc document conversion failed with error 63
此外: Warning message:
MathJax doesn't work with self_contained when not using the rmarkdown "default" template. 
停止执行
juba commented 5 years ago

webp seems to be a fairly recent image format, and it is not yet supported by Pandoc, as you can see here :

https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/MIME.hs

This is really pandoc related, you should open an issue there I think...

JiaxiangBU commented 5 years ago

Hi @juba thanks for your reply, I open a issue on pandoc repo now.