[sage-support] Re: "Usage Styles" and using scipy

2009-06-10 Thread Burcin Erocal

Hi,

On Wed, 10 Jun 2009 01:12:57 -0700 (PDT)
Marky Marc  wrote:


> > > Now, on other silly topics:
> > > I've switched from using sage 3.2 on my machine to using the
> > > sagenb.org server. It seems the latter has poorer typesetting
> > > abilities than v3.2, eg often (but not always) renders sqrt(.) as
> > > "sqrt (...)" rather than using the usual symbol. Why? Is it
> > > something I set?

As Jason mentioned, this is caused by the switch in the default
symbolics backend. We didn't have enough time to test things
thoroughly. We're tracking the typesetting problem here:

http://trac.sagemath.org/sage_trac/ticket/6211

I just added your example to the ticket.

> > > Finally, regarding this code:
> > > 
> > > var('X kappa')
> > > X=sqrt(kappa)
> > > F=exp(X)
> > > show(F/F)
> > > -
> > > On v3.2 on my machine the answer is shown as "1", but the
> > > sagenb.org server tells me it's
> > > e^{2*sqrt(kappa)}  as though it were showing F*F. What's going on
> > > here?
> >
> > In the past few weeks, we've switched to a new system for doing
> > symbolics which is much faster and promises a great future.  There
> > are some patches still going in to better handle the typesetting;
> > these issues may be associated with the update.
> >
> 
> Regarding the code I posted: am I doing something stupid to not get
> "1" as the answer. I really like the idea of the notebook server, but
> at the moment it seems that sagenb.org is not typesetting well (which
> you addressed) and is returning faulty answers. Particularly for the
> latter reason it's not terribly usable. OK, I'm probably jumping to
> conclusions in that last sentence... I must be doing something silly
> in my code. Perhamps there's some semantic nuance I'm unaware of?

This is a serious bug in the new code we added for simplifying
expressions involving exp's. I made a new ticket for this,

http://trac.sagemath.org/sage_trac/ticket/6256

It's a blocker for 4.0.2. I hope I can get to it before the release
this weekend.


Many thanks for reporting these.

Cheers,
Burcin

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: "Usage Styles" and using scipy

2009-06-10 Thread Marky Marc

Wow, thanks for answering so many questions.

On Jun 10, 4:03 am, Jason Grout  wrote:
> MarkyMarcwrote:
> > Thanks for the many useful answers in this thread from several people.
> > (And thanks for the book on Rubik's Cube, David Joyner ;-)
>
> > Now, once again please forgive these questions if they're silly.
> > Firstly, regarding neatly typesetting text and maths, I've tried the
> > funky javascript editor (shift+click blue bar), but I don't thinks
> > it's not quite what I'm looking for. Moreover, I haven't found how to
> > edit text once it's entered. How is this done?
>
> Double-click on the text.
>
>

Ah yes! I guess double-clicking is not an intuitive way of doing it as
single clicking highlights the text. Text one highlights is rarely
treated as buttons or hyperlinks in GUIs. OK, you can highlight links
but it's fiddly. Well, that's my excuse for not figuring that one
out ;-)

