Skip to content

Commit e44e10e

Browse files
author
Release Manager
committed
gh-39023: Fix the right-border on unicode tables Turn ``` sage: table([1],frame=True) ┌───┐ │ 1 | └───┘ ``` into ``` sage: table([1],frame=True) ┌───┐ │ 1 │ └───┘ ``` which should look a bit better (depends on your font) and is more consistent (the left and right borders now match). URL: #39023 Reported by: Michael Orlitzky Reviewer(s): Martin Rubey, user202729
2 parents 9f0b27d + c5d9fc2 commit e44e10e

File tree

2 files changed

+91
-91
lines changed

2 files changed

+91
-91
lines changed

src/sage/combinat/bijectionist.py

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -69,52 +69,52 @@
6969
sage: a, b = bij.statistics_table()
7070
sage: table(a, header_row=True, frame=True)
7171
┌───────────┬────────┬────────┬────────┐
72-
│ a | α_1(a) | α_2(a) | α_3(a) |
72+
│ a α_1(a) α_2(a) α_3(a)
7373
╞═══════════╪════════╪════════╪════════╡
74-
│ [] | 0 | 0 | 0 |
74+
│ [] 0 0 0
7575
├───────────┼────────┼────────┼────────┤
76-
│ [1] | 1 | 1 | 1 |
76+
│ [1] 1 1 1
7777
├───────────┼────────┼────────┼────────┤
78-
│ [1, 2] | 2 | 2 | 2 |
78+
│ [1, 2] 2 2 2
7979
├───────────┼────────┼────────┼────────┤
80-
│ [2, 1] | 2 | 1 | 0 |
80+
│ [2, 1] 2 1 0
8181
├───────────┼────────┼────────┼────────┤
82-
│ [1, 2, 3] | 3 | 3 | 3 |
82+
│ [1, 2, 3] 3 3 3
8383
├───────────┼────────┼────────┼────────┤
84-
│ [1, 3, 2] | 3 | 2 | 1 |
84+
│ [1, 3, 2] 3 2 1
8585
├───────────┼────────┼────────┼────────┤
86-
│ [2, 1, 3] | 3 | 2 | 1 |
86+
│ [2, 1, 3] 3 2 1
8787
├───────────┼────────┼────────┼────────┤
88-
│ [2, 3, 1] | 3 | 2 | 0 |
88+
│ [2, 3, 1] 3 2 0
8989
├───────────┼────────┼────────┼────────┤
90-
│ [3, 1, 2] | 3 | 1 | 0 |
90+
│ [3, 1, 2] 3 1 0
9191
├───────────┼────────┼────────┼────────┤
92-
│ [3, 2, 1] | 3 | 2 | 1 |
92+
│ [3, 2, 1] 3 2 1
9393
└───────────┴────────┴────────┴────────┘
9494
9595
sage: table(b, header_row=True, frame=True)
9696
┌───────────┬───┬────────┬────────┬────────┐
97-
│ b | τ | β_1(b) | β_2(b) | β_3(b) |
97+
│ b τ β_1(b) β_2(b) β_3(b)
9898
╞═══════════╪═══╪════════╪════════╪════════╡
99-
│ [] | 0 | 0 | 0 | 0 |
99+
│ [] 0 0 0 0
100100
├───────────┼───┼────────┼────────┼────────┤
101-
│ [1] | 1 | 1 | 1 | 1 |
101+
│ [1] 1 1 1 1
102102
├───────────┼───┼────────┼────────┼────────┤
103-
│ [1, 2] | 2 | 2 | 1 | 0 |
103+
│ [1, 2] 2 2 1 0
104104
├───────────┼───┼────────┼────────┼────────┤
105-
│ [2, 1] | 1 | 2 | 2 | 2 |
105+
│ [2, 1] 1 2 2 2
106106
├───────────┼───┼────────┼────────┼────────┤
107-
│ [1, 2, 3] | 3 | 3 | 1 | 0 |
107+
│ [1, 2, 3] 3 3 1 0
108108
├───────────┼───┼────────┼────────┼────────┤
109-
│ [1, 3, 2] | 2 | 3 | 2 | 1 |
109+
│ [1, 3, 2] 2 3 2 1
110110
├───────────┼───┼────────┼────────┼────────┤
111-
│ [2, 1, 3] | 2 | 3 | 2 | 1 |
111+
│ [2, 1, 3] 2 3 2 1
112112
├───────────┼───┼────────┼────────┼────────┤
113-
│ [2, 3, 1] | 2 | 3 | 2 | 1 |
113+
│ [2, 3, 1] 2 3 2 1
114114
├───────────┼───┼────────┼────────┼────────┤
115-
│ [3, 1, 2] | 2 | 3 | 2 | 0 |
115+
│ [3, 1, 2] 2 3 2 0
116116
├───────────┼───┼────────┼────────┼────────┤
117-
│ [3, 2, 1] | 1 | 3 | 3 | 3 |
117+
│ [3, 2, 1] 1 3 3 3
118118
└───────────┴───┴────────┴────────┴────────┘
119119
120120
sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition
@@ -849,51 +849,51 @@ def statistics_table(self, header=True):
849849
sage: a, b = bij.statistics_table()
850850
sage: table(a, header_row=True, frame=True)
851851
┌───────────┬────────┬────────┐
852-
│ a | α_1(a) | α_2(a) |
852+
│ a α_1(a) α_2(a)
853853
╞═══════════╪════════╪════════╡
854-
│ [] | 0 | 0 |
854+
│ [] 0 0
855855
├───────────┼────────┼────────┤
856-
│ [1] | 1 | 1 |
856+
│ [1] 1 1
857857
├───────────┼────────┼────────┤
858-
│ [1, 2] | 2 | 2 |
858+
│ [1, 2] 2 2
859859
├───────────┼────────┼────────┤
860-
│ [2, 1] | 1 | 0 |
860+
│ [2, 1] 1 0
861861
├───────────┼────────┼────────┤
862-
│ [1, 2, 3] | 3 | 3 |
862+
│ [1, 2, 3] 3 3
863863
├───────────┼────────┼────────┤
864-
│ [1, 3, 2] | 2 | 1 |
864+
│ [1, 3, 2] 2 1
865865
├───────────┼────────┼────────┤
866-
│ [2, 1, 3] | 2 | 1 |
866+
│ [2, 1, 3] 2 1
867867
├───────────┼────────┼────────┤
868-
│ [2, 3, 1] | 2 | 0 |
868+
│ [2, 3, 1] 2 0
869869
├───────────┼────────┼────────┤
870-
│ [3, 1, 2] | 1 | 0 |
870+
│ [3, 1, 2] 1 0
871871
├───────────┼────────┼────────┤
872-
│ [3, 2, 1] | 2 | 1 |
872+
│ [3, 2, 1] 2 1
873873
└───────────┴────────┴────────┘
874874
sage: table(b, header_row=True, frame=True)
875875
┌───────────┬───┬────────┬────────┐
876-
│ b | τ | β_1(b) | β_2(b) |
876+
│ b τ β_1(b) β_2(b)
877877
╞═══════════╪═══╪════════╪════════╡
878-
│ [] | 0 | 0 | 0 |
878+
│ [] 0 0 0
879879
├───────────┼───┼────────┼────────┤
880-
│ [1] | 1 | 1 | 1 |
880+
│ [1] 1 1 1
881881
├───────────┼───┼────────┼────────┤
882-
│ [1, 2] | 2 | 1 | 0 |
882+
│ [1, 2] 2 1 0
883883
├───────────┼───┼────────┼────────┤
884-
│ [2, 1] | 1 | 2 | 2 |
884+
│ [2, 1] 1 2 2
885885
├───────────┼───┼────────┼────────┤
886-
│ [1, 2, 3] | 3 | 1 | 0 |
886+
│ [1, 2, 3] 3 1 0
887887
├───────────┼───┼────────┼────────┤
888-
│ [1, 3, 2] | 2 | 2 | 1 |
888+
│ [1, 3, 2] 2 2 1
889889
├───────────┼───┼────────┼────────┤
890-
│ [2, 1, 3] | 2 | 2 | 1 |
890+
│ [2, 1, 3] 2 2 1
891891
├───────────┼───┼────────┼────────┤
892-
│ [2, 3, 1] | 2 | 2 | 1 |
892+
│ [2, 3, 1] 2 2 1
893893
├───────────┼───┼────────┼────────┤
894-
│ [3, 1, 2] | 2 | 2 | 0 |
894+
│ [3, 1, 2] 2 2 0
895895
├───────────┼───┼────────┼────────┤
896-
│ [3, 2, 1] | 1 | 3 | 3 |
896+
│ [3, 2, 1] 1 3 3
897897
└───────────┴───┴────────┴────────┘
898898
899899
TESTS:
@@ -906,27 +906,27 @@ def statistics_table(self, header=True):
906906
sage: a, b = bij.statistics_table()
907907
sage: table(a, header_row=True, frame=True)
908908
┌────────┐
909-
│ a |
909+
│ a
910910
╞════════╡
911-
│ [] |
911+
│ []
912912
├────────┤
913-
│ [1] |
913+
│ [1]
914914
├────────┤
915-
│ [1, 2] |
915+
│ [1, 2]
916916
├────────┤
917-
│ [2, 1] |
917+
│ [2, 1]
918918
└────────┘
919919
sage: table(b, header_row=True, frame=True)
920920
┌────────┬───┐
921-
│ b | τ |
921+
│ b τ
922922
╞════════╪═══╡
923-
│ [] | 0 |
923+
│ [] 0
924924
├────────┼───┤
925-
│ [1] | 1 |
925+
│ [1] 1
926926
├────────┼───┤
927-
│ [1, 2] | 2 |
927+
│ [1, 2] 2
928928
├────────┼───┤
929-
│ [2, 1] | 1 |
929+
│ [2, 1] 1
930930
└────────┴───┘
931931
932932
We can omit the header::

0 commit comments

Comments
 (0)