LaTeXML icon indicating copy to clipboard operation
LaTeXML copied to clipboard

Chemistry packages for the working scientist

Open dginev opened this issue 9 years ago • 5 comments
trafficstars

Packages requested:

  • mhchem.sty
  • bpchem.sty
  • chemfig.sty

Part of the larger #559 issue for providing packages currently in use by latex-writing scientists.

A chemistry postdoctoral fellow recently requested support for "bpchem.sty" at our Authorea help desk. There is no reason not to support that on our end, safe for it not having a binding in LaTeXML.

I am recording the issue here, and will ideally come back to implement it as time permits, but anyone should feel free to beat me to it.

dginev avatar Jan 15 '16 16:01 dginev

I was just told that mhchem is even more widely used, so I will tuck it in here, maybe they are similar enough to hit 2 birds with 1 stone.

dginev avatar Jan 15 '16 17:01 dginev

Hey @dginev - any progress on this? We are setting up a UK-wide chemistry data exchange project.

csaladenes avatar Oct 08 '18 15:10 csaladenes

Hi @csaladenes -- we haven't put any work into this issue since it was filed, it's moving up the priority list, but it helps to know that you're considering latexml for a large project.

Could you let us know the packages you would like to have for your workflow, as compared to the list here?

I can take a fresh look into adding some more support. Thanks!

dginev avatar Oct 08 '18 17:10 dginev

Awesome! mhchem is the priority for us.

csaladenes avatar Oct 11 '18 16:10 csaladenes

An "feature" of chemistry notation is that all the sup/superscript are horizontally aligned (respectively). This leads MathJaX (or the mchem package in it) to use mphantom and mpadded to get the alignment. It also detaches the scripts from the elements they adorn. Better is what https://chem.libretexts.org/ does. They use mmultiscripts to get the alignment (example page).

This doesn't quite work because adornments can appear on electrons ("e") and they don't have the height of a capital letter. So maybe it is better to use msub/msup/msubsup with the attributes subscriptshift and superscriptshift. Of course, you would need to figure out the proper amount to shift. A big downside with this approach is that those attrs are not in MathML Core.

NSoiffer avatar Aug 08 '22 23:08 NSoiffer