p

physica

@preview

Math constructs for science and engineering: derivative, differential, vector field, matrix, tensor, Dirac braket, hbar, transpose, conjugate, many operators, and more.

v0.9.8
MIT
9 downloads

Package Information

Last Updated
Minimum Typst Version
0.14.0
Authors
Leedehai
Categories
componentsutility
Disciplines
mathematicsphysicschemistryeconomicseducationengineering

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/physica:0.9.8

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/physica:0.9.8": *

Version History

0.9.80.14.0
9cce5041efa1...
0.9.70.14.0
78b668fb979c...
0.9.60.13.0
0b04a0e8b4cd...
0.9.50.13.0
52e298fe0d23...
0.9.40.12.0
c1572ab6982d...
0.9.30.10.0
d952f9296a8d...
0.9.20.10.0
11b7aab3ffd6...
0.9.10.10.0
c67f3a032534...
0.9.00.10.0
0ea6ae153459...
0.8.10.8.0
624863b980b9...
0.8.00.8.0
ea3cd17fb82e...
0.7.5
9d318823ace2...

:green_book: manual (HEAD)

logo

The physica package for Typst (v0.9.8)

CI

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 ..^T as 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.

demo-quick

A larger demo.typ:

demo-larger

Using physica in your Typst document

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.

effect

// 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

changelog.md.

License