StandardForm

StandardForm[expr]

prints as the standard Wolfram Language two-dimensional representation of expr.

Details

  • StandardForm generates output that gives a unique and unambiguous representation of Wolfram Language expressions, suitable for use as input. »
  • StandardForm incorporates many aspects of traditional mathematical notation.
  • StandardForm is the standard format type used for both input and output of Wolfram Language expressions in notebooks.
  • Graphics and Graphics3D are displayed graphically in StandardForm.
  • StandardForm can be edited in the notebook front end.
  • StandardForm uses special characters as well as ordinary keyboard characters.
  • StandardForm is based on boxes.
  • The notebook front end contains menu items for conversion to and from StandardForm.
  • When an input evaluates to StandardForm[expr], StandardForm does not appear in the output. »

Examples

open allclose all

Basic Examples  (2)

StandardForm is used by default for output:

StandardForm for graphics:

Scope  (7)

Basic Objects  (2)

Integer, Rational, Real, and Complex numbers:

Arbitrary-precision Real and Complex numbers:

Special constants:

Characters and strings of characters:

Control characters for strings:

Special Input Forms  (3)

Different Power expressions:

Special typeset expressions:

Different list structures:

Special Output Forms  (2)

Some objects use a special output representation:

Compare with the underlying FullForm of the expression:

Some objects use an elided output representation:

The elided parts are visible using InputForm:

Properties & Relations  (5)

When an input evaluates to StandardForm[expr], StandardForm does not appear in the output:

Out is assigned the value x2, not StandardForm[x^2]:

StandardForm is two-dimensional unambiguous formatting:

OutputForm approximates StandardForm using keyboard characters:

TraditionalForm is two-dimensional, but ambiguous formatting:

InputForm and FullForm provide one-dimensional formatting:

Use ToString to generate a string in StandardForm:

The string includes two-dimensional markup:

Use ToExpression to convert back:

Use ToBoxes to get the box representation of an expression in StandardForm:

Use ToExpression to convert back:

Add formatting via Format:

Possible Issues  (1)

Even when an output omits StandardForm from the top level, it is not stripped from subexpressions:

The output does not have StandardForm in it:

However, the variable e does have StandardForm in it, which may affect subsequent evaluations:

The product is not evaluated due to the intervening StandardForm:

Assign variables first and then apply StandardForm to the result to maintain computability:

Neat Examples  (1)

Nested roots:

Nested powers:

Wolfram Research (1996), StandardForm, Wolfram Language function, https://reference.wolfram.com/language/ref/StandardForm.html (updated 2007).

Text

Wolfram Research (1996), StandardForm, Wolfram Language function, https://reference.wolfram.com/language/ref/StandardForm.html (updated 2007).

CMS

Wolfram Language. 1996. "StandardForm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/StandardForm.html.

APA

Wolfram Language. (1996). StandardForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StandardForm.html

BibTeX

@misc{reference.wolfram_2024_standardform, author="Wolfram Research", title="{StandardForm}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/StandardForm.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_standardform, organization={Wolfram Research}, title={StandardForm}, year={2007}, url={https://reference.wolfram.com/language/ref/StandardForm.html}, note=[Accessed: 21-December-2024 ]}