after updating to latest Physics package, I find now latex geneated is invalid as it gives compile error.
I looked at old files I have and I see the latex generated before was correct. so something changed in the latex() command to cause this and now none of my files compile when I run my Maple program.

Before, same code used to generate this
\left(-x^{2}+1\right) \left(y^{\prime}\right)^{2} = 1-y^{2}
which compiled correctly.
Here is worksheet


> |
latex:-Settings(useimaginaryunit=i,
usecolor = false,
powersoftrigonometricfunctions= mixed, ## computernotation,
leavespaceafterfunctionname = true,
cacheresults = false,
spaceaftersqrt = true,
linelength=10000
);
Typesetting:-Unsuppress('all'); #always do this.
Typesetting:-Settings(prime=x,'typesetprime'=true); #this says to use y'(x) instead of dy/dx
Typesetting:-Suppress(y(x)); # this says to use y' and not y'(x)
|
![[useimaginaryunit = i, usecolor = false, powersoftrigonometricfunctions = mixed, leavespaceafterfunctionname = true, cacheresults = false, spaceaftersqrt = true, linelength = 10000]](/view.aspx?sf=235632_question/f64644f99e16d92ebe54b39d89f4196d.gif)

> |
ode:=(-x^2+1)*diff(y(x),x)^2 = 1-y(x)^2;
|

\left(-x^{2}+1\right) y^{\prime}^{2} = 1-y^{2}
|
The error from the latex compiler is
\documentclass[12pt]{book}
\usepackage{breqn}
\usepackage{amsmath}
\begin{document}
\begin{dmath*}
\left(-x^{2}+1\right) y^{\prime}^{2} = 1-y^{2}
\end{dmath*}
\end{document}
compiled using texlive lualatex command gives
(/usr/local/texlive/2022/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
! Double superscript.
<recently read> \mathsup
l.12 \left(-x^{2}+1\right) y^{\prime}^{2}
= 1-y^{2}
?
The fix is to keep same latex as before or use an extra {} like this {y^{\prime}}^{2}
but I think \left(y^{\prime}\right)^{2} looks better. But y^{\prime}^{2} is definitly wrong latex.
Download latex_problem.mw