If you look at the knit2html
?help page, you will see that :
This is a convenience function to knit the input markdown source and
call ‘markdownToHTML()’ in the ‘markdown’ package to convert the
result to HTML.
Then you look at the markdownToHTML
help page and read that there is the following argument :
options: options that are passed to the renderer. see
‘markdownHTMLOptions’.
So you look at the markdownHTMLOptions
(still not lost ?) and see the following option :
‘'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.
With the following command, you should see the default options on your system :
R> markdownHTMLOptions(default=TRUE)
[1] "use_xhtml" "smartypants" "base64_images" "mathjax"
[5] "highlight_code"
So may be you can try to knit your markdown file with :
knit2html("knit.Rmd", options=c("use_xhtml","smartypants","mathjax","highlight_code"))
Not tested, though...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…