You do not have permission to delete messages in this group
Copy link
Report message
Sign in to 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 sy...@googlegroups.com
Hi--
I can give a symbol a latex representation with:
x1=symbols(r'x_{1}')
How do I create a function with a latex representation?
Ic=symbols(r'I_{C}',cls=Function)
Ic=Function(r'I_{C}')
Don't seem to work... They pretty print as strings.
Thanks--
G B
unread,
Mar 30, 2015, 2:54:27 AM3/30/15
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
Sign in to 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 sy...@googlegroups.com
Interesting.
Function('V_{C}')
returns a string (V_{C})
Function('V_{C}')(t)
returns proper latex. It must be how it's handled in the printer...
Aaron Meurer
unread,
Mar 30, 2015, 2:02:17 PM3/30/15
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
Sign in to 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 sy...@googlegroups.com
If you want to do anything nontrivial, you'll need to define a latex
printer on it, by defining _latex(self, printer) (where printer will
be the printer class that you should use to recursively print the args
with printer.doprint(expr)). See
http://docs.sympy.org/latest/modules/printing.html. Search the SymPy
code base for some examples.