modelsummary (version 0.1.0)

knit_latex: Utility function to cleanup LaTeX output from gt and ensures that it knits well with `knitr`

Description

The `gt::as_latex` function is still in development, rather feature poor, and prone to breakage when using `knitr`. This function is a stopgap measure which adds a little functionality and "cleans-up" some of the LaTeX output to avoid common compilation errors. In time, as upstream improves, the goal is to deprecate this function.

Usage

knit_latex(tab, label = NULL)

Arguments

tab

table object produced by `modelsummary` or `gt`

label

string will be inserted as a `label`

Value

an object of class `knit_asis`. The first element of this object (`x[[1]]`) contains raw LaTeX code.