>
> > Preferrably I'd like to enter sage/python code in the form of a self-
> > documenting program (actually, there's a better term for this, but
> > I've forgotten it).
>
> Literate programming
>

Brilliant, yes! Some long-forgotten cogs are squealing at the back of
my brain.


> I'd like to have lots of neatly formatted latex
>
>
>
> > commentary accomanying my sage code, ie I want to be able to
> > intersperse latex and sage code. I've done this in the past in latex
> > (and some programming lanuage) with some extra tools and packages that
> > extract and compile code from a latex document, run it, then retrieve
> > and typeset the results.
>
> > I've tried using the latex(.) function. It neatly typsets a maths
> > object, but so far I've only combined it with
> > text through statements of the form
> > print " %s " % latex(object)
> > which doesn't make for nicely typeset text, headings, piecewise-
> > defined-equations etc.
>
> > Typing %latex at the start of a cell makes all of that cell's content
> > interpretted and processed as latex markup -- great for the
> > commentary, but then I can't switch back to sage commands in the same
> > cell.
>
> > OK, maybe I should be content with starting a new cell if I want to
> > switch from latex entry to sage entry. But then, ideally, I could
> > still refer to a sage object in a latex cell which would render the
> > referred object as tex in the latex cell. Thus, I wouldn't need to
> > manually transliterate a rendered sage expression (say) in to latex in
> > a latex cell containing commentary of a sage cell.
>
> > Am I making sense? Is anything like this possible?
>
> You might check out sagetex
> (http://www.ctan.org/tex-archive/help/Catalogue/entries/sagetex.html;
> updated version athttp://bitbucket.org/ddrake/sagetex/or installed by
> doing sage -i sagetex-2.1.1 )
>

Sounds like that's what I want, thanks.

> It means you are editing a latex document, but you can do all of those
> things you mentioned above with sagetex.
>
>
>
> > Being the first sage material I read, "Sage for Newbies" appeared to
> > be prepared in a manner that is exactly what I'm looking for. In it
> > Ted Kosan briefly mentions  "speed" and "presentation"  "usage
> > styles", and that the latter usage style was the one in which the book
> > was prepared, but then he leaves the details of "usage styles"
> > unexplained and marked only "to be developed".
>
> > Perhaps if Ted Kosan's source file from which "Sage for Newbies" was
> > generated could be made available I could try and pick up the details
> > from there?

OK. Yes, an OpenOffice file is available. I had the impression that
this wasn't the source but was rather the OO doc was generated from
some other sage session. I'll look in to it.

>
> Ted's book was written in OpenOffice.  I thought the source file was in
> the same directory.  That book hasn't been updated in probably several
> years; it may or may not reflect the current nature of Sage.  I don't know.
>
>
>
>
>
> > Now, on other silly topics:
> > I've switched from using sage 3.2 on my machine to using the
> > sagenb.org server. It seems the latter has poorer typesetting
> > abilities than v3.2, eg often (but not always) renders sqrt(.) as "sqrt
> > (...)" rather than using the usual symbol. Why? Is it something I set?
>
> > Finally, regarding this code:
> > 
> > var('X kappa')
> > X=sqrt(kappa)
> > F=exp(X)
> > show(F/F)
> > -
> > On v3.2 on my machine the answer is shown as "1", but the sagenb.org
> > server tells me it's
> > e^{2*sqrt(kappa)}  as though it were showing F*F. What's going on
> > here?
>
> In the past few weeks, we've switched to a new system for doing
> symbolics which is much faster and promises a great future.  There are
> some patches still going in to better handle the typesetting; these
> issues may be associated with the update.
>

Regarding the code I posted: am I doing something stupid to not get
"1" as the answer. I really like the idea of the notebook server, but
at the moment it seems that sagenb.org is not typeset

[sage-support] Re: "Usage Styles" and using scipy

2009-06-09 Thread Jason Grout

Marky Marc wrote:
> Thanks for the many useful answers in this thread from several people.
> (And thanks for the book on Rubik's Cube, David Joyner ;-)
> 
> Now, once again please forgive these questions if they're silly.
> Firstly, regarding neatly typesetting text and maths, I've tried the
> funky javascript editor (shift+click blue bar), but I don't thinks
> it's not quite what I'm looking for. Moreover, I haven't found how to
> edit text once it's entered. How is this done?

Double-click on the text.


> 
> Preferrably I'd like to enter sage/python code in the form of a self-
> documenting program (actually, there's a better term for this, but
> I've forgotten it). 

Literate programming


I'd like to have lots of neatly formatted latex
> commentary accomanying my sage code, ie I want to be able to
> intersperse latex and sage code. I've done this in the past in latex
> (and some programming lanuage) with some extra tools and packages that
> extract and compile code from a latex document, run it, then retrieve
> and typeset the results.
> 
> I've tried using the latex(.) function. It neatly typsets a maths
> object, but so far I've only combined it with
> text through statements of the form
> print " %s " % latex(object)
> which doesn't make for nicely typeset text, headings, piecewise-
> defined-equations etc.
> 
> Typing %latex at the start of a cell makes all of that cell's content
> interpretted and processed as latex markup -- great for the
> commentary, but then I can't switch back to sage commands in the same
> cell.
> 
> OK, maybe I should be content with starting a new cell if I want to
> switch from latex entry to sage entry. But then, ideally, I could
> still refer to a sage object in a latex cell which would render the
> referred object as tex in the latex cell. Thus, I wouldn't need to
> manually transliterate a rendered sage expression (say) in to latex in
> a latex cell containing commentary of a sage cell.
> 
> Am I making sense? Is anything like this possible?

You might check out sagetex 
(http://www.ctan.org/tex-archive/help/Catalogue/entries/sagetex.html; 
updated version at http://bitbucket.org/ddrake/sagetex/ or installed by 
doing sage -i sagetex-2.1.1 )

It means you are editing a latex document, but you can do all of those 
things you mentioned above with sagetex.



> 
> Being the first sage material I read, "Sage for Newbies" appeared to
> be prepared in a manner that is exactly what I'm looking for. In it
> Ted Kosan briefly mentions  "speed" and "presentation"  "usage
> styles", and that the latter usage style was the one in which the book
> was prepared, but then he leaves the details of "usage styles"
> unexplained and marked only "to be developed".
> 
> Perhaps if Ted Kosan's source file from which "Sage for Newbies" was
> generated could be made available I could try and pick up the details
> from there?


Ted's book was written in OpenOffice.  I thought the source file was in 
the same directory.  That book hasn't been updated in probably several 
years; it may or may not reflect the current nature of Sage.  I don't know.


> 
> Now, on other silly topics:
> I've switched from using sage 3.2 on my machine to using the
> sagenb.org server. It seems the latter has poorer typesetting
> abilities than v3.2, eg often (but not always) renders sqrt(.) as "sqrt
> (...)" rather than using the usual symbol. Why? Is it something I set?
> 
> Finally, regarding this code:
> 
> var('X kappa')
> X=sqrt(kappa)
> F=exp(X)
> show(F/F)
> -
> On v3.2 on my machine the answer is shown as "1", but the sagenb.org
> server tells me it's
> e^{2*sqrt(kappa)}  as though it were showing F*F. What's going on
> here?
> 


In the past few weeks, we've switched to a new system for doing 
symbolics which is much faster and promises a great future.  There are 
some patches still going in to better handle the typesetting; these 
issues may be associated with the update.

Thanks,

Jason

-- 
Jason Grout


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: "Usage Styles" and using scipy

2009-06-09 Thread Marky Marc

Thanks for the many useful answers in this thread from several people.
(And thanks for the book on Rubik's Cube, David Joyner ;-)

Now, once again please forgive these questions if they're silly.
Firstly, regarding neatly typesetting text and maths, I've tried the
funky javascript editor (shift+click blue bar), but I don't thinks
it's not quite what I'm looking for. Moreover, I haven't found how to
edit text once it's entered. How is this done?

Preferrably I'd like to enter sage/python code in the form of a self-
documenting program (actually, there's a better term for this, but
I've forgotten it). I'd like to have lots of neatly formatted latex
commentary accomanying my sage code, ie I want to be able to
intersperse latex and sage code. I've done this in the past in latex
(and some programming lanuage) with some extra tools and packages that
extract and compile code from a latex document, run it, then retrieve
and typeset the results.

I've tried using the latex(.) function. It neatly typsets a maths
object, but so far I've only combined it with
text through statements of the form
print " %s " % latex(object)
which doesn't make for nicely typeset text, headings, piecewise-
defined-equations etc.

Typing %latex at the start of a cell makes all of that cell's content
interpretted and processed as latex markup -- great for the
commentary, but then I can't switch back to sage commands in the same
cell.

OK, maybe I should be content with starting a new cell if I want to
switch from latex entry to sage entry. But then, ideally, I could
still refer to a sage object in a latex cell which would render the
referred object as tex in the latex cell. Thus, I wouldn't need to
manually transliterate a rendered sage expression (say) in to latex in
a latex cell containing commentary of a sage cell.

Am I making sense? Is anything like this possible?

Being the first sage material I read, "Sage for Newbies" appeared to
be prepared in a manner that is exactly what I'm looking for. In it
Ted Kosan briefly mentions  "speed" and "presentation"  "usage
styles", and that the latter usage style was the one in which the book
was prepared, but then he leaves the details of "usage styles"
unexplained and marked only "to be developed".

Perhaps if Ted Kosan's source file from which "Sage for Newbies" was
generated could be made available I could try and pick up the details
from there?

Now, on other silly topics:
I've switched from using sage 3.2 on my machine to using the
sagenb.org server. It seems the latter has poorer typesetting
abilities than v3.2, eg often (but not always) renders sqrt(.) as "sqrt
(...)" rather than using the usual symbol. Why? Is it something I set?

Finally, regarding this code:

var('X kappa')
X=sqrt(kappa)
F=exp(X)
show(F/F)
-
On v3.2 on my machine the answer is shown as "1", but the sagenb.org
server tells me it's
e^{2*sqrt(kappa)}  as though it were showing F*F. What's going on
here?

Thanks heaps,
   Marc



On May 13, 5:52 am, David Joyner  wrote:
> On Tue, May 12, 2009 at 10:56 AM, Marky Marc  wrote:
>
> > Hi,
> > I'm brand new to sage and have just read "Sage for Newbies". Thanks
> > Ted kosan for that. I have several questions.
>
> > Immediately I wanted to do some work with sage and am loath to just do
> > maths without documenting things as I go. Thus I really want to know
> > how to use "Usage Styles", which are mentioned in Kosan's book but not
> > documented yet.  Where can I get info on "Usage Styles"?
>
> Did he meanhttp://www.python.org/dev/peps/pep-0008/?
> I can't find the discussion of "usage stlyes" 
> athttp://sage.math.washington.edu/home/tkosan/newbies_book/
>
>
>
> > Or, at the very least, I'm happy to use print statements, but how do I
> > print arbitrary TeX math's for markup by jsMath? (ie just as
> > documentation, not by using show(.) on objects.)
>
> Have you read the tutorial?http://www.sagemath.org/doc/tutorial/index.html
> Maybe you are looking for the latex(...) command?
>
>
>
> > Also, can I expect to be able to use scipy methods from sage, or does
> > sage generally replace/wrap-up these with its own methods? Where's a
> > good reference to sage's libraries?
>
> You can use Sage's wrappers to scipy or scipy 
> directly.http://www.sagemath.org/doc/reference/
>
>
>
> > Finally, how do I assert variables to be real (or imaginary, or
> > whatever)? I want to do this to so I can find the complex conjugate of
> > a symbolic expression by asserting that a variable in the expression
> > is real.
>
> This should be in the tutorial or reference manual.
>
>
>
> > Thanks, and sorry if the questions are stupid,
>
> Good questions. Hope you have fun with Sage!
>
> >  Marc
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/gr

[sage-support] Re: "Usage Styles" and using scipy

2009-05-13 Thread Kevin Horton

On 13 May 2009, at 06:51, Jason Grout wrote:

> Kevin Horton wrote:
>>
>> The baffling part is why you don't get this editor when you click the
>> Edit button in a notebook worksheet.  As it sits now, with no obvious
>> visual clue that this editor even exists, most users would never
>> discover its existence.  Are there any plans to change that?
>
> Good point.  What do you suggest?
>
> The html editor is mentioned (several times?) in the Help page.

I had actually tried "Shift click between cells to create a new HTML  
cell" as described in the Help page, but it didn't work so I assumed  
it was broken.  The current help text only works if you already know  
what it means.   This should be much more descriptive, like "To create  
a new HTML cell, shift click on the blue line that appears when the  
mouse is just above an input cell".

Random ideas to make things easier and/or more obvious for new users:

1. Why do we need to click on this phantom blue line that is only  
there when the mouse is in just the right place?  Why not have the  
whole area between output and input cells active to add HTML, or to  
insert new cells?  What is the advantage of the current design?

2. If there are definite advantages to hiding some functionality  
unless you do exactly the right thing, maybe there should be a "New  
User" mode where much more functionality is clearly visible.  The "New  
User" mode would be the default, but there would be a setting  
available from the "Settings" link to switch accounts to "Power User"  
mode, which would work as the current interface does.  For example, in  
New User mode, instead of using this hidden, unlabeled, blue bar to do  
magic things, there could be two buttons between output and input  
cells, always visible, labeled "New Cell" and "Add/Edit HTML Text".

3. The notebook interface should have much more coverage in the  
Tutorial and the Reference docs.

> My
> thoughts up to this point were that the Edit button is mainly for  
> being
> able to edit and copy the worksheet as a text file, so  putting the
> editor in the Edit page is probably not appropriate.  What do you  
> think?
>   How do you suggest we make the editor a more visible part of Sage to
> the new user?

What if we mirrored the approach taken my MoinMoin?  In MoinMoin,  
there are two types of editors - a plain text editor and a GUI  
editor.  The plain text editor is analogous to the notebook editor  
that is seen if you click the notebook Edit button.  The GUI editor is  
analogous to Jason's HTML editor.  In MoinMoin, there is a user  
preference for the default editor - either text or GUI.  And, if you  
click Edit in MoinMoin, you have a control at the top of the editor  
window that allows to switch between text and GUI editors.  Copying  
the MoinMoin interface here has several advantages:

1. It exposes the presence of the HTML editor without adding any more  
visible controls to basic notebook window.  The HTML notebook editor  
should be the default for new user accounts. Power users can switch to  
text editor if they wish.

2. It provides a consistent user interface between the sage notebook  
and MoinMoin, which is included with sage.

3. It allows a proven interface design to be slavishly copied, rather  
than having to reinvent the wheel.

> What about changing the new cell (blue) bar so that it had two links,
> one that said "New computation" and another link that said "New text"?

This would help.  As it is, the blue bar is not obvious, unless you  
know to look for it.  And once you see it, its purpose is mysterious  
unless you have been told about it, or have read and understood the  
info at the Help page.

--
Kevin Horton
Ottawa, Canada




--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: "Usage Styles" and using scipy

2009-05-13 Thread Jason Grout

Kevin Horton wrote:
> 
> 
> Well done Jason - Thanks!
> 
> The baffling part is why you don't get this editor when you click the  
> Edit button in a notebook worksheet.  As it sits now, with no obvious  
> visual clue that this editor even exists, most users would never  
> discover its existence.  Are there any plans to change that?


Good point.  What do you suggest?

The html editor is mentioned (several times?) in the Help page.  My 
thoughts up to this point were that the Edit button is mainly for being 
able to edit and copy the worksheet as a text file, so  putting the 
editor in the Edit page is probably not appropriate.  What do you think? 
   How do you suggest we make the editor a more visible part of Sage to 
the new user?

What about changing the new cell (blue) bar so that it had two links, 
one that said "New computation" and another link that said "New text"?

Thanks,

Jason



--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: "Usage Styles" and using scipy

2009-05-13 Thread Mike Hansen

On Wed, May 13, 2009 at 3:44 AM, Kevin Horton  wrote:
> Well done Jason - Thanks!
>
> The baffling part is why you don't get this editor when you click the
> Edit button in a notebook worksheet.  As it sits now, with no obvious
> visual clue that this editor even exists, most users would never
> discover its existence.  Are there any plans to change that?

There is something there under the "HTML" section on the help page for
the notebook.  See http://sagenb.org/help/ .  But, it could probably
be made more clear and/or advertised better.

--Mike

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: "Usage Styles" and using scipy

2009-05-13 Thread Kevin Horton

On 12 May 2009, at 21:46, kcrisman wrote:

>>> You can also shift-click on the blue bar to bring up a nice  
>>> editor, in
>>> which you can enter latex code like you did above.  This basically
>>> is a
>>> nice way of editing text in between cells.
>>
>>> For an example, do what you did above (put that text in between the
>>> cells) and then go back to the worksheet and doubleclick on the  
>>> math.
>>> It should pop up the editor and let you edit it.
>>
>> I didn't know that.  Thanks.  That looks useful.
>
> That's an understatement, as it turns out - many of us can't imagine
> going back.  Jason is too humble to mention that he is largely
> responsible for that being part of Sage now :)


Well done Jason - Thanks!

The baffling part is why you don't get this editor when you click the  
Edit button in a notebook worksheet.  As it sits now, with no obvious  
visual clue that this editor even exists, most users would never  
discover its existence.  Are there any plans to change that?

--
Kevin Horton
Ottawa, Canada




--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: "Usage Styles" and using scipy

2009-05-12 Thread kcrisman


>
> > You can also shift-click on the blue bar to bring up a nice editor, in
> > which you can enter latex code like you did above.  This basically  
> > is a
> > nice way of editing text in between cells.
>
> > For an example, do what you did above (put that text in between the
> > cells) and then go back to the worksheet and doubleclick on the math.
> > It should pop up the editor and let you edit it.
>
> I didn't know that.  Thanks.  That looks useful.

That's an understatement, as it turns out - many of us can't imagine
going back.  Jason is too humble to mention that he is largely
responsible for that being part of Sage now :)

- kcrisman
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: "Usage Styles" and using scipy

2009-05-12 Thread Kevin Horton

On 12 May 2009, at 18:18, Jason Grout wrote:

> Kevin Horton wrote:
>> I'm very new to sage myself, so perhaps I have not yet found the
>> optimum solution.  For the moment, I am embedding latex math  
>> equations
>> in html, like:
>>
>> $W_{1}=\frac{1}{2}\rho_{1}V_{1}^{2}SC_{l}$
>>
>> The html explanatory notes go between the cells, and are entered  
>> after
>> clicking the "Edit" button while viewing a worksheet.  You can see an
>> example of what I created:
>>
>> https://99.240.209.8:8000/home/pub/11
>>
>
> You can also shift-click on the blue bar to bring up a nice editor, in
> which you can enter latex code like you did above.  This basically  
> is a
> nice way of editing text in between cells.
>
> For an example, do what you did above (put that text in between the
> cells) and then go back to the worksheet and doubleclick on the math.
> It should pop up the editor and let you edit it.


I didn't know that.  Thanks.  That looks useful.

--
Kevin Horton
Ottawa, Canada




--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: "Usage Styles" and using scipy

2009-05-12 Thread Jason Grout

Kevin Horton wrote:
> On 12 May 2009, at 10:56, Marky Marc wrote:
> 
>> I'm brand new to sage and have just read "Sage for Newbies". Thanks
>> Ted kosan for that. I have several questions.
>>
>> Immediately I wanted to do some work with sage and am loath to just do
>> maths without documenting things as I go. Thus I really want to know
>> how to use "Usage Styles", which are mentioned in Kosan's book but not
>> documented yet.  Where can I get info on "Usage Styles"?
>>
>> Or, at the very least, I'm happy to use print statements, but how do I
>> print arbitrary TeX math's for markup by jsMath? (ie just as
>> documentation, not by using show(.) on objects.)
>>
> 
> It is worth looking at some of the notebook worksheets on the sage  
> public server:
> 
> http://www.sagenb.org/pub
> 
> You can download copies of any of the public worksheets, then load the  
> copy onto your server.  Or, create your own account on the sage public  
> server, and edit a copy of any worksheet there.
> 
> I'm very new to sage myself, so perhaps I have not yet found the  
> optimum solution.  For the moment, I am embedding latex math equations  
> in html, like:
> 
> $W_{1}=\frac{1}{2}\rho_{1}V_{1}^{2}SC_{l}$
> 
> The html explanatory notes go between the cells, and are entered after  
> clicking the "Edit" button while viewing a worksheet.  You can see an  
> example of what I created:
> 
> https://99.240.209.8:8000/home/pub/11
> 

You can also shift-click on the blue bar to bring up a nice editor, in 
which you can enter latex code like you did above.  This basically is a 
nice way of editing text in between cells.

For an example, do what you did above (put that text in between the 
cells) and then go back to the worksheet and doubleclick on the math. 
It should pop up the editor and let you edit it.

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: "Usage Styles" and using scipy

2009-05-12 Thread Kevin Horton

On 12 May 2009, at 10:56, Marky Marc wrote:

> I'm brand new to sage and have just read "Sage for Newbies". Thanks
> Ted kosan for that. I have several questions.
>
> Immediately I wanted to do some work with sage and am loath to just do
> maths without documenting things as I go. Thus I really want to know
> how to use "Usage Styles", which are mentioned in Kosan's book but not
> documented yet.  Where can I get info on "Usage Styles"?
>
> Or, at the very least, I'm happy to use print statements, but how do I
> print arbitrary TeX math's for markup by jsMath? (ie just as
> documentation, not by using show(.) on objects.)
>

