On Thu, 03 May 2012 at 04:58PM +0530, Priyanka Kapoor wrote:
> \begin{sageblock}
> v= [x^2, sin(x)]
> \end{sageblock}
>
> Here's a plot of $f$ from $-2$ to $2$:
> for i in range(2):
> \sageplot[width=10cm]{plot(v[i],(x,
> -2,2),legend_label='sin(x)',aspect_ratio =1)}
> \end{document}You are putting Python code into your TeX document, but TeX will typeset it, not ask Python/Sage to process it. It looks like you want TeX to do the loop. Try the forloop package: http://www.ctan.org/tex-archive/macros/latex/contrib/forloop/ Dan -- --- Dan Drake ----- http://mathsci.kaist.ac.kr/~drake -------
signature.asc
Description: Digital signature
