Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Conventions for writing documentation
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Charles Bouillaguet  
View profile  
 More options Nov 15 2012, 2:09 pm
From: Charles Bouillaguet <charles.bouillag...@gmail.com>
Date: Thu, 15 Nov 2012 20:09:39 +0100
Local: Thurs, Nov 15 2012 2:09 pm
Subject: Conventions for writing documentation
Hi,

Skimming over the reference manual, it seems that there is no clear standard regarding how to write some things. For instance, sometimes self is double-quoted (``self``), sometimes it isn't. Sometimes True and False are double-quoted, sometimes not. Sometimes the name of arguments (say, x) is single-quoted (when they are mathematical variables), sometimes they are double-quoted, and sometimes they are not quoted at all, etc. etc. etc.

What is the preferred way to go?

Also, to describe what a function does, is it better to write maths in latex (i.e., if `x = 0`) or in "sage code" (i.e., if ``x == 0``) ?

Thanks,
---
Charles Bouillaguet
http://www.lifl.fr/~bouillaguet/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Raniere Gaia Silva  
View profile  
 More options Nov 15 2012, 2:46 pm
From: Raniere Gaia Silva <r.gaia...@gmail.com>
Date: Thu, 15 Nov 2012 17:45:29 -0200
Local: Thurs, Nov 15 2012 2:45 pm
Subject: Re: [sage-devel] Conventions for writing documentation
Charles,

> Skimming over the reference manual, it seems that there is no clear
> standard regarding how to write some things. For instance, sometimes self
> is double-quoted (``self``), sometimes it isn't. Sometimes True and False
> are double-quoted, sometimes not. Sometimes the name of arguments
> (say, x) is single-quoted (when they are mathematical variables),
> sometimes they are double-quoted, and sometimes they are not quoted at
> all, etc. etc. etc.

> What is the preferred way to go?

For name of variables, functions, ..., you must use two backquotes
because this is the standard in Shinpx
(http://sphinx-doc.org/rest.html) and Docutils
(http://docutils.sourceforge.net/docs/ref/rst/roles.html#literal).

The single backqoute must be used only for math elements that will be
rendering using LaTeX
(http://docutils.sourceforge.net/docs/ref/rst/roles.html#math).

> Also, to describe what a function does, is it better to write maths in latex (i.e., if `x = 0`) or in "sage code" (i.e., if ``x == 0``) ?

It will depend if you use the sign symbol (=) to mean attribution or
not when describe what the algorithm does. Once in "sage code" (and
python) the sign symbol mean attribution I prefer to use the two sign
symbol to mean comparison (``x == 0``).

Raniere


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Travis Scrimshaw  
View profile  
 More options Nov 15 2012, 3:06 pm
From: Travis Scrimshaw <tsc...@ucdavis.edu>
Date: Thu, 15 Nov 2012 12:06:48 -0800 (PST)
Local: Thurs, Nov 15 2012 3:06 pm
Subject: Re: Conventions for writing documentation

Hey,
   From my understanding there is a lot of documentation put in before the
current standards were set (for example, look at how many functions do not
have any documentation). My personal belief is that it should always be
``self``, ``True``, and ``False`` when they are consider as code (ex.
Return ``False`` if...). Variables are somewhat more tricky, in particular
if it is also an argument for the function. There it depends on context and
how the documentation is written (same for your second question). I also
believe in cross-referencing whenever possible.

My 2 cents,
Travis


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Volker Braun  
View profile  
 More options Nov 15 2012, 5:14 pm
From: Volker Braun <vbraun.n...@gmail.com>
Date: Thu, 15 Nov 2012 14:14:10 -0800 (PST)
Local: Thurs, Nov 15 2012 5:14 pm
Subject: Re: Conventions for writing documentation

For code (if it makes sense to type it into Sage), use double quotes.
``self``, ``x==0``.

For math, use single quotes `x=0`,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
kcrisman  
View profile  
 More options Nov 15 2012, 8:41 pm
From: kcrisman <kcris...@gmail.com>
Date: Thu, 15 Nov 2012 17:41:38 -0800 (PST)
Local: Thurs, Nov 15 2012 8:41 pm
Subject: Re: Conventions for writing documentation

On Thursday, November 15, 2012 3:06:48 PM UTC-5, Travis Scrimshaw wrote:

> Hey,
>    From my understanding there is a lot of documentation put in before the
> current standards were set (for example, look at how many

Yup, and unless someone wants to update ALL the doc at once with this and
then personally rebase all current patches to it, it's probably better to
update it piecemeal as things are changed, which often does happen.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
P Purkayastha  
View profile  
 More options Nov 16 2012, 2:21 am
From: P Purkayastha <ppu...@gmail.com>
Date: Fri, 16 Nov 2012 15:21:02 +0800
Local: Fri, Nov 16 2012 2:21 am
Subject: Re: Conventions for writing documentation
To avoid this dichotomy, I would suggest writing in language

if ``x`` equals zero.

On 11/16/2012 06:14 AM, Volker Braun wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »