Go to the first, previous, next, last section, table of contents.

Horizontal Compositions

The choriz function takes a vector of objects and composes them horizontally. For example, `choriz([17, a b/c, d])' formats as `17a b / cd' in normal language mode, or as

  a b
17--d
   c

in Big language mode. This is actually one case of the general function `choriz(vec, sep, prec)', where either or both of sep and prec may be omitted. Prec gives the precedence to use when formatting each of the components of vec. The default precedence is the precedence from the surrounding environment.

Sep is a string (i.e., a vector of character codes as might be entered with " " notation) which should separate components of the composition. Also, if sep is given, the line breaker will allow lines to be broken after each occurrence of sep. If sep is omitted, the composition will not be breakable (unless any of its component compositions are breakable).

For example, `2 choriz([a, b c, d = e], " + ", 180)' is formatted as `2 a + b c + (d = e)'. To get the choriz to have precedence 180 "outwards" as well as "inwards," enclose it in a cprec form: `2 cprec(choriz(...), 180)' formats as `2 (a + b c + (d = e))'.

The baseline of a horizontal composition is the same as the baselines of the component compositions, which are all aligned.


Go to the first, previous, next, last section, table of contents.