In bookdown
projects, it is possible to translate automatically generated words, such as "Table" or "Figure" by changing settings in the _bookdown.yml
file (see https://bookdown.org/yihui/bookdown/internationalization.html). An how can I achieve the same result (translate the words) in bookdown::html_document2
documents?
The contens of my R Markdown document:
---
output:
bookdown::html_document2
---
```{r fig1, fig.cap=CAPTION}
CAPTION = "My plot. "
plot(women)
```
And the figure caption in the rendered document is:
I'd like to have "Fig." instead of "Figure".
You need to add a file _bookdown.yml in the same directory as your .Rmd. It should look like this:
_bookdown.yml
.Rmd