t

typsium-atomic

@preview

Draw Atoms, their electron configurations, shells and orbitals in Typst.

v0.1.0
MIT
1 downloads

Package Information

Last Updated
Categories
visualizationtextpaper
Disciplines
educationchemistry

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/typsium-atomic:0.1.0

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/typsium-atomic:0.1.0": *

Version History

0.1.0
3105d540a972...

Typst Package
MIT License
User Manual

Draw Atoms in Typst

Draw simple atomic models consisely using the power of CeTZ and Typst.

Usage

To draw a simple atom use

#atom-shells(element:"H")

image

The electrons should be passed in an array where the index corresponds to the shell, while the value is the amount of electrons on that shell. Here is an example:

#atom-shells(element:"Cu", electrons:(1, 8, 18, 2))

image

To draw the same in a CeTZ canvas, use draw-atom-shells, which takes the same arguments as atom-shells

#cetz.canvas({
  draw-atom-shells(element: (atomic-number:29, mass-number:64, symbol: "Cu"), electrons:(1, 8, 18, 2))
})

If you'd like to exclusively draw the shells (for example to draw your own core) use

draw-shell(electrons: 20, radius: 5, fill: blue, stroke: 0.5pt + gray)

You can use the following options to customise the way atomic draws:

#atom-shells(
  element: (
    atomic-number: 2,       // proton count
    mass-number: 4,         // nucleon count
    symbol: "He"),          // element name
  electrons: (2,8),         // electrons in each shell
  core-distance: 1,         // radius of the first shell
  shell-distance: 0.4,      // distance between each shell
  core-radius: 0.6,         // size of the core
  fill: luma(90%),          // color of core and electrons
  stroke: 1pt + black,      // stroke color and width
)