-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Summary
Some intents are formed from linear notations and some from 2d notations. That information is lost when the intent is used and so the need to verbally group the intent (such as would be done for "fraction x plus 1 over y end fraction") is lost.
The Problem
Intent is typically layered on top of the presentation. Consider
<math>
<mrow intent="cross-product:infix($x, $y)">
<mrow arg="x">
<mo>(</mo>
<mrow>
<mi>a</mi>
<mo>+</mo>
<mi>b</mi>
</mrow>
<mo>)</mo>
</mrow>
<mo>⨯</mo>
<mi arg="y">c</mi>
</mrow>
</math>
Because the presentation requires the parens and because they are likely to be part of the arguments to the intent, speech will naturally work because they will be spoken and listeners will understand what the arguments to the cross product are.
However, a \binom macro, An author/generating software would understand how that is laid out and would know that no parens are needed assuming it generates a 2D layout such as
<math>
<mrow intent="binomial-coefficient:infix($a, $b)">
<mo>(</mo>
</mrow>
<mfrac linethickness="0">
<mrow arg='a'>
<mi>n</mi>
<mo>+</mo>
<mi>k</mi>
</mrow>
<mrow arg='b'>
<mi>j</mi>
<mo>+</mo>
<mn>1</mn>
</mrow>
</mfrac>
<mo>)</mo>
</mrow>
</math>
Because this is a core concept, MathCAT knows that "binomial-coefficient" should be spoken as "choose", so "a choose b" or with more complicated args from the example "binomial coefficient n + k choose j + 1 end binomial coefficient". But for open concepts, there is nothing to say grouping around the construct is needed. MathCAT could decide to add parens around the arguments, or more accurately, it could add start xxx/end xxx as it does for fraction. But what tells MathCAT that this needs to happen for xxx:infix
but not cross-product:infix
?
Potential Solution
One potential solution is to say that AT needs to figure this out. In a simple case like above, the AT can look at the argument and if is non-trivial and not bracketed, look at the ancestors up to the element with the intent. If there is ancestor that has 2D layout (maybe not counting the base of msub
, munder
, etc.). If any of the arguments has a 2D ancestor, then bracketing words "start binomial ... choose ... end binomial" potentially are used.
I'm not sure this always works though with reference args. For example, what if the intent were $f($x, $y)
? Is the stopping point still the intent? Is there a more complicated example where it isn't the element with the intent but some descendent?
Another potential solution is to add a property where the author says whether this requires grouping/bracketing. In a discussion with @davidcarlisle, he suggested a :grouped
or :fenced
property. If we introduced a similar property, is AT constrained to use it if present and assume its absence indicates that it should not be grouped?