I've tried to customize captions using expressions as described in this post.
While the post stated that Markdown syntax is supported, I could not make a strong type. Instead of strong type, in the book, I got caption enclosed with asterisks, like **Table 1.1.**
. I reproduced this behavior by copying Yihui's minimal bookdown and adding _bookdown.yml
to it.
index.Rmd
---
title: "reprex"
site: bookdown::bookdown_site
documentclass: book
output:
bookdown::gitbook: default
---
# Hello World
```{r}
knitr::kable(
head(iris),
caption = 'A table generated by the longtable package.'
)
```
_bookdown.yml
language:
label:
tab: !expr function(x) sprintf("**TABLE %s.** ", x)
output:
Any suggestions why it does not work?