Error typesetting mathematics

409 views
Skip to first unread message

Jan Groenewald

unread,
Apr 25, 2015, 8:35:56 AM4/25/15
to sage-devel
Hi

With sage 6.6 (PPA from buildslave binary) on Ubuntu 14.04, firefox 37, I get

Error typesetting mathematics

in every cell. Also if you check the boxes live3D or use java. Any idea?

Regards,
Jan

--
  .~.
  /V\     Jan Groenewald
 /( )\    www.aims.ac.za
 ^^-^^ 

Volker Braun

unread,
Apr 25, 2015, 8:54:24 AM4/25/15
to sage-...@googlegroups.com
Did you try multiple browsers? Whats in the error console?

Jan Groenewald

unread,
Apr 25, 2015, 9:14:28 AM4/25/15
to sage-devel
Hi

Yes, it occurs in chromium-browser as well.

There is no error in the console.

Regards,
Jan


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Volker Braun

unread,
Apr 25, 2015, 9:45:34 AM4/25/15
to sage-...@googlegroups.com
We added a mathjax spkg in 6.6 (and bumped the mathjax version). My guess would be that the PPA doesn't install it correctly...


On Saturday, April 25, 2015 at 9:14:28 AM UTC-4, Jan Groenewald wrote:
There is no error in the console.

The javascript console in the browser, not the unix console 

Jan Groenewald

unread,
Apr 25, 2015, 10:43:57 AM4/25/15
to sage-devel
Which seems to be at /usr/lib/sagemath/local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/data/sage/js/mathjax_sage.js

Regards,
Jan



--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To post to this group, send email to sage-...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
mathjax-404.png

Jan Groenewald

unread,
Apr 26, 2015, 2:37:27 PM4/26/15
to sage-devel
Hi

I don't get this with a from-source compile. Will try the compiled binary (which I made the PPA from) as soon as I can.

Regards,
Jan

Jan Groenewald

unread,
Apr 26, 2015, 4:53:42 PM4/26/15
to sage-devel
Hi

It also works in the binary. The PPA does not recompile, it only copies the binary files into place. I'm not sure why the URL to load mathjax is different in the binary and the PPA, or where to start looking.

See attached the successful mathjax.

Regards,
Jan

mathjax-from-binary.png

Volker Braun

unread,
Apr 26, 2015, 7:22:11 PM4/26/15
to sage-...@googlegroups.com
The mathjax directory is symlinked... when you say "copy", are you handling symlinks correctly?

Jan Groenewald

unread,
Apr 27, 2015, 12:04:31 AM4/27/15
to sage-devel
Hi

Yes, the debian package file called rules/install copies files into place from an untarred binary.

0 jan@snapperkob:~/src/sagemath-upstream-binary/sagemath-upstream-binary/debian$cat install
# to instruct dh_install
amd64/bootstrap /usr/lib/sagemath
amd64/build /usr/lib/sagemath
amd64/config /usr/lib/sagemath
amd64/configure /usr/lib/sagemath
amd64/configure.ac /usr/lib/sagemath
amd64/local /usr/lib/sagemath
amd64/m4 /usr/lib/sagemath
amd64/sage /usr/lib/sagemath
amd64/src /usr/lib/sagemath
amd64/.git /usr/lib/sagemath
amd64/.gitignore /usr/lib/sagemath
amd64/COPYING.txt  /usr/lib/sagemath
amd64/Makefile /usr/lib/sagemath
amd64/README.txt /usr/lib/sagemath
amd64/VERSION.txt /usr/lib/sagemath
debian/sagemath.desktop /usr/share/applications
0 jan@snapperkob:~/src/sagemath-upstream-binary/sagemath-upstream-binary/debian$

