Xymatrix support

213 views
Skip to first unread message

Lord_Farin

unread,
Aug 7, 2012, 6:14:36 PM8/7/12
to mathja...@googlegroups.com
Are there people currently working on implementing the xymatrix environment for MathJax? I would be interested in contributing towards the implementation of commutative diagram functionality in MathJax. I saw that amscd is now being supported, but not having any diagonal arrows is a huge disadvantage.

I feel a bit unfair asking even more functionality when the coverage of standard-fare (La)TeX is already of such high standards. I guess it's just human nature. For those interested in what we use MathJax for, check out http://www.proofwiki.org/

Kind regards,
LF

Davide P. Cervone

unread,
Aug 8, 2012, 7:47:50 AM8/8/12
to mathja...@googlegroups.com
Are there people currently working on implementing the xymatrix environment for MathJax?

Not that I know of, though there is an xypic implementation built on v1.1 of MathJax called XyJax, available at


that might do what you want.  Unfortunately, it is not an extension, but a modification of MathJax, so you can't easily use it with v2.0 (unless he's updated to that -- I haven't looked recently).

I would be interested in contributing towards the implementation of commutative diagram functionality in MathJax. I saw that amscd is now being supported, but not having any diagonal arrows is a huge disadvantage.

Actually, amscd isn't available directly yet, but will be in the next release (I do have a working implementation).  But as you say, it is limited to horizontal and vertical arrows.

I feel a bit unfair asking even more functionality when the coverage of standard-fare (La)TeX is already of such high standards. I guess it's just human nature. For those interested in what we use MathJax for, check out http://www.proofwiki.org/

It never hurts to ask, and being willing to contribute makes that a lot more encouraging.  I have never used xymatrix myself, and have only looked briefly at the documentation.  It might help if someone like you who knows the package could prioritize its functionality to identify the most crucial things to support, and what could be left out on an initial implementation.  It is not always easy for me to tell this without more experience with the package.

Davide

Lord_Farin

unread,
Aug 8, 2012, 9:04:15 AM8/8/12
to mathja...@googlegroups.com


On Wednesday, August 8, 2012 1:47:50 PM UTC+2, Davide Cervone wrote:
Are there people currently working on implementing the xymatrix environment for MathJax?

Not that I know of, though there is an xypic implementation built on v1.1 of MathJax called XyJax, available at


that might do what you want.  Unfortunately, it is not an extension, but a modification of MathJax, so you can't easily use it with v2.0 (unless he's updated to that -- I haven't looked recently).

Sadly, the project hasn't been touched in several months. From what I gather the author was attempting to make the XyJax part stand-alone, but I can't determine at this point to what extent this was/is successful.
 

[...]
 
It never hurts to ask, and being willing to contribute makes that a lot more encouraging.  I have never used xymatrix myself, and have only looked briefly at the documentation.  It might help if someone like you who knows the package could prioritize its functionality to identify the most crucial things to support, and what could be left out on an initial implementation.  It is not always easy for me to tell this without more experience with the package.

Davide

From reading around here and there in the xypic package documentation I have come to realise that xymatrix is just a small part of a huge conglomerate.
I *think*, and that is with the utmost caution, that it will suffice to implement the 'Kernel' and the 'Matrix feature' (the latter may be not strictly necessary but I'm used to it) as correspond to chapters I and III.26 of http://ctan.tche.br/macros/latex/contrib/xypic/xy/doc/xyrefer.pdf (which by the way is an excellent documentation).
My own experience with xypic (limited to xymatrix) is also quite the bit shallower than the depths mentioned reference goes into. Again, given the kernel and matrix implementations, one should be able to produce standard-fare commutative diagrams with considerable power. If that is the goal set for implementing xypic/xymatrix (it suffices for my purposes) then I think my contributions and ideas can be of some value. 

Because I will be now to developing MathJax functionality (and practically to actual, shared open source developing as well) it would be best if there were some people who could 'supervise' the progress. Maybe it's best for me to get involved in some less ambitious MathJax project, so that I could get used to the general principles and ideas first. Any pointers to these are appreciated.

LF

Peter Krautzberger

unread,
Aug 9, 2012, 8:16:51 PM8/9/12
to mathja...@googlegroups.com
Hi LF,

First off: it's great that you're interested in getting involved! I'm sure everybody around here will try to help you out any way we can.

Since I lack Davide's and Fred's insight into the codebase, I'll just add some general thoughts. If we really just want diagonal arrows in a commutative diagram, then that might make sense to be done in MathML, hence MathJax should handle it.

But when diagrams become complex (like xypic-diagrams can), MathML might not cut it anymore (and maybe shouldn't?). Like text-macros, it seems to me that drawing complex diagrams should be left to other tools.

That doesn't mean we shouldn't get the functionality, of course, it just changes to goal to enabling MathJax to interact well with established libraries -- and creating macros to simulate something like xymatrix.

There are a lot of fantastic javascript libraries out there for drawing (http://jsxgraph.uni-bayreuth.de/wp/ http://d3js.org/http://jsplumb.org/jquery/demo.html http://processingjs.org/ http://www.jointjs.com/demos.html to name a few) which likely do not work with MathJax out of the box  (actually, jsplumb might work well, playing around in firebug just now). Getting one of them to work well with MathJax would offer a rich base for drawing mathematically in general.

Anyway, just food for thought to get the conversation started.

Peter.

Lord_Farin

unread,
Aug 12, 2012, 9:37:42 AM8/12/12
to mathja...@googlegroups.com


On Wednesday, August 8, 2012 3:04:15 PM UTC+2, Lord_Farin wrote:


On Wednesday, August 8, 2012 1:47:50 PM UTC+2, Davide Cervone wrote:
Are there people currently working on implementing the xymatrix environment for MathJax?

Not that I know of, though there is an xypic implementation built on v1.1 of MathJax called XyJax, available at


that might do what you want.  Unfortunately, it is not an extension, but a modification of MathJax, so you can't easily use it with v2.0 (unless he's updated to that -- I haven't looked recently).

Sadly, the project hasn't been touched in several months. From what I gather the author was attempting to make the XyJax part stand-alone, but I can't determine at this point to what extent this was/is successful.


I just received a reply from the author of mentioned XyJax. He has just released a new version and it is now a separate extension of MathJax, compatible with v2.0 (and later).

It can be found on mentioned GitHub repo. I will try to test it today or tomorrow on ProofWiki and I will report my findings here.


Thanks go to sonoisa for developing XyJax further so that it is a separate extension.

Peter Krautzberger

unread,
Aug 12, 2012, 10:53:21 PM8/12/12
to mathja...@googlegroups.com
That's great! Thanks for letting us know, LF.

Peter.
Reply all
Reply to author
Forward
0 new messages