is a form that disables the formatting of expr when it appears inside held expressions, but gives expr as soon as evaluation occurs.
- DisableFormatting prevents formatting of expressions inside Hold, HoldComplete, and other functions with the HoldFirst, HoldRest, HoldAll, and HoldAllComplete attributes.
- DisableFormatting usually displays expressions in InputForm.
- The DisableFormatting wrapper is not visible in StandardForm and TraditionalForm.
Examplesopen allclose all
Basic Examples (3)
DisableFormatting must appear inside held expression or it will evaluate away:
Properties & Relations (5)
However, DisableFormatting does not by itself hold its argument or prevent typesetting:
Defer prevents an expression from evaluating but not typesetting:
Interpretation assigns an arbitrary appearance to an output expression:
With DisableFormatting, the normal evaluation and formatting is restored once the hold is released:
On the other hand, copy and paste will preserve the DisableFormatting wrapper:
Inactivate creates an expression that sometimes, but not always, avoids 2D typesetting:
The result is a different expression, where each head h has been replaced by Inactive[h]:
DisableFormatting always avoids 2D typesetting, and the input expression returns unchanged: