On Jan 5, 2010, at 6:37 PM, Rob Beezer wrote: >> 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. > > I was being too sloppy and you were being too literal - you have to > have something to add. ;-)
Yeah, I figured this out. Seems obvious now. > It's really just one parameter, its a > Python/object-oriented thing that gives a misleading error message. > > Try: > > sage: latex.add_to_preamble? > > to get help. In there you will see examples such as: > > latex.add_to_preamble("\\usepackage{xypic}") > > Note the *double* backslash, where the first "escapes" the second one. If you do sage: latex.add_to_preamble? the examples only use a single backslash and this doesn't work. Unless I'm missing something, this should be fixed. >>> 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. > > That looks just like it should, but then doesn't help explain why Sage > may not be seeing your TeX installation. I have two copies of sage on my computer. One is Sage 4.3 for OSX 10.6 that I obtained from the download page and the other I obtained using (to get an icon to open immediately in a notebook; bdist): export SAGE_APP_BUNDLE = "yes" export SAGE_APP_DMG = "yes" ./sage -bdist MySage Both sit inside a folder called sage that sits inside my home folder. However, when I run Sage from the icon, I always get an error message saying that LaTeX does not seem to be installed. Everything seems to work fine if I run Sage from the standard install. However, I still don't quite understand what lines of code need to be in separate cells and why. For example, why do latex.add_to_preamble("\\usepackage{tikz}") and %latex \begin{tikzpicture} blah blah \end{tikzpicture} need to be in separate cells? As a side note, I have not been able to install the bdist Sage on my home computer. I posted something about this on the sage-support list, but haven't heard anything. For now, it seems best for me to ignore the pretty purple sage icon. 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.