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 <[email protected]> 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
> -------------------------------------
--~--~---------~--~----~------------~-------~--~----~
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
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---