\leq converted to <=, can't we use unicode?

65 views
Skip to first unread message

Dima Pasechnik

unread,
Oct 5, 2015, 3:10:30 PM10/5/15
to sage-support
In docstrings we have \leq converted to <=, can't we use unicode, and get ? More importantly, can we do similar
things to \cap (∩) and \cup (∪), and perhaps even more of this?

Dima

Volker Braun

unread,
Oct 5, 2015, 3:20:45 PM10/5/15
to sage-support
+1: write a patch

Dima Pasechnik

unread,
Oct 5, 2015, 3:37:49 PM10/5/15
to sage-support


On Monday, 5 October 2015 12:20:45 UTC-7, Volker Braun wrote:
+1: write a patch

do you know where to look for the code doing the replacement '\leq' -> '<=' ?

Volker Braun

unread,
Oct 5, 2015, 3:44:37 PM10/5/15
to sage-support
src/sage/misc/sagedoc.py

Jori Mäntysalo

unread,
Oct 6, 2015, 1:36:30 AM10/6/15
to sage-support
What we assume the user to have on command line?

I just read your email in real Linux console, Ubuntu 14.04 LTS. \cap was
OK, \cup was shown as a kind of diamond. In this gnome-terminal on X that
I normally use for email everything is fine.

Personally I don't mind the change, and I am sure that nobody whose
computer support I am will complain.

* * *

Btw, I have corrected M\"obius function to Möbius function in docs. I hope
that it is OK for everyone. (Linux has used US keyboard layout as a
default from 0.03 I think. Before it was finnish layout. :=) )

--
Jori Mäntysalo

Dima Pasechnik

unread,
Oct 6, 2015, 5:31:57 PM10/6/15
to sage-support


On Monday, 5 October 2015 22:36:30 UTC-7, jori.ma...@uta.fi wrote:
On Mon, 5 Oct 2015, Dima Pasechnik wrote:

> In docstrings we have \leq converted to <=, can't we use unicode, and
> get ≤? More importantly, can we do similar things to \cap (∩) and \cup
> (∪), and perhaps even more of this?

What we assume the user to have on command line? 

IMHO we can assume a UTF-8 capable terminal.
(Perhaps not for input, but for output for sure)

I just read your email in real Linux console, Ubuntu 14.04 LTS. \cap was
OK, \cup was shown as a kind of diamond. In this gnome-terminal on X that
I normally use for email everything is fine.

I wrote the message in a web interface to google groups, and pasted UTF-8
symbols from some other webpage. I'm glad that it looks OK.. :-)

I looked a bit more into this, and it looks as if Python 3 supports this more or less
out of the box, but on Python 2 one would need to import stuff from __future__.

Jori Mäntysalo

unread,
Oct 7, 2015, 2:37:51 AM10/7/15
to sage-support
On Tue, 6 Oct 2015, Dima Pasechnik wrote:

>> What we assume the user to have on command line? 

> IMHO we can assume a UTF-8 capable terminal.

OK. And as this example showed, even real Linux console has quite good
support for unicode. (But it was a little surprise to have \cap but not
\cup.)

> (Perhaps not for input, but for output for sure)

Can this be a problem? I guess no, but theoretically one might want
information about Möbius function without being able to write it.

--
Jori Mäntysalo
Reply all
Reply to author
Forward
0 new messages