Skip to content

Implemented plugin for latex compatability#15

Closed
zenxol wants to merge 3 commits intomainfrom
feature/latex-compatability
Closed

Implemented plugin for latex compatability#15
zenxol wants to merge 3 commits intomainfrom
feature/latex-compatability

Conversation

@zenxol
Copy link
Copy Markdown

@zenxol zenxol commented Feb 14, 2026

https://github.com/CMU-313/nodebb-spring-26-kernel-panic/issues/9

Summary

Adds LaTeX/math support to the forum so users can write and render math in new topics and replies.

  • Toolbar button: LaTeX (superscript) button in the composer that inserts $$ $$ or wraps the selection with $$...$$.
  • Rendering: MathJax 3 loads from CDN when needed and renders inline $...$ and display $$...$$ in the composer preview and in posts.

Changes

  • New plugin in vendor/nodebb-plugin-composer-latex/ (library, client scripts, MathJax loader, language file).
  • package.json: dependency added for nodebb-plugin-composer-latex (local vendor path).

How to use

  1. Create a new topic or reply.
  2. Use the LaTeX button (x² icon) or type $...$ (inline) or $$...$$ (display).
  3. Preview and published posts will render the math.

Setup for reviewers / after merge

  • npm install then ./nodebb build (Redis or DB must be running).
  • In Admin → Extend → Plugins, activate Composer LaTeX if it isn’t already active. This is a mandatory step!

Testing

  • In the composer, click the LaTeX button and confirm $$ $$ is inserted.
  • Type e.g. $$x^2 + y^2 = z^2$$ and use Preview to confirm it renders.
  • Post and confirm the same math renders in the topic.
latex

@zenxol zenxol closed this Feb 14, 2026
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 22022403183

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 78.828%

Totals Coverage Status
Change from base Build 21806455475: 0.0%
Covered Lines: 25357
Relevant Lines: 30331

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants