MathJax support #2087

Closed
opened 2026-02-05 02:51:35 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @AlexGustafsson on GitHub (Feb 9, 2021).

Describe the feature you'd like

I'd like to see support for viewing Markdown with MathJax in the browser.

Describe the benefits this feature would bring to BookStack users
By using MathJax we'd grow the support for common Markdown "extensions", enabling users to render math. In my case, I have a series of notes I'd like to transfer to BookStack, but not being able to read math makes it less appealing.

Additional context
I've read #495, but to some extent the issue seems to focus more on Mermaid support. In the issue it's also mentioned that MathJax is more or less on the roadmap, but I didn't find any recent mentioning of releasing the feature.

I read that there are some size consideration to be aware of. MathJax is about 700K non-gzipped, 168K gzipped.

Originally created by @AlexGustafsson on GitHub (Feb 9, 2021). **Describe the feature you'd like** I'd like to see support for viewing Markdown with MathJax in the browser. **Describe the benefits this feature would bring to BookStack users** By using MathJax we'd grow the support for common Markdown "extensions", enabling users to render math. In my case, I have a series of notes I'd like to transfer to BookStack, but not being able to read math makes it less appealing. **Additional context** I've read #495, but to some extent the issue seems to focus more on Mermaid support. In the issue it's also mentioned that MathJax is more or less on the roadmap, but I didn't find any recent mentioning of releasing the feature. I read that there are some size consideration to be aware of. MathJax is about 700K non-gzipped, 168K gzipped.
Author
Owner

@AlexGustafsson commented on GitHub (Feb 9, 2021):

I'd happily implement this. The idea would be to include MathJax and its extension "tex2jax" in the client. When Markdown is selected as an editor, one could add an option to enable or disable MathJax support, leaving the choice to the user. That way we mitigate the risk of needlessly sending more JS to the user.

I don't think this necessarily goes against the roadmap, rather fills in the gap until the rework is done later on.

@AlexGustafsson commented on GitHub (Feb 9, 2021): I'd happily implement this. The idea would be to include MathJax and its extension "tex2jax" in the client. When Markdown is selected as an editor, one could add an option to enable or disable MathJax support, leaving the choice to the user. That way we mitigate the risk of needlessly sending more JS to the user. I don't think this necessarily goes against the roadmap, rather fills in the gap until the rework is done later on.
Author
Owner

@ssddanbrown commented on GitHub (Feb 11, 2021):

Thanks for the input @AlexGustafsson, I'll probably still close this since the original #495 request is generic enough to cover this and MathJax has been suggested in there.

The file size was only of many more concerns I came across when reviewing this before.

Overall, Math support is complex and is not something we can easily support in all areas of the application (Including API and Export systems). In addition, from what I can see people are somewhat opinionated, or at least would only really desire, in the particular syntax/format.

I'm thinking math in general would be something better served via platform extension/customization rather than being built in. I already provide some editor event hooks. I'd need to do another dive into utilizing the existing options/hooks we offer and explore what else may need to be opened up.

@ssddanbrown commented on GitHub (Feb 11, 2021): Thanks for the input @AlexGustafsson, I'll probably still close this since the original #495 request is generic enough to cover this and MathJax has been suggested in there. The file size was only of [many more concerns I came across](https://github.com/BookStackApp/BookStack/issues/495#issuecomment-628919106) when reviewing this before. Overall, Math support is complex and is not something we can easily support in all areas of the application (Including API and Export systems). In addition, from what I can see people are somewhat opinionated, or at least would only really desire, in the particular syntax/format. I'm thinking math in general would be something better served via platform extension/customization rather than being built in. I already provide some editor event hooks. I'd need to do another dive into utilizing the existing options/hooks we offer and explore what else may need to be opened up.
Author
Owner

@AlexGustafsson commented on GitHub (Feb 11, 2021):

Thanks for the thorough response. I understand the situation more clearly now.

I'll try to utilize the existing customization possibilities and hooks to implement visual support in the client (as I currently do not need export support).

Feel free to close.

@AlexGustafsson commented on GitHub (Feb 11, 2021): Thanks for the thorough response. I understand the situation more clearly now. I'll try to utilize the existing customization possibilities and hooks to implement visual support in the client (as I currently do not need export support). Feel free to close.
Author
Owner

@ssddanbrown commented on GitHub (Feb 12, 2021):

@AlexGustafsson Thanks for the understanding, Will therefore close. Just let us know if you need any guidance on this.

@ssddanbrown commented on GitHub (Feb 12, 2021): @AlexGustafsson Thanks for the understanding, Will therefore close. Just let us know if you need any guidance on this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2087