Pretty-printing (or prettyprinting) is the application of any of various stylistic formatting conventions to s, such as source code, markup, and similar kinds of content. These formatting conventions may entail adhering to an indentation style, using different color and typeface to highlight syntactic elements of source code, or adjusting size, to make the content easier for people to read, and understand. Pretty-printers for source code are sometimes called code formatters or beautifiers.
Pretty-printing usually refers to displaying mathematical expressions similar to the way they would be typeset professionally. For example, in computer algebra systems such as Maxima or Mathematica the system may write output like "x ^ 2 + 3 * x" as Some graphing calculators, such as the Casio 9860 series, HP-49 series, TI-84 Plus, TI-89, and TI-Nspire, the TI-83 Plus with the PrettyPt add-on, or the TI-84 Plus with the same add-on or the "MathPrint"-enabled OSes, can perform pretty-printing. Additionally, a number of newer scientific calculators are equipped with dot matrix screens capable of pretty-printing such as the Casio FX-ES series (Natural Display), Sharp EL-W series (WriteView), HP SmartCalc 300s, TI-30XB, and Numworks.
Many text formatting programs can also typeset mathematics: TeX was developed specifically for high-quality mathematical typesetting.
Pretty-printing in markup language instances is most typically associated with indentation of tags and string content to visually determine hierarchy and nesting. Although the syntactical structures of tag-based languages do not significantly vary, the indentation may vary significantly due to how a markup language is interpreted or due to the data it describes.
In MathML, whitespace characters do not reflect data, meaning, or syntax above what is required by XML syntax. In HTML, whitespace characters between tags are considered text and are parsed as text nodes into the parsed result.