Hi Björn,
Here is the complete example with the shifted *-1 from the numerator to the
denominator.
In the second part of the example your code works quite well again. But I
don't know how to shift the -1* automatically when there is a need for.
In [21]: test = -(Rzy + 1)/(Ryz*Rzy - 1)
In [22]: test
Out[22]: (-\RZY - 1)/(\RYZ*\RZY - 1)
In [23]: latex(test)
Out[23]: '\\frac{- \\RZY - 1}{\\RYZ \\RZY - 1}'
In [24]: print(MyLatexPrinter().doprint(test))
\frac{-1 - \RZY}{\RYZ \RZY - 1}
In [25]: test = (Rzy + 1)/(-1*(Ryz*Rzy - 1))
In [26]: test
Out[26]: (\RZY + 1)/(-\RYZ*\RZY + 1)
In [27]: latex(test)
Out[27]: '\\frac{\\RZY + 1}{- \\RYZ \\RZY + 1}'
In [28]: print(MyLatexPrinter().doprint(test))
\frac{1 + \RZY}{1 - \RYZ \RZY}
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/f5e00996-ffe1-432e-879f-1e38bff82bac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.