Leedehai / typst-physics

physica: vectors, fields, differentials, derivatives, Dirac brakets, tensors, and more. See examples in the manual PDF.
https://github.com/Leedehai/typst-physics
MIT License
357 stars 11 forks source link

Add shortcuts for plus.minus and minus.plus #30

Closed adamanteye closed 5 months ago

adamanteye commented 5 months ago

let pm = $plus.minus$ saved me a lot of time, I wonder if it is okay to make this as a default option.

YDX-2147483647 commented 5 months ago

FYI, quick-maths – Typst Universe allows us to write +-.

#import "@preview/quick-maths:0.1.0": shorthands

#show: shorthands.with(
  ($+-$, $plus.minus$),
  ($|-$, math.tack),
  ($<=$, math.arrow.l.double) // Replaces '≤'
)

$ x^2 = 9 quad <==> quad x = +-3 $
adamanteye commented 5 months ago

Wow, this is what I need, thank you!