This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

NB (.nb)

Registered MIME types: application/mathematica, application/vnd.wolfram.mathematica
Mathematica
notebooks.
Used for storing and exchanging Mathematica input and output and for the creation of interactive technical documents.
Native file format of the Mathematica notebook interface.
ASCII format based on the Mathematica expression syntax.
Stores text, typeset expressions, graphics, animations, sounds, and other Mathematica input and output.
Supports interactive elements like hyperlinks, buttons, sliders, and other graphical user interface features.
Uses external or embedded stylesheets for specifying the appearance onscreen and in print.
Developed since 1988 by Wolfram Research.
  • Import and Export fully support the Mathematica notebook format.
  • Import reads a Mathematica notebook and returns it as a Notebook expression.
  • Export exports a Notebook, Cell, or box expression, as well as arbitrary mathematical expressions as a notebook.
  • Import imports the specified element from a notebook.
  • Import imports multiple elements.
  • Export creates a notebook by treating expr as specifying element elem.
  • Export treats each as specifying the corresponding .
  • Export exports expr with the specified option elements taken to have the specified values.
  • Export uses rules to specify the elements to be exported.
  • Put can be used to export multiple expressions.
  • See the reference pages for full general information on Import and Export.
  • In the notebook front end, Save and Save As can be used to save the current notebook to a file.
"Elements"list of elements and options available in this file
"Rules"full list of rules for each element and option
"Options"list of rules for options, properties, and settings
"Initialization"reads and evaluates all initializaton cells, returning the results as a list
"Notebook"notebook represented as a Notebook expression
"NotebookObject"NotebookObject expression
"Plaintext"plain text version of the notebook
  • Import by default uses the element for notebook files.
Show the Import elements available in a sample file:
Convert an arbitrary mathematical expression to the notebook format:
Import plain text contents from the previous output:
Show the Import elements available in a sample file:
In[1]:=
Click for copyable input
Out[1]=
 
Convert an arbitrary mathematical expression to the notebook format:
In[1]:=
Click for copyable input
Out[1]=
Import plain text contents from the previous output:
In[2]:=
Click for copyable input
Out[2]=