Groups
Groups
Sign in
Groups
Groups
sage-support
Conversations
Labels
About
Send feedback
Help
latex of acos
1,160 views
Skip to first unread message
pragma
unread,
Oct 1, 2008, 2:16:10 AM
10/1/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-support
hi, im new to sage :)
the latex output of arccos(x), arcsin etc. is
\cos^{-1} \left( x \right)
can i change this
\arccos
sry. for my english
pragma
unread,
Oct 1, 2008, 10:21:53 AM
10/1/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-support
ive tried this but it doesnt seem to do the job:
class c_arccos(sage.calculus.calculus.Function_arccos):
def __init__(self):
pass
def _latex_(self):
return "\\arccos"
p_arccos = c_arccos()
print latex(p_arccos(1/3))
print latex(p_arccos)
#############
#outputs:
############
\cos^{-1} \left( \frac{1}{3} \right)
\arccos
the first line still outputs \cos^{-1} instead of arccos
Håkan Granath
unread,
Oct 7, 2008, 12:23:14 PM
10/7/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-support
This seems to work:
sage: sage.calculus.calculus.Function_arccos._latex_ = lambda self : "\
\arccos"
sage: latex(arccos(1/3))
\arccos \left( \frac{1}{3} \right)
Best,
/Håkan
pragma
unread,
Oct 11, 2008, 12:40:39 PM
10/11/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sage-support
thank you :)
Reply all
Reply to author
Forward
0 new messages