Ticket #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: | Work issues: | ||
| Report Upstream: | Reviewers: | Golam Mortuza Hossain | |
| Authors: | Burcin Erocal | Merged in: | Sage 4.1.1.rc1 |
| 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
Change History
Changed 4 years ago by burcin
-
attachment
trac_6401-real_imag_typesetting.patch
added
comment:1 Changed 4 years ago by burcin
- Owner set to burcin
- Status changed from new to assigned
- Milestone set to sage-4.1.1
- Authors set to Burcin Erocal
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 4 years ago by burcin
- 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 4 years ago by gmhossain
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 4 years ago by burcin
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 4 years ago by gmhossain
- 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 4 years ago by mvngu
- Status changed from assigned to closed
- Resolution set to fixed
- Merged in set to Sage 4.1.1.rc1
- 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