sympy/sympy — pull request #1981 by hacman (2013-04-07 23:13:45+00:00)
Title: in latex: don't use operatorname for single letter functions;

copied from the mailing list:

I noticed something about rendering of symbolic functions into latex. Currently, \operatorname is applied to all functions, even single letter ones when they are rendered with an argument, but not when they are rendered without the argument. The following code in SymPy Live illustrates this point:

f, f(x)

I would say that the former is more correct and looks better. I have a set of patches that would change the behavior as I suggest. You can see the diff below. Even if you thing that \operatorname should be used on single character functions, I think it should at least be consistent.

ALSO (this was not in my post to the mailing list): if you render a multi-character function name without arguments, you don't get \operatorname{} around it, which looks strange:

In [3]: ijkl = Function('ijkl')

In [4]: latex(ijkl)
Out[4]: ijkl

In [5]: latex(ijkl(x))
Out[5]: \operatorname{ijkl}{\left (x \right )}

I have fixed both issues.