Export a Notebook to a LaTeX Document
Using the File Menu...
Navigate the menu
Within the notebook interface, go to File ▶ Save As... and select LaTeX Document from the file dropdown:
Once selected, click Options... to alter aspects of the LaTeX document:
Specify LaTeX options
From the LaTeX Options dialog box, select which Document class and Typeset expression formats are needed from the following options, then click OK:
Customizing with Export...
Set the directory
Set the directory with notebook source files using SetDirectory:
Set the source notebook
Set the notebook source file:
Open the notebook source file:
- A NotebookObject must remain open with the application in order to be used directly in expressions, as it is managed by the notebook front end.
Export the notebook to LaTeX
The Export function can be used to programmatically convert files to LaTeX documents and save them to any location in the file system. By default, the document is exported as an article class:
View the resulting document:
Compile to PDF:
The Document class can be altered by changing the corresponding option:
View the resulting document:
Compile to PDF:
Export can also handle conversion rules for user-defined macros. Translate a list of cell style elements:
View the resulting document:
Compile to PDF:
Translate a list of inline style elements:
View the resulting document:
Compile to PDF:
- Conversion rule specifications can also be added to any style element prototypes within a custom stylesheet.
Using Utility Functions...
Set the directory
Set the directory with notebook source files using SetDirectory:
Export the notebook to LaTeX
Use FileConvert to directly convert a notebook to a LaTeX document with default parameters:
Click the in the File object to view the resulting document: