Skip to content

Rendering

render

Convert a StyledTable into a SummaryTables.Table for display or for saving to HTML, LaTeX, or Typst. In interactive contexts, calling render explicitly is optional because Base.show automatically renders the table.

Signature: render(tbl::StyledTable) -> SummaryTables.Table

julia
using StyledTables, DataFrames

df = DataFrame(a = [1, 2], b = ["x", "y"])

tbl = StyledTable(df)
cols_label!(tbl, :a => "A", :b => "B")
render(tbl)
A B
1 x
2 y

The returned SummaryTables.Table supports:

  • show(io, MIME"text/html"(), rendered)

  • show(io, MIME"text/latex"(), rendered)

  • show(io, MIME"text/typst"(), rendered)

Saving to file

See the SummaryTables.jl docs for information on how to save SummaryTables.Tables to html, LaTeX, typst or docx.

StyledTables.render Function
julia
render(tbl::StyledTable) -> Table

Convert a StyledTable into a renderable SummaryTables.Table.

Applies all registered modifiers (labels, spanners, formatters, styles, row groups) and assembles the cell matrix. The result renders to HTML, LaTeX, and Typst.

In interactive contexts, render is optional: StyledTable defines Base.show methods that call it automatically.

Arguments

Returns

A SummaryTables.Table (a Matrix{Cell} with header/footer metadata).

See also: StyledTable, tab_header!, cols_label!.

Examples

julia
using StyledTables, DataFrames
df = DataFrame(a = [1, 2], b = ["x", "y"])
tbl = StyledTable(df)
cols_label!(tbl, :a => "A", :b => "B")
render(tbl)
source