geoffrowland / moodle-editor_atto-chemistry

Chemistry equation editor for Moodle using the mhchem TeX extension in MathJax
1 stars 6 forks source link

Rearrange braces to work with TeX binaries #1

Closed dthies closed 10 years ago

dthies commented 10 years ago

Hello Geoff.

I made some changes to settings.php. Mainly removed extraneous braces or swapped the order of braces and dollar signs if braces are needed to make the expressions work with both MathJax and with the TeX binaries. I also changed the unicode character to the correct ASCII TeX expression. MathJax processes unicode only because it is looking at HTML documents, but the is really not a standard extension of TeX and causes compatibility problems. An editor should produce correct TeX expressions if possible. The will enable Moodle documents to be copied to be easily used with other programs which understand TeX.

geoffrowland commented 10 years ago

Hi Daniel

Thanks for taking the time to look at this. I have been tinkering too, and come to much he same conclusions. So, I'll merge most/all of this.

Agree that degree can become ^\circ. I experimented with adding \usepackage{gensymb} to preamble and using \degree, but without much success.

May make standard state ('plimsoll mark' or 'london tube') symbol ^\circ too, or ^\ominus, rather than ^\Theta. Currently favouring ^\ominus.

I think \omicron should be $o$, in mhchem context, in order to be italic.

I have also been experimenting with, say, \mathit{A} as an alternative to $A$ for italics in mhchem context. But I think some of your rearrangements have fixed things more neatly.

Have also fixed the chemistry editor icon path. So, it should now work out of the box.

Minor tweaks to CSS to try to preserve periodic table layout of buttons for both TeX and MathJax across browsers

Was starting to think all this would only work well with the MathJax filter. It will be great if it now works with the TeX filter too.

Thanks again!