MathJax can't handle a \renewcommand with too many replacements?

11 views
Skip to first unread message

Matt Wechter

unread,
Jan 5, 2026, 7:21:40 PMJan 5
to PreTeXt support
Using LaTeX commands in docinfo, I'm trying to replace \lim with \displaystyle\lim
When I build to html, I get the error
MathJax maximum macro substitution count exceeded; is here a recursive macro call?
for every appearance of that command.  Are these just natural limitations in Mathjax when using \renewcommand ?

David W. Farmer

unread,
Jan 5, 2026, 7:34:04 PMJan 5
to PreTeXt support

The error message is acurate, your definition of "\lim"
has "\lim" in it.

So when Mathjax expands \lim, it sees another \lim and expandes that,
etc etc etc.
> --
> You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> pretext-suppo...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/pretext-support/746d1103-bfcb-41c1-9eb9-a9ca5b732859n%40googlegroups.com.
>
>

Matt Wechter

unread,
Jan 6, 2026, 9:19:13 AMJan 6
to PreTeXt support
Oh, that's wild.  Thanks for figuring it out.
Reply all
Reply to author
Forward
0 new messages