How to adjust spacing between mathematical terms (term or word spacing)?

I like the spacing between terms in a textbook and want to recreate it in Typst. Here is the reference from my Linear Algebra book by Ron Larson (p. 21, 8th edition):

I recreated the basic system of equations in Typst:

As you can see, the Typst render is more cramped, with less spacing between terms and operators/symbols. How can I adjust the spacing between terms to achieve the same look as the textbook’s render? And along the same vein, is there a symbol for more spaced out horizontal dots like that in the textbook?

My code:

$
a_11 x_1 &+& a_12 x_2 &+& a_13 x_3 &+ dots.c +& a_(1n) x_n &= 0 \
a_21 x_1 &+& a_22 x_2 &+& a_23 x_3 &+ dots.c +& a_(2n) x_n &= 0 \
&&&&&&&dots.v \
a_(m 1) x_1 &+& a_(m 2) x_2 &+& a_(m 3) x_3 &+ dots.c +& a_(m n) x_n &= 0
$

Maybe use the function mat, for example,

$
  mat(
    delim: #none,
    column-gap: #0.3em, // control the gap between columns
    a_11 x_1, +, a_12 x_2, +, dots.c, +, a_(1 n) x_n, =, 0, ;
    a_21 x_1, +, a_22 x_2, +, dots.c, +, a_(2 n) x_n, =, 0, ;
    , , , , , , , dots.v, , ;
    a_(m 1) x_1, +, a_(m 2) x_2, +, dots.c, +, a_(m n) x_n, =, 0, ;
  )
$

Does using mat reduce the effectiveness of assistive technology like screen readers? I would like to preserve accessibility of equations as much as possible, that’s why I ask.

Additionally, it seems like the default spacing between terms in Typst is med or 2/9 em, as the following 2 lines of math code render the same:

$
f(x) &= x^2 + 3x + 2 \
f(x) &= x^2 med + med 3x med + med 2
$

Is it possible to change the default ‘word spacing’ in math mode from med to thick?

You can always write an alt text.

1 Like

Oh, I forgot about that feature. I think that would be sufficient for a select number of equations, but can maybe get cumbersome for a longer math document where you want to space out every term in that way. If there were a way to change the default spacing for math typesetting that would be ideal for stylistic consistency. Perhaps I should open a separate topic about changing default spacing?

Are my eyes deceiving me? I find the first sample more cramped, in particular, the a and x are much too close together, looking much like what I get in Word. The second sample is more harmonious, and the spacing around plus looks very similar.

As for the ellipsis, in the first sample they appear to simply be three individual dots, not a proper ellipsis, which is a single symbol. Also note that the vertical and horizontal ellipses are inconsistent in the first sample, but consistent in the second.