RawBoxes

RawBoxes[boxes]

is a low-level construct which is formatted as boxes without further interpretation.

Details

  • When typeset, RawBoxes[boxes] inserts boxes verbatim into the resulting box structure, to be rendered by the front end.
  • RawBoxes[boxes] performs no validation of boxes before inserting them.
  • If the front end determines that a given box structure is invalid, it may display the result with an error indicator.

Examples

open allclose all

Basic Examples  (2)

Display the formatted box expressions:

Create a button that applies a template:

Scope  (1)

Render an output that does not directly correspond to an input expression:

Properties & Relations  (2)

MakeBoxes returns the content of RawBoxes:

MakeBoxes will not validate the contents and may return illegally formed boxes:

RawBoxes of a string typesets as if the contents of the string were literally typed:

This can be used to display arbitrary content without using string quoting:

It can also be used to represent an operator that vertically spans:

Possible Issues  (2)

Not all box expressions that are valid for display purposes correspond to input expressions:

Attempting to converting such expressions to an input will produce an ErrorBox construct:

It is possible to send invalid boxes to the front end with RawBoxes:

Introduced in 2007
 (6.0)
 |
Updated in 2017
 (11.1)