LaTeX (.tex)

Background & Context

    • MIME type: application/x-tex
    • LaTeX typesetting system and programming language.
    • Commonly used for typesetting mathematical and scientific publications.
    • Plain text format.
    • Describes the contents and the layout of multi-page documents.
    • Based on Donald Knuth's TeX typesetting system.
    • Developed in 1985 by Leslie Lamport as a special-purpose derivative of TeX.

Import

  • Import["file.tex"] imports a LaTeX document and returns a notebook version of it.
  • Import["file.tex"] converts a LaTeX document to a Notebook expression.
  • Import["file.tex",elem] imports the specified element from a LaTeX file.
  • Import["file.tex",{{elem1,elem2,}}] imports multiple elements.
  • The import format can be specified with Import["file", "LaTeX"] or Import["file",{"LaTeX",elem,}].
  • See the following reference pages for full general information:
  • Importimport from a file
    CloudImportimport from a cloud object
    ImportStringimport from a string
    ImportByteArrayimport from a byte array

Notebook Interface

  • In the Wolfram System front end, LaTeX can be pasted directly into a notebook.
  • Save As exports the active notebook as a LaTeX document.

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
  • Import elements:
  • "Notebook"a Notebook version of the LaTeX file
    "NotebookObject"LaTeX file represented as a NotebookObject
  • The Wolfram Language by default uses the "Notebook" element when importing from LaTeX.

Options

  • Advanced Import options:
  • "InputPath"{}list of directories to search for TeX input files
    "LogFile"Falsewhether to create a log file for the conversion process
    "OutputFile"Nonefile to which to save the Notebook expression
    "StyleDefinitions"AutomaticWolfram System stylesheet to use in the generated notebook

Examples

Basic Examples  (1)

Show the Import elements available in a LaTeX sample file:

Convert a LaTeX file to a Notebook expression: