Leedehai/typst-physics
Leedehai/typst-physics has 620 GitHub stars and 27 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-16 19:48 UTC. Last push 2026-09-12.
Progression mesurée des étoiles
- in 24h
- 0
- in 7 days
- Historique en cours
- in 15 days
- Historique en cours
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
À propos
physica: vectors, fields, differentials, derivatives, Dirac brakets, tensors, and more. See examples in the manual PDF.
Outils de développementREADME.md
Original:green_book: manual (HEAD)
The physica package for Typst (v0.9.8)
Available in the collection of Typst packages: #import "@preview/physica:0.9.8": *
physica noun.
- Latin, study of nature.
This Typst (GitHub) package provides handy typesetting utilities for natural sciences, including:
- Braces,
- Vectors and vector fields,
- Special matrices, including Jacobian and Hessian,
- Smart rendering of
..^Tas transpose and..^+as dagger (conjugate transpose), - Dirac braket notations,
- Common math functions,
- Differentials and derivatives, including partial derivatives of mixed orders with automatic order summation,
- Familiar "h-bar", tensor abstract index notations, isotopes, Taylor series term.
A quick look
See the manual for more details and examples.
A larger demo.typ:
Using physica in your Typst document
With typst package management (recommended)
See https://github.com/typst/packages. If you are using the Typst's web app, packages listed there are readily available; if you are using the Typst compiler locally, it downloads packages on-demand and caches them on-disk, see here for details.
// Style 1
#import "@preview/physica:0.9.8": *
$ curl (grad f), tensor(T, -mu, +nu), pdv(f,x,y,[1,2]) $
// Style 2
#import "@preview/physica:0.9.8": curl, grad, tensor, pdv
$ curl (grad f), tensor(T, -mu, +nu), pdv(f,x,y,[1,2]) $
// Style 3
#import "@preview/physica:0.9.8"
$ physica.curl (physica.grad f), physica.tensor(T, -mu, +nu), physica.pdv(f,x,y,[1,2]) $
Without typst package management
Similar to examples above, but import with the undecorated file path like "physica.typ".
Typst version
The version requirement for the compiler is in typst.toml's
compiler field. If you are using an unsupported Typst version, the compiler
will throw an error. You may want to update your compiler with typst update,
or choose an earlier version of the physica package.
Developed with Typst 0.14.0 (see typst --version).
Manual
See the manual for a more comprehensive coverage, a PDF file generated directly with the Typst binary.
To regenerate the manual, use command
typst watch physica-manual.typ
Contribution
Bug fixes are welcome!
New features: welcome as well. If it is small, feel free to create a pull request. If it is large, the best first step is creating an issue and let us explore the design together. Some features might warrant a package on its own.
Testing: currently testing is done by closely inspecting the generated manual. This does not scale well. I plan to add programmatic testing by comparing rendered pictures with golden images.
Change log
License
- Code: the MIT License.
- Docs: the Creative Commons BY-ND 4.0 license.