#10679: Typesetting (LaTeX) error for complex fractions
-------------------------+--------------------------------------------------
   Reporter:  jan        |          Owner:  burcin       
       Type:  defect     |         Status:  needs_review 
   Priority:  critical   |      Milestone:  sage-4.7.1   
  Component:  symbolics  |       Keywords:               
Work_issues:             |       Upstream:  N/A          
   Reviewer:             |         Author:  Burcin Erocal
     Merged:             |   Dependencies:               
-------------------------+--------------------------------------------------
Changes (by newvalueoldvalue):

  * status:  new => needs_review
  * author:  => Burcin Erocal


Old description:

> The simple fraction
>
> {{{
> i/2* x^2/a
> }}}
>
> is typeset as
>
> {{{
> 1/2* i x^2/ (2*a).
> }}}
>
> This is clearly wrong. There is an extra factor of 2 in the denominator.
> The internal representation is however correct.
>
> Reproduce with
>
> {{{
> var('a x')
> ratio = i/2* x^2/a
> print ratio        # correct
> latex(ratio)       # wrong
> }}}
>
> See my public worksheet http://demo.sagenb.org/home/pub/69/ (sage version
> 4.6)

New description:

 The simple fraction

 {{{
 i/2* x^2/a
 }}}

 is typeset as

 {{{
 1/2* i x^2/ (2*a).
 }}}

 This is clearly wrong. There is an extra factor of 2 in the denominator.
 The internal representation is however correct.

 Reproduce with

 {{{
 var('a x')
 ratio = i/2* x^2/a
 print ratio        # correct
 latex(ratio)       # wrong
 }}}

 See my public worksheet http://demo.sagenb.org/home/pub/69/ (sage version
 4.6)

 Apply trac_10679-quadratic_number_field_numerator.patch,
 trac_10679-py_numer.patch.

--

Comment:

 Attached patches fix this issue.

  * attachment:trac_10679-quadratic_number_field_numerator.patch defines a
 `numerator()` method for quadratic number field elements
  * attachment:trac_10679-py_numer.patch changes the `py_numer()` function
 so that it will still work when it encounters another element class that
 defines `denominator()` but not `numerator()`

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10679#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to