MathJax and QuickTex options in editor

Is it possible to add to the text editor a MathJax text wrap for easy math equation writing?

For example, I’d like to be able to highlight text that should be in LaTex and then click on an icon in the text editor that would wrap the text with $latex and $ or [latex] and [\latex] to turn it into MathJax mode. Or, even better, use a keybord shortcut to enter $latex.

It is super time consuming to have to write $latex or [latex] for every math text when creating a math textbook.

If there is a way to do this before Pressbooks is able to act on it, can you share your wisdom? Please keep in mind I am not a coder and thus the lingo needs to be aimed at a peasant.

Hi Ana, that’s a great suggestion! I’ve created a feature idea and have added it to our backlog: Add LaTeX button to visual editor · Issue #383 · pressbooks/ideas · GitHub. Unfortunately, the only way to do it yourself would be with coding. Here’s how we added the ‘footnote’ button that this feature will likely be modeled on: pressbooks/footnote.js at dev · pressbooks/pressbooks · GitHub, in case that’s helpful?

1 Like

@Ana We added this feature to our latest release. You should be able to add [latex] [/latex] shortcodes to new or existing content by clicking the LaTeX button we’ve added to the visual editor, as shown in this short video: Thanks for the suggestion!