在Rmarkdown文件中添加pdf文件 [英] Add pdf file in Rmarkdown file

查看:2547
本文介绍了在Rmarkdown文件中添加pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在Rmarkdown文件中显示pdf文件?例如,说一个以前保存的图像:'myimage.pdf'

Is it possible to display a pdf file in an Rmarkdown file? Say, for example, a previously saved image :'myimage.pdf'

我的目标是"\ includegraphics [width = 0.5] {myimage.pdf}"的一种形式

What I am aiming is a form of "\includegraphics[width=0.5]{myimage.pdf}"

推荐答案

2017年底的更新
可以使用knitr::include_graphics()(例如

An update from the very end of 2017
It is possible to import a PDF image using knitr::include_graphics(), e.g.

{r label, out.width = "85%", fig.cap = "caption"} include_graphics("path-to-your-image.pdf")

{r label, out.width = "85%", fig.cap = "caption"} include_graphics("path-to-your-image.pdf")

这篇关于在Rmarkdown文件中添加pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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