Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
b090d58
Initial commit for French braille.
NSoiffer Sep 27, 2024
7b75709
Added a table of atomic numbers for the elements and added a test for…
NSoiffer Sep 27, 2024
5136cb3
renamed test
NSoiffer Sep 27, 2024
fca6ce0
Merge branch 'main' into French-Braille
NSoiffer May 30, 2025
4ccda5f
Update braille.rs to compile after merging.
NSoiffer May 30, 2025
34ce947
Merge branch 'main' into French-Braille
NSoiffer Nov 19, 2025
596e210
Merge branch 'main' into French-Braille
NSoiffer Jun 6, 2026
c7eda2c
Updated to main. Needed to update the format of the tests to match t…
NSoiffer Jun 6, 2026
b163b6b
Merge main into French-Braille: fold French into BrailleCode trait
NSoiffer Jun 16, 2026
62dfe83
It appears some logic was missing parens -- not sure why this always …
NSoiffer Jun 22, 2026
3c5b101
Lots more cleanup of tests, additions of rules.
NSoiffer Jun 22, 2026
fffcc73
fix clippy warning
NSoiffer Jun 22, 2026
de9751d
More fixes for French braille. Now at 89 correct, 8 fail, with most o…
NSoiffer Jun 25, 2026
f9ba42a
pass through braille chars as is
NSoiffer Jun 25, 2026
4d848ed
Merge branch 'main' into French-Braille
NSoiffer Aug 3, 2026
822485d
Merge branch 'main' into French-Braille
NSoiffer Aug 3, 2026
52d91c2
UEB has a rule for some pseudo-script chars. The match for that rule …
NSoiffer Aug 5, 2026
baf7de6
Added new UEB chars. Many of these are accented letters. I added 'A' …
NSoiffer Aug 5, 2026
916978c
change small spaces from 'W' to ''
NSoiffer Aug 6, 2026
6bddbda
add 'H' for Hebrew alphabet indicator
NSoiffer Aug 6, 2026
6af4178
promote munder/mover/munderover base attrs to element -- prevents err…
NSoiffer Aug 6, 2026
1046bd5
all primes on chem symbols such as R' -- used to be a reject, now neu…
NSoiffer Aug 7, 2026
af250aa
Fix leftover value for G1 indicator -- unlike UEB, French braille num…
NSoiffer Aug 7, 2026
f481cd5
Lots of fixes and addition of tests.
NSoiffer Aug 7, 2026
d743060
Add "(eau)" as a state (for French)
NSoiffer Aug 7, 2026
0d7a39a
add more arrows. French at the moment doesn't seem to distinguish bet…
NSoiffer Aug 7, 2026
363fc51
removed some intent attrs that were not needed
NSoiffer Aug 7, 2026
9588ed9
uncomment a determinant test after fixing the braille
NSoiffer Aug 7, 2026
4408cb2
Add rules for multiple lines in a script position done via an mtable …
NSoiffer Aug 7, 2026
5c48268
a linebreaks to MathML to make it easier to read
NSoiffer Aug 7, 2026
9b2ac74
Merge branch 'main' into French-Braille
NSoiffer Aug 7, 2026
e5a9c87
add more arrow chars -- I thought I did this in a previous commit, bu…
NSoiffer Aug 7, 2026
c2dbcc6
Add MathJax demo link to developer docs for rendering inspection
moritz-gross Aug 15, 2026
eebb4be
.
moritz-gross Aug 15, 2026
8e886cc
Merge changes (mostly unicode) from hu branch (#688)
NSoiffer Aug 15, 2026
7fbaf17
Ru -- merge speech changes into main (#689)
NSoiffer Aug 15, 2026
0380bb0
Remove unused and commented-out code (#680)
moritz-gross Aug 15, 2026
d4a112a
Update demo link in developers documentation
moritz-gross Aug 15, 2026
8305b6f
Merge pull request #687 from moritz-gross/link-mathjax-demo-as-helpfu…
moritz-gross Aug 15, 2026
6ecc412
Did cleanup with ranges to shrink file size. The big win was the 'id'…
NSoiffer Aug 16, 2026
2e1301f
Merge branch 'main' of https://github.com/daisy/MathCAT
NSoiffer Aug 16, 2026
fbc49bb
Announce column separator (#679)
moritz-gross Aug 16, 2026
d5c63d8
fix clippy warnings in the no-unsafe version
NSoiffer Aug 16, 2026
78744ec
Revert changes to file from 6ecc412
NSoiffer Aug 16, 2026
a1fc8e0
missed this change that needed to be reverted for Russian braille
NSoiffer Aug 16, 2026
bc712eb
fix AGENTS.md instruction on `uv run pytest`
moritz-gross Aug 16, 2026
58aa858
Merge pull request #693 from moritz-gross/main
moritz-gross Aug 16, 2026
6937925
Merge latest hu changes (#696)
NSoiffer Aug 17, 2026
adbf1e5
move to release candidate
NSoiffer Aug 17, 2026
2267de3
Added creation of minified yaml files for an alternative Rules.zip
NSoiffer Aug 17, 2026
487ce71
fix build problem
NSoiffer Aug 17, 2026
65250fc
try again for creation of minified yaml files for an alternative Rule…
NSoiffer Aug 17, 2026
0bac005
try again -- needs to run on linux
NSoiffer Aug 17, 2026
80b749a
Add standalone Rules packaging script
NSoiffer Aug 17, 2026
b1f15e9
try again with more files in github
NSoiffer Aug 17, 2026
43af561
try again adding 'zz' test dir for testing
NSoiffer Aug 17, 2026
82e8188
internally zip of the Language/Braille dirs
NSoiffer Aug 17, 2026
082afd1
add another file for packaging the rules
NSoiffer Aug 17, 2026
61c04bd
trying again with zipping -- AI is not doing a very good job...
NSoiffer Aug 18, 2026
917dbe5
Merged the messy multiple files AI created into one file
NSoiffer Aug 18, 2026
3bb491d
AI keeps messing with things it shouldn't...
NSoiffer Aug 18, 2026
7af9ec3
remove inappropriate check
NSoiffer Aug 18, 2026
786d058
Unify Rules packaging in Rust for CI, include-zip, and release zips.
NSoiffer Aug 18, 2026
2e2c19c
Serialize rules unzip and YAML reads during parallel tests
NSoiffer Aug 18, 2026
5e899d7
update version number
NSoiffer Aug 18, 2026
04882d3
better speech for missing char used for parsing
NSoiffer Aug 18, 2026
25b472b
udate version #
NSoiffer Aug 18, 2026
67cc546
Add option --exclude to audit-translations
CristianCantoro Aug 19, 2026
3d267a0
Add tests for --exclude option
CristianCantoro Aug 19, 2026
0f4791c
Add test case IDs for CLI main exclude tests
moritz-gross Aug 19, 2026
c89adf4
Merge pull request #701 from CristianCantoro/audit-translations-exclude
moritz-gross Aug 19, 2026
512919a
fix minimized zip file so that flow style is used to reduce space
NSoiffer Aug 20, 2026
2355535
Merge branch 'main' of https://github.com/daisy/MathCAT
NSoiffer Aug 20, 2026
88856c9
fix test that depending on the details of YAML notation -- broke for …
NSoiffer Aug 20, 2026
728bbb7
fix row terminator for UEB in mtable
NSoiffer Aug 20, 2026
4a7f5ca
fix row terminator for UEB in mtable
NSoiffer Aug 20, 2026
18859bc
Bring over fixes to the minified yaml files.
NSoiffer Aug 20, 2026
4b9d19c
bump release number
NSoiffer Aug 20, 2026
eaa36e9
Fix #698 -- merge arc-like symbols under restricted condidtions
NSoiffer Aug 20, 2026
cf0b751
Update user guide
TimArborealis Aug 20, 2026
c7c25fa
Updated acknowledgements
TimArborealis Aug 21, 2026
76b3e59
fix #703
NSoiffer Aug 22, 2026
fc79ce9
Fix up UEB mtable notations.
NSoiffer Aug 22, 2026
c37aac5
Merge branch 'release-candidate'
NSoiffer Aug 22, 2026
baac528
Merge branch 'main' of https://github.com/daisy/MathCAT
NSoiffer Aug 22, 2026
1b32804
accidentally picked up wrong version # when merged in release-candidate
NSoiffer Aug 22, 2026
7ee9e3a
bump version #
NSoiffer Aug 22, 2026
f89080f
add Math4VIP to German translators
moritz-gross Aug 22, 2026
8931979
Merge pull request #713 from moritz-gross/main
moritz-gross Aug 22, 2026
88129be
Fix up arc look-alike chars due to canonicalize change.
NSoiffer Aug 23, 2026
6327bbd
Merge branch 'main' into French-Braille
NSoiffer Aug 23, 2026
6b980d1
Merge branch 'French-Braille'
NSoiffer Aug 23, 2026
9f8d81f
fixes no-unsafe branch clippy issues
NSoiffer Aug 25, 2026
4952dd7
Update MathCAT logo and add descriptive alt text. (#714)
ways2read Aug 27, 2026
1172c4d
fix clippy warning with new version of rust
NSoiffer Aug 28, 2026
e54a29f
Merge branch 'release-candidate'
NSoiffer Aug 28, 2026
70ef046
Merge branch 'main' of github.com:daisy/MathCAT
NSoiffer Aug 28, 2026
5a4aa2c
tried to align the MathCAT logo with the following text.
NSoiffer Aug 28, 2026
ed724d1
Add logo-inline.png for README and GitHub Pages docs
NSoiffer Aug 28, 2026
49bb57d
Cred to Greek translators
TimArborealis Sep 1, 2026
0932ffb
Fix outdated MathCAT project URLs (#732)
k4its1t Sep 2, 2026
72e2b1d
Add Brazilian Portuguese (pt) translation- #729 (#736)
natalieac03 Sep 2, 2026
aaad746
Release candidate (#743)
NSoiffer Sep 2, 2026
9ea98c2
pl: fix five speech/navigation defects and catch up with recent en ch…
michaldziwisz Sep 2, 2026
df565e2
pl: inflect unit names according to the numeral, not with an English …
michaldziwisz Sep 3, 2026
9f4721a
pl: speak the unit after "na" in the accusative, not the nominative (…
michaldziwisz Sep 3, 2026
6a5170a
Update: Add `Cargo.lock` file to track dependencies
moritz-gross Sep 3, 2026
8ac56dd
Merge pull request #750 from moritz-gross/remove-cargo-lock-for-gitig…
moritz-gross Sep 5, 2026
a6b6af1
Minor chemistry fix in Swedish
TimArborealis Sep 7, 2026
bd03fcd
pl: mark the unicode translations as verified (t -> T) (#741)
michaldziwisz Sep 7, 2026
e199081
add PauseFactor to test initialization so that local changes don't af…
NSoiffer Sep 8, 2026
d3b7970
Fix pica unit parsing in spacing width conversion (#755)
moritz-gross Sep 8, 2026
0714929
Update chemistry.rs
TimArborealis Sep 8, 2026
d5d1933
Fix "TEMP NAME of" when a parenthesized matrix is raised to a power (…
wittjeff Sep 13, 2026
8ef6ee1
Fix typo in fallback
NSoiffer Sep 15, 2026
87f4c59
The word "of" was hard-coded into intents. This moves its value to de…
NSoiffer Sep 15, 2026
a74a6e2
remove value used in debugging
NSoiffer Sep 15, 2026
2622ee5
Fix audit-ignore rule scoping
Kostenkov-2021 Sep 19, 2026
a6e65c8
Add in-memory virtual filesystem support to shim_filesystem (#760)
dtsengchromium Sep 19, 2026
49de6d6
Refactor: Simplify match return logic and improve string interpolatio…
moritz-gross Sep 19, 2026
3896006
Merge branch 'daisy:main' into main
Kostenkov-2021 Sep 19, 2026
5c8117e
de, el: use $CommandOffset instead of string-length($Prefix) in navig…
michaldziwisz Sep 20, 2026
97785d8
Merge branch 'daisy:main' into main
Kostenkov-2021 Sep 20, 2026
600180b
Fix audit-ignore parsing around comments
Kostenkov-2021 Sep 20, 2026
374ea58
Merge pull request #777 from Kostenkov-2021/main
moritz-gross Sep 20, 2026
7f3e79d
add tests for intervals in German
moritz-gross Sep 21, 2026
f1895d9
Refine German interval descriptions and update translation rules
moritz-gross Sep 21, 2026
322d7d6
Merge pull request #784 from moritz-gross/fix-intervals-german
moritz-gross Sep 21, 2026
ee539f2
Add German ClearSpeak rule and tests for pause intent
moritz-gross Sep 21, 2026
b2bf819
Merge pull request #785 from moritz-gross/add-pause-rule-to-German
moritz-gross Sep 21, 2026
21fd1eb
Add German localization for currency symbol placement and correspondi…
moritz-gross Sep 22, 2026
327d988
add another test for euro
moritz-gross Sep 22, 2026
a4083ce
add another test for pound/pfund
moritz-gross Sep 22, 2026
4e906f0
Merge pull request #786 from moritz-gross/fix-currency-order-in-German
moritz-gross Sep 22, 2026
692343a
Update German ClearSpeak rules: Add support for principal logarithm (…
moritz-gross Sep 22, 2026
b8d3116
Merge pull request #787 from moritz-gross/add-principal-value-log-for…
moritz-gross Sep 22, 2026
25059dd
Refine German ClearSpeak fraction translations and update ordinal fra…
moritz-gross Sep 22, 2026
5f08dc0
Merge pull request #788 from moritz-gross/German-add-rest-of-NumbersO…
moritz-gross Sep 22, 2026
5df8e81
German ClearSpeak: subset & superset
moritz-gross Sep 22, 2026
fd8153d
Merge pull request #790 from moritz-gross/de-ClearSpeak-superset-subset
moritz-gross Sep 22, 2026
88404bf
de: fix chemical state names
moritz-gross Sep 22, 2026
8efb7ee
Merge pull request #791 from moritz-gross/de--fix-vocab-for-chemical-…
moritz-gross Sep 22, 2026
c17671c
de: fix chemical reaction arrow
moritz-gross Sep 22, 2026
771dc68
de: fix integer exponentiation
moritz-gross Sep 22, 2026
c6a33fa
de: fix exponentiation by arbitrary exponents
moritz-gross Sep 22, 2026
6f24b27
de: add vector norm
moritz-gross Sep 22, 2026
11736b5
de: fix "transpose"
moritz-gross Sep 22, 2026
bb775c5
replace lamda with lambda (#789)
moritz-gross Sep 22, 2026
24eaee3
fix(pl): przywróć szablony sum i iloczynów po naprawie słowa łącząceg…
michaldziwisz Sep 22, 2026
e46e7db
Refactor/simplify prefs rs (#780)
moritz-gross Sep 22, 2026
8ef55c4
ci: add scheduled workflow to alert translators of English rule changes
Johannes-spsm Sep 8, 2026
1af0b43
Add comment to cron schedule in translator-alert.yml
moritz-gross Sep 9, 2026
6172909
de: fix "k-th root"
moritz-gross Sep 22, 2026
71f2f8a
de: fix "negativ positiv"
moritz-gross Sep 22, 2026
8ebda89
de: fix RPM singular/plural
moritz-gross Sep 22, 2026
32d7a9c
Set CRLF line endings for .rs and .yaml files
moritz-gross Sep 22, 2026
7c7f9b5
Add support for stdin, inline MathML, and default fallback
moritz-gross Sep 22, 2026
a8f2e3c
Re-add addon info to user guide
TimArborealis Sep 23, 2026
709b716
Add rule order checks and reporting for shared rule mismatches
moritz-gross Sep 23, 2026
e42aec2
fix ruff
moritz-gross Sep 23, 2026
16a830d
uv run ruff format audit_translations/
moritz-gross Sep 23, 2026
fc7d939
Refactor: Replace custom path utilities with `Path` API and update zi…
moritz-gross Sep 24, 2026
e79dda7
Refactor navigation state management: unify position and command stac…
moritz-gross Sep 24, 2026
c113028
simplify `read_prefs_file` (#808)
moritz-gross Sep 24, 2026
7764ea6
Replace `unwrap()` with `let Some(...) else` constructs for safer opt…
moritz-gross Sep 23, 2026
2b80113
simplify destructuring syntax using tuples
moritz-gross Sep 24, 2026
824cdda
use elements.rs as chemistry database
moritz-gross Sep 20, 2026
d22ed4d
fix redundant call of pref_to_string (#815)
moritz-gross Sep 25, 2026
ad0e716
clean up unused types in definitions and remove outdated docstring (#…
moritz-gross Sep 25, 2026
414a7df
remove dead functions set_string_value and set_bool_value (#819)
moritz-gross Sep 25, 2026
307109f
replace custom constructor with struct literals for TTSCommandRule (#…
moritz-gross Sep 25, 2026
6146645
Add GitHub Actions workflows to measure and report library size changes
moritz-gross Sep 26, 2026
89d018b
Refactor library size comment script to improve readability and error…
moritz-gross Sep 26, 2026
aab967c
Update README with supported and in-progress speech languages list
moritz-gross Sep 23, 2026
3bbbd44
replace buggy Display implementation for Pronounce with Debug trait (…
moritz-gross Sep 27, 2026
429cf07
define ratio (U+2236)
NSoiffer Sep 28, 2026
71f208c
added/modified comments for functions that deal with function names a…
NSoiffer Sep 29, 2026
5ad3987
Swap IntentMappings so ":" is argument glue and "|" is verbosity -- t…
NSoiffer Sep 30, 2026
762d492
shorten 'ratio' def after debugging
NSoiffer Sep 30, 2026
a3de867
fix clippy warnings (about comments)
NSoiffer Sep 30, 2026
e1692f0
Normalize tracked files to match .gitattributes (#843)
moritz-gross Sep 30, 2026
18f1cf9
Create rule coverage functionality (#834) (#845)
moritz-gross Oct 1, 2026
7aa6b6f
Rules/Languages/hu/definitions.yaml: add a new rule, based the englis…
hammera Oct 6, 2026
afe0f25
src/canonicalize.rs: apply clippy fixes with two places (#850)
hammera Oct 7, 2026
9b176b9
Fix intent detection for limits and norms (#840)
Kostenkov-2021 Oct 7, 2026
85c89a3
Improve translator alert workflow by including file links in notifica…
moritz-gross Oct 7, 2026
72e41ba
docs: create the CONTRIBUTING.md file for newcomers (#860)
AnGabSS Oct 16, 2026
4ad434d
deps: upgrade zip to 9.x (#861)
lexoliu Oct 18, 2026
793fcb7
Add lang-* and braille-* features to choose which rules include-zip e…
trypsynth Oct 18, 2026
a0c9761
Simplify `is_leaf_any_name` (#829)
moritz-gross Oct 19, 2026
7e2df54
simplify some Vector handling (#828)
moritz-gross Oct 19, 2026
95892ab
Refactor comma-check logic in `is_leaf_any_name` (#830)
moritz-gross Oct 19, 2026
b1c88f9
Merge remote-tracking branch 'upstream/main' into ru
Kostenkov-2021 Oct 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/translator-alert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,16 @@ jobs:
? Array.from(shaSet).map(sha => `- https://github.com/${context.repo.owner}/${context.repo.repo}/commit/${sha}`).join("\n")
: "(No commits specifically touched monitored files)";

const fileLinks = matchedList.map(file => {
const encodedPath = file.split("/").map(encodeURIComponent).join("/");
return `- [${file}](https://github.com/${context.repo.owner}/${context.repo.repo}/blob/${context.sha}/${encodedPath})`;
}).join("\n");

const body = `
Changes detected in english files.

Changed files:
${JSON.stringify(matchedList, null, 2)}
${fileLinks}

See changes in the commits affecting monitored files:
${commitUrls}
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ but add common mistakes of AI agents here instead.
- Common per-language files:
- `ClearSpeak_Rules.yaml`, `SimpleSpeak_Rules.yaml`
- `SharedRules/`, `unicode.yaml`, `unicode-full.yaml`, `definitions.yaml`, `navigate.yaml`
- `build.rs` can bundle rules into `rules.zip` when `include-zip` is enabled (always the minimized tree). Shared zipper: `src/rules_archive.rs`, invoked as `cargo run --bin package-rules -- Rules <output> [--minimize]`.
- `build.rs` can bundle rules into `rules.zip` when `include-zip` is enabled (always the minimized tree). The `lang-*` / `braille-*` features (all on by default via `rules-all`) choose which `Languages/` and `Braille/` directories it embeds; every rules directory needs a feature listed in `lang-all` / `braille-all`, and `build.rs` fails without one. Shared zipper: `src/rules_archive.rs`, invoked as `cargo run --bin package-rules -- Rules <output> [--minimize]`.
- CI packages `Rules.zip` (verbatim) and `Rules-minimized.zip` (comments stripped from `Languages/**/unicode.yaml` and `unicode-full.yaml` only). Each language/braille subdir is stored as `<name>/<name>.zip`; top-level and `Intent/` YAML stay loose. Inner language zips use BZIP2; the outer downloadable archive uses DEFLATE so `unzip` works. Both omit `Languages/zz`; the `test-rules-package` job restores `zz` from git after unzip so unit tests still run against release-like archives.

## Translation Conventions
Expand Down
56 changes: 56 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Contributing to MathCAT

Thanks for your interest in MathCAT! This is a short intro to get you started.
For more detail, see the [full documentation](https://daisy.github.io/MathCAT/).

## Ways to help

- **Report bugs / suggest features:** open an [issue](https://github.com/daisy/MathCAT/issues).
Include the MathML input, the output you got, and the output you expected
(the [MathCAT Demo](https://daisy.github.io/MathCATDemo/) is handy for this).
- **Code:** fixes and improvements to the Rust library (`src/`) or the rules (`Rules/`).
- **Translations:** translators have their own guide. Start with
[information for translators/rule writers](https://daisy.github.io/MathCAT/helpers.html).
If you want to add a new language, please open an issue first.

## Getting set up

1. Install [Rust](https://www.rust-lang.org/tools/install).
2. Fork and clone the repo.
3. Build and run the tests:
```bash
cargo build
cargo test
```
4. For the Python tooling (e.g. translation audits), use [uv](https://docs.astral.sh/uv/).
See [`PythonScripts/README.md`](PythonScripts/README.md).

The [Developer Guide](docs/developers.md) has more on testing and coverage.

## Pull requests

- Keep PRs focused: one fix or feature per PR.
- **Add relevant unit tests whenever it makes sense.** A bug fix should usually include
a test that would have caught it. Trivial changes (e.g. fixing a typo in a comment)
don't need one.
- Make sure `cargo test` and `cargo clippy` pass. CI runs both and treats warnings as errors.
- Don't change expected outputs (speech/braille/navigation strings) in existing tests
unless that change is the point of your PR. If so, explain why in the description.
- Link the issue your PR addresses, if there is one.

## Using AI tools

Using AI to help write code is fine. You are still responsible for what you submit:
review it, understand it, and test it.

Issues, PR descriptions, and comments should be **written by a human**. If you want to
include AI-generated text, put it in a clearly labeled block at the end, for example:

> **AI summary:** .

Nobody should have to read through walls of generated text to find out what you mean.

## Questions?

Open an issue or ask in the relevant issue/PR thread. We're happy to help.

27 changes: 23 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 40 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,49 @@ exclude = ["src/main.rs", "docs", "BrailleDocs", "PythonScripts"] # should ha


[features]
default = ["rules-all"]
"rule-coverage" = ["dep:serde_json"]
"include-zip" = []
"enable-logs" = ["android_logger"]
"tts" = [ "natural-tts" ]
"no-unsafe" = ["sxd-document-no-unsafe/no-unsafe", "sxd-xpath-no-unsafe/no-unsafe"]

# Which Rules/Languages and Rules/Braille directories `include-zip` embeds. Every one is on by default.
# To embed fewer, turn off default features and name the ones you want, for example
# `default-features = false, features = ["include-zip", "lang-en", "braille-ueb"]`.
# `en` is always embedded because the library falls back to it, and `build.rs` fails if a rules
# directory has no feature here or is missing from `lang-all` / `braille-all`.
# MathCAT itself never asks for ASCIIMath or LaTeX, but an application that copies math in those
# notations does so through the braille API, so it needs `braille-asciimath` / `braille-latex`.
# These only change what is embedded: without `include-zip`, the Rules directory is read from disk.
rules-all = ["lang-all", "braille-all"]
lang-all = ["lang-de", "lang-el", "lang-en", "lang-es", "lang-fi", "lang-fr", "lang-hu", "lang-id", "lang-nb", "lang-pl", "lang-pt", "lang-ru", "lang-sv", "lang-vi", "lang-zh"]
braille-all = ["braille-asciimath", "braille-cmu", "braille-french", "braille-latex", "braille-nemeth", "braille-russian", "braille-swedish", "braille-ueb", "braille-vietnam"]
lang-de = []
lang-el = []
lang-en = []
lang-es = []
lang-fi = []
lang-fr = []
lang-hu = []
lang-id = []
lang-nb = []
lang-pl = []
lang-pt = []
lang-ru = []
lang-sv = []
lang-vi = []
lang-zh = []
braille-asciimath = []
braille-cmu = []
braille-french = []
braille-latex = []
braille-nemeth = []
braille-russian = []
braille-swedish = []
braille-ueb = []
braille-vietnam = []


[dependencies]
sxd-document-no-unsafe = "0.4.2"
Expand All @@ -44,16 +81,16 @@ elements_rs = { version = "0.2.8", default-features = false }

# Runtime extracts inner language/braille zips (BZIP2). The package-rules binary also
# writes DEFLATE outer archives for Windows/unzip-compatible Rules.zip downloads.
# wasm uses the same features: zip 8.x bzip2 is pure Rust (libbz2-rs-sys), not clang C.
zip = { version = "8.2", default-features = false, features = ["deflate", "bzip2"] }
# wasm uses the same features: zip 9.x bzip2 is pure Rust (libbz2-rs-sys), not clang C.
zip = { version = "9.0", default-features = false, features = ["deflate", "bzip2"] }

android_logger = {version = "0.15.1", optional = true}
natural-tts = { version = "0.3.1", optional = true }

[build-dependencies]
bitflags = "2.6"
yaml-rust = "0.4"
zip = { version = "8.2", default-features = false, features = ["deflate", "bzip2"] }
zip = { version = "9.0", default-features = false, features = ["deflate", "bzip2"] }

[dev-dependencies]
tempfile = "3.23"
Expand Down
18 changes: 17 additions & 1 deletion Rules/Intent/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
-
name: limit
tag: [msub, munder]
variables: [NoSpacesBase: "translate(*[1], ' \u00A0\u2004\u2005\u2006\u2007\u2008\u2009\u200A','')"] # Sometimes these have (weird) spaces in them
variables: [NoSpacesBase: "translate(*[1], ' \u00A0\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2061','')"] # Sometimes these have spaces or an invisible function-application character in them
match: "*[1][$NoSpacesBase='lim' or $NoSpacesBase='limsup' or $NoSpacesBase='liminf']"
replace:
- intent:
Expand Down Expand Up @@ -809,6 +809,22 @@
variables: [TableProperty: "'determinant'"]
replace: [x: "*[2]"]

-
# TeX's gathered environment is one derivation split across display lines,
# not a system whose rows are independent equations.
name: mtable-gathered-property
tag: mtable
match: "contains(concat(' ', normalize-space(@class), ' '), ' gathered ')"
replace:
- with:
variables:
- TableProperty: "'lines'"
replace:
- intent:
name: "lines"
children:
- x: "*"

-
name: mtable-equations-property
tag: mtable
Expand Down
43 changes: 43 additions & 0 deletions Rules/Intent/linear-algebra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,49 @@
- x: "*[1]/*[2]" # grab the contents of the bracketed expr
- x: "*[2]"

-
# TeX4ht commonly attaches the norm's subscript to the closing bar only:
# <mrow><mo>∥</mo>...<msub><mo>∥</mo><mi>p</mi></msub></mrow>.
name: norm-with-subscripted-closing-bar
tag: mrow
match:
- "count(*) >= 3 and *[1][.='∥'] and *[last()][self::m:msub and *[1][.='∥']]"
replace:
- intent:
name: "subscripted-norm"
attrs: "data-intent-property='concat(data-intent-property, \":function:\")'"
children:
- x: "*[position() > 1 and position() < last()]"
- x: "*[last()]/*[2]"

-
# The same TeX4ht shape can use two ordinary vertical bars for each double bar.
name: norm-with-doubled-bars-and-subscripted-closing-bar
tag: mrow
match:
- "count(*) >= 5 and *[1][.='|'] and *[2][.='|'] and *[last()-1][.='|'] and *[last()][self::m:msub and *[1][.='|']]"
replace:
- intent:
name: "subscripted-norm"
attrs: "data-intent-property='concat(data-intent-property, \":function:\")'"
children:
- x: "*[position() > 2 and position() < last()-1]"
- x: "*[last()]/*[2]"

-
# Canonicalization groups ||x||_p as an indexed row containing a nested |x|.
name: norm-with-canonicalized-doubled-bars
tag: msub
match:
- "*[1][self::m:mrow and count(*)=3 and *[1][.='|'] and *[2][self::m:mrow and IsBracketed(., '|', '|')] and *[3][.='|']]"
replace:
- intent:
name: "subscripted-norm"
attrs: "data-intent-property='concat(data-intent-property, \":function:\")'"
children:
- x: "*[1]/*[2]/*[2]"
- x: "*[2]"

-
name: vector-magnitude
tag: mrow
Expand Down
38 changes: 21 additions & 17 deletions Rules/Languages/hu/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@
## Other : Not tested, don't appear in https://w3c.github.io/mathml-docs/intent-core-concepts/
"modified-variable": "silent= "
}
# The connector word to say for functional 'IntentMappings' (in English, "of")
# This is likely the word used for U+2061 in unicode.yaml, but for technical reasons needs to be defined here
# vector of length=1 because scalars not supported
- FunctionApplicationWord: ["a(z)"]

# Names of functions that in terse mode don't say "of" (or it's equivalent in other languages)
- TerseFunctionNames: {
Expand All @@ -359,30 +363,30 @@

- NavigationParts: {
# These are the parts of a formula that can be navigated to
"large-op": "base; lower limit; upper limit",
"mfrac": "numerator; denominator",
"large-op": "alap; alsó határ; felső határ",
"mfrac": "számláló; nevező",
"fraction": "számláló; nevező",
"msqrt": "gyök",
"square-root": "gyök",
"mroot": "root; root index",
"mroot": "gyök; gyök index",
"root": "gyök; gyök index",
"msub": "base; subscript",
"sub": "base; subscript",
"logarithm-with-base": "base",
"indexed-by": "base; subscript",
"msup": "base; superscript",
"say-super": "base; superscript",
"skip-super": "base; superscript",
"power": "base; exponent",
"msubsup": "base; subscript; superscript",
"munder": "base; under limit",
"mover": "base; upper limit",
"munderover": "base; under limit; upper limit",
"msub": "alap; alsó index",
"sub": "alap; alsó index",
"logarithm-with-base": "alap logaritmus",
"indexed-by": "alap; alsó index",
"msup": "alap; felső index",
"say-super": "alap; felső index",
"skip-super": "alap; felső index",
"power": "alap; kitevő",
"msubsup": "alap; alsó index; felső index",
"munder": "alap; határérték alatt",
"mover": "alap; határérték felett",
"munderover": "alap; határérték alatt; határérték felett",

# words for moving into and out of one of the parts (e.g., "move right 'out of' numerator, 'in' denominator")
# it's a hack to put them here, but at least they are grouped with the other navigation parts
"in": "in",
"out": "out of",
"in": "ban/ben",
"out": "ki",
}

- KnownWords: {
Expand Down
Loading
Loading