Skip to content

Typsium/typsium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typst Package MIT License User Manual

Write beautiful chemical formulas and reactions with Typsium

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

result

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[...]

result2

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.

About

The main Typsium package. Typeset chemical formulas and reactions.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •