notebook questions

54 views
Skip to first unread message

John Cremona

unread,
Nov 21, 2016, 2:41:03 PM11/21/16
to sage-cloud
Some questions about Sage cloud notebooks (i.e. .sagews):

1. Is it possible to download just the input? When I download a
worksheet I get lines like

73b7ed58-0f7f-46f8-b581-e5eb9eec4da9so︠

appearing all over the place and it is tedious to edit them out. I
thought of using the "toggle output" before downloading, but that
toggle button does nothing.

2. In old-style Sage notebooks it was possible to have blocks of
explanatory text between cells. The closest I found with sagews is to
have a block tagged with %md but the result looks stupid since the
output repeats the input. The result is certainly not good enough to
use as a demo.

3. There is a Help button at the top of a worksheet but all it does is
enter something like help() in the worksheet itself. What use is
that?

4. I tried to see if I could open up some help in a second tab, but
opening a new tab just creates a copy of the old tab which doesn't
seem useful.

John

Rob Beezer

unread,
Nov 21, 2016, 3:24:26 PM11/21/16
to sage-...@googlegroups.com
On 11/21/2016 11:40 AM, John Cremona wrote:
> 1. Is it possible to download just the input? When I download a
> worksheet I get lines like
>
> 73b7ed58-0f7f-46f8-b581-e5eb9eec4da9so︠
>
> appearing all over the place and it is tedious to edit them out. I
> thought of using the "toggle output" before downloading, but that
> toggle button does nothing.

Those are markers for the input and output cells - which doesn't answer your
question.

> 2. In old-style Sage notebooks it was possible to have blocks of
> explanatory text between cells. The closest I found with sagews is to
> have a block tagged with %md but the result looks stupid since the
> output repeats the input. The result is certainly not good enough to
> use as a demo.

Use %hide also (own line, maybe first?), and/or use the code-folding arrows ihn
the left margin.

William Stein

unread,
Nov 21, 2016, 3:35:55 PM11/21/16
to sage-cloud
On Mon, Nov 21, 2016 at 11:40 AM, John Cremona <john.c...@gmail.com> wrote:
> Some questions about Sage cloud notebooks (i.e. .sagews):
>
> 1. Is it possible to download just the input? When I download a
> worksheet I get lines like
>
> 73b7ed58-0f7f-46f8-b581-e5eb9eec4da9so︠
>
> appearing all over the place and it is tedious to edit them out. I
> thought of using the "toggle output" before downloading, but that
> toggle button does nothing.

No. You could use `grep -v` to remove all the input/output cell
markers though. They are delimited by two unicode characters.

> 2. In old-style Sage notebooks it was possible to have blocks of
> explanatory text between cells. The closest I found with sagews is to
> have a block tagged with %md but the result looks stupid since the
> output repeats the input. The result is certainly not good enough to
> use as a demo.

You can hide the input using the toggle to the left. Or you can do
%md(hide=True).

> 3. There is a Help button at the top of a worksheet but all it does is
> enter something like help() in the worksheet itself. What use is
> that?

That is not what the button does for me.

When I click the help menu, I get a dropdown menu with numerous
options. When I click the help *button* I get sent to
https://github.com/sagemathinc/smc/wiki/sagews

Exactly what web browser and OS are you using?

> 4. I tried to see if I could open up some help in a second tab, but
> opening a new tab just creates a copy of the old tab which doesn't
> seem useful.

I don't understand this question.

William




>
> John
>
> --
> You received this message because you are subscribed to the Google Groups "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/CAD0p0K4UvWQTG2hONtPN4aZe7j3QX6u1HetyPA7QZqUcc7%3D%3DhQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--

Best Regards,
William Stein

CEO, SageMath, Inc.

John Cremona

unread,
Nov 22, 2016, 7:35:32 AM11/22/16
to sage-cloud


On Monday, 21 November 2016 20:35:55 UTC, William Stein wrote:
On Mon, Nov 21, 2016 at 11:40 AM, John Cremona <john.c...@gmail.com> wrote:
> Some questions about Sage cloud notebooks (i.e. .sagews):
>
> 1. Is it possible to download just the input?  When I download a
> worksheet I get lines like
>
> 73b7ed58-0f7f-46f8-b581-e5eb9eec4da9so︠
>
> appearing all over the place and it is tedious to edit them out.  I
> thought of using the "toggle output" before downloading, but that
> toggle button does nothing.

No.  You could use `grep -v` to remove all the input/output cell
markers though.  They are delimited by two unicode characters.

OK, that would be a little faster than using emacs as I did.  I  suggest that it might be useful as an option to download input cells (perhaps with text cells prefixed by comment symbols).
 
In case anyone wonders why I want to do that, it's because I am using a free SMC account and some of the computations I want to do are time-consuming -- and I have plenty of powerful computers which run Sage.


> 2. In old-style Sage notebooks it was possible to have blocks of
> explanatory text between cells.  The closest I found with sagews is to
> have a block tagged with %md but the result looks stupid since the
> output repeats the input.  The result is certainly not good enough to
> use as a demo.

You can hide the input using the toggle to the left.  Or you can do
%md(hide=True).

Thanks, that's perfect.

