# MathCAT for johnmcm.com The WebAssembly braille module behind the Equation Editor's Accessibility tab (/equation-editor): Nemeth (US maths code) and UEB Technical braille. It is [MathCAT](https://github.com/daisy/MathCAT) (Math Capable Assistive Technology) by Neil Soiffer for the DAISY Consortium, MIT licence, built unmodified from tag `v0.7.7` (commit `764d24d1241b20c0973e9dbcee62d022c1f99a4a`; that tag's Cargo.toml still reads 0.7.6-rc.4, so `version()` reports that). MathCAT's rule files (the YAML in its `Rules/` folder) are part of the same MIT-licensed repository. - `src/lib.rs`: a wasm-bindgen wrapper with two functions, `braille(mathml, code)` (code `"Nemeth"` or `"UEB"`) and `version()`. It sets the same preferences as MathCAT's own braille test harness (`tests/common/mod.rs`, `test_braille`), so the output matches the expectations in MathCAT's test suite. - `Cargo.toml`: MathCAT with `default-features = false` and `include-zip`, `lang-en`, `braille-nemeth`, `braille-ueb`: the Rules folder is embedded in the .wasm as a zip holding only the English rules (always needed: MathCAT falls back to them), the shared definitions and intent rules, and the Nemeth and UEB braille rules. `opt-level = "z"`, LTO. A `[patch.crates-io]` swaps the `dirs` crate for `stub/dirs`, a stand-in written for this build: MathCAT asks `dirs::config_dir()` for a user preferences folder, which the real crate answers with `None` on wasm32 anyway, but it brings in dirs-sys and option-ext (MPL-2.0). With the stand-in every crate in the module is under a permissive licence. - `Dockerfile`: the build, with the Rust image pinned by digest, MathCAT by tag and commit, wasm-pack by version. Built again with `--no-cache`, it gives the same `mathcat_bg.wasm` byte for byte (checked on 29 Oct 2026). It downloads MathCAT, the crates, and wasm-pack's wasm-bindgen and wasm-opt, so it relies on those staying available. - `Cargo.lock`: the crate versions of the first build, used by every build after. - `stub/dirs`: the stand-in for the `dirs` crate described above. - `notices.sh`: writes `THIRD-PARTY.txt`, every crate in the dependency tree with its licence and licence files (all MIT, Apache-2.0, BSD-style, Zlib, Unlicense, CC0, 0BSD, Unicode-3.0 or bzip2-1.0.6; no GPL and no MPL). - `js/worker.mjs`: the worker the page talks to. It reports a character MathCAT has no braille for instead of passing on MathCAT's `'\x....'` spelling of it. The same cells can be real Nemeth (A′∖x), so a character is blamed only when brailling it alone spells it out too. - `build.ps1`: runs the build and copies `mathcat.js`, `mathcat_bg.wasm`, `LICENSE`, `THIRD-PARTY.txt` and `worker.mjs` to `frontend/vendor/local/mathcat@1/`. Checking a build: `frontend/tests/equation-braille.test.mjs` runs the vendored module on cases taken from MathCAT's tests (BANA Nemeth Code, ICEB Guidelines for Technical Material, BANA UEB guidance). `suite.mjs` runs MathCAT's whole Nemeth and UEB braille suite (every `test_braille` case in `tests/braille/{Nemeth,UEB}/*.rs` of a checkout of the same tag) against a build: the v0.7.7 build passes all 1049 that are not marked `#[ignore]`.