DisableFormatting
✖
DisableFormatting
is a form that disables the formatting of expr when it appears inside held expressions, but gives expr as soon as evaluation occurs.
Details

- 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.
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Prevent an expression from formatting:

https://wolfram.com/xid/0btnybqbagg6-87jnlv

Release the hold to let it format:

https://wolfram.com/xid/0btnybqbagg6-tb7aaw

Prevent an unevaluated expression from formatting:

https://wolfram.com/xid/0btnybqbagg6-tohrxl

Releasing the hold allows evaluation and, subsequently, formatting to occur:

https://wolfram.com/xid/0btnybqbagg6-gko6hm

DisableFormatting must appear inside held expression or it will evaluate away:

https://wolfram.com/xid/0btnybqbagg6-y4kpzj


https://wolfram.com/xid/0btnybqbagg6-zhsd3d

Scope (3)Survey of the scope of standard use cases
DisableFormatting works inside any function with held attributes like HoldAll:

https://wolfram.com/xid/0btnybqbagg6-4doppw


https://wolfram.com/xid/0btnybqbagg6-t9nz1i


https://wolfram.com/xid/0btnybqbagg6-0xcuxd


https://wolfram.com/xid/0btnybqbagg6-iejcug


https://wolfram.com/xid/0btnybqbagg6-zkr6zw


https://wolfram.com/xid/0btnybqbagg6-wo1ptv


https://wolfram.com/xid/0btnybqbagg6-2r0tk

Disable the formatting in held expressions:

https://wolfram.com/xid/0btnybqbagg6-fzpsr9


https://wolfram.com/xid/0btnybqbagg6-zscjta

Evaluate held parts to restore the normal formatting:

https://wolfram.com/xid/0btnybqbagg6-379o02

DisableFormatting is invisible in StandardForm and TraditionalForm:

https://wolfram.com/xid/0btnybqbagg6-71enzg


https://wolfram.com/xid/0btnybqbagg6-7dio5

InputForm and FullForm show DisableFormatting:

https://wolfram.com/xid/0btnybqbagg6-gmd8b9


https://wolfram.com/xid/0btnybqbagg6-qlsnyl

Properties & Relations (5)Properties of the function, and connections to other functions
Hold, HoldForm and other functions that hold their arguments prevent evaluation but not typesetting:

https://wolfram.com/xid/0btnybqbagg6-v2or67

DisableFormatting inside of Hold prevents the unevaluated expression from typesetting:

https://wolfram.com/xid/0btnybqbagg6-46hxe4

However, DisableFormatting does not by itself hold its argument or prevent typesetting:

https://wolfram.com/xid/0btnybqbagg6-c68frt

In a HoldFirst or HoldRest function, DisableFormatting only affects the held arguments:

https://wolfram.com/xid/0btnybqbagg6-jnw8ph


https://wolfram.com/xid/0btnybqbagg6-thuvue


https://wolfram.com/xid/0btnybqbagg6-qemetp


https://wolfram.com/xid/0btnybqbagg6-g0klrw

Defer prevents an expression from evaluating but not typesetting:

https://wolfram.com/xid/0btnybqbagg6-82u0f1

If copied and pasted, that expression will then evaluate:

https://wolfram.com/xid/0btnybqbagg6-dh9yeq

If using DisableFormatting along with Defer, the expression will neither evaluate nor typeset:

https://wolfram.com/xid/0btnybqbagg6-szao1b

However, on copy and paste, it evaluates and therefore typesets normally:

https://wolfram.com/xid/0btnybqbagg6-qf1z83

Interpretation assigns an arbitrary appearance to an output expression:

https://wolfram.com/xid/0btnybqbagg6-3x72u7

If copied and pasted, normal interpretation and typesetting follow:

https://wolfram.com/xid/0btnybqbagg6-ptfidm

However, the original expression remains unevaluated:

https://wolfram.com/xid/0btnybqbagg6-0xthj0

With DisableFormatting, the normal evaluation and formatting is restored once the hold is released:

https://wolfram.com/xid/0btnybqbagg6-iefon2


https://wolfram.com/xid/0btnybqbagg6-b2ou3j

On the other hand, copy and paste will preserve the DisableFormatting wrapper:

https://wolfram.com/xid/0btnybqbagg6-m2lxxo

Inactivate creates an expression that sometimes, but not always, avoids 2D typesetting:

https://wolfram.com/xid/0btnybqbagg6-zrqde7

The result is a different expression, where each head h has been replaced by Inactive[h]:

https://wolfram.com/xid/0btnybqbagg6-jno2l5

DisableFormatting always avoids 2D typesetting, and the input expression returns unchanged:

https://wolfram.com/xid/0btnybqbagg6-puwyub


https://wolfram.com/xid/0btnybqbagg6-uvsdx7

Wolfram Research (2016), DisableFormatting, Wolfram Language function, https://reference.wolfram.com/language/ref/DisableFormatting.html.
Text
Wolfram Research (2016), DisableFormatting, Wolfram Language function, https://reference.wolfram.com/language/ref/DisableFormatting.html.
Wolfram Research (2016), DisableFormatting, Wolfram Language function, https://reference.wolfram.com/language/ref/DisableFormatting.html.
CMS
Wolfram Language. 2016. "DisableFormatting." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DisableFormatting.html.
Wolfram Language. 2016. "DisableFormatting." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DisableFormatting.html.
APA
Wolfram Language. (2016). DisableFormatting. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DisableFormatting.html
Wolfram Language. (2016). DisableFormatting. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DisableFormatting.html
BibTeX
@misc{reference.wolfram_2025_disableformatting, author="Wolfram Research", title="{DisableFormatting}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/DisableFormatting.html}", note=[Accessed: 19-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_disableformatting, organization={Wolfram Research}, title={DisableFormatting}, year={2016}, url={https://reference.wolfram.com/language/ref/DisableFormatting.html}, note=[Accessed: 19-June-2025
]}