Opened 8 years ago

Closed 8 years ago

#11268 closed defect (fixed)

singular_function should turn the Singular documentation into a block of code

Reported by: SimonKing Owned by: mvngu
Priority: minor Milestone: sage-4.7.1
Component: documentation Keywords: Singular documentation formatting
Cc: malb Merged in: sage-4.7.1.alpha0
Authors: Simon King Reviewers: Martin Albrecht
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

The documentation of Singular is in a different format than the documentation of Sage. Hence, if a singular_function happens to be included into the reference manual then there will be numerous errors.

Example:

sage: from sage.libs.singular.function import singular_function
sage: f = singular_function('NF')
sage: f?
    ...
    This function is an automatically generated C wrapper around the Singular
    function 'NF'.

    ...

    The Singular documentation for 'NF' is given below.
    
    5.1.111 reduce
    --------------
    
    `*Syntax:*'
         `reduce (' poly_expression`,' ideal_expression `)'
         `reduce (' poly_expression`,' ideal_expression`,' int_expression
    ...

The back tick is interpreted as the beginning of a Latex expression, the indentation is not as it should be, and the header is very likely out of place.

My suggestion is to indent the documentation of Singular and prepend it by ::, so that in the reference manual the Singular documentation simply appears as a block quote.

With the patch:

sage: from sage.libs.singular.function import singular_function
sage: f = singular_function('NF')
sage: f?
    ...
    This function is an automatically generated C wrapper around the Singular
    function 'NF'.
    ...
    The Singular documentation for 'NF' is given below.
    
    ::
    
        
        5.1.111 reduce
        --------------
        
        `*Syntax:*'
             `reduce (' poly_expression`,' ideal_expression `)'
             `reduce (' poly_expression`,' ideal_expression`,' int_expression

Attachments (1)

trac11268-singular_function_doc.patch (1.2 KB) - added by SimonKing 8 years ago.
Format Singular's documentation as a code block

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by SimonKing

Format Singular's documentation as a code block

comment:1 Changed 8 years ago by SimonKing

  • Status changed from new to needs_review

comment:2 Changed 8 years ago by malb

  • Reviewers set to Martin Albrecht
  • Status changed from needs_review to positive_review

Looks good.

comment:3 Changed 8 years ago by jdemeyer

  • Merged in set to sage-4.7.1.alpha0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.