The backslash character also happens to be the escape character for python strings. See http://docs.python.org/ref/strings.html. So for every backslash you want to get processed by jsmath you need an extra backslash in your string. This quickly gets rather ugly.
As an alternative, you can prefix your string with r, so your example would be: L = r"An ordered field is a field $F$ which is also an ordered set, such that \\ \textbf{(i)} $x+y<x+z$ if $x,y,z \in F$ and $v<z$. \\ \textbf{(ii)} $xy>0$ if $x,y \in F$, and $x,y>0$." which would ignore the typical python escape sequences (except for \u, I believe). -Bobby On Sat, May 24, 2008 at 1:23 PM, Scot <[EMAIL PROTECTED]> wrote: > > It seems that when I try to display LaTeX code in SAGE, it's eating up > some of the characters. Here is the Latex code I want to display: > > > L = "An ordered field is a field $F$ which is also an ordered set, > such that \\ \textbf{(i)} $x+y<x+z$ if $x,y,z \in F$ and $v<z$. \\ > \textbf{(ii)} $xy>0$ if $x,y \in F$, and $x,y>0$." > > 'An ordered field is a field $F$ which is also an ordered set, such > that > \\ \textbf{(i)} $x+y<x+z$ if $x,y,z \\in F$ and $v<z$. \\ > \textbf{(ii)} $xy>0$ if $x,y \\in F$, and $x,y>0$.' > > > One interesting thing is that in the string itself I'm getting an > extra '\' before '\in'. But more importantly when I try to show the > latex code, this is what I get back: > > > show(L) > > An ordered field is a field F which is also an ordered set, such that > \ extbf{(i)} x+y0 if x;y2F, and x;y>0. > > > And when I investgate the latex code that is generated on my > statement, I get > > > latex(L) > > \text{An ordered field is a field $F$ which is also an ordered set, > such > that \ extbf{(i)} $x+y<x+z$ if $x,y,z \in F$ and $v<z$. \ > extbf{(ii)} $xy>0$ if $x,y \in F$, and $x,y>0$.}\text{An ordered > field is a field $F$ which is also an ordered set, such that \ > extbf{(i)} $x+y<x+z$ if $x,y,z \in F$ and $v<z$. \ extbf{(ii)} $xy>0$ > if $x,y \in F$, and $x,y>0$.} > > > which is also interesting. Does anyone have any ideas? > > > Thanks, > > > Scot > > > > -- Bobby Moretti [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---