如果您查看knit2html
帮助页面,您会看到:
This is a convenience function to knit the input markdown source and
call ‘markdownToHTML()’ in the ‘markdown’ package to convert the
result to HTML.
然后您查看markdownToHTML
帮助页面并阅读以下参数:
options: options that are passed to the renderer. see
‘markdownHTMLOptions’.
因此,您查看markdownHTMLOptions
(仍然没有丢失?)并查看以下选项:
‘'base64_images'’ Any local images linked with the ‘'<img>'’ tag
to the output HTML will automatically be converted to base64
and included along with output.
使用以下命令,您应该会看到系统上的默认选项:
R> markdownHTMLOptions(default=TRUE)
[1] "use_xhtml" "smartypants" "base64_images" "mathjax"
[5] "highlight_code"
因此,您可能可以尝试使用以下方式编织您的降价文件:
knit2html("knit.Rmd", options=c("use_xhtml","smartypants","mathjax","highlight_code"))
虽然没有测试...