I use RStudio to compile the following qmd file:
````yaml
---
title: "AAA"
author: "BBB"
format: pdf
toc: false
fontsize: "12"
pdf-engine: pdflatex
number-sections: true
colorlinks: true

# Where to place figure and table captions (top, bottom, or margin)
cap-location: bottom

code-line-numbers: true

execute:
  echo: false
  warning: false

fig-env: 'figure'
fig-lp: 'fig:'
fig-align: 'center'
fig-pos: 'htb'
---

```{r AAA}
#| cache: true
#| fig.cap: BBB
#| fig.height: 2
#| fig.width: 4
library(ggplot2)
mydata <- data.frame(x=1:5, y=11:15)
ggplot(mydata) +
  geom_point(aes(x = x, y = y), size = 0.2)
```
````

The generated TeX document contains
```tex
\begin{htb}[htb]

{\centering \includegraphics{intro_files/figure-pdf/AAA-1.pdf}

}

\caption{BBB}

\end{htb}
```
and crashes.

Am I doing something wrong?
cderv
2023-02-27T18:40:11Z
timothee-bacri
bug pandoc-lua
v1.3
closed
pdf from qmd file, bug with fig.pos
https://github.com/quarto-dev/quarto-cli/issues/4568