SummaryTables
Publication-ready tables for Julia - in HTML, docx, LaTeX and Typst
SummaryTables is focused on creating tables for publications in HTML, docx, LaTeX and Typst formats. It offers both convenient predefined table functions that are inspired by common table formats in the pharma space, as well as an API to create completely custom tables.
It deliberately uses an opinionated, limited styling API so that styling can be as consistent as possible across the different backends.
SummaryTables is registered in the General Registry and can be installed as usual:
using Pkg
Pkg.install("SummaryTables")
Completely customizable Tables can be built from scratch as a matrix of Cells with a little styling metadata.
using SummaryTables
categories = ["Deciduous", "Deciduous", "Evergreen", "Evergreen", "Evergreen"]
species = ["Beech", "Oak", "Fir", "Spruce", "Pine"]
fake_data = [
"35m" "40m" "38m" "27m" "29m"
"10k" "12k" "18k" "9k" "7k"
"500yr" "800yr" "600yr" "700yr" "400yr"
"80\$" "150\$" "40\$" "70\$" "50\$"
]
labels = ["", "", "Size", Annotated("Water consumption", "Liters per year"), "Age", "Value"]
body = [
Cell.(categories, bold = true, merge = true, border_bottom = true)';
Cell.(species)';
Cell.(fake_data)
]
Table(hcat(
Cell.(labels, italic = true, halign = :right),
body
), header = 2)
Deciduous | Evergreen | ||||
Beech | Oak | Fir | Spruce | Pine | |
Size | 35m | 40m | 38m | 27m | 29m |
Water consumption1 | 10k | 12k | 18k | 9k | 7k |
Age | 500yr | 800yr | 600yr | 700yr | 400yr |
Value | 80$ | 150$ | 40$ | 70$ | 50$ |
1 Liters per year |