Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ version = "0.7.7-alpha.1"
authors = ["Neil Soiffer <soiffer@alum.mit.edu>"]
license = "MIT"
description = "MathCAT: Math Capable Assistive Technology ('Speech and braille from MathML')"
repository = "https://github.com/NSoiffer/MathCAT"
homepage = "https://nsoiffer.github.io/MathCAT/"
documentation = "https://nsoiffer.github.io/MathCAT/"
repository = "https://github.com/daisy/MathCAT"
homepage = "https://daisy.github.io/MathCAT/"
documentation = "https://daisy.github.io/MathCAT/"
edition = "2024"
exclude = ["src/main.rs", "docs", "BrailleDocs", "PythonScripts"] # should have "Rules/", but then one can't run build.rs to build the zip file

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ There are four related projects that make use of MathCAT:

MathCAT is used in many assistive technologies including NVDA and JAWS.

For more information, see the [full documentation](https://nsoiffer.github.io/MathCAT/).
For more information, see the [full documentation](https://daisy.github.io/MathCAT/).
2 changes: 1 addition & 1 deletion Rules/Braille/ASCIIMath/ASCIIMath_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
# FIX: what should be output
name: mhchem-hack
# this captures the output for the mhchem's "<=>", "<<=>", and "<=>>" output (there are no Unicode arrows for them)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/NSoiffer/MathCAT/issues/60)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/daisy/MathCAT/issues/60)
tag: mover
match:
- "*[1][substring(., 1, 1)='↽'] and"
Expand Down
2 changes: 1 addition & 1 deletion Rules/Braille/French/French_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
-
name: mhchem-hack
# this captures the output for the mhchem's "<=>", "<<=>", and "<=>>" output (there are no Unicode arrows for them)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/NSoiffer/MathCAT/issues/60)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/daisy/MathCAT/issues/60)
tag: mover
match:
- "*[1][substring(., 1, 1)='↽'] and"
Expand Down
2 changes: 1 addition & 1 deletion Rules/Braille/LaTeX/LaTeX_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
# FIX: what should be output
name: mhchem-hack
# this captures the output for the mhchem's "<=>", "<<=>", and "<=>>" output (there are no Unicode arrows for them)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/NSoiffer/MathCAT/issues/60)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/daisy/MathCAT/issues/60)
tag: mover
match:
- "*[1][substring(., 1, 1)='↽'] and"
Expand Down
4 changes: 2 additions & 2 deletions Rules/Braille/Nemeth/Nemeth_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
replace:
- test:
if: "preceding-sibling::*"
then: [t: "W⣍"] # github.com/NSoiffer/MathCAT/issues/43#issuecomment-1297048039
then: [t: "W⣍"] # github.com/daisy/MathCAT/issues/43#issuecomment-1297048039
- test:
if: .[self::m:mlabeledtr]
then: [x: "*[position()>1]"]
Expand Down Expand Up @@ -900,7 +900,7 @@

-
# this captures the output for the mhchem's "<=>", "<<=>", and "<=>>" output (there are no Unicode arrows for them)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/NSoiffer/MathCAT/issues/60)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/daisy/MathCAT/issues/60)
name: chemistry-mhchem-equilibrium-arrow
tag: mover
match:
Expand Down
2 changes: 1 addition & 1 deletion Rules/Braille/Swedish/Swedish_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
-
name: mhchem-hack
# this captures the output for the mhchem's "<=>", "<<=>", and "<=>>" output (there are no Unicode arrows for them)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/NSoiffer/MathCAT/issues/60)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/daisy/MathCAT/issues/60)
tag: mover
match:
- "*[1][substring(., 1, 1)='↽'] and"
Expand Down
2 changes: 1 addition & 1 deletion Rules/Braille/UEB/UEB_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
-
name: mhchem-hack
# this captures the output for the mhchem's "<=>", "<<=>", and "<=>>" output (there are no Unicode arrows for them)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/NSoiffer/MathCAT/issues/60)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/daisy/MathCAT/issues/60)
tag: mover
match:
- "*[1][substring(., 1, 1)='↽'] and"
Expand Down
2 changes: 1 addition & 1 deletion Rules/Braille/Vietnam/Vietnam_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@

-
# this captures the output for the mhchem's "<=>", "<<=>", and "<=>>" output (there are no Unicode arrows for them)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/NSoiffer/MathCAT/issues/60)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/daisy/MathCAT/issues/60)
name: chemistry-mhchem-equilibrium-arrow
tag: mover
match:
Expand Down
2 changes: 1 addition & 1 deletion Rules/Intent/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@

-
# this captures the output for the mhchem's "<=>", "<<=>", and "<=>>" output (there are no Unicode arrows for them)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/NSoiffer/MathCAT/issues/60)
# this isn't a perfect match, but should be good enough and allows merging all three (see github.com/daisy/MathCAT/issues/60)
name: chemistry-mhchem-equilibrium-arrow
tag: mover
match:
Expand Down
2 changes: 1 addition & 1 deletion docs/helpers_old.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This page is a work-in-progress.

## Getting Started
If you plan to work on MathCAT development, you need to make use of github:
1. Fork the MathCAT repo at `github.com/NSoiffer/MathCAT`
1. Fork the MathCAT repo at `github.com/daisy/MathCAT`
2. Clone the forked copy so you have a local copy to work on.
3. Checkout the branch I create for your work (typically the country code for your translation) and work in that branch.

Expand Down
2 changes: 1 addition & 1 deletion docs/ru/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Руководство переводчика и разработчика

## Начало работы
Если вы планируете участвовать в разработке MathCAT, используйте GitHub:
1. Создайте форк репозитория MathCAT `github.com/NSoiffer/MathCAT`.
1. Создайте форк репозитория MathCAT `github.com/daisy/MathCAT`.
2. Клонируйте форк, чтобы получить локальную копию для работы.
3. Переключитесь на созданную для вашей работы ветку, обычно названную кодом языка перевода, и работайте в ней.

Expand Down
2 changes: 1 addition & 1 deletion src/canonicalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2083,7 +2083,7 @@ impl CanonicalizeContext {
fn merge_number_blocks(context: &CanonicalizeContext, parent_mrow: Element, children: &mut Vec<ChildOfElement>) {
// debug!("parent:\n{}", mml_to_string(parent_mrow));
// If we find a comma that is not part of a number, don't form a number
// (see https://github.com/NSoiffer/MathCAT/issues/271)
// (see https://github.com/daisy/MathCAT/issues/271)
// Unfortunately, we can't do this in the loop below because we might discover the "not part of a number" after a number has been formed
let do_not_merge_comma = is_comma_not_part_of_a_number(children);
let mut i = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/chemistry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ fn likely_chem_equation_operator(mathml: Element) -> i32 {
return -3; // there is still a chance

/// Detects output of mhchem for some equilibrium arrows that currently (11/22) don't have Unicode points
/// See github.com/NSoiffer/MathCAT/issues/60 for the patterns being matched
/// See github.com/daisy/MathCAT/issues/60 for the patterns being matched
fn is_hack_for_missing_arrows(mover: Element) -> bool {
assert_eq!(name(mover), "mover");
let children = mover.children();
Expand Down
2 changes: 1 addition & 1 deletion src/navigate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ fn key_press_to_command_and_param(
// key press mapping should probably be stored externally (registry) with an app that allows changes
// for now, we build in the defaults

// this is a hack to map alt+ctl+arrow to ctl+arrow to change table mappings (github.com/NSoiffer/MathCAT/issues/105)
// this is a hack to map alt+ctl+arrow to ctl+arrow to change table mappings (github.com/daisy/MathCAT/issues/105)
// if this change sticks, choose_command() needs to be changed and this hack should go away
let mut alt_key = alt_key;
if alt_key && control_key && [VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN].contains(&key) {
Expand Down
2 changes: 1 addition & 1 deletion src/speech.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ fn speak_rules(rules: &'static std::thread::LocalKey<RefCell<SpeechRules>>, math
// debug!("Speech string: {}", speech_string);
// Note: [[...]] is added around a matching child, but if the "id" is on 'mathml', the whole string is used
if !rules_with_context.nav_node_id.is_empty() {
// See https://github.com/NSoiffer/MathCAT/issues/174 for why we can just start the speech at the nav node
// See https://github.com/daisy/MathCAT/issues/174 for why we can just start the speech at the nav node
let raw_intent_attr = mathml.attribute_value("data-intent-property");
let intent_attr = raw_intent_attr.as_deref().unwrap_or_default();
if let Some(start) = speech_string.find("[[") {
Expand Down
2 changes: 1 addition & 1 deletion src/xpath_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,7 @@ mod tests {
test_is_not_simple("-x y z",
"<mrow><mrow><mo>-</mo><mi>x</mi></mrow>
<mo>&#x2062;</mo><mi>y</mi><mo>&#x2062;</mo><mi>z</mi></mrow>")?;
test_is_not_simple("C(-2,1,4)", // github.com/NSoiffer/MathCAT/issues/199
test_is_not_simple("C(-2,1,4)", // github.com/daisy/MathCAT/issues/199
"<mrow><mi>C</mi><mrow><mo>(</mo><mo>−</mo><mn>2</mn><mo>,</mo><mn>1</mn><mo>,</mo><mn>4</mn><mo>)</mo></mrow></mrow>")?;
return Ok( () );
});
Expand Down
14 changes: 7 additions & 7 deletions tests/braille/Nemeth/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use anyhow::Result;

#[test]
fn not_number_space_blocks() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/144
// https://github.com/daisy/MathCAT/issues/144
let expr = "<math><mn>123</mn><mtext>&nbsp;&#x2063;</mtext><mn>456</mn></math>";
test_braille("Nemeth", expr, "⠼⠂⠆⠒⠀⠼⠲⠢⠖")?;
return Ok(());
Expand All @@ -14,7 +14,7 @@ fn not_number_space_blocks() -> Result<()> {

#[test]
fn space_between_digits() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/144
// https://github.com/daisy/MathCAT/issues/144
let expr = "<math><mn>1</mn><mtext>&#x00a0;</mtext><mn>3</mn><mtext>&#x00a0;</mtext><mn>5</mn></math>";
test_braille("Nemeth", expr, "⠼⠂⠀⠼⠒⠀⠼⠢")?;
return Ok(());
Expand All @@ -23,7 +23,7 @@ fn space_between_digits() -> Result<()> {

#[test]
fn space_hack_between_digits() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/144
// https://github.com/daisy/MathCAT/issues/144
let expr = "<math><mn>1</mn><mtext>&#x00a0;&#x2063;</mtext><mn>3</mn><mtext>&#x00a0;&#x2063;</mtext><mn>5</mn></math>";
test_braille("Nemeth", expr, "⠼⠂⠀⠼⠒⠀⠼⠢")?;
return Ok(());
Expand All @@ -32,7 +32,7 @@ fn space_hack_between_digits() -> Result<()> {

#[test]
fn tilde_prefix_bug_244() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/244
// https://github.com/daisy/MathCAT/issues/244
let expr = "<math> <mo>~</mo> <mi>p</mi> </math>";
test_braille("Nemeth", expr, "⠈⠱⠏")?;
return Ok(());
Expand All @@ -41,7 +41,7 @@ fn tilde_prefix_bug_244() -> Result<()> {

#[test]
fn double_struck_bug_334() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/334 -- double struck was problem (⠼ was missing); test all of the scripted numbers here
// https://github.com/daisy/MathCAT/issues/334 -- double struck was problem (⠼ was missing); test all of the scripted numbers here
let expr = "<math><mn>𝟙</mn><mo>,</mo><mn>𝟐</mn><mo>,</mo><mn>𝟯</mn><mo>,</mo><mn>𝟺</mn></math>";
test_braille("Nemeth", expr, "⠠⠸⠼⠂⠠⠀⠸⠼⠆⠠⠀⠠⠨⠸⠼⠒⠠⠀⠼⠲")?;
return Ok(());
Expand All @@ -50,7 +50,7 @@ fn double_struck_bug_334() -> Result<()> {

#[test]
fn extra_indicators_bug_343() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/343 -- extra indicators before baseline indicator due to -x^2, not there for x^2
// https://github.com/daisy/MathCAT/issues/343 -- extra indicators before baseline indicator due to -x^2, not there for x^2
let expr = "<math xmlns='http://www.w3.org/1998/Math/MathML'>
<mrow>
<msup>
Expand Down Expand Up @@ -78,7 +78,7 @@ fn extra_indicators_bug_343() -> Result<()> {

#[test]
fn find_baseline_indicator_bug_364() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/364
// https://github.com/daisy/MathCAT/issues/364
let expr = r#" <math id='id-0'>
<mrow data-changed='added' id='id-1'>
<mi id='id-2'>π</mi>
Expand Down
6 changes: 3 additions & 3 deletions tests/braille/Nemeth/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn test_9_b_4() -> Result<()> {
}
#[test]
fn test_9_c_1_linear() -> Result<()> {
// see https://github.com/NSoiffer/MathCAT/issues/43 for discussion on linear layout
// see https://github.com/daisy/MathCAT/issues/43 for discussion on linear layout
let expr = "<math><mo>|</mo><mtable>
<mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd></mtr>
<mtr><mtd><mo>-</mo><mn>3</mn></mtd><mtd><mo>-</mo><mn>4</mn></mtd></mtr>
Expand Down Expand Up @@ -1763,7 +1763,7 @@ fn racket_below_121_4() -> Result<()> {

#[test]
fn identity_matrix_126_linearize() -> Result<()> {
// see https://github.com/NSoiffer/MathCAT/issues/43 for discussion on linear layout
// see https://github.com/daisy/MathCAT/issues/43 for discussion on linear layout
let expr = "<math> <mrow><mo>(</mo> <mtable>
<mtr><mtd><mn>1</mn></mtd><mtd><mn>0</mn></mtd><mtd><mn>0</mn></mtd></mtr>
<mtr><mtd><mn>0</mn></mtd><mtd><mn>1</mn></mtd><mtd><mn>0</mn></mtd></mtr>
Expand Down Expand Up @@ -2203,7 +2203,7 @@ fn tensor_from_mathml_spec() -> Result<()> {
<mi>l</mi> <none></none>
</mmultiscripts>
</math>";
// Note: the braille answer was verified to be correct (see https://github.com/NSoiffer/MathCAT/issues/55)
// Note: the braille answer was verified to be correct (see https://github.com/daisy/MathCAT/issues/55)
test_braille("Nemeth", expr, "⠠⠗⠰⠊⠐⠘⠚⠐⠰⠅⠐⠰⠇")?;
return Ok(());
}
Expand Down
2 changes: 1 addition & 1 deletion tests/braille/UEB/iceb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ fn ratio_3_2_6() -> Result<()> {

#[test]
fn standing_alone_1() -> Result<()> {
// Tests bug: github.com/NSoiffer/MathCAT/issues/142
// Tests bug: github.com/daisy/MathCAT/issues/142
let expr = "<math><mo>(</mo><mi>n</mi><mo>=</mo><mn>7</mn><mo>)</mo></math>";
test_braille("UEB", expr, "⠐⠣⠰⠝⠀⠐⠶⠀⠼⠛⠐⠜")?;
return Ok(());
Expand Down
10 changes: 5 additions & 5 deletions tests/braille/UEB/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn number_space_before_and_after() -> Result<()> {

#[test]
fn not_number_space_blocks() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/144
// https://github.com/daisy/MathCAT/issues/144
let expr = "<math><mn>123</mn><mtext>&nbsp;&#x2063;</mtext><mn>456</mn></math>";
test_braille("UEB", expr, "⠼⠁⠃⠉⠀⠼⠙⠑⠋")?;
return Ok(());
Expand All @@ -81,7 +81,7 @@ fn not_number_space_blocks() -> Result<()> {

#[test]
fn dot_above_bug_204() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/204
// https://github.com/daisy/MathCAT/issues/204
let expr = "<math> <mn>0.</mn> <mover> <mn>6</mn> <mo>&middot;</mo> </mover> </math>";
test_braille("UEB", expr, "⠼⠚⠲⠣⠼⠋⠜⠘⠲")?;
return Ok(());
Expand All @@ -90,7 +90,7 @@ fn dot_above_bug_204() -> Result<()> {

#[test]
fn tilde_prefix_bug_244() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/244
// https://github.com/daisy/MathCAT/issues/244
let expr = "<math> <mo>~</mo> <mi>p</mi> </math>";
test_braille("UEB", expr, "⠈⠔⠏")?;
return Ok(());
Expand All @@ -109,7 +109,7 @@ fn double_tilde_prefix_bug_244() -> Result<()> {

#[test]
fn space_hack_between_digits() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/144
// https://github.com/daisy/MathCAT/issues/144
let expr = "<math><mn>1</mn><mtext>&#x00a0;&#x2063;</mtext><mn>3</mn><mtext>&#x00a0;&#x2063;</mtext><mn>5</mn></math>";
test_braille("UEB", expr, "⠼⠁⠀⠼⠉⠀⠼⠑")?;
return Ok(());
Expand All @@ -118,7 +118,7 @@ fn space_hack_between_digits() -> Result<()> {

#[test]
fn space_hack_around_operator() -> Result<()> {
// https://github.com/NSoiffer/MathCAT/issues/144
// https://github.com/daisy/MathCAT/issues/144
let expr = "<math><mi>y</mi><mtext>&#x00a0;&#x2063;</mtext><mo>=</mo><mtext>&#x00a0;&#x2063;</mtext><mn>5</mn></math>";
test_braille("UEB", expr, "⠰⠽⠀⠐⠶⠀⠼⠑")?;
return Ok(());
Expand Down