Add stretchy characters needed by mhchem #1174
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adjusts the
mhchem
package to provide several stretchy characters that it needed but that weren't in the original MathJax TeX fonts (and two that don't have Unicode equivalents). This is done by using a separatemathjax-mhchem
font that has the needed arrows and pieces needed for stretchy assemblies for these characters, based on themathjax-newcm
arrows. In order to make the arrows used in mhchem consistent with these, all the arrows uses in mhchem are included in this new font, so that even when mhchem is used in a setting where a different font is selected, the arrows will not change their look between ones that could have been found in the selected font and ones that are in themathjax-mhchem
font.The new font also includes character used for the bonds that have in the past been constructed from multiple characters.
In order to use these characters and arrows, we end up scanning the TeX string constructed by mhchem and replacing the TeX code that creates the arrows and bonds by new mhchem-specific macros. That is a bit ugly, but gets the job done, without overriding existing macros. After v4.0 is released, I can approach Martin about chaing his code to make this easier, but didn't to do that until everythig was ready for him.