From ab8d9eafdddf99d36c058db2db4fd1443381c70d Mon Sep 17 00:00:00 2001 From: Vincent Arel-Bundock Date: Sat, 14 Sep 2024 11:24:01 -0400 Subject: [PATCH] minor example --- sandbox/typst.qmd | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sandbox/typst.qmd b/sandbox/typst.qmd index f8f4c9e9..3bea9b42 100644 --- a/sandbox/typst.qmd +++ b/sandbox/typst.qmd @@ -6,6 +6,18 @@ keep-typ: true ```{r} pkgload::load_all() + +theme_typst_figure <- function(x, ...) { + fn <- function(table) { + if (isTRUE(table@output == "typst")) { + table@table_string <- paste0("#figure([\n", table@table_string, "\n])") + } + return(table) + } + x <- style_tt(x, finalize = fn) + return(x) +} +options(theme_tt_tinytable = theme_typst_figure) ``` ```{r}