Reputation: 2481
I need to get Quarto to put figure captions above the figure, rather than the default (below).
Following the documentation I used this:
---
title: "Test title"
format: docx
fig-cap-location: top
---
```{r}
#| label: fig-test
#| fig-cap: This caption should be above the figure
plot(cars)
'``
However, this renders like so:
I see that some people have resorted to LaTeX customisations or knit hooks, however I'm also failing at those (and I don't understand why the simple YAML marker I used, that is recommended in the documentation, isn't working).
Edit: as Mael pointed out, fig-cap-location is not an option for docx outputs. The Quarto documentation has since been amended to clarify this.
Upvotes: 4
Views: 1654
Reputation: 52329
If you check the list of MS Word options, fig-cap-location
is not actually one of them (compared to e.g., PDF options), so this option is just not available with a docx output.
Upvotes: 0