| table.cross.ref | R Documentation |
tRef creates the cross-reference string, and tCap creates the caption.
tRef(label, isDocx)
tCap(cap, label, isDocx)
cap |
(character) the original caption string |
label |
(character) the |
isDocx |
(boolean) is the output format of the Rmd file |
Because the current version of flextablev0.5.5 does not work with bookdownv0.12 in automatically producing table cross-reference, these functions are a workaround.
(character) If isDocx is FALSE, tRef returns Table \@ref(tab:label) and tCap simply returns cap; otherwise, tRef returns Table. x and tCap returns Table. x cap, where x is the ordered index of the table.
library(wfr)
tCap("first table","tab1",FALSE)
tCap("first table","tab1",TRUE)
tCap("second table","tab2",TRUE)
tCap("first table","tab1",TRUE)
tRef("tab2",TRUE)
tRef("tab1",TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.