Mathtools package for LaTex/MathJax

Is it possible to add mathtools package to Latex/MathJax?

I would like to be able to use \underbracket and \overbracket but those don’t appear to work in MathJax/Latex mode currently so I am guessing the mathtools package is not included?

Hi @Ana you can’t do it with the native MathJax integration, but you can do it with the WP QuickLaTeX plugin which supports additional packages. To use this, you’ll need to activate the plugin if it’s not already active in your book and then go to Settings->QuickLaTeX and choose the Advanced settings tab. Add support for the package you want (in this case it sounds like mathtools?):

Once you do, you can use over/under brace/bracket commands, as seen in this sample chapter:

Hope that helps.

If your book is on, the QuickLaTeX plugin will already be on by default. More details in our guide chapter in case you need them: Math in Pressbooks – Pressbooks User Guide

Thanks @SteelWagstaff. I am avoiding QuickLaTex because it renders math as images, which is not accessible, as I understand it, particularly with regards to electronic readers. I’ll see if I can find a way around it. Your info is very helpful, thank you!

Hi @Ana totally understand the reservation. Images aren’t perfect, but all the QuickLaTeX images do automatically include descriptive alt text which contains the math expression, so they are as accessible as a mathematical image can be. Good luck with whatever you decide!

That’s good to know, @SteelWagstaff!