On Feb 3, 12:36 pm, Carl Witty <[email protected]> wrote:
> On Feb 2, 10:38 pm, Andrey Novoseltsev <[email protected]> wrote:
>
> > Hello,
>
> > I was sure there is no difference in Python and Sage. However, when I
> > try to return "I_0" in _latex_ function of my class, it typesets as
> > I_0, because somehow it gets wrapped into \text{I\_0}. When I change
> > the return value to 'I_0' everything works as expected. Why is it so
> > and are there other differences?
>
> I was also sure that there was no difference, so this doesn't make
> sense to me.
>
> Are you sure that's the only thing you changed?

I was sure that this was the only thing that I have changed, but
apparently I cannot replicate it - if I change back to double quotes,
everything works fine now. On the other hand I remember that I already
had this issue in the past - not being able to output latex version of
the object as I want, because it was interpreted as text.

>
> Are you calling the _latex_ method directly to test this, or how are
> you testing?
>

I was using typeset mode in notebook and when I saw that it does not
look like I want, I clicked on the output to see the latex code, that
was wrapping "my latex output" as text rather than math. Maybe there
was something wrong with reloading the class definition after defining
the _latex_ method. Well, at least it is pleasant to know that there
should be no difference, I'll report if I can see this behaviour again
and can reproduce it.

> Carl

Thank you!
Andrey
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to