TeX

Key point: A popular typesetting system for mathematics.

PageSeeder supports the rendering of TeX expressions in documents, fragments and inline labels.

TeX documents

Use the file extension .tex for TeX documents.

PageSeeder automatically renders xrefs of type math pointing to TeX documents or fragments.

For developers

To let users select TeX documents to include in their content, you need to create a math xref config.

<!-- To insert an expression stored in TeX document -->
<xref-config name="tex" title="TeX">
  <xref display="document"
        frag="default"
        type="math" />
  <target filters="+psmediatype:application/x-tex" />
</xref-config>

For further information, see PSML xref config in the developer documentation.

TeX fragments

Use the media type application/x-tex for tex media fragments.

Example

<media-fragment mediatype="application/x-tex">
\left[
\begin{matrix}
1 & 0\\
0 & 1
\end{matrix}
\right]
</media-fragment>

Renders as:

\left[ \begin{matrix} 1 & 0\\ 0 & 1 \end{matrix} \right]

TeX inline label

Use the tex inline label to render a portion of content within a paragraph or list.

Example

<para>This formula <inline label="tex">f(x) = x^2</inline> is an example.</para>

Renders as:

This formula  f(x) = x^2 is an example.

Publishing TeX

Similar to AsciiMath, PageSeeder supports TeX in both Word and PDF by first converting it to MathML at the beginning of the publish process.

Microsoft Word supports OMML (Office Math Markup Language), so MathML is converted to OMML when exporting to a Word document. When publishing to PDF, PageSeeder uses JEuclid to render MathML.

To be consistent with the user interface, publish supports the KaTeX functions except:

  • Neither the user interface or publishing support display-mode only functions (e.g. align, alignat, gather ). Instead use aligned, alignedat and gathered.
  • Publishing only supports multi-line equations when they are part of an aligned, alignedat or gatheredmath structure. However, Word will always center equations rather than aligning them.

Examples