m

metro

@preview

Typset units and numbers with options.

v0.3.0
Apache-2.0

Package Information

Last Updated
Minimum Typst Version
0.11.0
Categories
visualizationtext

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/metro:0.3.0

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/metro:0.3.0": *

Version History

0.3.00.11.0
fe70cdf25275...
0.2.00.10.0
131a36bca1de...
0.1.10.8.0
dd51fd82a4ca...
0.1.0
a5d33ab7d0ba...

Metro

The Metro package aims to be a port of the Latex package siunitx. It allows easy typesetting of numbers and units with options. This package is very early in development and many features are missing, so any feature requests or bug reports are welcome!

Metro’s name comes from Metrology, the study scientific study of measurement.

Bug reports, feature requests, and PRs are welcome!

Usage

Requires Typst v0.11.0+.
Use Typst's package manager:

#import "@preview/metro:0.3.0": *

You can also download the src folder and import lib.typ and import:

#import "src/lib.typ": *

See the manual for more detailed information: manual.pdf

Future Features (in no particular order)

  • Angles
  • Complex numbers
  • Ranges, lists and products
  • table extensions?
  • Number parsing
    • Uncertainties
    • Exponents
  • Number post-processing
    • rounding
    • exponent modes