Hi J,
I am not sure what exactly you want to do at the top of your notebook,
but I agree that it is not always easy to find specific information in
the documentation. Examples are for me the best way to learn new things.
However, it is usually not possible to just copy and paste code from a
pdf file into a notebook because symbols in the pdf are often not the
same as the ones originally typed in.
In the pdf you referred to below, for example, apostrophes got replaced
by accents when I copied and pasted, which led to an error in the notebook.
Type this instead:
a,b,c,d,x,y=var('a,b,c,d,x,y')
<Shift-Enter>
show(solve(a*x^2+b*x+c==0,x))
<Shift-Enter>
show(solve(a*x^3+b*x+c==0,x))
<Shift-Enter>
solve([a*x+b*y==0,c*x+d*y==0],x,y)
<Shift-Enter>
Note that the square brackets were missing in the last line.
Hope this helps to get you started.
Cheers,
Stan
J Elaych wrote:
> It takes quite a while to learn how to use the notebook just by
> googling around (search google for 'sage %hide' for instance) so I
> hope someone can point me in a better direction.
>
> One simple thing I would like to be able to do is to enter a bunch of
> forumula's, say integrals or ODEs, at the very beginning of my session
> and display them each in nicely formatted latex, as they are entered.
> Sort of like a typical maple session, where each equation is typeset
> as its entered. However, the closest I get to such output is to 1)
> assign the formula to a variable, 2) assign the latex(forumula) to a
> variable, 3) jsmath(this latex variable) and 4) click 'evaluate' under
> the cell.
>
> Thats a bit of work and I've found that if I have several jsmath()
> displays in a row and hit evaluate, only one of them shows up
> typeset. I know there has to be an easier way and it probably
> requires various settings in the dropdown boxes above the worksheet
> and some % declares and so on, and I would like to find a good
> resource to read about these options.
>
> For instance, the otherwise excellent 'an-invitation-to-sage.pdf'
> whitepaper has a nice screenshot of a notebook that seems to do what I
> want, with the helpful comment:
>
> -------------------------------------------------------
> Here are the commands used to create the output in the Notebook
> session
> in the above screenshot:
> Sage Notebook
> a,b,c,d,x,y=var(’a,b,c,d,x,y’)
> show(solve(a*xˆ2+b*x+c==0,x))
> show(solve(a*xˆ3+b*x+c==0,x))
> solve(a*x+b*y==0,c*x+d*y==0,x,y)
> -------------------------------------------------------
>
> but when I type them in to my notebook cell nothing happens, and when
> I click 'evaluate' under the cell I just get an error message. Also,
> I can't tell if the whitepaper's screenshot was generated after each
> of these 'show' commands, or if all of the commands are executed at
> once via the 'evaluate' button. Is there, for instance, a mode where
> 'evaluate' is implicit after each carriage return?
>
> Likewise, searching google for 'sage latex' turns up some interesting
> messages, but nothing that helps me set the notebook up to display
> formulae. Another forinstance: I would like to know how the author
> of http://sagenb.com/home/pub/365/ managed to have the nicely latex'd
> comments above each of the cells.
>
> I am still playing around and experimenting with the notebook but
> there have to be some shortcuts to learning all this, and I'd
> appreciate any pointers to websites, archives, and so on.
>
> Thanks,
>
> J
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---