The files are:
0 jan@snapperkob:/usr/lib/sagemath$ls -l
total 404
-rw-r--r--  1 root root  70547 Apr 18 02:17 COPYING.txt
-rw-r--r--  1 root root   5844 Apr 18 02:17 Makefile
-rw-r--r--  1 root root  13940 Apr 18 02:17 README.txt
-rw-r--r--  1 root root     38 Apr 18 02:17 VERSION.txt
-rwxr-xr-x  1 root root   3630 Apr 18 02:17 bootstrap
drwxr-xr-x  3 root root   4096 Apr 25 06:39 build
drwxr-xr-x  2 root root   4096 Apr 25 06:39 config
-rwxr-xr-x  1 root root 249151 Apr 18 02:21 configure
-rw-r--r--  1 root root  25671 Apr 18 02:17 configure.ac
drwxr-xr-x 12 root root   4096 Apr 25 06:39 local
drwxr-xr-x  2 root root   4096 Apr 25 06:39 m4
-rwxr-xr-x  1 root root   4816 Apr 18 02:17 sage
drwxr-xr-x 10 root root   4096 Apr 25 06:39 src
0 jan@snapperkob:/usr/lib/sagemath$

The symlinks are:

Binary:
0 jan@osprey:~/src/sage-6.6-x86_64-Linux$find . -type l -iname '*mathjax*' -exec ls -l '{}' \;
lrwxrwxrwx 1 jan jan 32 Apr 18 00:19 ./local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/data/mathjax -> ../../../../../../share/mathjax/
lrwxrwxrwx 1 jan jan 32 Apr 18 00:13 ./local/lib/python2.7/site-packages/IPython/html/static/mathjax -> ../../../../../../share/mathjax/
0 jan@osprey:~/src/sage-6.6-x86_64-Linux$

But PPA:
0 jan@snapperkob:/usr/lib/sagemath$find . -type l -iname '*mathjax*' -exec ls -l '{}' \;
lrwxrwxrwx 1 root root 31 Apr 24 17:49 ./local/lib/python2.7/site-packages/IPython/html/static/mathjax -> ../../../../../../share/mathjax
0 jan@snapperkob:/usr/lib/sagemath$

Bizarre.

0 jan@snapperkob:/usr/lib/sagemath$ls -lda ./local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/data/mathjax                            
drwxr-xr-x 2 root root 4096 Apr 25 06:39 ./local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/data/mathjax
0 jan@snapperkob:/usr/lib/sagemath$ls -a ./local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/data/mathjax
.  ..
0 jan@snapperkob:/usr/lib/sagemath$file ./local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/data/mathjax                      
./local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/data/mathjax: directory
0 jan@snapperkob:/usr/lib/sagemath$


Yet, there are plenty of symlinks preserved just fine:
0 jan@snapperkob:/usr/lib/sagemath$find . -type l | wc -l
1171
0 jan@snapperkob:/usr/lib/sagemath$

I'll have a closer look which could take a few days.

Regards,
Jan




Jan Groenewald

unread,
Apr 27, 2015, 11:47:43 AM4/27/15
to sage-devel
Hi

I have a new 6.6ppa1 version uploaded which fixes this. It is an ugly hack to replace the mathjax folder with a symlink the way it should be, in the debian/rules file; symlink it before installing all the files. Unfortunately it also contains a sagenb version number in the path, and I'm not sure how to get to the root cause of this.

0 jan@snapperkob:~/src/sagemath-upstream-binary/sagemath-upstream-binary/debian$grep -A1 mathjax rules
        dh_link ../../../../../../share/mathjax/ /usr/lib/sagemath/local/lib/python2.7/site-packages/sagenb-0.11.4-py2.7.egg/sagenb/data/mathjax
        dh_install

Thanks for the tip Volker.

Regards,
Jan

Jan Groenewald

unread,
Apr 27, 2015, 3:38:16 PM4/27/15
to sage-devel
Hi

It could be that from sage 6.6 sagenotebook stopped including the empty data/mathjax folder and that changed to a symlink.  (I just spotted that empty folder in a 6.4.1 install).

Dpkg won't mess with that during an upgrade:

https://wiki.debian.org/Teams/Dpkg/FAQ#Q:_Will_dpkg_replace_a_symlink_with_a_directory_or_vice_versa.3F

So this could be limited to the 6.5->6.6 upgrade; i.e. if that mathjax stays a symlink from now on, I can take my ugly hack out again.

It also means first removing/purging 6.5 then installing 6.6, or a brand new install of 6.6, would not have shown this issue.

So such a hack will only be necessary whenever a symlink changes to a directory or vice versa.

It's been suggested to me to keep a list of symlinks and do preinst stuff like rmdir.  Not sure I will get to that.

Regards,
Jan

Reply all
Reply to author
Forward
0 new messages