2
$\begingroup$

Suppose I have a function defined:

g[z_]:=Sum[Sin[z/k!],{k,0,infinity}]

And I want to export the following Latex based on only the function definition

$$\sum_{k=0}^\infty \sin\left(\frac{z}{k!}\right)$$

Is it possible to do this in Mathematica? If so, how? Ideally it would work for any arbitrary function, or at least as often as possible.

$\endgroup$
1
2
$\begingroup$

You can use

g[z_] := Sum[Sin[z/k!], {k, 0, Infinity}]
g[z] // TeXForm

output is

\sum _{k=0}^{\infty } \sin \left(\frac{z}{k!}\right).

However $g(z)$ will be simplified, for example g[z_] := z+z will yield $2z$. If you want to avoid that just use g[z_] := Holdform[z+z].

$\endgroup$
1
$\begingroup$

The simplest way to do it select the equation and copy it as latex. It can be pasted in the latex editor as an equation. A picture is attached for references enter image description here

$\endgroup$
2
  • $\begingroup$ This helps, but I need this process automated since I'll be doing it for several hundred equations. $\endgroup$ – jippyjoe4 Apr 8 at 22:11
  • $\begingroup$ You can also use TeXForm[] command available in Mathematica to get the Latex code of the equation. $\endgroup$ – Mohit Singh Apr 10 at 11:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.