Ticket #13632: trac_13632_symbolic_function_arguments.patch

File trac_13632_symbolic_function_arguments.patch, 1.1 KB (added by Sebastien Gouezel, 10 years ago)
  • sage/symbolic/pynac.pyx

    # HG changeset patch
    # User Sebastien Gouezel <sebastien.gouezel@univ-rennes1.fr>
    # Date 1350742654 -7200
    # Node ID ad65b8761ea22758cb49ec198b6edf5189177133
    # Parent  1b1a2f0434bb3b8319fac8578f5669861a6a4a1e
    
    Trac #13632: fix latex display of symbolic function arguments
    
    diff --git a/sage/symbolic/pynac.pyx b/sage/symbolic/pynac.pyx
    a b  
    367367        sage: py_latex_function_pystring(i, (x,y^z))
    368368        '{\\rm foo}\\left(x, y^{z}\\right)'
    369369        sage: py_latex_function_pystring(i, (x,y^z), True)
    370          '\\left({\\rm foo}\\right)\\left(x, y^{z}\\right)'
     370        '\\left({\\rm foo}\\right)\\left(x, y^{z}\\right)'
     371        sage: py_latex_function_pystring(i, (int(0),x))
     372        '{\\rm foo}\\left(0, x\\right)'
    371373
    372374    Test latex_name::
    373375
     
    425425    else:
    426426        olist = [name]
    427427    # print the arguments
    428     olist.extend([r'\left(', ', '.join([x._latex_() for x in args]),
     428    from sage.misc.latex import latex
     429    olist.extend([r'\left(', ', '.join([latex(x) for x in args]),
    429430        r'\right)'] )
    430431    return ''.join(olist)
    431432