It is worth looking at some of the notebook worksheets on the sage  
public server:

http://www.sagenb.org/pub

You can download copies of any of the public worksheets, then load the  
copy onto your server.  Or, create your own account on the sage public  
server, and edit a copy of any worksheet there.

I'm very new to sage myself, so perhaps I have not yet found the  
optimum solution.  For the moment, I am embedding latex math equations  
in html, like:

$W_{1}=\frac{1}{2}\rho_{1}V_{1}^{2}SC_{l}$

The html explanatory notes go between the cells, and are entered after  
clicking the "Edit" button while viewing a worksheet.  You can see an  
example of what I created:

https://99.240.209.8:8000/home/pub/11

--
Kevin Horton
Ottawa, Canada




--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: "Usage Styles" and using scipy

2009-05-12 Thread David Joyner

On Tue, May 12, 2009 at 10:56 AM, Marky Marc  wrote:
>
> Hi,
> I'm brand new to sage and have just read "Sage for Newbies". Thanks
> Ted kosan for that. I have several questions.
>
> Immediately I wanted to do some work with sage and am loath to just do
> maths without documenting things as I go. Thus I really want to know
> how to use "Usage Styles", which are mentioned in Kosan's book but not
> documented yet.  Where can I get info on "Usage Styles"?

Did he mean http://www.python.org/dev/peps/pep-0008/ ?
I can't find the discussion of "usage stlyes" at
http://sage.math.washington.edu/home/tkosan/newbies_book/


>
> Or, at the very least, I'm happy to use print statements, but how do I
> print arbitrary TeX math's for markup by jsMath? (ie just as
> documentation, not by using show(.) on objects.)


Have you read the tutorial?
http://www.sagemath.org/doc/tutorial/index.html
Maybe you are looking for the latex(...) command?


>
> Also, can I expect to be able to use scipy methods from sage, or does
> sage generally replace/wrap-up these with its own methods? Where's a
> good reference to sage's libraries?

You can use Sage's wrappers to scipy or scipy directly.
http://www.sagemath.org/doc/reference/

>
> Finally, how do I assert variables to be real (or imaginary, or
> whatever)? I want to do this to so I can find the complex conjugate of
> a symbolic expression by asserting that a variable in the expression
> is real.

This should be in the tutorial or reference manual.

>
> Thanks, and sorry if the questions are stupid,


Good questions. Hope you have fun with Sage!


>  Marc
>
> >
>

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---