8000 alphabetize greek and hebrew, closes #26140 · matplotlib/matplotlib@d83a448 · GitHub
[go: up one dir, main page]

Skip to content

Commit d83a448

Browse files
committed
alphabetize greek and hebrew, closes #26140
1 parent f329eb8 commit d83a448

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

doc/sphinxext/math_symbol_table.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55

66
symbols = [
77
["Lower-case Greek",
8-
6,
8+
4,
99
r"""\alpha \beta \gamma \chi \delta \epsilon \eta \iota \kappa
1010
\lambda \mu \nu \omega \phi \pi \psi \rho \sigma \tau \theta
1111
\upsilon \xi \zeta \digamma \varepsilon \varkappa \varphi
1212
\varpi \varrho \varsigma \vartheta""".split()],
1313
["Upper-case Greek",
14-
8,
14+
4,
1515
r"""\Delta \Gamma \Lambda \Omega \Phi \Pi \Psi \Sigma \Theta
1616
\Upsilon \Xi \mho \nabla""".split()],
1717
["Hebrew",
1818
6,
19-
r"""\aleph \beth \daleth \gimel""".split()],
19+
r"""\aleph \beth \gimel \daleth""".split()],
2020
["Delimiters",
2121
6,
2222
_mathtext.Parser._delims],
@@ -105,7 +105,12 @@ def render_symbol(sym):
105105

106106
lines = []
107107
for category, columns, syms in symbols:
108-
syms = sorted(list(syms))
108+
if category == "Hebrew":
109+
syms = sorted(list(syms), key=render_symbol, reverse=True)
110+
elif category.endswith("Greek"):
111+
syms = sorted(list(syms), key=render_symbol)
112+
else:
113+
syms = sorted(list(syms))
109114
columns = min(columns, len(syms))
110115
lines.append("**%s**" % category)
111116
lines.append('')

0 commit comments

Comments
 (0)
0