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.
On Tuesday, June 14, 2016 at 5:34:04 PM UTC-7, Travis Scrimshaw wrote: > > However, Paul's question is for things inheriting from > sage.symbolic.function.Function. So IDK of a specific standard for that, > but I would probably pass the attribute "latex_name" to the base class > __init__. Perhaps Ralf has an opinion on this? > > Best, > Travis > > > On Tuesday, June 14, 2016 at 7:04:00 PM UTC-5, Kwankyu Lee wrote: >> >> It is _latex_(self) according to the developer manual >> >> >> http://doc.sagemath.org/html/en/developer/coding_in_python.html#latex-representation >> >> On Wednesday, June 15, 2016 at 8:18:51 AM UTC+9, Paul Masson wrote: >>> >>> I'd like to add LaTeX support to special functions that do not yet have >>> it. Before I start, I'd like to know what the current recommendation is for >>> such support. >>> >>> From reading source code, it appears that adding a keyword argument >>> latex_name to the function initialization is equivalent to defining a >>> _print_latex_ attribute for the function. There is also the option to >>> define a _latex_ attribute in addition to _print_latex_. >>> >>> Which is the best of the three to use for consistency and legibility of >>> code? >>> >>> Between _latex_ and _print_latex_, which takes precedence if they >>> differ in definition? >>> >> -- 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.