# mathjax/MathJax

Merged
merged 7 commits into from Dec 29, 2014

## Conversation

Projects
None yet
4 participants
Member

### pkra commented Nov 26, 2014

 Fixes #921

### pkra added some commits Nov 26, 2014

 created mml3-mml2 extension for #921 
 55c59f0 
 fix references to content-mathml extension 
 37fb13f 
 switch hascolspan to false() as in http://www.w3.org/Math/draft-spec/… 
…doctop.js
 1807d55 

Member Author

### pkra commented Dec 4, 2014

 Marking this WIP as DavidC is looking into improving the msline implementation.
 renaming extension; pull in David Carlisle's new and improves xsl 
 905ce5f 
Member Author

### pkra commented Dec 5, 2014

 I've updated the extension and actually change the name (but didn't know a good one). The main point is that this now uses David Carlisle's awesome new xsl which massively improves the msline implementation and adds two mlongdiv notations (stackedrightright, :right=right). Live sample at http://codepen.io/pkra/pen/QwbJWa.

Member

### dpvc commented on 905ce5fDec 6, 2014

 There are a lot of references in the code to ctop (the content-to-presentation stylesheet). Should these be changed to something else for mml3? Also, there are references to ctop.xsl in the comments at the top of the page.
Member Author

### pkra replied Dec 6, 2014

 Meh. I thought I'd caugth them all. Let me clean it up some more (and then I'll clean up the commit history as well).

### jeankaplansky commented Dec 6, 2014

 Whoa! Does this mean we can actually use mlongdiv with MathJax, or do we need to run the transform first? And are you going to tell you know who? :)
Member

### dpvc commented Dec 6, 2014

 The code pen examples look very nice. Good work, Peter, and thanks to David Carlisle (yet again) for writing the original transformations.

Member Author

### pkra commented Dec 6, 2014

 @jeankaplansky well, it's still a hack but yes, when you load this extension, MathJax will convert quite a bit of elementary math on the fly; this should work ok for simple examples (i.e., with numbers or characters, nothing more complex). It's not a proper implementation though. @dpvc David C actually improved the xsl for MathJax over the past week.

### davidcarlisle commented Dec 8, 2014

 I have added some sort of cover for all 10 mlongdiv styles to the upstream version on googlecode, see http://web-xslt.googlecode.com/svn/trunk/ctop/tests/mml3mj.html some are prettier than others, but all should be understandable I hope.
Member Author

### pkra commented Dec 9, 2014

 Thanks, David. I'll work them in later this week.
 update stylesheet to pull in latest fixes from David Carlisle 
 ac50815 

Member Author

### pkra commented Dec 16, 2014

 I've pulled in @davidcarlisle latest updates to the stylesheet and have removed all ctop references (except the one relevant one). This fixes some RTL transform problems (using SVG transforms causing hickups) and adds more longdivision notation (only one missing -- David is awesome). There are still a couple of limitations/bugs with RTL in particular and I'm not sure we can fix those. I've added a more samples to http://codepen.io/pkra/full/QwbJWa @dpvc IIRC we added some very rudimentary RTL features last year. I'm wondering if there's a clash?

