jamesrswift / typst-chem-par

Typst show rules for parsing IUPAC names and chemical formulae
MIT License
22 stars 4 forks source link

Move Nitrogen after other elements starting with "N" #8

Closed SillyFreak closed 6 months ago

SillyFreak commented 6 months ago

Move Nitrogen after other elements starting with "N" to avoid regex conflicts. This makes it consistent with other single-letter elements that also appear last.

I also noticed "Th\b" which is different from the rest. Is there a reason for that? If not, I could change that too in this or a separate PR.

jamesrswift commented 6 months ago

Merged, thanks :) I've not been on the ball with keeping this updated of recent, so if you're interested in being added as a maintainer, I'd be happy to hand it over to you.

To answer your question on "Th\b", the idea of the package is that it should strike a balance between convenient and clunky. Thorium's symbol is annoyingly how you start most sentences: "(Th)e quick brown fox". Without \b, it was too clunky.

SillyFreak commented 6 months ago

Ah, I see! I don't work in chemistry, so I don't really have the prerequisite knowledge to know what changes are actually correct fixes except for simple cases like this (see my comment on #7 for example), but thanks for asking!