Changes between Version 1 and Version 2 of Ticket #6290


Ignore:
Timestamp:
06/15/09 17:09:00 (11 years ago)
Author:
gmhossain
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6290

    • Property Summary changed from Allow latex_name=LaTeX keyword while defining symbolic function to [with patch, needs review] Allow keywords such as latex_name=LaTeX while defining symbolic function
  • Ticket #6290 – Description

    v1 v2  
    1 In new symbolics, underlying "sage.symbolic.SFunction" class allows
    2 one to pass the keyword "latex_name=LaTeX". It would be really good if we expose this feature at the user interface level. Currently,
    3 Sage (4.0.1) raises error if one tries to do so.
     1In new symbolics, underlying "sage.symbolic.function.SFunction" class allows one to pass the keywords such as "latex_name=LaTeX". It would be really good if we expose this feature at the user interface level. This will directly allow LaTeX customization by users according to their need.
     2
     3Currently, Sage (4.0.1) raises error if one tries to do so.
    44
    55
    6 Example usage:
     6Couple of example usage:
     7
     8'''(1)''' Define symbolic function with its latex representaion
    79
    810{{{
     
    1113\mathcal{R}\left(x\right)
    1214}}}
     15
     16
     17'''(2)'''   Printing arguments of a symbolic functions as its indices.
     18
     19{{{
     20mu,nu = var('mu,nu')
     21def my_latex_print(*args):
     22    return "\psi_{%s}"%(', '.join(map(latex, args)))
     23
     24psi(mu,nu) = function('psi', mu,nu, print_latex_func=my_latex_print)
     25
     26latex(psi(mu,nu))
     27\psi_{\mu, \nu}
     28}}}
     29
     30
     31Attached patch allows keyword arguments while defining symbolic functions.
     32