> 3. There is a Help button at the top of a worksheet but all it does is
> enter something like help() in the worksheet itself.  What use is
> that?

That is not what the button does for me.

When I click the help menu, I get a dropdown menu with numerous
options.  When I click the help *button* I get sent to
https://github.com/sagemathinc/smc/wiki/sagews

 Exactly what web browser and OS are you using?


Firefox on Suse enterprise, and/or chrome on ubuntu (I forget which one I was using when I posted).

(1) There's a help button near the top right of the screen next to my name and "About", and with an icon looking like a doctor's bag (?).  When I right click on that to open in a new tab I just get a copy of the same tab I was on.  If I just click on it I get a dialogue box offering to post a support question.
 
(2) There's a Help button in the sagews screen next to Mode and under the green Run button.  That does opo up a little menu of options.  The first one "General Help" has the effect I said, to insert "help()" into the worksheet.  The  next one also inserts some command into the worksheet.  I was expecting to *see* some help!

> 4. I tried to see if I could open up some help in a second tab, but
> opening a new tab just creates a copy of the old tab which doesn't
> seem useful.

 
I don't understand this question.


I tried to explain more above (when I right-clicked).
 
William

Thanks,

John
 

Harald Schilly

unread,
Nov 22, 2016, 11:13:33 AM11/22/16
to sage-cloud
On Tue, Nov 22, 2016 at 1:35 PM, John Cremona <john.c...@gmail.com> wrote:

In case anyone wonders why I want to do that, it's because I am using a free SMC account and some of the computations I want to do are time-consuming -- and I have plenty of powerful computers which run Sage.

​What about the following idea: next to the "save" ​button, there is a download dropdown button. One option is "PDF", which basically does what printing is now … and another option is "Sage": this option would convert the sagews file to a plain ".sage" file, for those cells which are in sage mode. I guess that would solve what you try to do.

​> ​
(1) There's a help button near the top right of the screen next to my name
​...


t
​hat's a button for the support functionality, yes.​ trying to open it in a new tab makes not much sense, since it is the same single page application.

 
​> ​
(2) There's a Help button in the sagews screen
​...

This is the buttonbar. It's main purpose is -- or rather will be -- to give you some shortcuts for frequently used commands.

The button you're looking for is highlighted in blue and above that bar. It's pointing to https://github.com/sagemathinc/smc/wiki/sagews

there isn't much more help than that.

-- harald




Whitcher, Ursula A.

unread,
Nov 22, 2016, 11:43:31 AM11/22/16
to sage-cloud

Harald Schilly wrote:

 

On Tue, Nov 22, 2016 at 1:35 PM, John Cremona <john.c...@gmail.com> wrote:

>>
(1) There's a help button near the top right of the screen next to my name
...


> t
hat's a button for the support functionality, yes. trying to open it in a new tab makes not much sense, since it is the same single page application.

 

Tabs are an area where the sagemathcloud development philosophy is in conflict with the modern browser paradigm.  I am frequently frustrated by sagemathcloud's lack of support for right-clicking and opening in a new tab, and usually work around it by opening multiple tabs in my browser first and then navigating to slightly different spots within the same project.  I would definitely do so if I wanted to paste specific code or messages from a project into the support message box (support messages happen to persist when you close them, but that's not an interface behavior I'd expect or trust).

--Ursula.

John Cremona

unread,
Nov 22, 2016, 11:44:18 AM11/22/16
to sage-cloud
Thanks, Harald!

On 22 November 2016 at 16:13, Harald Schilly <harald....@gmail.com> wrote:
>
> On Tue, Nov 22, 2016 at 1:35 PM, John Cremona <john.c...@gmail.com>
> wrote:
>>
>>
>> In case anyone wonders why I want to do that, it's because I am using a
>> free SMC account and some of the computations I want to do are
>> time-consuming -- and I have plenty of powerful computers which run Sage.
>
>
> What about the following idea: next to the "save" button, there is a
> download dropdown button. One option is "PDF", which basically does what
> printing is now … and another option is "Sage": this option would convert
> the sagews file to a plain ".sage" file, for those cells which are in sage
> mode. I guess that would solve what you try to do.

Yes, that would be perfect. Perhaps also on the separate download
page, for each sagews file listed there could be optoins as to what
format the user wants.

>
>>
> (1) There's a help button near the top right of the screen next to my name
> ...
>
>
> t
> hat's a button for the support functionality, yes. trying to open it in a
> new tab makes not much sense, since it is the same single page application.
>
>
>>
> (2) There's a Help button in the sagews screen
> ...
>
> This is the buttonbar. It's main purpose is -- or rather will be -- to give
> you some shortcuts for frequently used commands.
>
> The button you're looking for is highlighted in blue and above that bar.
> It's pointing to https://github.com/sagemathinc/smc/wiki/sagews
>
> there isn't much more help than that.

You probably cannot believe that I did not see that -- but in my
defense, having 3 different buttons on the page all labelled "Help" is
a little confusing, though it is my fault for having noticed only 2 of
the 3, especially as the one I missed was the one which answered my
questions (almost)!

>
> -- harald
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/CAGG4CB7NHaDS%3DJo%2BNVhs2YyxQScBSk7H20eG%2Bcji81siAyKWyg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages