Zero 0.6.0
The new version 0.6.0 of Zero brings many updates and improvements including
- exponent modes for fixed, scientific, and engineering formatting,
- new rounding modes and options for rounding ties, and
- improvements for unit formatting.
The full changelog is listed below.
What is Zero?
Zero is a package for formatting numbers in a consistent and scientifically accurate way, e.g., num[1.7+-0.2e5]. Also, for tables it provides alignment of numerals at the decimal point (and more). Check out the detailed documentation via the link above.
#import "@preview/zero:0.6.0": num, format-table, zi
Physicists estimate a number of #num[1e80] particles in the observable universe.
#figure({
show: format-table(none, auto)
table(
columns: 2,
[1], [1.2],
[2], [2],
[3], [300]
)
})
#let Js = zi.declare("J s")
Plancks constant is roughly #Js[6.626e-34].
Changelog
Exponent modes and rounding improvements
Exponents:
Breaking Change: Removes the parameter num.fixedwhich is now replaced by the exponent modefixed(see below).- Adds new exponent modes:
autofor standard formatting,"sci"for automatic scientific notation,(fixed: n)for fixing the exponent to a specific value, and"eng"for automatic engineering notation.
- Improves rendering of exponents for
math: trueto guarantee a look just like the number was generated by hand with an equation.
Rounding:
Breaking Change: Renames rounding modes "down"to"towards-negative-infinity"and"up"to"towards-infinity".- Adds an option
round.tiesto configure the behavior for rounding the digit 5. - Adds two new rounding directions
"towards-zero"and"away-from-zero". - Adds support for padding with a minimum number of digits.
- Fixes rounding when no integer part is given (like
num[.5]).
Units:
- Fixes spacing with angle units (there should be no space between the number and an angle unit).
Breaking Change: The unit alternatives with British spelling zi.metreandzi.litrehave been removed for consistency and to avoid confusion.- Adds an option
unit.lowercase-literthat enables a lower case symbol for the unit liter.
Miscellaneous:
- Fixes parsing of
[#""]values in formatted tables.
How to support this project
If you want to support this open-source work, you can sponsor the project with a small amount. You can also contribute by opening issues and pull requests.
