Closed mikkelricky closed 11 years ago
Thanks for the information. The <<=>
arrow doesn't seem to be in the documentation that I have, which is why I didn't include it. Your changes look good except for the match pattern, which would also allow <<=>>
, so I would use /^(<->?|<==>?|<<=>)/
instead.
I will make the modifications to the mhchem package.
Cool. And you're absolutely right that my match pattern isn't as precise as it should be.
The correct(ed) pattern in your comment contains a minor typo, but I suppose we can agree that the pattern should be /^(<->?|<=>>?|<<=>)/
.
Right. Your final pattern is the right one. I'm reopening the issue so that I will be sure to make the changes, and will close it again after that has occurred.
I started to write tests for the mhchem extension: https://github.com/fred-wang/MathJax-test/tree/master/testsuite/LaTeXToMathML/mhchem
These are based on example from http://mirror.ctan.org/macros/latex/contrib/mhchem/mhchem.pdf
I added a test for an unknown bond and for the "<<=>" arrow mentioned in this issue.
I have a [Math Processing Error] with advanced-1.html. For various other tests I get undefined macros. It seems that adding the mhchem extension does not force the loading of the package containing extended arrow definitions.
Maybe some tests are not correct or I did not use the correct MathJax version.
Right, the mhchem extension relies on the AMSmath extension, but it doesn't currently force it to be loaded. I will have to do that. In the meantime, if you add "AMSmath.js" to the TeX.extensions array, that should make the tests work.
Davide
OK, I've updated the tests on my fork. I still have a [Math Processing Error] with advanced-1.html. It seems that the "<=>" arrow does not work in that case (it works in arrows-1.html, though).
The issue234
branch of my fork of MathJax should resolve both the missing <<=>
arrow, and the [Math Processing Error] that Fred reported. The mhchem extension now sets things up to load AMSmath automatically when needed and properly synchronizes with its loading. I think the processing error came from not synchronizing properly so that mhchem tried to use part of AMSmath before it was loaded. The is certainly the issue with the undefined macros. In any case, the test files seem to work for me now. (And thanks for putting them together.)
OK, I no longer have the [Math Processing Error]. But I need to update the reference pages, now that you merged the issue285 branch into the issue234 branch. It seems that I also need to modify some arrows in the reference.
Sorry about that. The issue285 problem was what was causing the arrows with wording above and below to not be the correct width. Unfortunately, it does mean that the reference needs to be updated, as you say.
No problem, anyway I expected that I would have to update them.
LaTeXToMathML/mhchem/advanced-1.html LaTeXToMathML/mhchem/advanced-2.html LaTeXToMathML/mhchem/advanced-3.html LaTeXToMathML/mhchem/amounts-1.html LaTeXToMathML/mhchem/arrows-1.html LaTeXToMathML/mhchem/arrows-2.html LaTeXToMathML/mhchem/basics-1.html LaTeXToMathML/mhchem/bonds-1.html LaTeXToMathML/mhchem/environments-1.html LaTeXToMathML/mhchem/isotopes-1.html LaTeXToMathML/mhchem/math-1.html LaTeXToMathML/mhchem/special_symbols-1.html
=> In Testsuite, Ready for release
I just tried to run tests on IE7. There are two extra commas after the definitions of " tripledash" and "xLeftrightharpoons"...
It seems that a class="MJX-variant" has added in LaTeXToMathML/mhchem/arrows-1.html and LaTeXToMathML/mhchem/arrows-2.html since the last time. If that's intentional, I can update the references.
OK, I've taken care of the extra commas in the commit above. Yes, the extra MJX-variant
comes from the solution to issue #268. This will be the case for any prime produced by the TeX input jax. I will look into not applying the variant attribute when used in a superscript, where it is redundant.
I have removed the extra MJX-variant
in the develop branch. The log message refers to the wrong issue (issue #268) rather than this. Argh! Too many issues being worked on at once!
The reaction arrow
<<=>
is parsed as<
followed by<=>
, but should be parsed as a single arrow and rendered as "<=>>
rotated 180 degrees" (I'm not very strong at chemistry).I've tried to fix this myself and have come up with the following (expressed as a git diff)