Table of Contents
Math Chords: Write and Normalize Math in Obsidian
In academic, teaching, and technical notes, math is often part of the main argument rather than an occasional illustration. A single derivation may require fractions, scripts, Greek letters, integrals, delimiters, and a multiline environment. None of these LaTeX commands is especially difficult to type, but repeatedly spelling out \frac, \alpha, or \begin{aligned} shifts attention away from the idea being written down.
That interruption led me to build Math Chords. I wanted to preserve the directness of Markdown and LaTeX source in Obsidian while making repeated structures faster to enter. I prototyped the project with help from Cursor and now use OpenAI Codex primarily for refactoring, test design, and maintenance. I remain responsible for the product decisions, review, testing, and releases.
Math Chords (v0.3.4+) has since grown beyond its original shortcut workflow. It now addresses two related parts of writing math in Obsidian: entering common LaTeX structures efficiently, and normalizing \(...\) or \[...\] delimiters copied from papers, AI tools, and LaTeX documents into Obsidian’s $...$ and $$...$$ Markdown form. One supports continuous writing; the other makes imported material fit the note around it.
Replace repeated command names with key sequences
Math Chords uses chord shortcuts: press a leader key, release it, and then enter a short sequence. Think of the leader as a command prefix, not as one more modifier that must remain held throughout the shortcut.
The default leader is Alt+M. For example:
- Press
Alt+M, thenFto insert\frac{}{}with the caret in the numerator. - Press
Alt+M, thenGandAto insert\alpha. - Press
Alt+M, thenDto create a display-math block. - Press
Alt+M, thenShift+Eto open the display-environment picker.
The defaults take inspiration from LyX math-mode bindings, but they are not a required layout. You can change the leader, key sequence, inserted LaTeX, label, and group. Once a few sequences become muscle memory, frequent structures stay on the keyboard without requiring you to recall every character in the corresponding command.
You do not need to memorize the catalog before using it. An optional which-key-style hint appears after the leader and shows the keys that can follow. It turns learning the shortcuts into a gradual part of normal writing rather than a separate setup exercise.
Start with the formula panel when you do not know the shortcut
Keyboard sequences are efficient for familiar expressions; the formula panel is better for discovery. Select the Sigma (Σ) icon in Obsidian’s ribbon, or run Open formula panel, to browse the currently loaded shortcuts and math environments in the sidebar.
The panel searches by key, name, LaTeX command, or group and renders previews with Obsidian’s own MathJax. Selecting a formula inserts it into the most recently active Markdown editor. Because the panel and leader workflow use the same shortcut catalog, customizing an entry does not create a second collection that must be maintained separately.
I see these interfaces as two stages of the same workflow. Find an unfamiliar structure in the panel; remember its sequence if it becomes frequent. Insert established patterns directly from the keyboard. New users are not required to learn every binding, while experienced users are not forced back into menus.
Make selection and caret behavior part of the workflow
A useful snippet is defined not only by the text it inserts, but also by where editing continues. Math Chords templates can mark the primary editing position, so a fraction places the caret in its numerator. If text is selected first, the selection can become the content of the inserted structure. With auto-wrap enabled, inserting a math structure in ordinary prose also adds inline math delimiters when the context requires them.
Inline live preview is enabled by default. When the caret is inside $...$, Math Chords asks Obsidian’s built-in MathJax renderer to show the result near the editing position; it does not bundle a separate math-rendering library. For expressions with several braced arguments, the default Alt+Right and Alt+Left bindings move between braces inside Markdown math and reduce manual caret positioning.
The plugin also provides commands for inline and display math. A non-empty selection is wrapped in the requested kind. With only a caret inside existing math, the matching command removes that wrapper. Smart math toggle, enabled by default, additionally supports conversion between inline and display math without creating nested Markdown delimiters. The result remains ordinary text in the note, not a plugin-specific object format.
Use display environments for structured equations
Plain $...$ and $$...$$ delimiters cover many expressions, but multiline derivations, matrices, and piecewise definitions often need environments such as aligned, matrix, or cases. Manually entering matching \begin{...} and \end{...} lines is repetitive and easy to interrupt halfway through.
The environment picker includes aligned, matrix, cases, and gathered by default. If the caret is already inside display math, the selected environment wraps the block contents. Otherwise, Math Chords can create the $$...$$ block and insert the environment together. The edit is submitted as one transaction, so one Undo restores the previous text.
The environment list is editable and reorderable. If a particular field relies on another MathJax-compatible environment, it can be added without changing the plugin source.
Normalize math copied from other tools
Delimiter differences create a separate kind of friction. Standard LaTeX text, paper websites, and AI tools often produce content such as:
\( E = mc^2 \)
\[
\int_a^b f(x)\,dx
\]
Obsidian Markdown normally expects $...$ and $$...$$. Replacing every pair by hand is tedious, while a broad find-and-replace can alter code samples, YAML, or math that is already valid.
Math Chords provides selection and current-file commands that convert \(...\) to $...$ and \[...\] to $$...$$. Only the delimiters change; formula contents, whitespace, and line breaks remain intact. The converter skips YAML frontmatter, fenced and inline code, HTML comments, HTML <pre> and <code> blocks, and existing Markdown math. A complete conversion uses one editor transaction and can be reverted with one Undo.
If this is a regular part of your workflow, you can enable the same context-aware conversion on paste. The option is off by default because automatic changes to imported text should be deliberate. Math Chords also leaves a paste event alone when another editor extension has already handled it.
Normalization has a deliberately narrow meaning here. Math Chords does not rewrite the formula body, validate a derivation, or convert a complete LaTeX document. It resolves a delimiter compatibility issue; it does not claim to understand the mathematics or repair arbitrary TeX.
Install Math Chords and try the first workflow
The simplest installation path is Settings → Community plugins → Browse in Obsidian. Search for Math Chords, then install and enable it.
A practical five-minute setup looks like this:
- Open Settings → Math Chords and keep the default
Alt+Mleader, or replace it with a chord that does not conflict with your existing setup. - In a Markdown note, press
Alt+Mand thenFto try the fraction template and caret placement. - Open the Sigma formula panel and search for
alpha,fraction, ormatrix. Compare panel insertion with the corresponding keyboard sequence. - Under Settings → Hotkeys, optionally assign Obsidian hotkeys to the inline-math, display-math, or delimiter-conversion commands. Math Chords does not impose global default hotkeys for these commands.
- If you often import math, run the selection converter on a small sample first. Enable conversion on paste only after confirming that the result matches your note style.
The defaults cover the main workflow, but each supporting aid is optional. You can adjust the formula panel, hints, live preview, brace navigation, Smart math toggle, paste conversion, and environment wrapping independently. Shortcuts can be managed through the settings interface or in the plugin’s local shortcuts.yaml file.
Local processing, compatibility, and limits
Math Chords edits the current note through Obsidian’s editor and stores plugin settings and shortcut configuration locally. The current implementation has no separate account, cloud formula-processing service, or usage telemetry. Network activity involved in installing or updating the plugin, or in opening a GitHub link, remains the responsibility of the relevant application and service.
The plugin requires Obsidian 1.5.0 or later. Its keyboard-heavy workflow is most useful on desktop. Operating systems, keyboard layouts, and input methods differ, so the leader or individual punctuation bindings may need adjustment.
Context-aware protection and automated tests reduce the risk of unintended edits, but important or unusually structured notes still deserve a cautious first pass: convert a selection before a whole file, and make sure Undo or versioned backups are available. Math Chords is also not a complete LaTeX compiler. Whether a macro or environment renders ultimately depends on the Markdown and MathJax support available in Obsidian.
Open source and feedback
Math Chords is open source under the MIT License. The GitHub repository contains the code, detailed configuration reference, and development notes. Manual installation files are available from Releases, and reproducible problems or new workflow proposals are welcome in GitHub Issues.
My goal is not to hide math editing inside an opaque interface. It is to make ordinary LaTeX source easier to enter, inspect, and continue editing: use the keyboard for familiar structures, the panel for discovery, and bounded normalization for material coming from elsewhere.