Styling

The functions in this section produce a visual difference that is not material to the interpretation of an expression such as text color and size or other typographic variations.

They are inert and the value of a ["Function", _expr_] expression is expr.

Delimiter

["Delimiter", expr]

["Delimiter", expr, delim]

Visually group expressions with an open delimiter, a close delimiter and separators between elements of the expression.

When serializing to LaTeX, render expr wrapped in delimiters.

The Delimiter function is inert and the value of a ["Delimiter", _expr_] expression is expr.

expr is a function expression, usually a ["Sequence"]. It should not be a symbol or a number.

delim is an optional string:

  • when it is a single character it is a separator
  • when it is two characters, the first is the opening delimiter and the second is the closing delimiter
  • when it is three characters, the first is the opening delimiter, the second is the separator, and the third is the closing delimiter

The delimiters are rendered to LaTeX.

The open and close delimiters are a single character, one of: ()[]{}<>|‖⌈⌉⌊⌋⌜⌝⌞⌟⎰⎱". The open and close delimiters do not have to match. For example, "')]'" is a valid delimiter.

If an open or close delimiter is ., it is ignored.

The separator delimiter is also a single character, one of ,;.&:|- or U+00B7 (middle dot), U+2022 (bullet) or U+2026 (ellipsis).

If no delim is provided, a default delimiter is used based on the type of expr:

  • ["Sequence"] -> (,)
  • ["Tuple"], ["Single"], ["Pair"], ["Triple"] -> (,)
  • ["List"] -> [,]
  • ["Set"] -> {,}

Spacing

["Spacing", width]

When serializing to LaTeX, widthis the dimension of the spacing, in 1/18 em.

The Spacing function is inert and the value of a ["Spacing", _expr_] expression is expr.

Style

["Style", expr, dictionary]

  • expran expression
  • dictionarya dictionary with one or more of the following keys:
    • _"display"_:
      • "inline" for \textstyle
      • "block" for \displaystyle
      • "script" for \scriptstyle
      • "scriptscript" for \scriptscriptstyle
    • _"size"_: 110. Size 5 is normal, size 1 is smallest
    • _"color"_

The Style function is inert and the value of a ["Style", _expr_] expression is expr.