On Jan 5, 2010, at 4:00 PM, Rob Beezer wrote:

> On Jan 5, 12:40 pm, Dana Ernst <ernst.tr...@gmail.com> 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.

I think there is a problem here.  (see below)

>>> 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).

When I typed   latex.add_to_preamble()  I received a message saying that I 
needed to provide two parameters.  When I typed the command without the (), I 
got:

\newcommand{\Bold}[1]{\mathbf{#1}}\hbox{ < bound method Latex.add_to_preamble 
of  < sage.misc.latex.Latex instance at 0x10af7d2d8 >  > }

which I'm guessing is what was supposed to happen.

>> 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

Here is what I got:

/usr/local/texlive/2008/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty

but I'm not sure if this means that sage can't find latex or not.

Thanks.

Dana
--
You received this message because you are subscribed to the Google Groups "sage-edu" group.
To post to this group, send email to sage-...@googlegroups.com.
To unsubscribe from this group, send email to sage-edu+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sage-edu?hl=en.

Reply via email to