Section F.2 MathJax and Speech Rule Engine
MathJax is packaged as a
node.jsprogram. A component of MathJax is Speech Rule Engine (SRE), which converts LaTeX to text that represents a spoken version of the mathematics, and to Nemeth braille, a braille code for expressing mathematics.
Follow the directions here exactly. Do not free-style and think some modification will have a better or identical result. In a terminal, set your working directory with
Install both packages at the same time with a single command:
It is possible you will need to make this simple script executable. On Unix-style systems (Linux, Mac OS) this can be done with the
chmodcommand. As this is a bash script, Windows users must use Window’s Sybsystem for Linux or examine the contents of the script to run the commands manually.
update-srescript is supplied by PreTeXt. It will create a file and a directory:
Neither will be tracked by
git. Since SRE changes faster than MathJax, this will replace MathJax’s expectation for a version of SRE with a potentially newer version. So do not be alarmed if it appears MathJax is missing a dependency, that is intentional.
Now you have copies of MathJax and SRE that can be used by the
pretext/pretextscript to process mathematics offline into useful formats for conversions to EPUB, Kindle, and braille.