OpenersPrimaryExamplesSection(Spacer1)Examples  (6)

OpenersExampleSection0(Spacer1)Basic Examples  (6)

Export an arbitrary expression to TeX:

ExportString[Nest[1+1/#&,x,5],"TeX"]

This converts a (RefLink[Cell, paclet:ref/Cell]) expression to TeX:

ExportString[Cell[TextData["蔂圃"],"Subsection"],"TeX"]

Specify "ConversionRules" for the translation of a Wolfram System style element to a user-defined TeX macro:

ExportString[Cell[TextData["Exporting Cell expressions to TeX"],"Subsection"],"TeX","ConversionRules"-> {"Subsection"-> {"\n\\mymacro{","}\n"}} ]

Create a numbered equation using the "ConversionRules" option:

ExportString[Cell[BoxData[RowBox[{SubscriptBox["∫","𝒢"],RowBox[{"d"," ","μ",RowBox[{"(","g",")"}],SuperscriptBox["D","j"],RowBox[{"(","g",")"}]}]}]],"EquationNumbered"]

,"TeX","ConversionRules"-> {"EquationNumbered"-> {"\\begin{equation}\n",Convert`TeX`BoxesToTeX[#]&,"\n\\end{equation}"}} ]

Convert typeset expressions to EPS, stored in separate files:

ExportString[Sqrt[x-y],"TeX", "MathOutput" -> "EPS"]

Use the "BoxRules" option to customize how Wolfram Language boxes are translated to TeX:

ExportString[Sqrt[3],"TeX","BoxRules" -> {SqrtBox[x_]:>x<>"^(1/2)"}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {Related Formats:  (RefLink[TeXFragment, paclet:ref/format/TeXFragment])  ▪  (RefLink[EPS, paclet:ref/format/EPS])  ▪  (RefLink[HTML, paclet:ref/format/HTML])  ▪  (RefLink[LaTeX, paclet:ref/format/LaTeX])  ▪  (RefLink[MathML, paclet:ref/format/MathML])  ▪  (RefLink[NB, paclet:ref/format/NB])  ▪  (RefLink[PDF, paclet:ref/format/PDF])  ▪  (RefLink[RTF, paclet:ref/format/RTF])  ▪  (RefLink[XHTML, paclet:ref/format/XHTML])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Document Formats, paclet:guide/DocumentFormats])}, {▪(RefLinkPlain[Graphics Importing & Exporting, paclet:guide/GraphicsImportingAndExporting])}, {▪(RefLinkPlain[Importing & Exporting, paclet:guide/ImportingAndExporting])}, {▪(RefLinkPlain[Listing of All Formats, paclet:guide/ListingOfAllFormats])}, {▪(RefLinkPlain[Print Formats, paclet:guide/PrintFormats])}, {▪(RefLinkPlain[Vector Graphics Formats, paclet:guide/VectorGraphicsFormats])}})}})