This \over is from Maxima.
try

a1=maxima.solve(x^2-x-3,x)
R1=a1[0]
R3=maxima.rhs(R1).sage()
latex(R3)

R.

On 6 říj, 22:25, Mikie <thephantom6...@hotmail.com> wrote:
> Yes, your right.  I am latexing a value from maxima.solve(x^2-x-3,x).
> Then maxima.rhs().  Then latexing the value.  It still gives me the
> \over.  I am using 3.4.
> When I assign it to a variable it works as below.  If you would try
> a1=maxima.solve(x^2-x-3,x)
> R1=a1[0]
> R3=maxima.rhs[R1]
> latex(R3)
> produces -- {{1-\sqrt{13}}\over{2}}
> not good
>
> On Oct 6, 1:46 pm, "ma...@mendelu.cz" <ma...@mendelu.cz> wrote:
>
> > Hm, this is my Sage 4.1.1
>
> > a1=-(sqrt(13)-1)/2
> > latex(a1)
>
> > output is -\frac{1}{2} \, \sqrt{13} + \frac{1}{2}
>
> > You may have old version of Sage
>
> > latex(-{{\sqrt[13]-1\over[2}}) produces error
>
> > Robert Marik
>
> > On 6 říj, 21:10, Mikie <thephantom6...@hotmail.com> wrote:
>
> > > If I have this a1=-(sqrt(13)-1)/2 in a variable, then latex(a1) it
> > > produces -{{\sqrt[13]-1\over[2}}.
> > > If I do  latex(-{{\sqrt[13]-1\over[2}}) get \frac{1-\sqrt{13}}{2},
> > > which is what I want.
>
> > > This is in a function.  I need the latter.  The \over  does not do the
> > > pretty print.
> > > Is there a work around?
> > > Thanx
>
> > > ------------------------------------
> > > def Solver2a(exp1,exp2):
> > >         eq11=exp1;w=b*1==0
> > >         w1=maxima.subst(eq11,b,w)
> > >         R1 = maxima.solve(exp1,exp2);
> > >         w2 = latex(eq11); w3 = "$"+w2+"$"
> > >         R2 = latex(R1);R3="$"+R2+"$"
> > >         R4 = R1[0];R5=maxima.rhs(R4);R6=latex(R5);
> > >         str1="Calculate the symbolic solutions for the following
> > > equation."
> > >         str2="And here is the solution :"
> > >         return str1,w3,str2,R1,R6,R5
> > > -------------------------------------- Hide quoted text -
>
> > - Show quoted text -
>
>
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to