Skip to content

Commit e28ef8d

Browse files
authored
feat: remove xarrow and use stretch in typst v0.12.0 (#184)
1 parent 9580129 commit e28ef8d

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

packages/mitex/mitex.typ

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#import "specs/mod.typ": mitex-scope
2-
#import "@preview/xarrow:0.2.0": xarrow
32
#let mitex-wasm = plugin("./mitex.wasm")
43

54
#let get-elem-text(it) = {

packages/mitex/specs/latex/standard.typ

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#import "@preview/xarrow:0.2.0": xarrow
2-
31
#import "../prelude.typ": *
42

53
// 0. Some useful internal variables or functions
@@ -39,7 +37,7 @@
3937

4038
// 1. functions created to make it easier to define a spec
4139
#let operatornamewithlimits(it) = math.op(limits: true, math.upright(it))
42-
#let arrow-handle(arrow-sym) = define-cmd(1, handle: it => $limits(xarrow(sym: #arrow-sym, it))$)
40+
#let arrow-handle(arrow-sym) = define-cmd(1, handle: it => $limits(stretch(#arrow-sym)^#it)$)
4341
#let _greedy-handle(fn) = (..args) => $fn(#args.pos().sum())$
4442
#let greedy-handle(alias, fn) = define-greedy-cmd(alias, handle: _greedy-handle(fn))
4543
#let limits-handle(alias, wrap) = define-cmd(1, alias: alias, handle: it => math.limits(wrap(it)))
@@ -950,11 +948,10 @@
950948
varTheta: of-sym($italic(Theta)$),
951949
varUpsilon: of-sym($italic(Upsilon)$),
952950
varXi: of-sym($italic(Xi)$),
953-
// xarrows
954-
xleftarrow: arrow-handle(math.arrow.l.long),
955-
xrightarrow: arrow-handle(math.arrow.r.long),
956-
xLeftarrow: arrow-handle(math.arrow.l.double.long),
957-
xRightarrow: arrow-handle(math.arrow.r.double.long),
951+
xleftarrow: arrow-handle(math.arrow.l),
952+
xrightarrow: arrow-handle(math.arrow.r),
953+
xLeftarrow: arrow-handle(math.arrow.l.double),
954+
xRightarrow: arrow-handle(math.arrow.r.double),
958955
xleftrightarrow: arrow-handle(math.arrow.l.r),
959956
xLeftrightarrow: arrow-handle(math.arrow.l.r.double),
960957
xhookleftarrow: arrow-handle(math.arrow.l.hook),

0 commit comments

Comments
 (0)