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
312 stars 8 forks source link

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

Closed adamanteye closed 2 months ago

adamanteye commented 2 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 2 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 2 months ago

Wow, this is what I need, thank you!