Opened 17 months ago

Last modified 4 weeks ago

#30374 new defect

Improve repr for callable symbolic expressions using unicode

Reported by: mkoeppe Owned by:
Priority: minor Milestone: sage-9.6
Component: symbolics Keywords:
Cc: tscrim, gh-mwageringel, chapoton, egourgoulhon Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #30473 Stopgaps:

Status badges

Description (last modified by mkoeppe)

Currently we have:

sage: s(t) = t^3; s
t |--> t^3
sage: %display unicode_art
 3
t

In this ticket, we add the missing mapsto arrow, using '\u21a6'.

(The longmapsto arrow, '\u27fc' (⟼), does not work well on the macOS terminal, unfortunately)

Attachments (1)

unicode_mapsto.png (5.4 KB) - added by egourgoulhon 7 months ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 17 months ago by mkoeppe

  • Description modified (diff)

comment:2 Changed 15 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:3 Changed 13 months ago by mkoeppe

  • Cc chapoton added

comment:4 follow-up: Changed 13 months ago by chapoton

what about using ├──❱ and ──❱ ?

comment:5 Changed 10 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.

comment:6 Changed 7 months ago by mkoeppe

  • Cc egourgoulhon added
  • Dependencies set to #30473
  • Summary changed from Improve unicode art for callable symbolic expressions to Improve repr for callable symbolic expressions using unicode

comment:7 in reply to: ↑ 4 Changed 7 months ago by egourgoulhon

Replying to chapoton:

what about using ├──❱ and ──❱ ?

I would rather vote for (U+21A6). It's simple and quite readable after all (especially if surrounded by one space on each side). Moreover, it's a single-character symbol, which may avoid some line feed for long expressions (only when the line feed is up to 2 characters).

comment:8 follow-up: Changed 7 months ago by chapoton

I would prefer ⟼ (but apparently bad for the mac guys)

Changed 7 months ago by egourgoulhon

comment:9 in reply to: ↑ 8 Changed 7 months ago by egourgoulhon

Replying to chapoton:

I would prefer ⟼ (but apparently bad for the mac guys)

Not only for the mac guys: in my Ubuntu terminal, I have

So not only U+27FC does not appear longer, but it is even less clear than U+21A6.

comment:10 Changed 7 months ago by chapoton

Well, clearly this will depend a lot on people's fonts. We can never be sure to please everybody.

comment:11 Changed 6 months ago by mkoeppe

  • Milestone changed from sage-9.4 to sage-9.5

comment:12 Changed 4 weeks ago by mkoeppe

  • Milestone changed from sage-9.5 to sage-9.6
Note: See TracTickets for help on using tickets.