RE: Word Wrapping Mathematical Formulas

As an anecdote, my email client displayed that formula across 3 lines, breaking it seemingly at random, like this:
=SUM(SUMIFS(D$3:D$28,B$3:B$28,D42)+SUMIFS(E$3:E$28,B$3:B$28,E4
2)+SUMIFS(F$3:F$28,B$3:B$28,F42)+SUMIFS(G$3:G$28,B$3:B$28,G42)+
SUMIFS(H$3:H$28,B$3:B$28,H42))

The line break after the plus works well. The break in the middle of a coordinate (“E42”) so that it could easily be misread as E4, not so much. But then, navigating by arrow or visually scanning, I was able to infer the break relatively easily, this time.

So I agree this comes down to the user agent display. It looks like there is facility in CSS to put in soft hyphens, but I do not think it’s reasonable to expect authors to go through every formula they have and designate possible breaks. That seems something easily handle by a user-agent algorithm, so I think UAAG is the appropriate place to tackle, not WCAG.

Mike

From: Wayne Dick <wayneedick@gmail.com>
Date: Wednesday, July 5, 2023 at 2:07 PM
To: Michael Gower <michael.gower@ca.ibm.com>
Cc: W3C WAI ig <w3c-wai-ig@w3.org>
Subject: [EXTERNAL] Re: Word Wrapping Mathematical Formulas
I'll have to write out the code. I am really thinking this is more of an authoring tool transformation. The main idea is to break up an expression into multiple expressions that will pack as tightly as line space enables. An individual
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
    Report Suspicious  <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/PjiDSg!12-vrJE15piW1AkV8Y8lxsyUqoa5vraRw4JkDrLIVQM2Ixjl6BhemBWCxBGHdnQngjUhnjou7Ntc4R6OZ0sLJZsp7RucqXGDQXFakreKhhvVf-UgYcweQx9wFXaZr8A$>   ‌
ZjQcmQRYFpfptBannerEnd
I'll have to write out the code. I am really thinking this is more of an authoring tool transformation. The main idea is to break up an expression into multiple expressions that will pack as  tightly as line space enables. An individual can break a very long expression at obvious points like relational symbols, =, <, >, \leq, \geq, \neq etc. This should suffice, but there are also higher precedence operators like +, -, | for extremely long expressions. I'll code some expressions in LaTeX and MathML this week and post them next week.
Best, Wayne

On Wed, Jul 5, 2023 at 8:19 AM Michael Gower <michael.gower@ca.ibm.com<mailto:michael.gower@ca.ibm.com>> wrote:
If a formula is presented as a contiguous string of numbers and symbols with no spaces, then doesn’t your desire for no scrolling entirely depend on the hyphenation rules for formula within whatever user agent is being employed?
For instance, here’s an excel formula (no unusual math symbols involved).
=SUM(SUMIFS(D$3:D$28,B$3:B$28,D42)+SUMIFS(E$3:E$28,B$3:B$28,E42)+SUMIFS(F$3:F$28,B$3:B$28,F42)+SUMIFS(G$3:G$28,B$3:B$28,G42)+SUMIFS(H$3:H$28,B$3:B$28,H42))

My guess is that almost everyone’s email client is going to display that as a single line that is going to require scrolling – and that it would be dangerous if this was either wrapped onto two lines with hyphenation (which could be mistaken for a minus sign) or without (where if it coincided with closing parenthesis, it could seem like the end of the formula).

So, to me, you are only going to be able to display an entire formula at 400%, where the formula in question is shorter than however many characters you see on your system within your viewport.

Maybe it’s different for ‘real’ math’ formula? Didn’t do math past grade 12 algebra 😊

Mike
From: Wayne Dick <wayneedick@gmail.com<mailto:wayneedick@gmail.com>>
Date: Thursday, June 29, 2023 at 12:56 PM
To: W3C WAI ig <w3c-wai-ig@w3.org<mailto:w3c-wai-ig@w3.org>>
Subject: [EXTERNAL] Word Wrapping Mathematical Formulas
There is a prevalent but incorrect belief that mathematical formulas are images. Many web pages depict them as images. But  mathematical  formulas are language, albeit 2-dimensional language, but language. Mathematical symbols are text. Thus
ZjQcmQRYFpfptBannerStart
This Message Is From an Untrusted Sender
You have not previously corresponded with this sender.
    Report Suspicious  <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/PjiDSg!12-vrJE15piW1GlS2SGLpCaHiLN6xPNpMWNrRro8UH4mO2wfqu0pvqB3Jpahxmiqotx1117xnEgDwaco6cRl2sDERmWDZoOjx1sC8UKSmCCfcXoj64Ui-IP9MqClikM$>   ‌
ZjQcmQRYFpfptBannerEnd
There is a prevalent but incorrect belief that mathematical formulas are images. Many web pages depict them as images. But  mathematical  formulas are language, albeit 2-dimensional language, but language. Mathematical symbols are text. Thus a page that allows mathematics to  run off  the screen should be cited  as an example of  an SC 1.4.10 failure. It is not an image exception. There are numerous places where line breaks can be inserted. For example the symbols =, < are > that occur on the main line of a formula are clear examples. The guide should be that whenever possible a person should be able to see an entire formula at  400%. Formulas are difficult enough without having to horizontally scroll to see them. It is really difficult.
Best, Wayne

Received on Thursday, 6 July 2023 14:41:35 UTC