% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/typst_str.R
\name{save_as_typst}
\alias{save_as_typst}
\title{Save flextable objects in a Typst file}
\usage{
save_as_typst(
  ...,
  values = NULL,
  path,
  page = "#set page(width: auto, height: auto, margin: 12pt)"
)
}
\arguments{
\item{...}{flextable objects, possibly named.}

\item{values}{a list of flextable objects. If provided, \code{...} is ignored.}

\item{path}{Typst file to be created.}

\item{page}{a Typst \verb{#set page(...)} rule used as document setup. The
default produces a tightly cropped page fitting the table(s).}
}
\value{
the path to the generated file, invisibly.
}
\description{
Writes one or more flextables to a standalone Typst
(\code{.typ}) document. Images are embedded as base64 (decoded inline at
compile time), so the file is self-contained and compiles offline with
\verb{typst compile}. Equations require the \code{mitex} Typst package, which is
fetched from the Typst package registry on first compilation.
}
\examples{
ft <- flextable(head(iris))
tf <- tempfile(fileext = ".typ")
save_as_typst(ft, path = tf)
}
