ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 16 Mar 2013 16:52:29 +0100Trouble getting started with SageTex - Please helphttps://ask.sagemath.org/question/8199/trouble-getting-started-with-sagetex-please-help/I'm trying and failing to use SageTex
I've added the following code to a tex document:
\usepackage{sagetex}
\[
\sage{2+2}.
\]
and then run PDFLaTex, and indeed I get the warning:
Run Sage on "Filename".sage, and then run LaTeX on "Filename".tex again
I have sagetex-2.2.5 in the installed folder of the spkg folder of my sage installation and I have sagetex.sty in my Documents folder, but when I type:
run "/root/Documents/Filename.sage"
into a sage terminal I get the following error message. What's wrong?
Processing Sage code for "Filename".tex...
**** Error in Sage code on line 38 of "Filename".tex! Traceback follows.
Traceback (most recent call last):
File "/root/Documents/Filename.sage", line 12, in <module>
_st_.inline(0, latex(2+2))
NameError: name 'latex' is not defined
**** Running Sage on "Filename".sage failed! Fix "Filename".tex and try again.
---------------------------------------------------------------------------
SystemExit Traceback (most recent call last)
/root/Documents/Filename.sage in <module>()
12 _st_.inline(0, latex(2+2))
13 except:
---> 14 _st_.goboom(38)
15 _st_.endofdoc()
16
/home/dcomerf/sage/local/lib/python2.6/site-packages/sagetex.py in goboom(self, line)
169 self.souttmp.close()
170 os.remove(self.filename + '.sout.tmp')
--> 171 sys.exit(int(1))
172 def endofdoc(self):
173 sagef = open(self.filename + '.sage', 'r')
SystemExit: 1
WARNING: Failure executing file: </root/Documents/Filename.sage>Wed, 29 Jun 2011 18:51:37 +0200https://ask.sagemath.org/question/8199/trouble-getting-started-with-sagetex-please-help/Comment by kcrisman for <p>I'm trying and failing to use SageTex</p>
<p>I've added the following code to a tex document:
\usepackage{sagetex}</p>
<p>[
\sage{2+2}.
]</p>
<p>and then run PDFLaTex, and indeed I get the warning:
Run Sage on "Filename".sage, and then run LaTeX on "Filename".tex again</p>
<p>I have sagetex-2.2.5 in the installed folder of the spkg folder of my sage installation and I have sagetex.sty in my Documents folder, but when I type:
run "/root/Documents/Filename.sage"
into a sage terminal I get the following error message. What's wrong?</p>
<p>Processing Sage code for "Filename".tex...</p>
<p><em>*</em>* Error in Sage code on line 38 of "Filename".tex! Traceback follows.
Traceback (most recent call last):
File "/root/Documents/Filename.sage", line 12, in <module>
_st_.inline(0, latex(2+2))
NameError: name 'latex' is not defined</p>
<h2><em>*</em>* Running Sage on "Filename".sage failed! Fix "Filename".tex and try again.</h2>
<p>SystemExit Traceback (most recent call last)</p>
<p>/root/Documents/Filename.sage in <module>()
12 _st_.inline(0, latex(2+2))
13 except:
---> 14 _st_.goboom(38)
15 _st_.endofdoc()
16 </p>
<p>/home/dcomerf/sage/local/lib/python2.6/site-packages/sagetex.py in goboom(self, line)
169 self.souttmp.close()
170 os.remove(self.filename + '.sout.tmp')
--> 171 sys.exit(int(1))
172 def endofdoc(self):
173 sagef = open(self.filename + '.sage', 'r')</p>
<p>SystemExit: 1
WARNING: Failure executing file: </root></p>
https://ask.sagemath.org/question/8199/trouble-getting-started-with-sagetex-please-help/?comment=18055#post-id-18055I'm sorry no one ever seems to have seen this. If you ever see this, please try again with the latest Sage and SageTeX and let us know! SageTeX is so useful, and we want it to work right for everyone. Usually there is just some configuration wrong in such situations.Sat, 16 Mar 2013 16:52:29 +0100https://ask.sagemath.org/question/8199/trouble-getting-started-with-sagetex-please-help/?comment=18055#post-id-18055