### jeankaplansky commented Dec 16, 2014

 Will there be any way to adjust the appearance of the results other than copying the MathML and tweaking manually? Some publishers are going to want to do some additional formatting stuff to elementary math. (Peter - you know who I'm thinking of...) Thanks, Jean On Tue, Dec 16, 2014 at 4:43 AM, Peter Krautzberger < notifications@github.com> wrote: I've pulled in @davidcarlisle https://github.com/davidcarlisle latest updates to the stylesheet and have removed all ctop references (except the one relevant one). This fixes some RTL transform problems (using SVG transforms causing hickups) and adds more longdivision notation (only one missing -- David is awesome). There are still a couple of limitations/bugs with RTL in particular and I'm not sure we can fix those. I've added a more samples to http://codepen.io/pkra/full/QwbJWa @dpvc https://github.com/dpvc IIRC we added some very rudimentary RTL features last year. I'm wondering if there's a clash? — Reply to this email directly or view it on GitHub #964 (comment).

### jeankaplansky commented Dec 16, 2014

 PS... I looked at the codepen in more detail and see a couple of places where it's still complaining about mlongdiv and mstack - but only for what looks like should be RTL. I take it these are the "couple of limitations/bugs" you referred to above? Just wondering. Thanks again!

### davidcarlisle commented Dec 16, 2014

 On 16 December 2014 at 15:40, Jean Kaplansky notifications@github.com wrote: Will there be any way to adjust the appearance of the results other than copying the MathML and tweaking manually? Some publishers are going to want to do some additional formatting stuff to elementary math. (Peter - you know who I'm thinking of...) Thanks, Jean Hmm it depends on your workflow. As currently packaged as a mathjax extension, it's more or less a black box transform, the entire XSLT part is a single javascript string which makes it a bit inflexible. The original transform is an XSLT stylesheet and somewhat easier to customise if that fits with your workflow. There are possibilities for a future version to follow the route taken with the content-to-presentation transform which was originally an inline xslt as this, but has been recoded to be pure javascript (which makes it easier to customise from javascript by (re)defining individual functions). David
Member Author

### pkra commented Dec 16, 2014

 @davidcarlisle thanks, I'll pull them in (and reply to your email). @jeankaplansky Will there be any way to adjust the appearance of the results other than copying the MathML and tweaking manually? I think we simply can't say. This is an experimental extension and we have not done exhaustive testing (or design; we simply trust David C :-) ). I think customization such as styling should be possible locally but less so globally (e.g., color a row of an mstack won't work but adding a colored menclose to an mn will be fine). The msline implementation assumes your content is 1-dimensional. Anyway, just download or fork the codepen example and throw some examples at it? Or send them to me privately. I take it these are the "couple of limitations/bugs" you referred to above? Yes, most remaining issues are bidi related (e.g., they trip up the elementary math transform)

### jeankaplansky commented Dec 17, 2014

 I think this will turn out OK since I based the markup patterns for the toolbar I built off of the MathML examples generated by ctop in the MathML spec. I did have to do some tweaking to make things look just so. I think I sent all of that stuff to Peter already, though. Peter - I'll tell you more specifically where to look when we talk next week. Thanks, Jean On Tue, Dec 16, 2014 at 4:55 PM, Peter Krautzberger < notifications@github.com> wrote: @davidcarlisle https://github.com/davidcarlisle thanks, I'll pull them in (and reply to your email). Will there be any way to adjust the appearance of the results other than copying the MathML and tweaking manually? I think we simply can't say. This is an experimental extension and we have not done exhaustive testing (or design; we simply trust David C :-) ). I think customization such as styling should be possible locally but less so globally (e.g., color a row of an mstack won't work but adding a colored menclose to an mn will be fine). The msline implementation assumes your content is 1-dimensional. Anyway, just download or fork the codepen example and throw some examples at it? Or send them to me privately. I take it these are the "couple of limitations/bugs" you referred to above? Yes, most remaining issues are bidi related (e.g., they trip up the elementary math transform) — Reply to this email directly or view it on GitHub #964 (comment).
 pull in update from ctop/mml3.xslt that adds left/\right mlongdiv not… 
…ation
 f785418 
Member Author

### pkra commented Dec 17, 2014

 @jeankaplansky it's probably easier to discuss this in person next week.
 import fixes for RTL+elementary math; source: https://code.google.com… 
…/p/web-xslt/
 12d8eef 

Member Author

### pkra commented Dec 29, 2014

 Upated with latest code from @davidcarlisle -- ready to merge for 2.5-beta.

### dpvc pushed a commit that referenced this pull request Dec 29, 2014

 Merge pull request #964 from mathjax/issue921 
add mml3 extension.  Issue #921.
 5ccdf60