On Sun, 16 Jan 2011 at 01:52PM -0800, Luiz Felipe Martins wrote:
> The offending code in sagetex.py is:
>
> def inline(self, counter, s):
> self.progress('Inline formula {0}'.format(counter))
> self.souttmp.write('\\newlabel{@sageinline' + str(counter) + '}{{%\n' +
> s.rstrip() + '}{}{}{}{}}\n') # <<<<<<<<<<<<<<<<
> s is not a string, can be any sage object here
>
> I changed this to:
>
> def inline(self, counter, s):
> self.progress('Inline formula {0}'.format(counter))
> self.souttmp.write('\\newlabel{@sageinline' + str(counter) + '}{{%\n' +
> latex(s).rstrip() + '}{}{}{}{}}\n')
>
> And it works correctly. The versions I'm using are sage 4.6.1, and sagetex
> [2010/03/25 v2.2.5 embedding Sage into LaTeX documents]
That is very strange; the `s' in the function above should already be a
string. Your version of sagetex.sty has:
\newcommand{\sage}[1]{\ST@sage{latex(#1)}}
so `s' should be a string. What is in the generated .sage file? You
should see "latex(2+2)" there.
Dan
--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------
signature.asc
Description: Digital signature
