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.

Aaron Meurer

On Mon, Mar 30, 2015 at 1:54 AM, G B <[email protected]> wrote:
> 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...
>
> On Sunday, March 29, 2015 at 10:13:36 PM UTC-7, G B wrote:
>>
>> 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--
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/02276aae-b6ae-4518-a559-1cdf97c87b01%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6J8St-1rYRfu4M%3DTKrfu9ART3OsuHFnVkv%2B80mHuyLV4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to