The latex() command does different things in the notebook and the command line.
Command line: sage: var('a, b, c') (a, b, c) sage: eqn = [a+b*c==1, b-a*c==0, a+b==5] sage: s = solve(eqn, a,b ,c) sage: latex(s[0]) \left[a = \frac{{(\left(25 I\right) \, \sqrt{79} + 25)}}{{(\left(6 I\right) \, \sqrt{79} - 34)}}, \\b = \frac{{(\left(5 I\right) \, \sqrt{79} + 5)}}{{(I \, \sqrt{79} + 11)}}, \\c = \left(\frac{1}{10} I\right) \, \sqrt{79} + \frac{1}{10}\right] Notebook: if you execute this cell: var('a, b, c') eqn = [a+b*c==1, b-a*c==0, a+b==5] s = solve(eqn, a,b ,c) latex(s[0]) you get \begin{array}{l}[a = \frac{{(\left(25 I\right) \, \sqrt{79} + 25)}}{{(\left(6 I\right) \, \sqrt{79} - 34)}},\\ b = \frac{{(\left(5 I\right) \, \sqrt{79} + 5)}}{{(I \, \sqrt{79} + 11)}},\\ c = \left(\frac{1}{10} I\right) \, \sqrt{79} + \frac{1}{10}]\end{array} The source code to latex() doesn't seem like it makes a distinction between the notebook and command line. How does it figure out the difference, and why does it give me different answers? Dan -- --- Dan Drake <dr...@kaist.edu> ----- KAIST Department of Mathematical Sciences ------- http://mathsci.kaist.ac.kr/~drake
signature.asc
Description: Digital signature