Home

Awesome

quick-maths

A package for creating custom shorthands for math equations.

Usage

The package comes with a single template function shorthands that takes one or more tuples of the form (shorthand, replacement), where shorthand can be a string or content.

There are some small quality of life features for interaction of shorthands with fractions and attachments:

As the implementation of these features is quite hacky, you may encounter some edge cases, where the use of explicit parentheses hopefully saves you.

Notes

Example

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

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

$ x^2 = 9 quad <==> quad x = +-3 $
$ A or B |- A $
$ x <= y $

Result of example code.