Opened 11 months ago
Last modified 6 months ago
#27078 new PLEASE CHANGE
Latex version of piecewise is cumbersome
Reported by: | gh-JCGoran | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | user interface | Keywords: | latex |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
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.
Attachments (1)
Change History (3)
Changed 11 months ago by
comment:1 Changed 9 months ago by
- Milestone changed from sage-8.7 to sage-8.8
Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)
comment:2 Changed 6 months ago by
- Milestone sage-8.8 deleted
As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).
Piecewise current versus proposed Latex