| 1 |
\documentclass{l3doc} |
| 2 |
|
| 3 |
\usepackage{listings} |
| 4 |
|
| 5 |
|
| 6 |
\begin{document} |
| 7 |
|
| 8 |
\title{The tiny YAML Library} |
| 9 |
|
| 10 |
\author{% |
| 11 |
Zeping Lee% |
| 12 |
\thanks{% |
| 13 |
E-mail: |
| 14 |
\href{mailto:[email protected]} |
| 15 |
{[email protected]}% |
| 16 |
}% |
| 17 |
} |
| 18 |
|
| 19 |
\date{2025-02-01 v0.4.4} |
| 20 |
|
| 21 |
\maketitle |
| 22 |
|
| 23 |
\begin{documentation} |
| 24 |
|
| 25 |
\section{Introduction} |
| 26 |
|
| 27 |
The \textsf{lua-tinyyaml} package is a lightweight YAML parser written in pure Lua. |
| 28 |
It supports a subset of the YAML 1.2 specifications. |
| 29 |
This package is a dependency for several other LuaTeX packages, including \textsf{markdown} and \textsf{citeproc-lua}. |
| 30 |
|
| 31 |
|
| 32 |
\section{Usage} |
| 33 |
|
| 34 |
To parse a YAML string into a Lua table, use the \texttt{parse} function: |
| 35 |
|
| 36 |
\begin{lstlisting}[language={[5.3]Lua}, basicstyle=\ttfamily] |
| 37 |
contents = require("tinyyaml").parse(str) |
| 38 |
\end{lstlisting} |
| 39 |
|
| 40 |
|
| 41 |
\section{License} |
| 42 |
|
| 43 |
\texttt{lua-tinyyaml} is distributed under the MIT License. |
| 44 |
|
| 45 |
|
| 46 |
\end{documentation} |
| 47 |
|
| 48 |
\end{document} |