Who would do that ? You ? And which 73 others ? Unicode is Huuuuge... Seriously : Such a proposal couldn't stop to "just" the "customary" single-letter greek variable names we are used to and think of first. There is no a priori valid reason to accept them and refuse, for example, hebrew or cyrillic characters (and names), katakana, sinograms or greek polytonic multiletter names...
The real question(s) would be "Where do you stop ? (And why ?)" Furthermore, the question remains of what happens to those characters in \LaTeX math mode (not obvious to me), what happens to spacing, alignment and possibly kerning, etc, etc... Le vendredi 21 février 2020 22:46:54 UTC+1, Simon King a écrit : > > On 2020-02-21, Simon King <simo...@uni-jena.de <javascript:>> wrote: > > Hi Emmanuel, > > > > On 2020-02-21, Emmanuel Charpentier <emanuel.c...@gmail.com > <javascript:>> wrote: > >> sage: latex(λ^2) > >> λ^{2} > > > > Couldn't we modify the latex() function, by exploiting > > IPython.core.completer.reverse_latex_symbol, to automatically translate > > all unicode symbols that aren't understood by pdflatex? > > Such as: > sage: import IPython > sage: from IPython.core.completer import reverse_latex_symbol > sage: def replfunc(match): > ....: return reverse_latex_symbol[match.group(0)] > ....: > sage: import re > sage: regex = re.compile('|'.join(re.escape(x) for x in > reverse_latex_symbol)) > sage: f(λ) = sin(λ) > sage: latex(f) > λ \ {\mapsto}\ \sin\left(λ\right) > sage: print(regex.sub(replfunc,latex(f))) > \lambda \ {\mapsto}\ \sin\left(\lambda\right) > > Best regards, > Simon > > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/95ba50fe-b154-4867-9633-f53bd8b3a322%40googlegroups.com.