LaTeX
Latex adds LaTeX as document content, read as a document part reads it. Its text is used as written, so braces and backslashes are LaTeX's. It also takes a latex value with value:, or a .tex file with path:.
<import package="KScript.Document" />
<fn name="method" value="```latex
\subsection{Method}
We counted \textbf{gliders} by hand.
```" />
<Document title="From LaTeX" to="paper.pdf">
<Latex>\section{Results}
Gliders travel \emph{diagonally}, and $N(t) = N_0 e^{rt}$.</Latex>
<Latex value="@method()" />
<Latex path="chapters/discussion.tex" />
</Document>import KScript.Document
fn method() => ```latex
\subsection{Method}
We counted \textbf{gliders} by hand.
```
Document(title: "From LaTeX", to: "paper.pdf") {
Latex ```latex
\section{Results}
Gliders travel \emph{diagonally}, and $N(t) = N_0 e^{rt}$.
```
Latex(value: @method())
Latex(path: "chapters/discussion.tex")
}A command it doesn't read is an error that names it.