DITA Open Toolkit plugin for math content (MathML and LaTeX) integration with DITA v1.3.
2024-09-27
This plugin includes stylesheets for HTML5/XHTML and PDF/FO transformations by means of DITA Open Toolkit extensions.
- XSL transformations for equation and math domain elements; not included in DITA Open Toolkit standard plugins
- While browsers have included some support for MathML in recent years, rendering of anything but very basic math content is severely limited even as of late 2023. However, SVG support is well established in all modern browsers. Therefore, in addition to general stylesheets to support MathML content, this plugin also "pre-renders" the
<mathml>
elements into SVG using MathJax 3.x.
- Node.js - for pre-rendering of equation content into SVG
MathJax 3 is included in this plugin (currently limited to 'pre' rendering using Node.js) See also: Hosting your own copy of the MathJax Components
- Download or clone this repository to your DITA OT
plugins
directory. - Run the
dita --install
command.
To build the com.bentley.math-content plugin from the source:
- Run the Gradle build task to generate the compiled Jar file:
gradle clean build
- Run the Gradle distribution task to generate the plugin package:
gradle dist build
The distribution package is located inlib/build/distributions/
.
The following parameters are available in this plugin:
args.eqnlink.style Specifies how cross references to equations are styled.
- abbr (default)
- full
args.mathml.processing Specifies method for processing MathML.
- none (default) - Use MathML mark up in the resulting FO (i.e., relies of FO processor to render the MathML).
- mathjax-pre - Use MathJax-Node to pre-render the MathML into SVG.
args.eqnlink.style Specifies how cross references to equations are styled.
- abbr (default)
- full
args.mathml.processing Specifies method for processing MathML.
- none (default) - Use MathML mark up in the resulting HTML (i.e., relies on browser rendering of MathML).
- mathjax-pre - Use MathJax-Node to pre-render the MathML into SVG.
- mathjax-local - Use MathML markup in resulting HTML and add link to local copy of MathJax in footer.
- mathjax-cdn - Use MathML markup in resulting HTML and add MathJax CDN in footer.
args.mathml.svg2file Specifies if resulting SVG should be saved to reference files.
- no (default)
- yes
This plugin also contains some output customization for generating nomenclature lists from definition lists which are included within an <equation-figure>
parent. Simply placing a <dl>
within a <equation-figure>
element to generate a series of <dt>
= <dd>
lines (i.e., formatted with the equality symbol). If the <dl>
is preceeded by an <equation-block>
, the string "Where" is automatically generated between the two.
Refer to TODO.md for details.
In Development: Refer to docs for roadmap and To Do list.
Copyright © Bentley Systems, Incorporated. All rights reserved.
MathJax 3.x distribution is licensed under an Apache v2.0 license. See the included license file for details.