Universal Inline & Display LaTeX Renderer (KaTeX)

Render inline and display LaTeX math on any website using KaTeX. Careful with input fields! Be sure to have rendering OFF when entering an input field, otherwise you can mess up your delimiters. I have made a fix button for this, but it might not be exactly correct.

Mint 2025.07.12.. Lásd a legutóbbi verzió

Fejlesztő
ParaMigi
Értékelések
0 0 0
Verzió
2025-07-12
Létrehozva
2025.07.12.
Frissítve
2025.07.12.
Size
10 KB
Licensz
MIT
Érvényes
Minden oldal

This script renders LaTeX math expressions on any website using KaTeX, with inline delimiters and display delimiters. It provides a toggle button to switch rendering on/off.


🔧 Features:

  • Renders both inline and display math expressions

  • Supports multiple delimiter styles: [;...;], \(...\), and $...$ for inline and \[...\] and $$...$$ for display. You can easily edit the script to add your own or change which delimiter is used for what.

  • Toggle button lets you enable/disable rendering whenever you want

  • Auto-hides buttons when holding CTRL for unobtrusive editing

  • Only displays the button when a valid delimiter is detected on the page

  • Leaves <input>, <textarea>, and editable fields untouched while rendering is ON

  • Minimal and fast — scans efficiently and only activates when LaTeX is detected


⚠️ Caution: Always turn LaTeX rendering OFF before typing into input fields or rich text editors. Rendering changes the DOM and could interfere with form content if left on while editing.

  • "Fix Input Field" button restores LaTeX expressions from rendered KaTeX, useful if rendering was accidentally left ON while editing and the content got messed up
长期地址
遇到问题?请前往 GitHub 提 Issues。