# Question about converting Mma expressions to TeX

When I want to convert the following expression

Integrate[1/(1 + t (-I - 1)) (-I - 1), {t, 0, 1}]


to TeX, I do:

HoldForm[Integrate[1/(1 + t (-I - 1)) (-I - 1), {t, 0, 1}]] // TeXForm


which works fine.

Now, I want to do the same without having to add HoldForm. I thought that the following might work.

tex[exp_] := TeXForm[HoldForm[exp]]

Integrate[1/(1 + t (-I - 1)) (-I - 1), {t, 0, 1}] //tex


• Add SetAttributes[tex,HoldFirst] and your tex function will work. – Alx Sep 4 at 9:58