Ticket #12156: 12156_reviewer.patch

File 12156_reviewer.patch, 1.7 KB (added by novoselt, 10 years ago)
  • sage/misc/latex.py

    # HG changeset patch
    # User Andrey Novoseltsev <novoselt@gmail.com>
    # Date 1323974819 25200
    # Node ID 5e66f881f42075673dd1dbc080167e8ff75ec760
    # Parent  77905fefe2c4bdca5c49ff9a1a0a9123c729a30c
    Small documentation improvement in LaTeXing code.
    
    diff --git a/sage/misc/latex.py b/sage/misc/latex.py
    a b  
    372372
    373373class LatexExpr(str):
    374374    """
    375     A class for LaTeX expressions, i.e. the result of a :func:`latex`
    376     call.  A ``LatexExpr`` can also be generated directly from a string.
    377     This string is then pretty-printed (see :func:`pretty_print`) as-is.
     375    A class for LaTeX expressions.
     376   
     377    Normally, objects of this class are created by a :func:`latex` call. It is
     378    also possible to generate :class:`LatexExpr` directly from a string, which
     379    must contain a valid LaTeX code for typesetting in math mode. Strings are
     380    wrapped into verbatim environment for typeset output, while LaTeX
     381    expressions are left as-is (see :func:`pretty_print`).
     382   
     383    INPUT:
     384   
     385    - anything convertible to a string of valid math mode LaTeX code.
     386   
     387    OUTPUT:
     388   
     389    - :class:`LatexExpr` wrapping the string representation of the input.
    378390
    379391    EXAMPLES::
    380392
     
    16801692            sage: JSMath().eval(type(3), mode='inline')
    16811693            <html>...\verb|&lt;type|\phantom{x}\verb|'sage.rings.integer.Integer'&gt;|</span></html>
    16821694        """
    1683         # Now get a regular LaTeX representation of x...
     1695        # Get a regular LaTeX representation of x...
    16841696        x = latex(x)
    16851697        # ... and make it suitable for jsMath, which has issues with < and >.
    16861698        x = x.replace('<', '&lt;').replace('>', '&gt;')