verifying visual look of ReST in docstrings

2 views
Skip to first unread message

William Stein

unread,
Aug 23, 2009, 1:02:39 AM8/23/09
to sage-devel
Hi,

I just wanted to emphasize that as of sage-4.1.1, if you write some code and want to very easily/quickly check that your ReST docstrings look right, just introspect (tab or ?) in the notebook on that docstring and it now will come up nicely formatted.   If you did "sage -br" you do *not* have to restart the notebook server -- it suffices to just do "Action --> Restart Worksheet".

Thanks to John Palmieri, and many others for getting this functionality working.

William

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

Golam Mortuza Hossain

unread,
Aug 23, 2009, 6:24:25 AM8/23/09
to sage-...@googlegroups.com
Hi,

On Sun, Aug 23, 2009 at 2:02 AM, William Stein<wst...@gmail.com> wrote:

> If you did "sage -br" you do *not* have to restart the notebook server --
> it suffices to just do "Action --> Restart Worksheet".


Thats a cool feature. I noticed that restarting worksheet seems to disable
latex typesetting even though "Typeset" box is checked. I need to
un-check and then re-check the "Typeset" box to get it working again.


Cheers,
Golam

William Stein

unread,
Aug 23, 2009, 3:46:04 PM8/23/09
to sage-...@googlegroups.com

Thanks for finding this bug.  Can you report it to trac, please?

William

Golam Mortuza Hossain

unread,
Aug 23, 2009, 7:00:41 PM8/23/09
to sage-...@googlegroups.com
On Sun, Aug 23, 2009 at 4:46 PM, William Stein<wst...@gmail.com> wrote:
>
> Thanks for finding this bug.  Can you report it to trac, please?

Here it goes

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


Cheers,

David Kohel

unread,
Aug 24, 2009, 10:27:30 AM8/24/09
to sage-devel
Hi William,

Thanks (to John Palmieri et al), such a feature was requested at Sage
Days 16.

Is there an interface in the command-line version or a command-line
call on a file
that doesn't request require starting up Sage?

Cheers,

David

William Stein

unread,
Aug 24, 2009, 11:14:21 AM8/24/09
to sage-...@googlegroups.com

I think so, in the sense that testing/build the reference manual has been discussed numerous times before on sage-devel.

But the code I mentioned above is only for the notebook.  I can't really imagine how it would work without the notebook, since it is code for rendering ReST which partly requires javascript libraries, etc.   Do you want something on the command line that pops up a web browser view of ReST?  Or pdf?  or ?

William

David Kohel

unread,
Aug 24, 2009, 11:48:21 AM8/24/09
to sage-devel
I would prefer to generate a html or pdf file that I could view with
standard tools or just read as plain text. Or maybe break the
task into steps: extract the doc strings to a ReST file, and browse
the ReST file with some "standard tools" (say rst2html file |
lynx).

The first step is important since I'd like to look at and compare
valid ReST extracted from the source files, e.g. identified from
good examples in the manual.

If I want to learn ReST, then I would like to have some standard
tool (as simple as pdflatex file.tex + my_favorite_pdf_viewer) so
that I could view and validate a ReST file that I attempt to write.
So I find the second step important.

--David

John H Palmieri

unread,
Aug 24, 2009, 4:09:12 PM8/24/09
to sage-devel
On Aug 24, 8:48 am, David Kohel <drko...@gmail.com> wrote:
> I would prefer to generate a html or pdf file that I could view with
> standard tools or just read as plain text. Or maybe break the
> task into steps: extract the doc strings to a ReST file, and browse
> the ReST file with some "standard tools" (say rst2html file |
> lynx).

Take a look at this:

<http://trac.sagemath.org/sage_trac/ticket/6820>

It doesn't quite do what you want because it only works within a
running version of Sage. But maybe it's some progress.

Regards,
John
Reply all
Reply to author
Forward
0 new messages