Rmarkdown图像跳过文本前面 [英] Rmarkdown Image Skips Ahead of Text
问题描述
我正在将具有以下YAML设置的Rmarkdown PDF文档放在一起:
I am putting together an Rmarkdown PDF document with the following YAML settings:
---
output:
pdf_document:
fig_caption: true
fig_crop: true
toc_depth: 3
header-includes:
- \usepackage{hyperref}
---
在文档正文中,我使用以下语法插入了几张PNG图片
Within the body of the document I've inserted a few PNG images, using the following syntax
Paragraph 1..........
![Caption](path/image.png)
Paragraph 2....
呈现文档时,图像按预期出现在文本中,在Paragraph 1
和Paragraph 2
之间.但是,在某些情况下,渲染的图像出现在Paragraph 2
之后,我得到了一些无法预测的结果,我无法解决它.
And when the document is rendered, the image appears as expected within the text, between Paragraph 1
and Paragraph 2
. However, I am getting some unpredictable results where the rendered image appears after Paragraph 2
in some cases and I can't manage to solve it.
推荐答案
我遇到了同样的问题.如果将图像包装在段落"标签中,则会出现该图像,该图像将与文本对齐.
I have run into the same problem. It appears if you wrap the image in "paragraph" tags, the image will be in-line with the text.
Paragraph 1...
<p>
![](image.png)
</p>
Paragraph 2...
这篇关于Rmarkdown图像跳过文本前面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!