TeX (.tex)
- Export creates files compatible with AMS-LaTeX.
- See the "LaTeX" reference page for complete information about importing TeX documents.
Background & Context
-
- MIME type: application/x-tex
- TeX typesetting system and programming language.
- Commonly used for typesetting mathematical and scientific publications and other technical documents.
- Plain text format.
- Describes the contents and the layout of multipage documents.
- Developed since 1977 by Donald Knuth.
Export
- Export["file.tex",expr] exports arbitrary expressions and Notebook or Cell objects, as well as any box expressions obtained from ToBoxes, to the TeX format.
- The exported TeX includes markup material that maintains much of the document structure that exists within the Wolfram System.
- Export always generates complete AMS-LaTeX documents, not merely TeX language fragments.
- TeXForm can be used to create a TeX version of a typeset expression.
- Export["file.tex",expr,elem] creates a TeX file by treating expr as specifying element elem.
- The export format can be explicitly specified with the command Export["file",expr,"TeX"].
- See the following reference pages for full general information:
-
Import, Export import from or export to a file CloudImport, CloudExport import from or export to a cloud object ImportString, ExportString import from or export to a string ImportByteArray, ExportByteArray import from or export to a byte array
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements
Options
- Advanced Export options:
-
"BoxRules" {} specifies mappings from Wolfram Language box expressions to TeX elements "ConversionRules" Automatic specifies mappings from Wolfram System cell styles to TeX elements "DocumentClass" "article" what LaTeX document type to use "MathOutput" "TeX" format to use for typeset expressions "UsePackages" Automatic list of packages to include in \usepackage{} - Typical settings for "DocumentClass" include "article", "report", and "letter".
- Possible values for "MathOutput" are:
-
"EPS" converts typeset expressions to EPS, stored in separate files "TeX" formats all typeset expressions to embedded TeX macros
Examples
Basic Examples (6)
Export an arbitrary expression to TeX:
This converts a Cell expression to TeX:
Specify "ConversionRules" for the translation of a Wolfram System style element to a user-defined TeX macro:
Create a numbered equation using the "ConversionRules" option:
Convert typeset expressions to EPS, stored in separate files:
Use the "BoxRules" option to customize how Wolfram Language boxes are translated to TeX: