### Bug description

Consider the following minimal working example

``````
---
title: "MWE"

format:
  docx: default
---

Some text

```{r}
#| echo: false
#| label: tbl-foo
#| tbl-cap: Some table
iris |>
  head() |>
  knitr::kable()
```

```{r}
#| echo: false
#| label: fig-bar
#| fig-cap: Mininal data visualisation.

plot(iris$Petal.Length, iris$Petal.Width)
```
``````

It produces

![Screenshot from 2022-09-19 10-22-56](https://user-images.githubusercontent.com/1506457/190940531-1f51dfac-0116-4069-818d-c7d3fb778828.png)

Please note that the figure is part of the table. This is more clear when the table spans two pages:

![Screenshot from 2022-09-19 10-25-26](https://user-images.githubusercontent.com/1506457/190940643-dfba2beb-197f-4724-9ded-ef25130c923b.png)

The expected behaviour was

![Screenshot from 2022-09-19 10-24-21](https://user-images.githubusercontent.com/1506457/190941009-819db9a3-ca99-4f71-a605-6f39183260ab.png)

where the figure outside the table.

## System Information

```
$ uname -srv
Linux 5.15.0-47-generic #51-Ubuntu SMP Thu Aug 11 07:51:15 UTC 2022
$ quarto check
[✓] Checking Quarto installation......OK
      Version: 1.2.131
      Path: /opt/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....(None)

      Unable to locate an installed version of Python 3.
      Install Python 3 from https://www.python.org/downloads/

[✓] Checking R installation...........OK
      Version: 4.1.3
      Path: /opt/conda/lib/R
      LibPaths:
        - /opt/conda/lib/R/library
      rmarkdown: 2.16

[✓] Checking Knitr engine render......OK
```


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
dragonstyle
2022-09-19T02:30:58Z
rgaiacs
bug pandoc-lua
v1.2
closed
Figure concatenated to previous table in DOCX
https://github.com/quarto-dev/quarto-cli/issues/2493