Rmarkdown image skips text

I am compiling a Rmarkdown PDF document with the following YAML settings:

---
output: 
  pdf_document:
    fig_caption: true 
    fig_crop: true
    toc_depth: 3
  header-includes:
  - \usepackage{hyperref}
 ---

Inside the document, I inserted several PNG images using the following syntax

Paragraph 1..........

![Caption](path/image.png)

Paragraph 2....

And when the document is rendered, the image is displayed as expected in the text, between Paragraph 1and Paragraph 2. However, I get some unpredictable results when image rendering appears after Paragraph 2in some cases, and I cannot solve it.

+4
source share
2 answers

\FloatBarrier ( placeins) . knitr rmarkdown LaTeX, .

, ""; , , . , .

+2

-

\newpage

, Floatbarrier. , , , .

:

Paragraph 1..........

![Caption](path/image.png)

Paragraph 2....

, :

Paragraph 1..........

![Caption](path/image.png)

\newpage

Paragraph 2....
0

Source: https://habr.com/ru/post/1618968/


All Articles