d

drawmatrix

@preview

Visualize matrices inside of equations. Inspired by the LaTeX package of the same name.

v0.1.0
MIT

Package Information

Last Updated
Categories
visualization

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/drawmatrix:0.1.0

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/drawmatrix:0.1.0": *

Version History

0.1.0
7a8d084930de...

The drawmatrix Package

Visually represent matrices: rectangular, triangular(, soon: banded).
Inspired by the LaTeX package of the same name.

Sylvester equation in Schur form
#import "@preview/drawmatrix:0.1.0": drawmatrix

#let dm = drawmatrix.with(color: black.lighten(50%))
#let dmbig = dm.with(scale: 2, upper: true)
#let dmtall = dm.with(height: 2)
#let dmsmall = dm.with(upper: true)

$
  #dmbig[$A$]
  #dmtall[$X$]
  +
  #dmtall[$X$]
  #dmsmall[$B$]
  =
  #dmtall[$C$]
$

Limitations / Differences to the OG

  • Must "repeat" math environment for matrix label
  • No banded matrices (yet)
  • No control of bounding box (yet)
  • No replacement to accumulating scales as in \dramatrix[scale=2, scale=3]
    (yet; planned replacement: #drawmatrix(common-scale))

Additional Documentation and Acknowledgments