Opened 10 years ago
Closed 10 years ago
#6401 closed defect (fixed)
[with patch, positive review] Typesettings of real() and imag() are broken
Reported by: | gmhossain | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-4.1.1 |
Component: | symbolics | Keywords: | |
Cc: | Merged in: | Sage 4.1.1.rc1 | |
Authors: | Burcin Erocal | Reviewers: | Golam Mortuza Hossain |
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Typesetting of real() and imag() methods are broken due to missing parenthesis.
sage: latex(x.real()) \Rex
"\Rex" is not a valid latex expression. It should be something like "\Re\left(x\right)".
Similar issues are present also for Symbolic functions
sage: f(x) = function('f',x) sage: latex( f(x).imag()) \Imf\left(x\right)
Again it should be similar to "\Im\left(f\left(x\right)\right)".
Attachments (1)
Change History (7)
Changed 10 years ago by
comment:1 Changed 10 years ago by
- Milestone set to sage-4.1.1
- Owner changed from (none) to burcin
- Status changed from new to assigned
I have a fix for this in my local pynac tree. I will make a new package with a few more bugfixes available soon.
comment:2 Changed 10 years ago by
- Summary changed from Typesettings of real() and imag() are broken to [with patch, needs review] Typesettings of real() and imag() are broken
This now depends on the package linked from #6404.
Please follow the instructions on that ticket to apply & test.
comment:3 Changed 10 years ago by
Hi Burcin,
I am testing out the new pynac spkg. Seems alright to me so far. Out of curiosity: is there any reason to print the extra spaces around the the argument of real() and imag()?
sage: latex(real(x)) \Re \left( x \right)
Given it differs a bit from your earlier convention for default typesetting of symbolic function
sage: psi(x) = function('psi',x) sage: latex(psi(x)) \psi\left(x\right)
Otherwise, I am ready to give positive review as the output is valid latex expression in both cases.
comment:4 Changed 10 years ago by
There is no specific reason I chose that format. We can change it in the future if we decide on a convention.
comment:5 Changed 10 years ago by
- Reviewers set to Golam Mortuza Hossain
- Summary changed from [with patch, needs review] Typesettings of real() and imag() are broken to [with patch, positive review partial] Typesettings of real() and imag() are broken
Note: I am giving partial positive review because I tested this patch against my stable sage-4.1. So if it applies cleanly on Sage-4.1.1.rc1 then that would be full positive from me.
comment:6 Changed 10 years ago by
- Merged in set to Sage 4.1.1.rc1
- Resolution set to fixed
- Status changed from assigned to closed
- Summary changed from [with patch, positive review partial] Typesettings of real() and imag() are broken to [with patch, positive review] Typesettings of real() and imag() are broken
I applied patches in the following order:
- the spkg
pynac-0.1.8.p2.spkg
at #6404 trac_6404-conjugate_typesetting.patch
trac_6401-real_imag_typesetting.patch
trac_6377-exp_infinity.patch
trac_6243-fderivative_hash.patch
All doctests pass in my merge tree. So I'm changing #6404, #6401, #6377 and #6243 to positive review as per Golam's request.
doctest fixes for typesetting changes in pynac