#6286: Inconsistence typesettings of PrimitiveFunctions and SFunctions
-----------------------+----------------------------------------------------
 Reporter:  gmhossain  |       Owner:  burcin    
     Type:  defect     |      Status:  assigned  
 Priority:  major      |   Milestone:  sage-4.0.2
Component:  symbolics  |    Keywords:            
 Reviewer:             |      Author:            
   Merged:             |  
-----------------------+----------------------------------------------------
Description changed by gmhossain:

Old description:

> In sage-4.0.1, most of the primitive functions suffer from
> inconsistence typsettings. For example:
>
> {{{
> f = arcsin
> latex( f ); latex( f(x) ); latex( f(x,1) )
>
> \sin^{-1}
> \arcsin\left(x\right)
> \mbox{\sin^{-1}}\left(x\right)
> }}}
>
> Note that the same function is being typeset differently. The additional
> "\mbox" in third case (which has been reported in
> #6268) will get resolved by #5711.
>
> However, second case seems weird to me, given "class Function_arcsin"
> (sage.functions.trig) clearly defines its
> latex expression to be "\sin^{-1}". So it seems to be a pynac issue.
>
> One can try following to see the issues for other functions
>
> {{{
> # Trigonometric functions
> lst = [sin, cos, tan, cot, sec, csc, arcsin, arccos, arctan, arccot,
> arcsec, arccsc]
>
> # view
> for fn in lst:
>     view( fn ); view( fn(x) ); view( fn(x,1) )
>
> # latex
> for fn in lst:
>     latex( fn ); latex( fn(x) ); latex( fn(x,1) )
> }}}
>
> and
>
> {{{
> # Hyperbolic functions
> lst = [sinh, cosh, tanh, coth, sech, csch, arcsinh, arccosh, arctanh,
> arccoth, arcsech, arccsch ]
>
> # view
> for fn in lst:
>     view( fn ); view( fn(x) ); view( fn(x,1) )
>
> # latex
> for fn in lst:
>     latex( fn ); latex( fn(x) ); latex( fn(x,1) )
> }}}
>
> It seems, out of these 24 functions, 18 functions suffer from
> inconsistence typesetting.

New description:

 In sage-4.0.1, most of the primitive functions suffer from
 inconsistence typsettings. For example:

 {{{
 f = arcsin
 latex( f ); latex( f(x) ); latex( f(x,1) )

 \sin^{-1}
 \arcsin\left(x\right)
 \mbox{\sin^{-1}}\left(x\right)
 }}}

 Note that the same function is being typeset differently. The additional
 "\mbox" in third case (which has been reported in
 #6268) will get resolved by #5711.

 However, second case seems weird to me, given "class Function_arcsin"
 (sage.functions.trig) clearly defines its
 latex expression to be "\sin^{-1}". So it seems to be a pynac issue.

 One can try following to see the issues for other functions

 {{{
 # Trigonometric functions
 lst = [sin, cos, tan, cot, sec, csc, arcsin, arccos, arctan, arccot,
 arcsec, arccsc]

 # view
 for fn in lst:
     view( fn ); view( fn(x) ); view( fn(x,1) )

 # latex
 for fn in lst:
     latex( fn ); latex( fn(x) ); latex( fn(x,1) )
 }}}

 and

 {{{
 # Hyperbolic functions
 lst = [sinh, cosh, tanh, coth, sech, csch, arcsinh, arccosh, arctanh,
 arccoth, arcsech, arccsch ]

 # view
 for fn in lst:
     view( fn ); view( fn(x) ); view( fn(x,1) )

 # latex
 for fn in lst:
     latex( fn ); latex( fn(x) ); latex( fn(x,1) )
 }}}

 It seems, out of these 24 functions, 18 functions suffer from
 inconsistence typesetting.


 '''Note:'''   Unlike latex aliases such as "\sinh" (which
 is alias for "{\rm sinh}" ) there are no alias such as "\sech".
 However, this alias is used currently in "sech" function which leads to
 latex error. The function should be represented as "{\rm sech}" and
 similar typesetting should be used for "csch" and others.


 '''SFunctions:''' In current pynac, default typesetting used for a
 symbolic function say "myfunc" is "\mbox{myfunc}".

 This seems highly inconsistent from the rest. If a function named "sin" is
 typseset as "\sin" (=>"{\rm  sin}") then why should another function named
 "mysin" be typeset as "\mbox{mysin}"? I guess, we should follow a
 consistent standard.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6286#comment:2>
Sage <http://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