Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typesettings of real() and imag() are broken #6401

Closed
golam-m-hossain opened this issue Jun 25, 2009 · 10 comments
Closed

Typesettings of real() and imag() are broken #6401

golam-m-hossain opened this issue Jun 25, 2009 · 10 comments

Comments

@golam-m-hossain
Copy link

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)".

Component: symbolics

Author: Burcin Erocal

Reviewer: Golam Mortuza Hossain

Merged: Sage 4.1.1.rc1

Issue created by migration from https://trac.sagemath.org/ticket/6401

@burcin
Copy link

burcin commented Jul 28, 2009

Attachment: trac_6401-real_imag_typesetting.patch.gz

doctest fixes for typesetting changes in pynac

@burcin
Copy link

burcin commented Jul 28, 2009

comment:1

I have a fix for this in my local pynac tree. I will make a new package with a few more bugfixes available soon.

@burcin
Copy link

burcin commented Jul 28, 2009

Author: Burcin Erocal

@burcin burcin added this to the sage-4.1.1 milestone Jul 28, 2009
@burcin burcin self-assigned this Jul 28, 2009
@burcin
Copy link

burcin commented Aug 1, 2009

comment:2

This now depends on the package linked from #6404.

Please follow the instructions on that ticket to apply & test.

@golam-m-hossain
Copy link
Author

comment:3

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.

@burcin
Copy link

burcin commented Aug 2, 2009

comment:4

There is no specific reason I chose that format. We can change it in the future if we decide on a convention.

@golam-m-hossain
Copy link
Author

Reviewer: Golam Mortuza Hossain

@golam-m-hossain
Copy link
Author

comment:5

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.

@golam-m-hossain golam-m-hossain changed the title Typesettings of real() and imag() are broken [positive review partial] Typesettings of real() and imag() are broken Aug 2, 2009
@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Aug 3, 2009

comment:6

I applied patches in the following order:

  1. the spkg pynac-0.1.8.p2.spkg at Typeseting for conjugate() of symbolic function is inadequate #6404
  2. trac_6404-conjugate_typesetting.patch
  3. trac_6401-real_imag_typesetting.patch
  4. trac_6377-exp_infinity.patch
  5. trac_6243-fderivative_hash.patch
    All doctests pass in my merge tree. So I'm changing Typeseting for conjugate() of symbolic function is inadequate #6404, Typesettings of real() and imag() are broken #6401, exp(x) is broken at x=Infinity and x=-Infinity #6377 and hashes for derivatives of symbolic functions w.r.t. different variables are the same #6243 to positive review as per Golam's request.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Aug 3, 2009

Merged: Sage 4.1.1.rc1

@sagetrac-mvngu sagetrac-mvngu mannequin changed the title [positive review partial] Typesettings of real() and imag() are broken Typesettings of real() and imag() are broken Aug 3, 2009
@sagetrac-mvngu sagetrac-mvngu mannequin closed this as completed Aug 3, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants