【发布时间】:2014-05-28 17:55:58
【问题描述】:
我对这个很棒的库(和 HTML)有点陌生,所以这可能是一个菜鸟问题。
我有一种情况,我无法弄清楚 - 如何在图像中添加一些 CSS 样式,同时用 base64 对其进行编码?这是我的 Rmarkdown 文件中的代码(我将其传递给 knit2html) -
<img src="SomeImage.png", width = "75%", border = "2"> # converts to base64 with width and border correctly applied
<img class="displayed", src="SomeImage.png"> # does not convert to base64, points to local path with style correctly applied
在应用样式的同时,有什么方法可以让第二个转换为 base64?还是我做错了什么?
SessionInfo,如果需要 -
> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-w64-mingw32/x64 (64-bit)
other attached packages:
[1] markdown_0.6.5 xtable_1.7-1 knitr_1.5 audio_0.1-4 ggplot2_0.9.3.1
[6] scales_0.2.3 stringr_0.6.2 reshape2_1.2.2 reshape_0.8.4 plyr_1.8
[11] data.table_1.9.2
谢谢!
【问题讨论】: