Xy-pic graph problem with Moodle 3.8, 3.9

Xy-pic graph problem with Moodle 3.8, 3.9

by For Linh -
Number of replies: 5

Hi All,


I have used  the Xy-pic code:


$\begin{equation*} \xymatrix { X \ar[r]^{\Large {i}} \ar[dr]|{\large {f}} \ar[ddr]_{\Large {i}} &  A \,\,\, \ar@{.>}[d]^{\large {\theta}} \ar@[red]@`{[]+/r3.5pc/, [dd]+/2.5pc/} [dd]^(0.35){\color{blue}{\large{Id_A}}}\\ & G \ar@{.>}[d]^{\large {\varphi}} \\ & A & } \end{equation*}$ 

to draw the diagram in my Moodle course .

It works  with Moodle 3.7.* : [see Xypic37.jpg]

but not with Moodle 3.8.*, 3.9 :  [see Xypic38.jpg]

Help me to fix it !

Thanks.

Best Regards,


Forlink

Attachment Xypic37.jpg
Attachment Xypic38.jpg
Average of ratings: -
In reply to For Linh

Re: Xy-pic graph problem with Moodle 3.8, 3.9

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Sorry to delay in answering. Been very busy and thought someone else might respond. You have actually made more progress than I have since you say you have Xy-pic working with Moodle 3.7. The only version I've ever managed to get to work is Moodle 3.4+ without https using MathJax 2.6.0.

On your 3.7 site, are you using http or https? What version of MathJax? What do you have in the Moodle MathJax configuration setting?

In reply to AL Rachels

Re: Xy-pic graph problem with Moodle 3.8, 3.9

by For Linh -
Hello AL Rachels,

My site: https://ltn.lomath.in/

My Mathjax configuration (written in Within HEAD of Additional HTML in Appearance):
===== 
// <script type="text/x-mathjax-config">
//   MathJax.Hub.Config({
//    extensions: ["tex2jax.js"],
//    jax: ["input/TeX","output/HTML-CSS"],
//    "HTML-CSS": {
//      styles: {".MathJax_Preview": {visibility: "hidden"}}
//    },
//    tex2jax: {inlineMath: //[//["$","$"], //['$$','$$'//], //['@i','@i'],//["\\(","\\)"]]},
//    TeX: {extensions: ["https://lomath.in/doc/xyjax/xypic.js", "AMSmath.js","AMSsymbols.js"]},
//  MathML: {extensions: ["content-mathml.js"]  } ,  
//  });
// </script>
// <script type="text/javascript"
// src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js">
// </script>


=======
Maybe this config. was redundant, but it's sufficient for working.
Hope this help!
FL
In reply to For Linh

Re: Xy-pic graph problem with Moodle 3.8, 3.9

by For Linh -
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js">
In reply to For Linh

Re: Xy-pic graph problem with Moodle 3.8, 3.9

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I have always tried to use the MathJax configuration in Plugins > Filters > MathJax, to hold my setup:

MathJax.Hub.Config({
    config: ["MMLorHTML.js", "Safe.js"],
    jax: ["input/TeX","input/MathML","output/HTML-CSS","output/NativeMML"],
    extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js"],
    TeX: {
        extensions: ["xypic.js","mhchem.js","color.js","AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"],
    },
    menuSettings: {
        zoom: "Double-Click",
        mpContext: true,
        mpMouse: true
    },
    errorSettings: { message: ["!"] },
    skipStartupTypeset: true,
    messageStyle: "none"
});

I have only been able to get it to work using Moodle 3.4+ with MathJax 2.6 installed on my server so that I could add extensions. Every time a new Moodle or new MathJax have been released, I have not been able to get XyPic to work with the new versions.

Actually, I think your Xypic38.jpg picture is showing partial success as all the parts of the drawing are there, just not in the right locations. Maybe you could experiment and find out what is causing the incorrect placement of the arrows.

In reply to AL Rachels

Re: Xy-pic graph problem with Moodle 3.8, 3.9

by For Linh -
Hi AL Rachels,

1) Try to use the Mathjax configuration in Additional HTML.

2) Why is there no path to xypic.js ?

3) I agree to your remark on the Xypic38.jpg picture. I think must modify something in xypic.js, but with my competence it's impossible!

Anyway I thank you for your opinions.