Ask Your Question

tex distribution doesn't see sagetex

asked 2013-11-09 02:36:58 -0500

updated 2015-01-25 11:05:58 -0500

FrédéricC gravatar image

Hi all,

So I've spent some time installing sage 5.12 on my machine (Ubuntu 12.04.3) and been trying to edit a latex document using sagetex that worked fine on another computer. I've found that despite copying




and running

sudo texhash

I get a compile error. To be clear, I have a single sagesilent block and a single sagestr{} block, and the document compiles on my other machine. I have found that simply copying 'sagetex.sty' into the document directory will work, but this is not the permanent solution I was hoping for. I'm really confused because both my machines are running the same linux OS, so there should really be no difference between them. Any thoughts?


edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2013-11-09 02:46:11 -0500

In looking a bit deeper in the latex directory trees for each of my machines, I noticed something. For the machine that DOES compile sagetex is installed under


whereas for the machine that does NOT compile, sagetex is installed as per the 'make sagetex known to tex' page in


I'm confused as to why the directory structure provided by sagetex documentation doesn't work, while a directory structure from what looks like my default texlive install does.

edit flag offensive delete link more


I suppose it would depend on what path is being searched. Do other changes in the usr/local make a difference for you? It's possible that only the global texmf is being searched for some reason...

kcrisman gravatar imagekcrisman ( 2013-11-09 02:50:57 -0500 )edit

yeah I wanted to test this myself so I installed a local copy of the latest gnuplottex.sty file into /usr/local/share/texmf/tex/latex/gnuplottex/. Works fine after sudo texhash.

underchemist gravatar imageunderchemist ( 2013-11-09 04:30:05 -0500 )edit

I don't really understand why, but I tried declaring sagetex in my preamble using an absolute path i.e /usr/share/texmf-texlive/tex/latex/sagetex/sagetex and it worked! it gave me an error, but even better, when I went back to using just \usepackage{sagetex} it was able to compile, no problem. I even tested a new document just to see if it would work on other files, and it appears to do so. Not sure why, hopefully I don't have this problem again.

underchemist gravatar imageunderchemist ( 2013-11-09 04:39:08 -0500 )edit

Huh. I'll make sure the SageTeX developer sees this. Glad your problem was resolved!

kcrisman gravatar imagekcrisman ( 2013-11-09 09:30:11 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-11-09 02:36:58 -0500

Seen: 104 times

Last updated: Nov 09 '13