You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `loader` section sets up the path to the speech-rule-engine (SRE), which is used to load the node-based version of SRE (there are separate browser and node versions), and includes the `a11y/semantic-enrich` component in the list to be loaded.
33
+
The `loader` section sets up the path to the directory with the MathJax components, which is here relative to the `node_modules` directory and includes the `a11y/semantic-enrich` component in the list to be loaded. Note, that unlike in previous versions of MathJax there is no need to set up the path to speech-rule-engine (SRE) as this is internally handled by MathJax.
32
34
33
-
The `options` section sets the document options to include the speech level (given by the `--speech` command-line option), and adds a custom `renderAction` to handle the `data-semantic` attributes generated by SRE. Because this code is used by all the examples in this directory, it is store in a separate file, [`action.js`](action.js). It defines a function that removes any attribute that starts with `data-semantic-` except for `data-semantic-speech`, since the semantic enrichment adds lots of data about the structure of the expression in these attributes. The code is commented, so see that for details. The `enableAssistiveMml` option is disabled, since the speech string for assistive technology is being included, so there is no need for the assistive MathML.
35
+
The `options` section sets the document options to include the speech level as a `sre` instruction (given by the `--speech` command-line option), and adds a custom `renderAction` to handle the `data-semantic` attributes generated by SRE. Because this code is used by all the examples in this directory, it is stored in a separate file, [`action.js`](action.js). It defines a function that removes any attribute that starts with `data-semantic-` except for `data-semantic-speech`, since the semantic enrichment adds lots of data about the structure of the expression in these attributes. The code is commented, so see that for details. The `enableAssistiveMml` option is disabled, since the speech string for assistive technology is being included, so there is no need for the assistive MathML. In addition the `--sre` command-line option allows you to pass additional pairs of arguments to SRE, e.g., to change locale, rule set, or rule preference settings.
34
36
35
37
The rest of the file is the same as the standard `tex2chtml` using components. The `renderAction` configuration is all that is needed for that action to be taken automatically during the usual typesetting or conversion calls.
0 commit comments