2
$\begingroup$

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

$\endgroup$
2
  • 1
    $\begingroup$ AFAIK, Mathematica has a TeX output filter available $\endgroup$ – Hagen von Eitzen Sep 19 '20 at 18:18
  • $\begingroup$ This belongs on Meta $\endgroup$ – gen-ℤ ready to perish Sep 19 '20 at 22:47
6
$\begingroup$

Try TeXForm[] in Mathematica.

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

which outputs

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

Putting that between dollar signs on this page

$\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.

$\endgroup$
4
  • 2
    $\begingroup$ $+1$. Every day we learn something new !!!. $\endgroup$ – Felix Marin Sep 19 '20 at 18:23
  • $\begingroup$ Upright font for dx is the continental European convention, italic font is the US convention. $\endgroup$ – GEdgar Sep 20 '20 at 16:48
  • $\begingroup$ thanks; I was using wrong input format for TeXForm function. This clears that up, I think. $\endgroup$ – Jim farned Sep 22 '20 at 16:10
  • $\begingroup$ 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 $\endgroup$ – Andrey Mitin Oct 4 '20 at 19:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .