Open notaduck448 opened 10 months ago
Before physica updates (or if this request is rejected), you can try the following:
#import "@preview/physica:0.9.2": vb as _vb
#let vb(x) = _vb(math.upright(x))
$vb(v) times vb(mu_1)$
It appears to me vb(x, style:"upright")
or vb(x, "upright")
are too ad-hoc, and also given that Typst doesn't support set-rules for non-native functions, for now I think the workaround given in the above comment is good enough.
Discussions are welcome.
btw, Please give a bump to https://github.com/typst/typst/issues/147 that proposes set-rules for non-native functions :)
Currently I prefer
#import "@preview/physica:0.9.3": *
#let vb = vb.with(style:"upright")
$vb(v) crossproduct vb(mu_1)$
I doubt the usage of custom element here is necessary, since "vector" is semantic but "bold" is not.
I guess it would be better to set the style for v
/vect
(like set vect(style: "bold upright")
) when Typst supports custom element ~and add support for std import to use vec
or fix the single letter function support in math mode to use v
~
Currently, typing in
vb(u)
orvu(u)
makes the vector u appear bold and italicized. However, in some style guides it is customary to make vectors only appear bold without being italics. It would be nice if an option was added to support this.