moskobosko55 downloadsWrite Hebrew, Arabic and other RTL text with LaTeX math. Formulas stay left-to-right, each line gets the right direction, and inline math gets a live preview and a keyboard layout fix.
RTL support for LaTeX math in Obsidian. Write Hebrew, Arabic, Persian or any right-to-left language together with $...$ formulas without the text jumping around.
$f(x)$ היא פונקציה is RTL. Plain dir=auto makes it LTR, because the first letter is the f inside the formula. Markdown syntax (- [x], > [!note], #tags, links, inline code) is ignored too.$...$ source and rendered math are both bidi isolates, so punctuation and words next to a formula stay where they belong. This also holds while you're still typing an unclosed $. Display math stays centered.$...$, the rendered formula shows under the line (like Obsidian's $$ preview), or as a floating popup.\text{...} is left alone, so you can still write words in your language there. A ∑ math · EN status-bar indicator shows when you're inside a formula.\ inside math and get a list of about 240 commands (\blacksquare, \infty, \frac, Greek letters, arrows, environments…), each with its rendered symbol. Search by name or by keyword (qed, box, arrow). ↑/↓ to pick, Enter or Tab to insert; templates like \frac{}{} put the cursor in the first brace.\text{...} keeps its natural order.Supported RTL scripts: Hebrew, Arabic (incl. Persian, Urdu), Syriac, Thaana, N'Ko, Samaritan, Mandaic.
$|$, or wraps the selection)moskobosko/rightymath.main.js, manifest.json and styles.css from the latest release into <vault>/.obsidian/plugins/rightymath/, then enable RightyMath in Settings → Community plugins.Requires Obsidian 1.15.1 or later.
Tip: leave Obsidian's global "Right-to-left (RTL)" editor setting off. RightyMath handles direction per line.
No build step: main.js is plain CommonJS. Run the logic tests with:
node test/run.js
To check that every autocomplete entry renders in MathJax 4, install @mathjax/src@4 anywhere and run MATHJAX_DIR=<folder>/node_modules/@mathjax/src node test/latex.js.
Released under the MIT License. Free to use, modify and share, as long as the copyright notice is kept.