Usage
#import "@preview/typsium:0.3.0":*
Enter your chemical formula or reaction into the #ce"
method like this:
#ce("[Cu(H2O)4]^2+ + 4NH3 -> [Cu(NH3)4]^2+ + 4H2O")
You can also embed any kind of content into your chemical reactions like by using square brackets instead of a passing in a string. This will also apply any styling to the reaction.
Warning: Currently, brackets inside another bracket will not be parsed correctly.
#ce[...]
There are many different kinds of arrows to choose from.
#ce[->]\
#ce[=>]\
#ce[<=>]\
#ce[<=]\
#ce("<->")\
#ce("<-")\
And you can add additional arguments to them (such as the top or bottom text) by adding square brackets.
#ce("->[top text][bottom text]")
The molecule parsing is flexible and allows many different ways of writing, so you can just copy paste in your formulas and they will probably work. Oxidation numbers can be added like this^^
, radicals can be added like this.
and hydration groups can be added like this*
.
You can use many kinds of brackets. they will auto scale by default, but you can disable it with a show rule.
Inline formulas often need to be a bit more compact, for this purpose there is an affect-layout
rule, which can be toggled on and off for each part of the reaction separately.
You can use Typsium inside other packages and the styling will be consistent across the entire document.