Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 875294 - Implement menclose notation "updiagonalarrow"
: Implement menclose notation "updiagonalarrow"
: dev-doc-complete
Product: Core
Classification: Components
Component: MathML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla24
Assigned To: Frédéric Wang (:fredw)
: Anthony Jones (:kentuckyfriedtakahe, :k17e)
Depends on: CVE-2014-1508 963324
Blocks: mathml-in-mathjax
  Show dependency treegraph
Reported: 2013-05-23 06:41 PDT by Frédéric Wang (:fredw)
Modified: 2014-01-23 15:24 PST (History)
1 user (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

testcase (1.24 KB, text/html)
2013-06-01 00:51 PDT, Frédéric Wang (:fredw)
no flags Details
Patch V1 (11.76 KB, patch)
2013-06-01 01:39 PDT, Frédéric Wang (:fredw)
karlt: review+
Details | Diff | Splinter Review
Patch V2 (11.80 KB, patch)
2013-06-04 00:18 PDT, Frédéric Wang (:fredw)
no flags Details | Diff | Splinter Review

Description Frédéric Wang (:fredw) 2013-05-23 06:41:45 PDT
In order to implement the \cancelto command MathJax uses the nonstandard syntax 

    <menclose notation="updiagonalstrike" class="MJX-arrow">

and render it as an up "diagonal arrow". Unfortunately other MathML rendering engines won't draw the arrow head. I suggested to replace that by a new notation "updiagonalarrow" (the list of menclose notation is open-ended). I think it would be good to implement this notation in Gecko.

Note that MathJax will actually generate

    <menclose notation="updiagonalstrike updiagonalarrow">

for backwards compatibility with rendering engines that only support "updiagonalstrike". So Gecko should make "updiagonalarrow" override "updiagonalstrike".
Comment 1 Karl Tomlinson (:karlt) 2013-05-23 22:23:13 PDT
(In reply to Frédéric Wang (:fredw) from comment #0)
> So Gecko should make "updiagonalarrow" override "updiagonalstrike".

If the arrow is drawn such that its shaft is the same as the strike, then no special case is required when the two occur together.  MathML notations are usually all drawn iirc.
Comment 2 Frédéric Wang (:fredw) 2013-05-23 22:29:32 PDT
(In reply to Karl Tomlinson (:karlt) from comment #1)
> If the arrow is drawn such that its shaft is the same as the strike, then no
> special case is required when the two occur together.  MathML notations are
> usually all drawn iirc.

Yes, I agree. I think I was more thinking about how menclose is handled in MathJax. That should not be a problem in Gecko.
Comment 3 Frédéric Wang (:fredw) 2013-06-01 00:51:53 PDT
Created attachment 756934 [details]

Here is a test case. See also attachment 389368 [details] for a dynamic version where you can select the dimensions and notations.
Comment 4 Frédéric Wang (:fredw) 2013-06-01 01:39:29 PDT
Created attachment 756937 [details] [diff] [review]
Patch V1
Comment 5 Karl Tomlinson (:karlt) 2013-06-03 19:50:17 PDT
Comment on attachment 756937 [details] [diff] [review]
Patch V1

>+        rect.TopRight(),
>+        rect.TopRight() + gfxPoint(-w -.4*h, h - .4*w),

For a wide rect, this point may be more than e/2 above the top of rect, which can lead to parts not being invalidated correctly, on scrolling or selection, for example.
Comment 6 Frédéric Wang (:fredw) 2013-06-04 00:18:24 PDT
Created attachment 757830 [details] [diff] [review]
Patch V2

OK, I modified the patch to limit the overflow by a maximum of e/2.

That preserves the shape of the arrow head in normal cases and that seems to be what MathJax HTML-CSS does too (but only for the y coordinates??).
Comment 7 Ryan VanderMeulen [:RyanVM] 2013-06-04 05:27:25 PDT
Comment 8 Ryan VanderMeulen [:RyanVM] 2013-06-04 12:05:23 PDT
Comment 9 Frédéric Wang (:fredw) 2013-06-07 13:11:31 PDT
As I indicated on the MathJax issue, this does not work very well in RTL. See also discussion on the LaTeXML mailing list:

Note You need to log in before you can comment on or make changes to this bug.