# Simple TeXML file

An example of a simple TeXML document:

<TeXML>
<TeXML escape="0">
\documentclass[a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
</TeXML>
<env name="document">
I'm not afraid of the symbols
\$, ^, > and others.
</env>
</TeXML>


The result of conversion to TeX is the LaTeX document:

\documentclass[a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\begin{document}
I'm not afraid of the symbols
\textdollar{}, \^{}, \textgreater{} and others.
\end{document}


This example demonstrates:

• the root element is TeXML,
• TeX special symbols are escaped automatically,
• it's possible to disable escaping.

By the way, while preparing the original LaTeX example, I made two errors:

• \textgreater instead of \textgreater{} (result — no space after the symbol >),
• \^ instead of \^{} (result — circumflex over comma instead of the symbol ^).

TeXML saves me from such dummy errors.

Disabling escaping is not recommended. In most cases it's a misuse of TeXML. But to make examples simple, I do use it for creating the LaTeX header.

Next step: “More TeXML