Skip to content

Commit 1134f58

Browse files
roed314claude
andcommitted
Add missing KaTeX macros GammaL, GammaU, SigmaL, SigmaSp (LMFDB#7048)
Group pages for groups whose elements are displayed in a projective Lie family (PGammaL, PGammaU, PSigmaL, PSigmaSp) strip the leading P in repr_strg, emitting \GammaL / \GammaU / \SigmaL / \SigmaSp, which base.html did not define, so e.g. /Groups/Abstract/51840.b showed raw \GammaU(4,2). Audited every macro used in devmirror gps_groups tex columns, gps_subgroup_search tex columns (sampled), gps_families.tex_name and the Lie families in representations; these four were the only missing legitimate macros. Added them in the style of the existing P-family macros plus a regression test; verified in a local server that 51840.b renders the sentence as matrices in GammaU(4,2) with zero katex-error nodes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 5ef81bd commit 1134f58

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

lmfdb/groups/abstract/test_abstract_groups.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,19 @@ def test_live_pages(self):
7575
r"C_2^3\times C_{100}", # automorphism group structure
7676
])
7777

78+
def test_latex_macros(self):
79+
r"""
80+
Check that KaTeX macros used by group tex names are defined (issue #7048)
81+
"""
82+
# 51840.b displays its elements as matrices in \GammaU(4,2)
83+
page = self.tc.get("/Groups/Abstract/51840.b").get_data(as_text=True)
84+
assert r"\GammaU(4,2)" in page
85+
# macros produced by stripping the initial P from projective Lie families
86+
# must be defined in base.html along with the rest of the family
87+
for macro in [r'"\\GammaL"', r'"\\GammaU"', r'"\\SigmaL"', r'"\\SigmaSp"',
88+
r'"\\PGammaL"', r'"\\PGammaU"', r'"\\PSigmaL"', r'"\\PSigmaSp"']:
89+
assert macro in page
90+
7891
def test_underlying_data(self):
7992
self.check_args("/Groups/Abstract/data/2520.a", [
8093
"gps_groups", "number_normal_subgroups",

lmfdb/templates/base.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@
134134
"\\POmega": '{\\textrm{P}\\Omega}',
135135
"\\POmegaPlus": '{\\textrm{P}\\Omega^+}',
136136
"\\POmegaMinus": '{\\textrm{P}\\Omega^-}',
137+
"\\GammaL": '{\\Gamma\\textrm{L}}',
138+
"\\SigmaL": '{\\Sigma\\textrm{L}}',
139+
"\\SigmaSp": '{\\Sigma\\textrm{Sp}}',
140+
"\\GammaU": '{\\Gamma\\textrm{U}}',
137141
"\\PGammaL": '{\\textrm{P}\\Gamma\\textrm{L}}',
138142
"\\PSigmaL": '{\\textrm{P}\\Sigma\\textrm{L}}',
139143
"\\PSigmaSp": '{\\textrm{P}\\Sigma\\textrm{Sp}}',

0 commit comments

Comments
 (0)