So I have Cantor 0.3 with Netrunner 4.3 Linux distro (Kubuntu 12.10 spin-off) with KDE 4.9.3 and Sage. When using Sage engine in Cantor and entering a command: >>> show(x^2) I get a LaTeX error report: \newcommand{\Bold}[1]{\mathbf{#1}}x^{2} On both 32 and 64-bit systems. In KDE 4.8 it worked fine. Reproducible: Always Steps to Reproduce: 1. Install Sage 5 branch binaries (no matter is it via PPA or using tar.lzma file) 2. Install Cantor from repos 3. Start Cantor with Sage engine. 4. Type show(x^2) and evaluate. Actual Results: You get a LaTeX error message. Expected Results: You should get a nicely rendered equation in a LaTeX form. Happens every time. But command show() works fine when a plot object is entered as a argument. Eg. PL = plot( x^2 -x +3, (-10,10)) show(PL) Will work okay and will produce a graph.
In Cantor 0.4 with KDE 4.10 this bug still exists :-(
Same here. I noticed that you can load the example, and the error does not show up; but as soon as you re-evaluate the worksheet, even the examples show the error. Looks like Latex typesetting is broken in Cantor with Sage. Let me know if you want me to test anything to help narrow this down.
If you have a *.cws file created with a previous version of Cantor they are displayed fine, coz cws files are archive files containing the commands in xml file, evaluated equations in eps format and plots in png format. And yes, when I open this file I can see the equations in a swift stile, but when I ask to evaluate the whole sheet I get an LaTeX error message where the command show(x^2) is. If I'll do it in two separate commands: >>> equ = x^2 >>> show(equ) Error still occurs (which is kind of obvious). I have Sage Version 5.6, Release Date: 2013-01-21 and in Sage Notebook it works OK.
@ Saverio : what distro have you? May it be it's system-specific? I have Netrunner 12.12.1 (based on Ubuntu 12.10)
Yep, I got Ubuntu 12.10 64 bits.. Hopefully somebody can look at it; I am using the SAGE notebook as a workaround, but liked Cantor much more.
Git commit fbe7b8b1675b210bc07dc98a1f73208e24edf8ee by Alexander Rieder. Committed on 10/02/2013 at 15:13. Pushed by arieder into branch 'master'. fix typesetting of show(formula)-like commands in the sage backends. M +1 -1 src/backends/sage/sageexpression.cpp http://commits.kde.org/cantor/fbe7b8b1675b210bc07dc98a1f73208e24edf8ee
Git commit 3c2c1470ce64c5156f520e6797b47939621ce954 by Alexander Rieder. Committed on 10/02/2013 at 15:13. Pushed by arieder into branch 'KDE/4.10'. fix typesetting of show(formula)-like commands in the sage backends. FIXED-In: 4.10.1 (cherry picked from commit fbe7b8b1675b210bc07dc98a1f73208e24edf8ee) M +1 -1 src/backends/sage/sageexpression.cpp http://commits.kde.org/cantor/3c2c1470ce64c5156f520e6797b47939621ce954
Hello, I report a reoccurrance of the same issue using Cantor 0.5 (4.13.3) with sagemath 6.9, 6.10 and 7.0 - looks like something has changed once more: show(x^2) >>> \newcommand{\Bold}[1]{\mathbf{#1}}x^{2} I noticed in the patch the change was inserting a QRegExp. Would it be possible to modifiy and rebuild the sage backend again (I can do it privately if I know what to change)?
I have checked lines 183 of sageexpression.cpp in both the 0.5 (my current) and 0.6 versions of Cantor. The code is identical so I suspect the LaTeX might also be broken in newer versions of Cantor. I extracted a show(x^2) output from a sage 6.5 and a sage 7.0 notebook "worksheet.html" file: sage 7.0: ******* {{{id=1| show(x^2) /// <html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}x^{2}</script></html> }}} {{{id=2| /// }}} as well as the output from sage 6.5 for the same file: sage 6.5 ******* {{{id=1| show(x^2) /// <html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}x^{2}</script></html> }}} {{{id=2| /// }}} and they are identical. However sage 6.5 displays ok in Cantor 0.5 but when Cantor 0.5 runs sage 7.0, the output is as in my last post. Can anyone with more knowledge who sees this guide me a bit ? Thanks!