Introduction
An .nb file is a notebook from Wolfram Research’s
Mathematica, which has
used notebooks since its first version in 1988. A notebook holds text, Wolfram Language input,
the output it produced, such as formulas and graphics, and interactive controls, all
as cells in one document. The same files are used by the other Wolfram desktop
products and the Wolfram Cloud.
Structure
A notebook is a plain text file, readable in any text editor, holding a single
Wolfram Language expression. It starts with comments giving the content type
application/vnd.wolfram.mathematica and the program that wrote it, and
cache information that lets Mathematica open large files quickly. Then comes
Notebook[{…}], a list of Cell expressions, each with its
content and a style such as "Title", "Text",
"Input" or "Output". Cells can be grouped into sections, and
graphics are stored as expressions too, or as compressed data. The header, cache,
expressions, styles and options are on the
file and expressions page.
Notebook[{
Cell["Squares", "Title"],
Cell[BoxData[RowBox[{"Table", "[", RowBox[{RowBox[{"n", "^", "2"}], ",", RowBox[{"{", RowBox[{"n", ",", "5"}], "}"}]}], "]"}]], "Input"],
Cell[BoxData[RowBox[{"{", RowBox[{"1", ",", "4", ",", "9", ",", "16", ",", "25"}], "}"}]], "Output"]
}]
Not described
Known, not yet covered
- Reference: the box and style expressions, each documented on its own Wolfram symbol page, for the expressions page.
- Viewer: there is no viewer for Wolfram notebooks yet.
Unknown
- Reference: the cache numbers (such as
NotebookDataPosition): Wolfram’s notebook reference does not document them.
Links
Software
- Mathematica – Wolfram’s computing system, which makes and edits notebooks (Windows, macOS, Linux)
- Wolfram Player – free reader for notebooks (Windows, macOS, Linux)
- Wolfram Cloud – opens and runs notebooks in the browser (web)
Reference
- Notebook – Wolfram Language documentation of the Notebook expression