#6268 closed defect (fixed)
[with patch, positive review] Typesetting of sec(x), csc(x), cot(x) are broken
Reported by: | gmhossain | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-4.0.2 |
Component: | symbolics | Keywords: | |
Cc: | ncalexan | Merged in: | 4.0.2.alpha0 |
Authors: | John Palmieri | Reviewers: | Nick Alexander |
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Typesettings of sec(x), csc(x), cot(x) are broken. It puts an extra "\mbox" around them. However, typesetting for sin(x), cos(x), tan(x) works as expected.
Attachments (2)
Change History (9)
comment:1 Changed 10 years ago by
comment:2 follow-up: ↓ 3 Changed 10 years ago by
- Milestone set to sage-4.0.2
- Summary changed from Typesetting of sec(x), csc(x), cot(x) are broken to [with patch, not ready for review] Typesetting of sec(x), csc(x), cot(x) are broken
Is this a bug in ginac/pynac? Look at this:
sage: SR Symbolic Ring sage: SR._latex_element_(sin(x)) '\\sin\\left(x\\right)' sage: SR._latex_element_(sec(x)) '\\mbox{\\sec}\\left(x\\right)'
The method _latex_element_
is a one-liner:
return GEx_to_str_latex(&x._gobj)
and I think GEx_to_str_latex is a ginac/pynac thing. At least, I found it in sage/libs/ginac/decl.pxi.
It's possible to work around it, I think, with a patch like the attached, but I'm not at all convinced that this is the right way to fix it. If you think it's okay, feel free to review it, but since I'm not sure, I've labeled it as "not read for review".
Changed 10 years ago by
comment:3 in reply to: ↑ 2 Changed 10 years ago by
The rebased patch for the ticket
http://trac.sagemath.org/sage_trac/ticket/5711
will resolve this issue as an un-intended consequence.
comment:4 Changed 10 years ago by
- Cc ncalexan added
- Component changed from misc to symbolics
- Owner changed from cwitty to burcin
- Status changed from new to assigned
- Summary changed from [with patch, not ready for review] Typesetting of sec(x), csc(x), cot(x) are broken to [with patch, needs review] Typesetting of sec(x), csc(x), cot(x) are broken
attachment:trac_6268-py_print_latex.patch fixes the reported problem. Apply only this patch.
comment:5 Changed 10 years ago by
- Merged in set to 4.0.2.alpha0
- Resolution set to fixed
- Reviewers set to Nick Alexander
- Status changed from assigned to closed
- Summary changed from [with patch, needs review] Typesetting of sec(x), csc(x), cot(x) are broken to [with patch, positive review] Typesetting of sec(x), csc(x), cot(x) are broken