sphinx icon indicating copy to clipboard operation
sphinx copied to clipboard

HTML: Assign glossary terms with grouping keys to single-character groupings

Open jayaddison opened this issue 1 year ago • 0 comments

Feature or Bugfix

  • Bugfix

Purpose

  • Group glossary items by a single-character symbol instead of grouping key (when present).

Detail

  • Instead of short-circuit returning the (optional) category_key -- the entire grouping key name -- and using that as a heading to place glossary terms under, instead derive a single-character symbol from category_key.
  • This borrows existing logic used in the _key_func_1 function.

Concerns

  • I'm uncertain whether this grouping logic is valid for locales other than Latin-based scripts. In particular, there are some use cases for Katakana in the test suite that seem to indicate that glossary grouping keys are used for curated organization of index entries.

Relates

  • Resolves #12707.

Screenshots

Before (en) image

After (en) image

Edit: fixup: I'd uploaded an incorrect after-fix sample image, containing a made-up fooon fermion in the glossary. That is now corrected.

jayaddison avatar Sep 05 '24 01:09 jayaddison