Does anyone know how to fix this?

On Jul 28, 2:50 pm, Katie Johnson <katie.v.johnso...@gmail.com> wrote:
> I used Dan's minimal example.  I copied his code into a file, ran it
> in TexShop and got no errors, but did get a warning:
>
> *************************************************************************** 
> *******************************
> This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009)
>  \write18 enabled.
> entering extended mode
> (./simpleEx.tex
> LaTeX2e <2009/09/24>
> Babel <v3.8l> and hyphenation patterns for english, usenglishmax,
> dumylang, noh
> yphenation, german-x-2009-06-19, ngerman-x-2009-06-19, ancientgreek,
> ibycus, ar
> abic, basque, bulgarian, catalan, pinyin, coptic, croatian, czech,
> danish, dutc
> h, esperanto, estonian, farsi, finnish, french, galician, german,
> ngerman, mono
> greek, greek, hungarian, icelandic, indonesian, interlingua, irish,
> italian, ku
> rmanji, latin, latvian, lithuanian, mongolian, mongolian2a, bokmal,
> nynorsk, po
> lish, portuguese, romanian, russian, sanskrit, serbian, slovak,
> slovenian, span
> ish, swedish, turkish, ukenglish, ukrainian, uppersorbian, welsh,
> loaded.
> (/usr/local/texlive/2009/texmf-dist/tex/latex/base/article.cls
> Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
> (/usr/local/texlive/2009/texmf-dist/tex/latex/base/size10.clo))
> (/usr/local/texlive/2009/texmf-dist/tex/latex/sagetex/sagetex.sty
> (/usr/local/texlive/2009/texmf-dist/tex/latex/tools/verbatim.sty)
> (/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/graphicx.sty
> (/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/keyval.sty)
> (/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/graphics.sty
> (/usr/local/texlive/2009/texmf-dist/tex/latex/graphics/trig.sty)
> (/usr/local/texlive/2009/texmf-dist/tex/latex/latexconfig/
> graphics.cfg)
> (/usr/local/texlive/2009/texmf-dist/tex/latex/pdftex-def/pdftex.def)))
> (/usr/local/texlive/2009/texmf-dist/tex/latex/makecmds/makecmds.sty)
> (/usr/local/texlive/2009/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
> (/usr/local/texlive/2009/texmf-dist/tex/latex/base/ifthen.sty)
> No file simpleEx.sout.
> )
> No file simpleEx.aux.
> (/usr/local/texlive/2009/texmf-dist/tex/context/base/supp-pdf.mkii
> [Loading MPS to PDF converter (version 2006.09.02).]
> )
>
> LaTeX Warning: Reference `...@sageinline0' on page 1 undefined on input
> line 5.
>
> Package sagetex Warning: There were undefined Sage formulas and/or
> plots.
> Run Sage on simpleEx.sage, and then run LaTeX on simpleEx.tex again.
>
> [1{/usr/local/texlive/2009/texmf-var/fonts/map/pdftex/updmap/
> pdftex.map}]
> (./simpleEx.aux)
>
> LaTeX Warning: There were undefined references.
>
>  )</usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/
> cmbx10.pfb></usr/local/texlive/2009/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.p
>  fb>
>
> Output written on simpleEx.pdf (1 page, 21132 bytes).
> SyncTeX written on simpleEx.synctex.gz
> Transcript written on simpleEx.log.
> *************************************************************************** 
> *******************************
>
> Then I changed into the directory the file was saved in (this time my
> Desktop for simplicity), and ran sage on the file:
>
> *************************************************************************** 
> *******************************
> $ /Applications/sage/sage simpleEx.sage
> Processing Sage code for simpleEx.tex...
> Inline formula 0
>
> **** Error in Sage code on line 5 of simpleEx.tex! Traceback follows.
> Traceback (most recent call last):
>   File "simpleEx.py", line 7, in <module>
>     _st_.inline(_sage_const_0 , _sage_const_1 +_sage_const_2 )
>   File "/Applications/sage/local/lib/python2.6/site-packages/
> sagetex.py", line 73, in inline
>     s.rstrip() + '}{}{}{}{}}\n')
>   File "element.pyx", line 306, in
> sage.structure.element.Element.__getattr__ (sage/structure/element.c:
> 2632)
>   File "parent.pyx", line 268, in
> sage.structure.parent.getattr_from_other_class (sage/structure/
> parent.c:2835)
>   File "parent.pyx", line 170, in
> sage.structure.parent.raise_attribute_error (sage/structure/parent.c:
> 2602)
> AttributeError: 'sage.rings.integer.Integer' object has no attribute
> 'rstrip'
>
> **** Running Sage on simpleEx.sage failed! Fix simpleEx.tex and try
> again.
> *************************************************************************** 
> *******************************
>
> I just find it so weird/interesting that the original sample file
> actually worked (I deleted the pdf, too, so I know it actually
> compiled from scratch), but now nothing does!
>
> Also, for this one, the files it saved on my desktop were:
> simpleEx.tex, simpleEx.aux, simpleEx.log, simpleEx.pdf, simpleEx.py,
> simpleEx.sage, simpleEx.synctex.gz.
>
> There weren't any files anywhere else, but of course there weren't any
> image files to save either...
>
> >The directory sage-plots-for-example.tex should get
> > > created in the same directory as your document. Is that directory
> > > created in the root directory before you modify example.tex?
>
> I'm not sure what you mean by the above.  I had the example.tex file
> saved in Library -> texmf -> tex -> generic -> sagetex, so pretty deep
> down in folders.  As far as I can tell, that directory was created
> when I ran sage on example.tex (what do you mean "before I modify"?).
>
> I'm using TeXShop version 2.34.  I actually just got my MacBook Pro a
> couple of weeks ago (I'm a new convert!), so all the software should
> be the current versions.
>
> Thanks,
> Katie
>
> On Jul 28, 2:05 am, Dan Drake <dr...@kaist.edu> wrote:
>
>
>
> > On Tue, 27 Jul 2010 at 02:45PM -0700, Katie Johnson wrote:
> > > Another brief question I have is: why does sagetex put files needed
> > > for a tex file (like graphics files) in my root directory (Macintosh
> > > HD)?  It seems like a really odd place to have all of these files
> > > piling up, and what if I have two different example.tex files?  Will
> > > the images for both be copied into the "sage-plots-for-example.tex"
> > > folder?
>
> > That's very strange. The directory sage-plots-for-example.tex should get
> > created in the same directory as your document. Is that directory
> > created in the root directory before you modify example.tex?
>
> > What version of TeXShop are you using? TS has in the past included its
> > own versions of SageTeX and some related scripts, and those may need
> > some updating.
>
> > Can you try using SageTeX with a very minimal file -- something like
> > this:
>
> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> > \documentclass{article}
> > \usepackage{sagetex}
>
> > \begin{document}
>
> > one two $\sage{1+2}$
>
> > \end{document}
> > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> > Does that work?
>
> > Dan
>
> > --
> > ---  Dan Drake
> > -----  http://mathsci.kaist.ac.kr/~drake
> > -------
>
> >  signature.asc
> > < 1KViewDownload

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to