2

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.

EllipticalInitial
  • 1,111
  • 8
  • 13

2 Answers2

2

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].

A.G.
  • 4,362
  • 13
  • 18
1

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

Mohit Singh
  • 156
  • 7