bn_double_table_fix: fix compiled file

View source: R/double_table_fix.r

bn_double_table_fixR Documentation

fix compiled file

Description

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

Usage

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-")

Arguments

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

Value

NULL; one or two files are written/manipulated as a side effect

Functions

  • bn_double_table_fix_docx: fix double table instance in docx file

  • bn_double_table_fix_html: fix double table instance in html file


renlund/bokner documentation built on March 26, 2023, 3:53 a.m.