Jason is right,

Looking at the example.tex included with sagetex, the following lines
in the preamble lists the dependencies:

\usepackage{hyperref}
\usepackage{tkz-berge}
\usepackage{sagetex}

If using the Ubuntu texlive latex distribution, you need to make sure
to install the texlive-latex-extra and texlive-latex-recommeded
packages to have a more extensive library of latex packages. Make sure
the texlive-pictures package is also installed. If you installed the
official CTAN TexLive from the DVD image, these dependencies should be
installed by default.

I'm using texlive 2009 from the Ubuntu 10.04 repository, and had to
copy the files texlivetkz-arith.sty, tkz-graph.sty and tkz-berge.sty
(these can be downloaded here: http://altermundus.com/downloads/packages/).
Put them in your texmf directory (for example in the /usr/share/texmf-
texlive/tex/latex/tkz-berger folder).

Last, but not least, you must run "sudo texhash" to refresh the
texlive database. Else the newly installed .sty packages won't be
seen.

Or as Jason suggested, you could make your own tex document. Here's an
other example, plotting AM modulation curves and demonstrating some of
sagetex features:

% ----------------- START ------------------
\documentclass{article}
\usepackage{sagetex}
\begin{document}

\begin{sageblock}
m(t)= cos(2*pi*100*t)
p(t)= cos(2*pi*1000*t)
AM1(t)=(1 + 0.5*m(t))*p(t)
a=plot(AM1(t),0,0.020)
a.axes_labels(['$t\, \mathrm{(s)}$','$\phi_1(t)\, \mathrm{(V)}$'])
a.fontsize(12)
\end{sageblock}

\begin{sagesilent}
AM2(t)=(1 + 2*m(t))*p(t)
b=plot(AM2(t),0,0.020)
b.axes_labels(['$t\, \mathrm{(s)}$','$\phi_2(t)\, \mathrm{(V)}$'])
b.fontsize(12)
\end{sagesilent}

\begin{figure}[h!]%
  \centering
    \sageplot[width=0.5\textwidth]{a}
    \sageplot[width=0.5\textwidth]{b}
  \label{fig:ex7}%
\end{figure}

\end{document}
% ------------------- END --------------------

Save this under test.tex, for example, and generate a pdf using
pdflatex
     pdflatex test.tex

Good luck and have fun!

Maxim

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

Reply via email to