View source: R/double_table_fix.r
bn_double_table_fix | R Documentation |
Some table code generators (I'm thinking specifically of huxtable) have to
have caption set to "Table: (\#<label>)" in order for automatic
enumeration with bookdown to work for "all" formats (html, pdf, docx),
with the side effect that tables will have captions starting with
"Table: Table". This function simply substitutes "Table: Table" with
"Table:". Note: this function is for docx and html, for pdf you need a
'hook' - run bn_double_table_fix(".pdf")
for more info
bn_double_table_fix(input, keep_input = TRUE, prefix = "raw-")
bn_double_table_fix_docx(input, keep_input = TRUE, prefix = "raw-")
bn_double_table_fix_html(input, keep_input = TRUE, prefix = "raw-")
input |
character; name of docx file in the working directory |
keep_input |
logical; should input be kept? |
prefix |
character; if input is kept, the prefix to use |
NULL; one or two files are written/manipulated as a side effect
bn_double_table_fix_docx
: fix double table instance in docx file
bn_double_table_fix_html
: fix double table instance in html file
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.