The XLaTeX Logo

XLaTeX, a DTD/Schema Which is Very Close to LaTeX

Contact

TUG has kindly provided a discussion list for XLaTeX. To subscribe please visit page http://tug.org/mailman/listinfo/xlatex. You can also contact the author of XLaTeX at the address Yannis period Haralambous at enst dash bretagne period fr.

Namespace

The namespace of XLaTeX v. 0.9, is http://omega.enstb.org/2003/xlatex.

Specifications

The version of XLaTeX described below is 0.9.0 (March 21, 2005).

Global Attributes

Attribute xml:lang

XML attribute xml:lang is defined by the XML Specification and can be used with any XLaTeX element, to specify its language. There must be a section in the XLaTeX configuration file xlatex.conf giving the correspondance between babel options and xml:lang values.

Attribute xmlid

XML attribute xmlid is an attribute of type ID as defined in the XML Specification (its value has to be a unique XML name). It can be used in any XLaTeX element and produces a \label command. Note that there is also a <label> element which produces the same LaTeX command but is not bound to type ID constraints.

Attribute xmlref

XML attribute xmlref is an attribute of type IDREF as defined in the XML Specification (its value has to be taken by an attribute of type ID). It can be used in any XLaTeX element and produces a \ref command. Note that there is also a <ref> element which produces the same LaTeX command but is not bound to type IDREF constraints.

Global Document Structure

Element <xlatex>

XML element <xlatex> is the root of any XLaTeX document. It takes one attribute:

Element <document>

XML element <document> produces LaTeX environment document and if used with an class attribute, then also LaTeX command \documentclass. It takes two attributes: Note that when attribute class is not used, then a separate element <documentclass> is needed in the document.

Element <documentclass>

XML element <documentclass> produces LaTeX command \documentclass. It is an empty elements and takes two attributes: Note that this element is not necessary if the <document> element is used with a class attribute.

Element <usepackage>

XML element <usepackage> produces LaTeX command \usepackage. It is an empty element and takes two attributes: Note that this element must be placed between <documentclass> and <document> when the former is present, but can be used after <document> when used with a class attribute.

Title

Element <maketitle>

XML element <maketitle> produces LaTeX command \maketitle. It is an empty element.

Element <author>

XML element <author> produces LaTeX command \author.

Element <thanks>

XML element <thanks> produces LaTeX command \affiliation.

Element <and>

XML element <and> produces LaTeX command \and. It is an empty element.

Element <date>

XML element <date> produces LaTeX command \date.

Element <today>

XML element <today> produces LaTeX command \today. It is an empty element.

Element <title>

XML element <title> produces LaTeX command \title.

Sectionning

Element <chapter>

XML element <chapter> produces LaTeX command \chapter. It takes two attributes:

Element <section>

XML element <section> produces LaTeX command \section. It takes two attributes:

Element <subsection>

XML element <subsection> produces LaTeX command \subsection. It takes two attributes:

Element <subsubsection>

XML element <subsubsection> produces LaTeX command \subsubsection. It takes two attributes:

Element <paragraph>

XML element <paragraph> produces LaTeX command \paragraph. It takes two attributes:

Element <subparagraph>

XML element <subparagraph> produces LaTeX command \subparagraph. It takes two attributes:

Element <part>

XML element <part> produces LaTeX command \part. It takes two attributes:

Element <tableofcontents>

XML element <tableofcontents> produces LaTeX command \tableofcontents. It is an empty element.

Language

Element <selectlanguage>

XML element <selectlanguage> produces LaTeX command \selectlanguage. It takes one attribute: Note that one can also specify the language of any XLaTeX element by the global xml:lang attribute. In that case there must be a section in the XLaTeX configuration file xlatex.conf giving the correspondance between babel options and xml:lang values. In case one wants to change the language without using any specific XLaTeX element, there is also element <span> which, as in XHTML, is only used to carry attributes.

Text Blocks

