I'm trying to use the \mathclap command in gitbook / bookdown, which needs the mathtools MathJax package. I have tried including the following LaTeX code in e.g. a fresh "Book project using bookdown":
$$
\require{mathtools}
\sum_{\mathclap{\substack{I \subseteq \{1, \dots, n\}, \\ I \ne \emptyset}}} a_I = b
$$
When loading the rendered html, Firefox console indicates that the mathtools extension is not loaded:
Loading failed for the <script> with source “https://mathjax.rstudio.com/latest/extensions/TeX/mathtools.js?V=2.7.2”.
Attempting to load that page gives the following error message:
404 Not Found
- Code: NoSuchKey
- Message: The specified key does not exist.
- Key: 2.7.2/extensions/TeX/mathtools.js
- RequestId: KMNCVEW8XK741T2F
- HostId: sF07HV8BhQrZnhlHLfUJt45C3I1VFzQ5FfqguxsLVySq8ghlIb2ZCVn13jriIh+o+/1irLl7zME=
This bug report suggests that using a custom MathJax url is not supported in bookdown currently, so I'm at a loss on how to get \mathclap support. I'd greatly appreciate any help.