From 93473a3ee5bb692cb957893cea4506536c021792 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Sat, 30 Mar 2024 15:01:38 -0400 Subject: [PATCH] libs.typ: use unify library for units seems more actively developed --- libs.typ | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs.typ b/libs.typ index c5ce98a..75e3d04 100644 --- a/libs.typ +++ b/libs.typ @@ -1,5 +1,13 @@ #import "/templates/main.typ": settings, font +#import "@preview/unify:0.5.0": num, qty, unit +// percentage error quantity +// (because both unify and metro currently can't parse percentages) +#let pq(nb, un, pe) = { + return $(num(nb) plus.minus qty(pe, "%")) unit(un)$ +} + + // this used to be an alias to styled tablex #let tablef = table.with( align: center + horizon,