LaTeX
Latex は LaTeX を文書コンテンツとして追加します。文書パーツと同じ読み方をします。テキストはそのまま使われるため、波かっこやバックスラッシュは LaTeX の構文になります。また、latex の値として value: を指定することも、.tex ファイルを 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")
}読み取れないコマンドは、そのコマンド名を示すエラーになります。