Aligning mhchem arrows
Created by: mhchem
I'd like to align the mhchem arrows in length. But I do not know enough about the inner workings of MathJax to touch the arrow definitions.
First of all, is there a reason for using both, long arrows (e.g. \longrightarrow
) and x-arrows (\xrightarrow
)? We could use x-arrows only, with a phantom argument. This would make the whole task much easier.
Further issues: The harpoons do not stretch correctly.
The single-headed arrows are a little bit shorter for the same input as the double headed.
To complete the set, I would also need an arrow similar to the harpoons, but with full arrow heads.
The following test document works with current and new mhchem, as the arrow code stayed untouched.
<!doctype html>
</html>
<head>
<meta charset="utf-8">
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ TeX: {extensions: ['mhchem.js']} });
</script>
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</head>
<body>
\(\def\rel#1{\mkern3mu\mathrel{#1}\mkern3mu}
\def\a#1#2{| \rel{#2{a}} | \rel{#2[a]{}} | \rel{#2[a]{a}} | \rel{#2{aaaaa}} | \rel{#2[aaaaa]{}} | \rel{#2[aaaaa]{aaaaa}} | \rel{#1} |}\)
<br>
\(\a{\longrightarrow}{\xrightarrow}\)<br>
\(\a{\longleftarrow}{\xleftarrow}\)<br>
\(\a{\longleftrightarrow}{\xleftrightarrow}\)<br>
\(\a{\longrightleftharpoons}{\xrightleftharpoons}\)<br>
\(\a{\longRightleftharpoons}{\xRightleftharpoons}\)<br>
\(\a{\longLeftrightharpoons}{\xLeftrightharpoons}\)<br>
\(\a{\longleftrightarrows}{\xleftrightarrows}\)<br>
</body>
</html>