Open dpvc opened 1 month ago
Testing some of the examples in the POD, the complexes that you mentioned, I tried to create:
Formula("[CoCl_4(NH_3)_2]^−");
and got the error:
Unexpected character '−'; see position 18 of formula at line 15 of setunits/reaction.pg
from within main::Formula called at line 15 of setunits/reaction.pg
and that line cited above is line 15.
I tested other cases using ^-
without problems.
@drgrice1 when testing this with MQ, for the --> in the reactions, the -->
show up in MQ as 3 characters. Could we add the --> to create a \longrightrarrow ? Not a huge thing, but would look nice.
Perhaps. Add a feature request issue to https://github.com/openwebwork/mathquill, and I will look into it when I have time.
I tried to create:
Formula("[CoCl_4(NH_3)_2]^−");
and got the error: ...
It turns out that the minus is the Unicode minus at U+2212 rather than the hyphen-minus at U+002D. Since U+2212 is not defined as an operator, you get that error.
I must have copied the TeX output or something. Sorry about that. I suppose we could add the alternatives like in other contexts. I'll make a PR to fix the comment.
This PR updates the Reaction context to include several new features. These are documented in the changes to the POD section, but the main additions are:
Cl^{2-}
orNa^+
.[CoCl_4(NH_3)_2]^−
O + O
and2O
are equivalent.studentsMustUseStates
whose default is true.This is work I did a while ago, but never made a PR for it until now.