Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mml3 extension #964

Merged
merged 7 commits into from Dec 29, 2014

Conversation

Projects
None yet
4 participants
@pkra
Copy link
Member

commented Nov 26, 2014

Fixes #921

@pkra pkra changed the title add mml3-mml2 extension [WIP] add mml3-mml2 extension Dec 4, 2014

@pkra

This comment has been minimized.

Copy link
Member Author

commented Dec 4, 2014

Marking this WIP as DavidC is looking into improving the msline implementation.

@pkra

This comment has been minimized.

Copy link
Member Author

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.

@pkra pkra changed the title [WIP] add mml3-mml2 extension add mml3-mml2 extension Dec 5, 2014

@pkra pkra changed the title add mml3-mml2 extension add mml3 extension Dec 5, 2014

@dpvc

This comment has been minimized.

Copy link
Member

commented on 905ce5f Dec 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.

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link

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? :)

@dpvc

This comment has been minimized.

Copy link
Member

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.

@dpvc dpvc modified the milestone: MathJax 2.5 Dec 6, 2014

@pkra

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link

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.

@pkra

This comment has been minimized.

Copy link
Member Author

commented Dec 9, 2014

Thanks, David. I'll work them in later this week.

@pkra pkra changed the title add mml3 extension [WIP] add mml3 extension Dec 16, 2014

@pkra

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

@pkra

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link

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).

@jeankaplansky https://github.com/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)


Reply to this email directly or view it on GitHub
#964 (comment).

@pkra

This comment has been minimized.

Copy link
Member Author

commented Dec 17, 2014

@jeankaplansky it's probably easier to discuss this in person next week.

@pkra pkra changed the title [WIP] add mml3 extension add mml3 extension Dec 29, 2014

@pkra

This comment has been minimized.

Copy link
Member Author

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

Davide P. Cervone
Merge pull request #964 from mathjax/issue921
add mml3 extension.  Issue #921.

@dpvc dpvc merged commit 5ccdf60 into develop Dec 29, 2014

@dpvc dpvc deleted the issue921 branch Dec 30, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.