frank-smith24 downloadsToggle LaTeX math between inline and display blocks, and merge consecutive block formulas.
Repository · Releases · Changelog
Convert LaTeX math between inline ($...$) and display block ($$...$$) styles directly in the Obsidian editor.
Toggle math inline/blockMerge consecutive block formulasaligned environment.Notice messages when conversion cannot be safely performed.Input:
$$
\lim_{n \to \infty} a_n = L.
$$
Output:
$\lim_{n \to \infty} a_n = L.$
Input:
$\lim_{n \to \infty} a_n = L.$
Output (multiline block):
$$
\lim_{n \to \infty} a_n = L.
$$
main.js, manifest.json, and styles.css from the latest release, or build the plugin (see below)..obsidian/plugins/latex-inline-block-toggle/main.jsmanifest.jsonstyles.cssSettings -> Community pluginsLaTeX Inline Block ToggleThe minimum app version remains 1.5.0, on desktop and mobile. On 1.13+, the two settings use Obsidian's declarative API for settings search; older versions use the existing settings UI. Command IDs and setting keys are unchanged by the API update. External settings reload is available on 1.5.7+.
If upgrading from the old obisian-latex-inline-block-toggle ID, disable the old plugin first. Keep a copy of its data.json, install into the new folder above, and copy that file into it before enabling. The earlier ID rename changes Obsidian's command namespace, so reassign custom hotkeys to the new plugin. Do not enable both copies.
See official API references and validation notes.
npm ci
npm run dev
npm run build
Run npm run typecheck and npm test to check types and run the lightweight regression suite (no extra test dependencies).
npm run dev:main.ts and rebuilds main.js on changes.npm run build:main.js).npm run version:versions.json using manifest.json values.Select an inline expression or a block to convert it. Without a selection, the command converts the block at the cursor to inline math; otherwise it converts inline expressions on the current line into separate multiline blocks. Block-to-inline conversion can join neighboring text lines with matching quote prefixes.
Inline-to-block conversion always places the opening and closing $$ delimiters on separate lines. For example, $formula$ becomes:
$$
formula
$$
Block-to-inline conversion flattens line breaks and produces $formula$. Existing single-line display blocks are also accepted as input:
$$ formula $$
Toggling this block produces $formula$ with the default whitespace trimming setting. Toggling it again produces the multiline block shown above. There is no setting to generate single-line display blocks.
Select consecutive blocks, or place the cursor in one of them, to merge the group into a single aligned block. Intervening text prevents merging.
Open Settings -> Community plugins -> LaTeX Inline Block Toggle:
Show commands in editor context menu (default: true)Trim surrounding whitespace when converting (default: true)\$) are not treated as delimiters.```math are not supported (by design).MIT. See LICENSE.