Open dimpase opened 4 years ago
The problem is, however, in sagetex LaTeX class, in the part that generates the *.sage file. For the example above one gets
_st_ = sagetex.SageTeXProcessor('hh', version='2019/11/14 v3.4', version_check=True)
_st_.current_tex_line = 7
_st_.blockbegin()
try:
n = 1
except:
_st_.goboom(9)
_st_.blockend()
try:
_st_.current_tex_line = 14
_st_.inline(0, latex(n))
except:
_st_.goboom(14)
_st_.endofdoc()
try:
_st_.current_tex_line = 17
_st_.inline(1, latex(n))
except:
_st_.goboom(17)
and so endofdoc()
is issued too early.
@dandrake - perhaps you could quickly see how to fix this?
I have the same problem when using sage in a tikzpicture. Fix suggested works distributed 2020/08/12 v3.5 version of sagetex.py if applying at both line 264 and line 285.
As reported on sage-support
breaks sagetex with a funny error:
Basically, what happends is that sagetex closes
sout.tmp
too soon, while there is still something to be done. Namely, a hotfix is to replaceself.souttmp.close()
in line 285 of (generated)sagetex.py
withThis results in the example above working:
So, surely enough, "complete" is not quite complete at this point.