Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 658f0d9

Browse filesBrowse files
committed
! before H does not make sense with float package
closes #379 Ref: https://tex.stackexchange.com/questions/652253/howto-use-figure-placement-h-in-scrartcl
1 parent 6ee0076 commit 658f0d9
Copy full SHA for 658f0d9

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎06-latex.Rmd

Copy file name to clipboardExpand all lines: 06-latex.Rmd
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ output:
204204
extra_dependencies: ["float"]
205205
```
206206

207-
We can use the chunk option `fig.pos`\index{chunk option!fig.pos} to control the float behavior. The option value `!H` will prevent any floating within the document. We can set the default behavior for the document so that all chunks have this setting by including the following line in the first code chunk in your R Markdown document:
207+
We can use the chunk option `fig.pos`\index{chunk option!fig.pos} to control the float behavior. The option value `H` from **float**\index{LaTeX package!float} will prevent any floating within the document. We can set the default behavior for the document so that all chunks have this setting by including the following line in the first code chunk in your R Markdown document:
208208

209209
```{r, eval=FALSE}
210-
knitr::opts_chunk$set(fig.pos = "!H", out.extra = "")
210+
knitr::opts_chunk$set(fig.pos = "H", out.extra = "")
211211
```
212212

213213
In general, we do not recommend that users force LaTeX to stop floating figures. This solution was included in this book by popular demand,^[The related Stack Overflow question has been viewed for over 45,000 times: https://stackoverflow.com/q/16626462/559676.] but there could be some serious side effects when LaTeX is unable to float figures.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.