Package Information
- Last Updated
- Authors
- Jonas Schulze
- Categories
- visualization
- Dependencies
- @preview/cetz:0.4.2
1. Get the package
Download the package using the TPIX CLI:
tpix get @preview/drawmatrix:0.1.02. Import in your Typst file
Add this to your .typ file:
#import "@preview/drawmatrix:0.1.0": *The drawmatrix Package
Visually represent matrices: rectangular, triangular(, soon: banded).
Inspired by the LaTeX package of the same name.
#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
- OG: drawmatrix
- Typst package template: https://github.com/typst-community/typst-package-template