# Mathematical symbols in Mathematica and Stack Exchange

How may I transfer mathematical text (with symbols, etc.) from Wolfram Mathematica into Stack Exchange?

• AFAIK, Mathematica has a TeX output filter available Commented Sep 19, 2020 at 18:18
• This belongs on Meta Commented Sep 19, 2020 at 22:47

Try TeXForm[] in Mathematica.

TeXForm[Integrate[f(x), {x,-7,\[Pi]}]]


which outputs

\int_{-7}^{\pi } f(x) \, dx


$$\int_{-7}^{\pi } f(x) \, dx$$


yields $$\int_{-7}^{\pi } f(x) \, dx$$. (footnote 1) Between double dollar signs, $$\int_{-7}^{\pi } f(x) \, dx \text{.}$$

It's not perfect, and you may want to tweak the results, but it is an 80+% solution.

(footnote 1) There are several style faults in the form of integrals produced by Mathematica. I would always style the given integral as \int_{-7}^{\pi } \; f(x) \, \mathrm{d}x, "$$\int_{-7}^{\pi } \; f(x) \, \mathrm{d}x$$", but there are plenty of sources that can't be bothered to ensure the limits of integration and integrand don't collide and don't correctly render operators in an upright font.

• $+1$. Every day we learn something new !!!. Commented Sep 19, 2020 at 18:23
• Upright font for dx is the continental European convention, italic font is the US convention. Commented Sep 20, 2020 at 16:48
• thanks; I was using wrong input format for TeXForm function. This clears that up, I think. Commented Sep 22, 2020 at 16:10
• I often find myself simply right-clicking on the expression of interest and choose "Copy as LaTeX" from the context menu: s3.amazonaws.com/resources.gomodus.com/nb/latex.jpg Commented Oct 4, 2020 at 19:05