On Sat, Feb 28, 2009 at 2:42 PM, Mike Hansen <mhan...@gmail.com> wrote:
>
> On Sat, Feb 28, 2009 at 11:33 AM, William Stein <wst...@gmail.com> wrote:
>> I was just looking at some post-rest docstrings and they look like
>> this (see below).   Is all that whitespace really necessary???
>>
>> def QuaternionAlgebra(K, a, b, names=['i','j','k'], denom=1):
>>    """
>>    Return the quaternion algebra over `K` generated by
>>    `i`, `j`, and `k` such that
>>    `i^2 = a`, `j^2 = b`, and `ij=-ji=k`.
>>
>>    INPUT:
>>
>>
>>    -  ``K`` - field
>>
>>    -  ``a`` - element of K
>>
>>    -  ``b`` - element of K
>>
>>    -  ``names`` - list of three strings
>>
>>    -  ``denom`` - (optional, default 1)
>>
>
> No, most of  that was from the tool which did the LaTeX to reST 
> autoconversion.
>

So just to be clear, I can change the above to the following and it will work.

def QuaternionAlgebra(K, a, b, names=['i','j','k'], denom=1):
    """
    Return the quaternion algebra over `K` generated by
    `i`, `j`, and `k` such that
    `i^2 = a`, `j^2 = b`, and `ij=-ji=k`.

    INPUT:
    -  ``K`` - field
    -  ``a`` - element of K
    -  ``b`` - element of K
    -  ``names`` - list of three strings
    -  ``denom`` - (optional, default 1)

    EXAMPLES::
        sage: A.<i,j,k> = QuaternionAlgebra(QQ, -1,-1)
        sage: i^2
        -1
        sage: j^2
        -1
        sage: i*j
        k
        sage: j*i
        -k
        sage: (i + j + k)^2
        -3
        sage: A.ramified_primes()
        [2]
    """

Is there a command in sage-3.4.alpha0 that I can use to validate ReST
markup?  Or even one not in Sage?

William

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

Reply via email to