0

I have a problem with Rmarkdown and writing tables to html. I'm writing tables with kableextra and the table name comes out like this in the html output: (#tab:chunk name)table name. I only want my own table name I give to kable via caption= without the (#tab:chunk name).
I've already tried the suggestion from How to suppress automatic table name and number in an .Rmd file using xtable or knitr::kable? :

header-includes:
    - \usepackage[labelformat=empty]{caption} 

But it doesn't seem to work for html_document2, only for html_document. I'm using bookdown::html_document2 as output, because it is needed for some other things in the document, so I can't switch to html_document.

Any suggestions on how to fix this?

Thanks in advance!

Lieke Vree
  • 13
  • 3
  • You're more likely to receive help if in addition to describing the key components of your yaml section, you provide a reproducible example with the yalm section and table code. – guasi Jul 13 '22 at 06:22
  • it looks like you are using Latex syntax, but I thought we couldn't use latex syntax when creating HTML documents, only PDF docs. If you look at your resource link, they are using `output: pdf_document`, and you are using `bookdown::html_document2` – Daniel_j_iii Jul 15 '22 at 14:40

0 Answers0