Element <span>

XML element <span> produces no specific LaTeX command. It can carry global attributes such as xml:lang.

Element <center>

XML element <center> produces LaTeX environment center.

Element <quotation>

XML element <quotation> produces LaTeX environment quotation.

Element <quote>

XML element <quote> produces LaTeX environment quote.

Element <itemize>

XML element <itemize> produces LaTeX environment itemize. It takes only <item> sub-elements.

Element <enumerate>

XML element <enumerate> produces LaTeX environment enumerate. It takes only <item> sub-elements.

Element <item>

XML element <item> produces LaTeX command \item. It takes one attribute:

Footnotes

Element <footnote>

XML element <footnote> produces LaTeX command \footnote. It takes one attribute:

Element <footnotemark>

XML element <footnotemark> produces LaTeX command \footnotemark. It is an empty element and takes one attribute:

Element <footnotetext>

XML element <footnotetext> produces LaTeX command \footnotetext. It takes one attribute:

Microtypography

Element <emph>

XML element <emph> produces LaTeX command \emph. Note that you can also use element <em> as in XHTML.

Element <em>

XML element <em> produces LaTeX command \emph. Note that you can also use element <emph> as in LaTeX.

Element <textbf>

XML element <textbf> produces LaTeX command \textbf. Note that you can also use element <b> as in XHTML.

Element <b>

XML element <b> produces LaTeX command \textbf. Note that you can also use element <textbf> as in LaTeX.

Element <textit>

XML element <textit> produces LaTeX command \textit. Note that you can also use element <i> as in XHTML.

Element <i>

XML element <i> produces LaTeX command \textit. Note that you can also use element <textit> as in LaTeX.

Element <textsf>

XML element <textsf> produces LaTeX command \textsf.

Element <texttt>

XML element <texttt> produces LaTeX command \texttt. Note that you can also use element <tt> as in XHTML.

Element <tt>

XML element <tt> produces LaTeX command \texttt. Note that you can also use element <texttt> as in LaTeX.

Cross References

Element <label>

XML element <label> produces LaTeX command \label. It is an empty element and takes one attribute: Note that the id is, despite its name, of type CDATA and not ID. There is the global attribute xmlid for those who wish ID type constraints.

Element <ref>

XML element <ref> produces LaTeX command \ref. It is an empty element and takes one attribute: Note that the id is, despite its name, of type CDATA and not ID or IDREF. There is the global attribute xmlref for those who wish IDREF type constraints. Note also that there is a <pageref> element producing the same results as <ref type="page">.

Element <pageref>

XML element <pageref> produces LaTeX command \pageref. It is an empty element and takes one attribute: Note that the id is, despite its name, of type CDATA and not ID or IDREF. There is the global attribute xmlref for those who wish IDREF type constraints.

Tables

Element <tabular>

XML element <tabular> produces LaTeX environment tabular. It takes three attributes: Inside <tabular> one uses <tab> elements to separate cells (instead of & used in LaTeX), <br> to change line (instead of \\ in LaTeX), <hline> to obtain an horizontal rule, <cline> to obtain a partial horizontal rule, <multicolumn> to obtain a multi-column cell, <multirow> to obtain a multi-row cell. Note that package array is systematically loaded and package multirow whenever a <multirow> element is used.

Element <tab>

XML element <tab> produces an & in LaTeX. It is an empty element.

Element <br>

XML element <br> produces LaTeX command \\ whether in the context of a tabular environment or in a regular paragraph. It takes three attributes:

Element <hline>

XML element <hline> produces LaTeX command \hline. It is an empty element.

Element <cline>

XML element <cline> produces LaTeX command \cline. It takes one attribute:

Element <vline>

XML element <vline> produces LaTeX command \vline. It is an empty element.

Element <multicolumn>

XML element <multicolumn> produces LaTeX command \multicolumn. It takes two attributes: The contents of <multicolumn> produce the third argument of \multicolumn (the contents of the cell).

