From adcfe98a3678a8bf5bdb59101680b7c7f84800bf Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 16 Sep 2026 21:02:24 +0000 Subject: [PATCH] Map the comparison signs to their math commands, not to themselves MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'newunicodechar' makes a character active, so its replacement text is expanded again. U+2264 and U+2265 replaced themselves: \newunicodechar{≤}{\ensuremath{≤}} % \le \newunicodechar{≥}{\ensuremath{≥}} % \ge Each expansion re-inserts the active character, which ends in "TeX capacity exceeded, sorry [input stack size=10000]". The trailing comments name what was meant - '\le' and '\ge' - and they are used now. The other 82 mappings are not affected: they replace the character with a command ('\dots', '\leftarrow', ...) or wrap it in '\emoji', which typesets it through '\emojifont' rather than re-reading it as an active character. MiKTeX's own 'example/lualatex/document.tex' uses such icons and builds. Found in a Sphinx PDF build of 'pyTooling/Actions', whose documentation contains U+2264 twelve times. Co-Authored-By: Patrick Lehmann --- pytooling.sty | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytooling.sty b/pytooling.sty index 5a30ab5..4f343b5 100644 --- a/pytooling.sty +++ b/pytooling.sty @@ -114,8 +114,8 @@ % ============================================================ % Unicode character/symbol definitions % ============================================================ -\newunicodechar{≤}{\ensuremath{≤}} % \le -\newunicodechar{≥}{\ensuremath{≥}} % \ge +\newunicodechar{≤}{\ensuremath{\le}} +\newunicodechar{≥}{\ensuremath{\ge}} \newunicodechar{±}{\ensuremath{\pm}} \newunicodechar{—}{---} \newunicodechar{…}{\dots}