A good example is elliptic integrals. Complete elliptic integrals have a single letter as the function name, while the incomplete integrals require specifying the modulus or parameter. Since SageMath uses the parameter, a typical format for incomplete integrals has the argument separated from the parameter by a vertical bar, with the two variables enclosed in parentheses following the letter for the function, and that requires _print_latex_ for the formatting. The complete integrals can be easily specified with the latex_name keyword argument, letting existing LaTeX routines handle the single argument.
I propose that functions with a simple name always use latex_name rather than _print_latex_ to reduce the amount of code needed. I also propose that dlmf.nist.gov be used as a standard reference with respect to the details of formatting functions, so that for example I'd make the Bessel functions italicized rather than upright as they are now. I'm happy to add these specifications to the proper documentation location, which appears to be this one: http://doc.sagemath.org/html/en/developer/coding_in_python.html On Wednesday, June 15, 2016 at 6:36:55 AM UTC-7, Travis Scrimshaw wrote: > > > It occurs to me that latex_name can only be used for functions that do >> not need additional formatting, such as subscripts or superscripts. One of >> the other two attributes must be used in more complex situations. >> >> > Could you elaborate a bit more on what you want to do here, specifically > with a use case? > > Thanks, > Travis > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.