Skip to content

Update Spanish speech rules to match English - #945

Open
pablgonz wants to merge 36 commits into
daisy:mainfrom
pablgonz:es
Open

pablgonz wants to merge 36 commits into
daisy:mainfrom
pablgonz:es

Conversation

@pablgonz

@pablgonz pablgonz commented Nov 4, 2026 •

Copy link
Copy Markdown

I'm now coordinating the Spanish translation, as agreed with Noelia (@nvdaes) in #940. This is the first of two PRs.

Brings Rules/Languages/es up to date with the English rules and enables the Spanish tests. Only Spanish files are touched, plus the line in tests/languages.rs that turns the tests on.

Some readings on main, before and after (ClearSpeak, medium verbosity):

LaTeX before after
\lim_{x \to 0^{-}} f(x) lím con x flecha derecha, 0 superíndice menos, abajo; f de x el límite cuando x tiende a 0 por la izquierda, de f de x
\sum_{i=1}^{n} i el suma de i es igual a 1 a n de i la suma desde i es igual a 1, hasta n de i
x^{21} x a la veinte primero potencia x elevado a 21
\sqrt[n]{x} el n-th raíz de x la raíz n-ésima de x
\frac{5}{8} 5 ochos 5 octavos
\mathbb{Q}^{+} la positivo números racionales los números racionales positivos
\lvert x \rvert el absolute value de x el valor absoluto de x
\nabla \cdot \mathbf{F} div of f divergencia de f
\lVert f \rVert_{p} magnitude de f subíndice p la norma p de f
2 \cdot 5 2 punto 5 2 por 5
a \mid b a divisible b a divide a b
\arcsen x arc de sen, x arcosen de x
5\,\mathrm{lx} 5 luxs 5 lux
  • Structure: definitions.yaml, SharedRules, ClearSpeak_Rules.yaml, SimpleSpeak_Rules.yaml, overview.yaml, unicode.yaml and unicode-full.yaml follow the English files. The audit reports no missing rules or unreviewed text, except navigate.yaml, which will come in a separate PR.
  • Spanish additions: gender (la suma, el producto, tangente inversa), plurals of units, Spanish function names (sen, tg, arcsen, lím, máx...), one-sided limits.
  • Tests: 584 Spanish tests, copied from English plus Spanish-only cases. cargo test passes.
  • Temporary workaround: babel writes \arcsen as arc\,sen, and merge_arc_trig doesn't join arc with the function when there is a space in between (English has the same problem with arc\,cos). A rule in general.yaml handles it for Spanish and is marked to be removed once the code is fixed. I'll open an issue for that.

Listened with NVDA 2026.3 and the MathCAT 0.7.7 add-on; the readings match the tests.

Next: a second PR with navigate.yaml and its tests, and a few issues for things that affect all languages (found while doing this one).

For those curious about tagging PDF, here is a test using Windows 11, NVDA 2026.3, and an updated version of Acrobat.
mathcat-es-readings.pdf
mathcat-es-readings.txt

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant