On Jan 5, 12:40 pm, Dana Ernst <[email protected]> wrote:
> > If you have latex installed on the sage server, it can format and display 
> > latex figures in the notebook.  
>
> Currently, we don't have a local server.  Mostly, I've been running Sage on 
> my desktop (where I have LaTeX installed).  I'm not really sure what you mean 
> here.

You need to have LaTeX installed on the same machine where Sage is
executing, and it needs to be on your path so Sage can find it.

> > In fact, there is an option to draw graphs using TikZ and display the 
> > result (Rob Beezer did a lot of work on that...).  See the example about 
> > halfway down 
> > onhttp://mvngu.wordpress.com/2009/06/24/sage-4-0-2-released/(under the 
> > Graph Theory section).
>
> I looked at the example.  It appears to me that certain commands in Sage will 
> produce TikZ output.  What if you want to produce a figure using TikZ that 
> isn't pre-coded?

For starters:

Try loading the tikz package with   latex.add_to_preamble() (I think).
Then begin a cell with  %latex
Then type in some tikz commands.

Also on my todo-list:  Document the 87 ways latex, sage, jsMath,
TinyMCE and the notebook interoperate with each other.

> Also, I tried to implement the first command of the example that you mention 
> above and received an error message.  In particular, I typed:
>
> g=graphs.PetersenGraph()
>
> and the error message was:
>
> sh: kpsewhich: command not found
> sh: kpsewhich: command not found

kpksewhich is the tex utility that simulates seaching for packages,
fonts, etc.  This suggests maybe you don't have tex visible at all (ie
on your path, whatever), so fix this first.

Try at a system prompt:
$ kpsewhich tikz.sty
/home/rob/texmf/tex/generic/pgf/tikz.sty

to see if you get back something interesting (I have the latest tikz
installed in my personal tree for more reliable testing).
-- 
You received this message because you are subscribed to the Google Groups 
"sage-edu" group.
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-edu?hl=en.


Reply via email to