latex
produce output suitable for LaTeX 2e printing
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
latex(expr, options)
latex(expr, filename, options)
expr
-
any expression
filename
(optional) file in which to put the output
options
zero or more of the options described below
append : true or false
Append to the output file filename instead of overwriting it
output : one of file, string, or terminal
Specify whether output should be written to filename, returned as a string, or printed as terminal output, respectively. The default is output=file when parameter filename is provided, and output=terminal otherwise.
The latex function produces output which is suitable for printing the input expr with a LaTeX 2e processor. It knows how to format integrals, limits, sums, products and matrices.
The mathematical format is taken, in general, from the CRC handbook or the Handbook of Mathematical functions.
When expr is a named table, it is evaluated before translation. Procedures and modules are not automatically evaluated.
The inert functions Sum, Int, Diff, Limit, and Log can be used instead of sum, int, diff, limit, and log to prevent evaluation.
It is possible to extend the abilities of latex to format other objects by defining a procedure with the name `latex/functionname`. The latex function will call this procedure when it encounters a function call to functionname within expr. For more information, see latex/functions.
Note that the output of the latex command does not include the commands to invoke the latex math environment.
The function latex produces output as a side-effect, and returns NULL as the function value. Therefore the ditto commands, % and %%, will not recall the LaTeX output.
When called with more than one argument, the second argument must be a string and is used as the name of a file on which to write the output. The file is overwritten unless the optional third argument, which must be the name append is given, which causes output to be appended to the file if it already exists.
latex⁡x2+y2=z2
{x}^{2}+{y}^{2}={z}^{2}
Put this output in the file LatexFile
latex⁡x2+y2=z2,LatexFile
latex⁡Int⁡1x2+1,x=int⁡1x2+1,x
\int \! \left( {x}^{2}+1 \right) ^{-1}\,{\rm d}x=\arctan \left( x \right)
Return the result as a string
latex⁡BesselK⁡ν,z+BesselJ⁡ν,z,output=string
{{\sl K}_{\nu}\left(z\right)}+{{\sl J}_{\nu}\left(z\right)}
The output option was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
See Also
appendto
latex/functions
latex/names
latex/viewing
writeto
Download Help Document
What kind of issue would you like to report? (Optional)