"TeXExpression" (Interpreter Type)
"TeXExpression" (Interpreter Type)
TeX input.
Details
- "TeXExpression" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "TeXExpression" does not require connectivity to the Wolfram Cloud.
Restriction Specifications
-
Restricted["TeXExpression",{{choice1,…}}] one among choices Restricted["TeXExpression",symbols] a
expression involving only the given symbols (All, Automatic, or an explicit list)Restricted["TeXExpression",symbols,contexts] a
expression involving only the given symbols or symbols in the given contexts (All, Automatic, or an explicit list)Restricted["TeXExpression",symbols,contexts,resultcontext] a
expression involving only the given symbols or symbols in the given contexts, where the new symbols are created in resultcontext
Interpretation
- "TeXExpression" yields a representation of the
expression in the Wolfram Language.
Examples
Basic Examples (6)
Interpreter["TeXExpression"]["2+2"]Interpreter["TeXExpression"]["\ ext{el ni\\~no}"]Restrict to a list of choices:
Interpreter[Restricted["TeXExpression", {{True, False}}]]["x=2"]Interpreter[Restricted["TeXExpression", {{True, False}}]]["1=2"]By default, all symbols are allowed. Restrict to a list of allowed symbols:
Interpreter[Restricted["TeXExpression", {Greater}]]["x>2"]Interpreter[Restricted["TeXExpression", {Greater}]]["\\sin(x)>2"]By default, new symbols are created in $Context, but a custom context can be specified:
var = Interpreter[Restricted["TeXExpression", Automatic, Automatic, Automatic]]["x"]
Context[Evaluate[var]]var = Interpreter[Restricted["TeXExpression", Automatic, Automatic, "mycontext`"]]["x"]
Context[Evaluate[var]]Specify contexts for the allowed and output symbols:
Global`x = 10;
Interpreter[Restricted["TeXExpression", Automatic, {"Global`", "System`"}, "Global`"]]["\\sin(x)"]Prevent the creation of any new symbol:
Interpreter[Restricted["TeXExpression", Automatic, Automatic, None]]["\\sin(0)>0"]Interpreter[Restricted["TeXExpression", Automatic, Automatic, None]]["\\sin(z)>0"]See Also
TeXForm Interpreter Restricted Failure
Interpreter Types: HeldTeXExpression InactiveTeXExpression MathMLExpression HeldMathMLExpression InactiveMathMLExpression
Formats: LaTeX
Related Guides
History
Introduced in 2016 (10.4)