Element <multirow>

XML element <multirow> produces LaTeX command \multicolumn. It takes two attributes: The contents of <multirow> produce the third argument of \multirow (the contents of the cell). Note that the presence of <multirow> in the document automatically applied loading of the multirow package.

Processing Instructions and Related Elements

Processing Instruction <?tex ?>

XML PI <?tex ?> inserts unchanged TeX code into the document. No protection is necessary but the string ?> must be avoided. Note that the <tex> element can be used as well. Note that <?tex ?> and <?TeX ?> are distinct elements.

Element <tex>

XML element <tex> inserts unchanged TeX code into the document. It is necessary to protect XML special characters: write &lt; for <, &gt; for >, &amp; for &.

Processing Instruction <?math ?>

XML PI <?math ?> inserts unchanged TeX code into the document, enclosed in dollars. No protection is necessary but the string ?> must be avoided. Note that the <math> element can be used as well.

Element <math>

XML element <math> inserts unchanged TeX code into the document, enclosed in dollars. It is necessary to protect XML special characters: write &lt; for <, &gt; for >, &amp; for &.

Processing Instruction <?displaymath ?>

XML PI <?displaymath ?> inserts unchanged TeX code into the document, enclosed in double dollars. No protection is necessary but the string ?> must be avoided. Note that the <displaymath> element can be used as well.

Element <displaymath>

XML element <displaymath> inserts unchanged TeX code into the document, enclosed in double dollars. It is necessary to protect XML special characters: write &lt; for <, &gt; for >, &amp; for &.

Processing Instruction <?special ?>

XML PI <?special ?> inserts unchanged TeX code into the document, as argument of a \special command. No protection is necessary but the string ?> must be avoided. Note that the <special> element can be used as well.

Element <special>

XML element <special> inserts unchanged TeX code into the document, as argument of a \special command. It is necessary to protect XML special characters: write &lt; for <, &gt; for >, &amp; for &.

Processing Instruction <?verb ?>

XML PI <?verb ?> has the same effect as using the \verb command. No protection is necessary but the string ?> must be avoided. The <verb> element can be used as well.

Element <verb>

XML element <verb> has the same effect as using the \verb command. It is necessary to protect XML special characters: write &lt; for <, &gt; for >, &amp; for &.

Processing Instruction <?verbatim ?>

Processing Instruction <?verbstar ?>

XML PI <?verbstar ?> has the same effect as using the \verb* command. No protection is necessary but the string ?> must be avoided. The <verbstar> element can be used as well.

Element <verbstar>

XML element <verbstar> has the same effect as using the \verb* command. It is necessary to protect XML special characters: write &lt; for <, &gt; for >, &amp; for &.

Processing Instruction <?verbatim ?>

XML PI <?verbatim ?> inserts unchanged TeX code into the document, as contents of a verbatim environment. No protection is necessary but the string ?> must be avoided. The <verbatim> element can be used as well.

Element <verbatim>

XML element <verbatim> inserts unchanged TeX code into the document, as contents of a verbatim environment. It is necessary to protect XML special characters: write &lt; for <, &gt; for >, &amp; for &.

Graphics

Element <includegraphics>

XML element <includegraphics> produces LaTeX command \includegraphics. It is an empty element and takes seven attributes: Note that when combined, the LaTeX commands resulting from scale, rotate, resize(x|y) and reflect are produced in the order: reflect{rotate{scale{resize}}}. Note that there are also elements <scalebox>, <rotatebox>, <resizebox>, <reflectbox> producing the same results.

Element <scalebox>

XML element <scalebox> produces LaTeX command \scalebox. It takes two attributes:

Element <rotatebox>

XML element <rotatebox> produces LaTeX command \rotatebox. It takes one attribute:

Element <resizebox>

XML element <resizebox> produces LaTeX command \resizebox. It takes two attributes: Note that if one of these attributes is ommited, the value ! is produced in the LaTeX code.

