rmarkdown html 嵌入 pdf/eps [英] rmarkdown html embed pdf/eps

查看:88
本文介绍了rmarkdown html 嵌入 pdf/eps的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Rstudio 中制作 R markdown HTML 文档.我有许多 pdf 和 eps 格式的图像.我正在尝试使用 \includegraphics{path to image} 命令将这些嵌入到输出中.但是,输出 HTML 没有显示任何内容.

I'm trying to make an R markdown HTML document in Rstudio. I have a number of images that I have in pdf and eps format. I'm trying to embed these into the output with the \includegraphics{path to image} command. However, the output HTML doesn't show anything.

推荐答案

R-markdown 也是 Markdown.Markdown 本身没有嵌入 PDF 的机制,但是,Markdown 接受原始 HTML 在它的输入中并通过它而不改变它.

R-markdown is also a markdown. Markdown itself doesn't have a mechanism for embedding a PDF, however, Markdown accepts raw HTML in its input and passes it through unaltered.

有很多方法可以做到这一点,推荐的方法之一是-

There are many ways to do this, one of the recommended ways is-

<object data="http://www.africau.edu/images/default/sample.pdf" type="application/pdf" width="700px" height="700px">
    <embed src="http://www.africau.edu/images/default/sample.pdf">
        <p>This browser does not support PDFs. Please download the PDF to view it: <a href="http://www.africau.edu/images/default/sample.pdf">Download PDF</a>.</p>
    </embed>
</object>

这篇关于rmarkdown html 嵌入 pdf/eps的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