Knitr ignoring fig.pos?

后端 未结 2 2003
小蘑菇
小蘑菇 2020-12-08 11:07

I am trying to insert a figure in a RMarkdown document but am having trouble getting it to appear in the right place. The figure below shows the problem: when using a figur

2条回答
  •  旧巷少年郎
    2020-12-08 11:38

    The chunk option fig.pos is only used when knitr thinks it has to write out a LaTeX figure environment instead of pure Markdown ![](), and it writes LaTeX only when a figure caption (fig.cap) is specified, and at least one of these options has been specified: fig.align, out.width, out.extra. If you want to force knitr to write LaTeX code for figures and use fig.pos, you may set the chunk option out.extra = ''.

提交回复
热议问题