This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / The Mathematica Book / Reference Guide / Some Notes on Internal Implementation  /

A.9.6 Output and Interfacing


Hidden-surface elimination for 3D graphics is done so as to be independent of display resolution.
A custom-written PostScript interpreter is used to render graphics in the front end.
Notebooks use a custom platform-independent bitmap image format.

Front end

The front end uses MathLink both for communication with the kernel, and for communication between its different internal components.
All menu items and other functions in the front end are specified using Mathematica expressions.
Configuration and preference files use Mathematica language format.
The help browser is based on Mathematica notebooks generated from the same source code as this book.


Notebooks are represented as Mathematica expressions.
Notebook files contain additional cached outline information in the form of Mathematica comments. This information makes possible efficient random access.
Incremental saving of notebooks is done so as to minimize rewriting of data, moving data already written out whenever possible.
All special characters are represented platform-independently using Unicode. Mapping tables are set up for specific Kanji and other fonts.


In OSI terms, MathLink is a presentation-level protocol, which can be layered on top of any transport medium, both message-based and stream-based.
MathLink encodes data in a compressed format when it determines that both ends of a link are on compatible computer systems.
MathLink can transmit out-of-band data such as interrupts as well as Mathematica expressions.
When possible MathLink is implemented using dynamically linked shared libraries.

Expression formatting

The front end uses a directed acyclic graph to represent the box structure of formatted expressions.
Boxes are interpreted using a two-dimensional generalization of an operator precedence parser.
Incremental parsing is used to minimize structure and display updating.
Character spacing and positioning are determined from font data and operator tables.
Line breaking is globally optimized throughout expressions, based on a method similar to the one used for text layout in TeX.
Expression formatting uses about 2000 pages of C code.