Reputation: 2349
I want to make my table caption in bold but can't seem to find the option for it.
My code is (in a rmarkdown document):
kable(head(iris), caption = 'I want this in Bold') %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed", "responsive"))
The output is:
Upvotes: 2
Views: 7848
Reputation: 1800
Does this markdown-oriented solution work for you?
```{r, results='asis'}
kable(head(iris), caption = '**I want this in Bold**') %>%
kableExtra::kable_styling(bootstrap_options = c("striped", "hover", "condensed","responsive"))
```
for html
-output this should work:
```{r, results='asis'}
kable(head(iris), caption = '<b>I want this in Bold</b>', format = 'html') %>%
kableExtra::kable_styling(bootstrap_options = c("striped", "hover", "condensed","responsive"))
```
for pdf
-output this should work:
```{r, results='asis'}
kable(head(iris), caption = '\\textbf{I want this in Bold}', format = 'latex') %>%
kableExtra::kable_styling(bootstrap_options = c("striped", "hover", "condensed","responsive"))
```
Upvotes: 12