Hi,
On Wed, Mar 25, 2009 at 4:09 PM, Jason Grout
<[email protected]> wrote:
> Also, I think naming the function is_latex_name or something like that
> would be better. common_varnames says nothing to me about the variable
> name
Thanks Jason for your suggestions. I have renamed the
function. Also, I have made some changes to accommodate
typesetting for more functions. In _latex_() function
for "class SymbolicFunctionEvaluation", the new codes are
---------------------------------------------------------------------------
name = latex_function_name(self._f._name)
if name:
return "%s\\left(%s\\right)"%(name, ', '.join([latex(x) for x
in self._args]))
--------------------------------------------------------------------------
"latex_function_name" (In file: "sage/misc/latex.py") is now
defined as:
-------------------------------------------------------------
def latex_function_name(x):
"""
If possible return common function names such as alpha, beta,
psi1 as latex symbols otherwise return False
"""
return ... latex-ified(x) if possible #All latex construction goes here
return False
-------------------------------------------------------------
I have followed the typesetting of "SymbolicVariable" closely.
I am listing sample situations:
-----------------------------------------
(1) function('psi',x) => psi\left(x\right)
(2) function('psi1',x) => \psi_{1}\left(x\right)
(3) function('psi_00',x) => \psi_{00}\left(x\right)
(4) function('psi_mu',x) => \psi_{\mu}\left(x\right)
(5) function('psi_xyz',x) => \psi_{xyz}\left(x\right)
(6) function('myfunc_nu',x) => ???
(7) function('alpha_abcd_xyz',x) => ???
------------------------------------------
(1) to (5) have been implemented but I am not sure
what to do for (6) and (7). I guess, for them its better
to return False so that default typesetting are used.
Please let me know if I have missed something.
Cheers,
Golam
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---