Element <reflectbox>

XML element <reflectbox> produces LaTeX command \reflectbox.

Floats

Element <figure>

XML element <figure> produces LaTeX environment figure. It takes one attribute:

Element <table>

XML element <table> produces LaTeX environment table. It takes one attribute:

Element <caption>

XML element <caption> produces LaTeX command \caption. It takes one attribute:

Multiple Columns

Element <multicols>

XML element <multicols> produces LaTeX environment multicols (the <multicol> package is automatically loaded). It takes one attribute:

Element <onecolumn>

XML element <onecolumn> produces LaTeX command \onecolumn.

Element <twocolumn>

XML element <twocolumn> produces LaTeX command \twocolumn.

Miscellanea

Element <TeX>

XML element <TeX> produces TeX command \TeX. It is an empty element. Note that <?tex ?> and <?TeX ?> are distinct elements.

Element <LaTeX>

XML element <LaTeX> produces LaTeX command \LaTeX. It is an empty element.

Element <XLaTeX>

XML element <XLaTeX> produces XLaTeX command \XLaTeX. It is an empty element.

Element <MF>

XML element <MF> produces TeX command \MF. It is an empty element.

Index

Element <index>

XML element <index> produces LaTeX command \index. It takes three attributes: The <index> element can be used in three ways: The sort attribute is used to enter sorting keys: <index id="π" sort="pi"/> will produce \index{pi@π}. To obtain sub-entries one uses the usual ! syntax: <index id="France!Finistère!Brest"/>. Note that sorting keys for sub-entries are given in the sort attribute and shuffled automatically: <index sort="alpha!beta!gamma" id="α!β!γ"/> will produce \index{alpha@α!beta@β!gamma@γ}, as required by makeindex.

Element <printindex>

XML element <printindex> produces LaTeX command \printindex. It is an empty element and takes one attribute:

Bibliography

Element <cite>

XML element <cite> produces LaTeX command \cite. It is an empty element and takes two attributes:

Element <nocite>

XML element <nocite> produces LaTeX command \cite. It is an empty element and takes one attribute:

Element <bibliographystyle>

XML element <bibliographystyle> produces LaTeX command \bibliographystyle. It is an empty element and takes one attribute: Note that there is also attribute style of element <bibliography> producing the same result.

Element <bibliography>

XML element <bibliography> produces LaTeX command \bibliography or LaTeX environment thebibliography depending on whether attribute src is present. It is an empty element in the former case only and takes three attributes: Note that there is also element <bibliographystyle> producing the same result as attribute style. In case <bibliography> is not empty, it contains sub-elements <bibitem>. If widthof is ommited, the value 999 is produced in the LaTeX code.

Element <bibitem>

XML element <bibitem> produces LaTeX command \bibitem. It takes two attributes:

Arbitrary Commands and Environments

Element <com>

XML element <com> produces a LaTeX command whose name is equal to the value of (mandatory) attribute name. It takes eleven attributes: Note that instead of using attributes one can also use sub-elements <optarg>, <arg1>, ..., <arg9> to obtain optional and mandatory arguments. In case both attribute argn and sub-element <argn> are present, the sub-element prevails.

Element <env>

XML element <env> produces a LaTeX environment whose name is equal to the value of (mandatory) attribute name. It takes eleven attributes: Note that contrarily to <com> you can not use sub-elements <optarg>, <arg1>, ..., <arg9> under <env>.

Element <optarg>

XML element <optarg> produces the optional argument of a LaTeX command (as sub-element of <com>). Note that there is also an optarg attribute producing the same result.

Element <argn> for n = 1,...,9

XML element <argn> produces the n-th mandatory argument of a LaTeX command (as sub-element of <com>). Note that there is also an argn attribute producing the same result.

DTD and Schema

To be provided ASAP.

Implementations

To be provided ASAP.

Examples

To be provided ASAP.