[sage-support] Re: Typeset problem with sech(x)

2009-10-26 Thread Burcin Erocal

Hi,

On Sun, 25 Oct 2009 19:44:21 -0700 (PDT)
John H Palmieri jhpalmier...@gmail.com wrote:

 
 On Oct 25, 7:37 pm, Marshall Hampton hampto...@gmail.com wrote:
  Latex doesn't actually support \sech, so this can't really be
  considered an error on Sage's part.
 
  Note that
 
  sage: latex('sech(x)')
 
  gives
 
  \text{sech(x)}
 
 On the other hand,
 
 sage: latex(sech)
 
 gives
 
 \sech
 
 I think the problem is in sage/functions/hyperbolic.py:
 
 PrimitiveFunction.__init__(self, sech, latex=r\sech,
approx=lambda x: 1/math.cosh(x))
 
 Which hyperbolic functions have broken latex methods?


Here is the relevant ticket:

http://trac.sagemath.org/sage_trac/ticket/6286


In the symbolic function refactoring patch [1], I fixed the problems
with sin^{-1}. It seems that \sech still remains 

[1] 
http://groups.google.com/group/sage-devel/browse_thread/thread/6f1efcad26909d3

I will try to clean up the symbolic functions patch next week and
submit it for review. I can try to fix the other typesetting problems
then if nobody beats me to it.


Cheers,
Burcin

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Typeset problem with sech(x)

2009-10-25 Thread Marshall Hampton

Latex doesn't actually support \sech, so this can't really be
considered an error on Sage's part.

Note that

sage: latex('sech(x)')

gives

\text{sech(x)}

for this reason.  This does seem a little odd, since Latex (and
jsmath, which is what typesets things in the notebook) does support
cosh, sinh, and tanh.

-Marshall Hampton

On Oct 25, 3:50 pm, TianWei ltwis...@gmail.com wrote:
 Hi, I'm new to Sage and came across a potential bug in the Sage
 Notebook. When the Typeset checkbox is on, the expression sech(x)
 evaluates to an error:

 Unknown control sequence '\sech'

 The error text is contained in a pink box with a thin red border. When
 Typeset is off, there is no problem (it evaluates to the expected
 sech(x))

 This happened in the Sage Notebook with Mozilla Firefox 3.0.14. I'm
 running Sage version 4.1.2 on Ubuntu 9.04 as a guest operating system
 in VMware Workstation 6.5.3, on a Windows XP host. I compiled Sage
 from the source code.

 I'm a novice programming/math hobbyist, so any help and advice is very
 much appreciated.

 Thanks,
 TianWei
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Typeset problem with sech(x)

2009-10-25 Thread John H Palmieri

On Oct 25, 7:37 pm, Marshall Hampton hampto...@gmail.com wrote:
 Latex doesn't actually support \sech, so this can't really be
 considered an error on Sage's part.

 Note that

 sage: latex('sech(x)')

 gives

 \text{sech(x)}

On the other hand,

sage: latex(sech)

gives

\sech

I think the problem is in sage/functions/hyperbolic.py:

PrimitiveFunction.__init__(self, sech, latex=r\sech,
   approx=lambda x: 1/math.cosh(x))

Which hyperbolic functions have broken latex methods?

  John

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~--~~~~--~~--~--~---