Question: issue with Physics:-Latex. Invalid latex on expression generated

I've been using Physics:-Latex in my large program, and checking the output visually. I noticed this small issue on one page.

When asking Physics:-Latex to generate Latex for this expression

It gives

While when using standard latex() command, the result is

Below is the worksheet attached. Using Latest Physics and Maple.
 

interface(version)

`Standard Worksheet Interface, Maple 2020.1, Windows 10, July 30 2020 Build ID 1482634`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 784 and is the same as the version installed in this computer, created 2020, August 31, 0:51 hours Pacific Time.`

restart;

 

expr:=1/2*int(exp(-t)*f(t),t)*exp(t)-1/2*exp(-t)*int(exp(t)*f(t),t)

(1/2)*(int(exp(-t)*f(t), t))*exp(t)-(1/2)*exp(-t)*(int(exp(t)*f(t), t))

Physics:-Latex(expr)

\frac{\left(\int {\rm e}^{-t} f \left(t \right)d t \right) {\rm e}^{t}}{2}+-\frac{1}{2} {\rm e}^{-t} \left(\int {\rm e}^{t} f \left(t \right)d t \right)

latex(expr)

{\frac {\int \!{{\rm e}^{-t}}f \left( t \right) \,{\rm d}t{{\rm e}^{t}
}}{2}}-{\frac {{{\rm e}^{-t}}\int \!{{\rm e}^{t}}f \left( t \right)
\,{\rm d}t}{2}}

 


THe latex file used to compile the Maple output Latex using TeXLive distribution on Linux is

\documentclass[12pt]{article}
\usepackage{amsmath}
%\usepackage{maplestd2e} %not needed for this example
\begin{document}

%output of Physics:-Latex()
\[
\frac{\left(\int {\rm e}^{-t} f \left(t \right)d t \right) {\rm e}^{t}}{2}+-\frac{1}{2} {\rm e}^{-t} \left(\int {\rm e}^{t} f \left(t \right)d t \right)
\]

%output of maple latex()
\[
{\frac {\int \!{{\rm e}^{-t}}f \left( t \right) \,{\rm d}t{{\rm e}^{t}}}{2}}-{\frac {{{\rm e}^{-t}}\int \!{{\rm e}^{t}}f \left( t \right) \,{\rm d}t}{2}}
\]

\end{document}

Download latex_issue_5.mw

 

Please Wait...