Using LaTeX package xypic, the code
$$xymatrix{
&ar@{.}[d]\
1&2
}$$
produces a dashed downward arrow: texlive
so it is valid xypic code.
But it causes an error in XyJax (an implementation of xypic in Javascript. Examples)
<script>
MathJax = {
loader: {
load: ['[custom]/xypic.js'],
paths: {custom: 'https://cdn.jsdelivr.net/gh/sonoisa/[email protected]/build/'}
},
tex: {
packages: {'[+]': ['xypic']}
}
};
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-chtml.js"></script>
$$xymatrix{
&ar@{.}[d]\
1&2
}$$
Error: SyntaxError ‘}’ expected but ‘[‘ found. Parse error at or near “&ar@{.}[d]
“.
I tried to read the source of XyJax parser, but can’t locate code that causes the error.
A temporary workaround:
<script>
MathJax = {
loader: {
load: ['[custom]/xypic.js'],
paths: {custom: 'https://cdn.jsdelivr.net/gh/sonoisa/[email protected]/build/'}
},
tex: {
packages: {'[+]': ['xypic']}
}
};
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-chtml.js"></script>
$$xymatrix{
&{}ar@{.}[d]\
1&2
}$$