NSoiffer / MathCATForPython

A Python Interface and NVDA plugin to MathCAT
MIT License
7 stars 7 forks source link

Do not line break for a new Math block when screen layout is on #49

Closed bhavyashah closed 1 year ago

bhavyashah commented 1 year ago

It seems like each Math block gets its own line - or at least that is how NVDA seems to be rendering it to me - even though I suspect that visually, sighted students see them as one flowing paragraph. While it can often be useful to have the Math content spread out across a few lines for sake of digestability, but when each Math block is just a1, a2 a3, or another relatively trivial expressions, it seems counter-productive to have to arrow so much to re-read that text. I envision this to behave like links when screen layout is toggled; when screen layout is off, all Math blocks get their own line and when it is on, multiple Math blocks may be rendered on the same line as they appear visually.

NSoiffer commented 1 year ago

I believe this is an NVDA level issue, but I need to look into it more to be sure. NVDA does seem to stop when it comes to most math (but not all).

In any case, the problem lies with either NVDA or the python interface, so I'm going to transfer this to the appropriate project.

NSoiffer commented 1 year ago

The problem seems to have gone away with this preliminary build of MathCAT 0.3.0. Please let me know if that is the case for you.

If it isn't, reopen this issue.

bhavyashah commented 1 year ago

Yes, I am no longer facing this issue in the new build - thanks for pointing this out!

NSoiffer commented 1 year ago

I tried a few other pages and they were hit or miss -- sometimes it stopped at inline equations and sometimes not. For bigger equations, it was more likely to stop. This might have something to do NVDA's preference "Maximum number of characters on one line" (under "Browse Mode" in settings panel). With math, there is a lot of SSML generated around some characters and maybe NVDA is counting all of the markup.

If you run into the problem, it would be really helpful if you played with this option to see if it effects the stopping. If so, let me know and I'll dig into the NVDA and see if I can figure out whether a bug report needs to be filed. Thanks.

bhavyashah commented 1 year ago

The issue persists with consistency. I maxed out the "Maximum Number of Characters on One Line" that is 250, and that did not help with any of my Math blocks and the line break before and after each (including short expressions like $X=1$). If I configure that option to something low like 10, long words like "probability" get split across lines but somewhat long Math expressions like $P(X=k)=q^{k-1} p$ stay intact and occupy their own line as usual.