Hello, Thank you a lot for your reply! Yes, indeed, I did all that in my test file, there is
%!TEX TS-program = sage \documentclass[12pt]{article} ... \usepackage{sagetex} and I use the sage.engine of TeXShop which looks like this: #!/bin/bash PATH=$PATH:/usr/texbin:/usr/local/bin filename=$1 sagename=${filename/%tex/sage} soutname=${filename/%tex/sout} pdflatex "$filename" # do we need to run Sage? if [ -f "$soutname" ] then new_sum=$(egrep -v '^( _st_.goboom|print .SageT)' "$sagename" | md5) old_sum=$(egrep -o ^%[0-9a-f]{32}% "$soutname" | cut -b 2-33) if [ "$new_sum" != "$old_sum" ] then run_sage=yes fi else # no .sout file, so run Sage run_sage=yes fi if [ "$run_sage" = "yes" ] then echo Running Sage, please wait a moment... /Applications/sage/sage "$sagename" pdflatex "$filename" else echo No Sage commands have changed, so running Sage is unnecessary. fi When compiling in TeXShop, I get a SageTest.sagetex file in the same directory and when compiling, I get the message LaTeX Warning: Reference `@sageinline0' on page 1 undefined on input line 25. I can't seem to be able to run Sage on the .sage file. Any ideas? Thanks all for the help with this! All the best, Gabriel On Saturday, April 6, 2013 4:43:55 PM UTC+2, kcrisman wrote: > On Saturday, April 6, 2013 6:59:29 AM UTC-4, Gabriel wrote:Hello all, > I've just found this Sage Group recently while trying to install Sage and to > make it work with LaTeX. I followed (I think) all instructions in the > installation guide (http://www.sagemath.org/doc/installation/index.html) and > I am stuck in TeXShop (MacTeX 2012) while trying to compile the example. > "Everything" goes on well, I've got the example.pdf made, but I see double > question marks ("??") everywhere where Sage would had to make its output. I > thus think that I forgot one step somewhere in the installation? > What I did: > - Copy the Sage directory into Applications > - Copy the tex>generic>sagetex>[a bunch of files with sagetex.sty] into the > ~Library/texmf/ directory > - Copied the example sage.engine of TeXShop to the "Working directory" of > TeXShop engines > - texhash TEXMFLOCAL in Terminal. > What did I miss here? Sage does work in the terminal. I think it is just a > little point down the road... > > > > Did you do the following? > > > %!TEX TS-program = sage > \documentclass[12pt]{article} > ... > \usepackage{sagetex} > > > > > > Otherwise you'll probably have to run Sage explicitly on the .sage file or > something. In principle, the workflow is > > > LaTeX file > run Sage on .sage file > LaTeX file > LaTeX file again? (to make sure references are right) > > > But with the > > > > %!TEX TS-program = sage > > > I never have problems with TeXShop. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.