t

typsium

@preview

Typeset chemical formulas and reactions.

v0.3.2
MIT

Package Information

Last Updated
Minimum Typst Version
0.13.1
Categories
textpaper
Disciplines
educationchemistry

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/typsium:0.3.2

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/typsium:0.3.2": *

Version History

0.3.20.13.1
a3f52e20322c...
0.3.10.13.1
f3d4c0844c7f...
0.3.00.13.1
18eab5a97400...
0.2.0
b4dcfdbed815...
0.1.0
c2798c005b9d...
0.0.3
be834ad7ba06...
0.0.2
3e5c1b5b8069...
0.0.1
8f9560c8f01b...

Typst Package
MIT License
User Manual

Write beautiful chemical formulas and reactions with Typsium

#import "@preview/typsium:0.3.2":*

Enter your chemical formula or reaction into the #ce" method like this:

#ce("[Cu(H2O)4]^2+ + 4NH3 -> [Cu(NH3)4]^2+ + 4H2O")
An example chemical reaction with prettier formatting. Counts are subscripted and charges superscripted and proper reaction arrows are used.

Molecule parsing is flexible and supports many different ways of writing, so you can copy and paste your formulas, and they will probably work. You can use many kinds of brackets.

You can also embed any kind of content, such as organic molecules into your chemical reactions by passing in content instead of a string. This will also apply any styling to the reaction but should look exactly the same if you just leave it be.

#ce[[Cu(H2O)4]^2+ + 4NH3 -> [Cu(NH3)4]^2+ + 4H2O]

There are many different kinds of arrows to choose from.

#ce("1A -> B")\
#ce("2A <- B")\
#ce("3A <=> B")\
#ce("4A => B")\
#ce("5A <= B")\
#ce("6A -/> B")\
#ce("7A </- B")\
#ce("8A <=>> B")\
#ce("9A <<=> B")\
Different kinds of chemical reaction arrows.

And you can add additional arguments to them (such as the top or bottom text) by adding square brackets.

#ce("->[top][bottom]")
#ce[A ->[#qty("2.3", "electronvolt")] B]
#ce[A ->[LiAlH4][($Delta H$, reflux)] B]
Different kinds of chemical reaction arrows.

Oxidation numbers can be added like this^^I, radicals can be added like this^., and hydration groups can be added like this*.

You can use shorthand versions of particle names to display nicely rendered particles

#ce("electron") #ce("e-") #ce("beta-") \
#ce("proton") #ce("p+") #ce("antiproton")\
#ce("neutron") #ce("antineutron")\
#ce(" neutrino antineutrino")\
#ce("mu-") #ce("muon-")\
#ce("alpha")\
Different kinds of particles.

You can apply aggregation state information and we will make it prettier

#ce("NaCl(aq) + He(g) + C(s)")\
#ce[H2O(l) + NaOH(aq,oo)]\
Different kinds of particles.

When writing Isotopes it is important that this specific order is used. Otherwise the notation is similar
to counts and charges, just before the Symbol.

#ce("^227_90Th+")

You can use Typsium within other packages, and the styling will be consistent throughout the document.