Skip to content

additional fix to #17984 (MathML attrs in PDF)#18508

Merged
seanbudd merged 5 commits into
nvaccess:masterfrom
NSoiffer:master
Jul 24, 2025
Merged

additional fix to #17984 (MathML attrs in PDF)#18508
seanbudd merged 5 commits into
nvaccess:masterfrom
NSoiffer:master

Conversation

@NSoiffer

@NSoiffer NSoiffer commented Jul 19, 2025

Copy link
Copy Markdown
Contributor

This is an additional fix to #17984. I missed @width on mspace. It isn't used in speech (although maybe it should trigger a pause if wide), but it is used in some braille notations as a signal that this is a "fill in the blank" space. For my original fixed, I only looked at what was used in speech for MathCAT.

I also added the elementary math attributes used in MathPlayer. Neither MathCAT nor Access8Math currently support the elementary math notations, but it is on the list of things to implement for MathCAT.

Note: potentially this could go into the beta, but I can't get the beta to build on my machine so I can't test the fix there.

Link to issue number:

Closes #17984 (again)

Summary of the issue:

Acrobat's interface doesn't allow code to get all the attributes; they need to be queried individually. I missed an attribute that is relevant for some braille math codes.

Description of user facing changes:

Affects some math braille code output, such as Nemeth code.

Description of developer facing changes:

None.

Description of development approach:

Added some more cases for other math elements

Testing strategy:

Tested mspace with stem-article-2col-se-1.pdf. In section 2.1, there is $n^p ≡ n \mod {p}$, with a large space after the $n$. In MathCAT's Nemeth code output, this results in a blank braille char between $n$ and $\rm{mod}$.

Note: this is a minor bug in MathCAT because in fact, there shouldn't be a space. However, the very wide space triggers the "fill in the blank" interpretation. This came from LaTeX output; I've asked them to fix this so it isn't interpreted as "fill in the blank". However, the attached PDF serves as a good test that the fix works.

AFAIK, there are currently no PDFs that generate MathML's elementary math notation.

Known issues with pull request:

None

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

NSoiffer added 2 commits July 19, 2025 14:32
…ce`. It isn't used in speech (although maybe it should trigger a pause if wide), but it is used in some braille notations as a signal that this is a "fill in the blank" space.

I also added the elementary math attributes used in MathPlayer. Neither MathCAT nor Access8Math currently support the elementary math notations, but it is on the list of things to implement for MathCAT.

Note: potentially this could go into the beta, but I can't get the beta to build on my machine so I can't test the fix there.
@NSoiffer NSoiffer requested a review from a team as a code owner July 19, 2025 22:05
@NSoiffer NSoiffer requested a review from SaschaCowley July 19, 2025 22:05
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 09ce034112

Comment thread user_docs/en/changes.md Outdated

@seanbudd seanbudd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SaschaCowley - do you think this should go into 2024.2 beta?

@SaschaCowley

SaschaCowley commented Jul 21, 2025

Copy link
Copy Markdown
Member

@seanbudd I don't think so - it doesn't sound like this fixes a regression or high severity issue

@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Jul 22, 2025
@NSoiffer

Copy link
Copy Markdown
Contributor Author

The missing attrs fix is pretty obscure and has very little effect. The escaping problem (which is unfortunately slightly tied to this because I messed up my checkout) is less obscure because < will likely show up in math. I think should go into the beta (it is a one-liner). As mentioned before, I can't get the beta to build on my machine, so I can't do a PR for it.

Comment thread user_docs/en/changes.md Outdated
@seanbudd seanbudd enabled auto-merge (squash) July 24, 2025 00:30
@seanbudd seanbudd merged commit 21540a6 into nvaccess:master Jul 24, 2025
20 checks passed
@SaschaCowley SaschaCowley added this to the 2025.3 milestone Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants