First time here? Check out the FAQ!

Ask Your Question
0

SageTex, sage, version conflict?

asked 5 years ago

JC gravatar image

Hello to everyone,

I am trying to use sagetex in my ubuntu18.094 machine. I use the file from this manual. I call my file Test.tex

PdfLatex does its job. I have a Test.sagetex.sagefile in my folder. When I run, at the same folder, from a terminal sage Test.sagetex.sage I get the following error

Traceback (most recent call last):

File "Test.sagetex.sage.py", line 9, in <module>

_st_ = sagetex.SageTeXProcessor('Test', version='2015/08/26 v3.0-92d9f7a', version_check=True)

File "... Programs/sage-8.1/local/lib/python2.7/site-packages/sagetex.py", line 76, in __init__

raise VersionError(errstr)

sagetex.VersionError: versions of .sty and .py files do not match.

Test.sagetex.sage was generated by sagetex.sty version "2015/08/26 v3.0-92d9f7a", but

is being processed by sagetex.py version "2019/01/09 v3.2".

Please make sure that TeX is using the sagetex.sty

from your current version of Sage; see...

I built sage from the source code, at some point, then I upgraded with sage update. I now have sage 8.8 but still a folder sage-8.1

I installed sagetex from the repos.

Anyone a suggestion?

Thanks!

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 5 years ago

Emmanuel Charpentier gravatar image

It depends how you installed the correct SageTeX version in your TeX tree.

I tend to follow this unorthodox procedure

  • (Optionnaly): recompile sagetex.dtx and its indexes in $SAGE_ROOT/local/share/tex/latex/sagetex/. This gives you an updated documentation.
  • (as root) create a symlink to this directory somewhere in your TeX tree (I use a subtree of what is pointed by TEXMFLOCAL, see below...)
  • (still as root) texhash $(kpsewhich -var-value=TEXMFLOCAL)
  • (Optionally) symlink the generated documentation in your texdoc tree (highly distribution dependant...).

Of course, this has to be refreshed every time you update Sage...

Preview: (hide)
link

Comments

Hello @EmmanuelCharpentier Thanks for taking the time. I am sorry your answer is a little bit obscure to me : I do not know how to perform the steps you suggest.

Would it be possible to add some feature so that upgrading sage does not break sagetex?

JC gravatar imageJC ( 5 years ago )

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 5 years ago

Seen: 306 times

Last updated: Aug 30 '19