id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
27078 Latex version of piecewise is cumbersome gh-JCGoran "The latex produced by the `piecewise` function is rather cumbersome to look at. For instance:
{{{
sage: var('y'); f = piecewise([((0,1), x^2*y), ([-1,0], -x*y^2)], var=x);
sage: latex(f)
piecewise\left(\left(\left(\text{\texttt{(0,{ }1)}}, x^{2} y\right), \left(\text{\texttt{[{-}1,{ }0]}}, -x y^{2}\right)\right), x\right)
}}}
which looks very strange when rendered in a document. On the other hand, something like this
{{{
\operatorname{piecewise}(x) = \begin{cases}x^2y, & x\in (0, 1)\\ -xy^2, & x\in [-1, 0]\\ \end{cases}
}}}
is much easier to understand when rendered." PLEASE CHANGE new minor user interface latex N/A