$PrePrint

$PrePrint

is a global variable whose value, if set, is applied to every expression before it is printed.

Details

  • $PrePrint is applied after Out[n] is assigned, but before the output result is printed.

Examples

open allclose all

Basic Examples  (2)

By default, $PrePrint is not defined, meaning output is shown as it comes from evaluation:

Show exact quantities by their numerical value:

The function is designed to preserve arbitrary precision numbers if they are in the output:

Restore $PrePrint to the default:

Note that changing $PrePrint did not change the values saved in Out:

Scope  (1)

Show matrices using plots:

Restore $PrePrint to the default:

Wolfram Research (1988), $PrePrint, Wolfram Language function, https://reference.wolfram.com/language/ref/$PrePrint.html.

Text

Wolfram Research (1988), $PrePrint, Wolfram Language function, https://reference.wolfram.com/language/ref/$PrePrint.html.

CMS

Wolfram Language. 1988. "$PrePrint." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$PrePrint.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_$preprint, author="Wolfram Research", title="{$PrePrint}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/$PrePrint.html}", note=[Accessed: 17-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_$preprint, organization={Wolfram Research}, title={$PrePrint}, year={1988}, url={https://reference.wolfram.com/language/ref/$PrePrint.html}, note=[Accessed: 17-November-2024 ]}