TeXForm

TeXForm[expr]

prints as a TeX version of expr.

Details

  • TeXForm produces AMS-LaTeXcompatible TeX output.
  • When an input evaluates to TeXForm[expr], TeXForm does not appear in the output. »
  • TeXForm translates standard mathematical functions and operations.
  • TeXForm[expr] is equivalent to TeXForm[TraditionalForm[expr]]. TeXForm[StandardForm[expr]] can be used to get StandardForm TeX output. »
  • Symbols with names like alpha and ALPHA that correspond to TeX symbols are translated into their corresponding TeX symbols. »
  • Following standard mathematical conventions, singlecharacter symbol names are given in italic font, while multiple character names are given in roman font.
  • Wolfram Language special characters are translated whenever possible to their TeX equivalents.

Examples

open allclose all

Basic Examples  (1)

A polynomial:

A typeset expression:

A special character:

Scope  (9)

Subscripts and superscripts:

Overscripts and underscripts:

List structures:

A matrix:

Algebra and logic operations:

Calculus operations:

Elementary functions:

Special functions:

Named symbols are translated:

Generalizations & Extensions  (1)

TeXForm gives the TeX representation of the TraditionalForm expression:

Obtain the TeX representation of the expression in StandardForm:

Properties & Relations  (5)

Convert an expression to TeX:

Use ToExpression to convert TeX back to Wolfram Language syntax:

Use ToExpression to convert from TeX to the Wolfram Language:

The following expression will evaluate:

Use HoldForm to convert unevaluated expressions:

Add formatting via Format:

Use Export to generate a compilable TeX document:

When an input evaluates to TeXForm[expr], TeXForm does not appear in the output:

Out is assigned the value x2, not TeXForm[x^2]:

Possible Issues  (1)

Even when an output omits TeXForm from the top level, it is not stripped from subexpressions:

The output does not have TeXForm in it:

However, the variable e does have TeXForm in it, which may affect subsequent evaluations:

The product is not evaluated due to the intervening TeXForm:

Assign variables first and then apply TeXForm to the result to maintain computability:

Neat Examples  (1)

A continued fraction:

Wolfram Research (1988), TeXForm, Wolfram Language function, https://reference.wolfram.com/language/ref/TeXForm.html (updated 2004).

Text

Wolfram Research (1988), TeXForm, Wolfram Language function, https://reference.wolfram.com/language/ref/TeXForm.html (updated 2004).

CMS

Wolfram Language. 1988. "TeXForm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2004. https://reference.wolfram.com/language/ref/TeXForm.html.

APA

Wolfram Language. (1988). TeXForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TeXForm.html

BibTeX

@misc{reference.wolfram_2024_texform, author="Wolfram Research", title="{TeXForm}", year="2004", howpublished="\url{https://reference.wolfram.com/language/ref/TeXForm.html}", note=[Accessed: 26-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_texform, organization={Wolfram Research}, title={TeXForm}, year={2004}, url={https://reference.wolfram.com/language/ref/TeXForm.html}, note=[Accessed: 26-December-2024 ]}