Skip to content

Typsium/typsium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typst Package MIT License User Manual

Write beautiful chemical formulas and reactions with Typsium

Usage

#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")

result

You can also embed any kind of content into your chemical reactions by using square brackets instead of passing in a string, for example. This will also apply any styling to the reaction. Hoping this feature doesn't have bugs.

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

result2

The formulae will automatically break if they are longer than the page width now. 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]")

Molecule parsing is flexible and supports many different ways of writing, so you can copy and paste 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 within other packages, and the styling will be consistent throughout the document.

About

The main Typsium package. Typeset chemical formulas and reactions.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •