Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

LaTeX Color Sync

lunevoileelunevoilee34 downloads

Sync LaTeX formula color with nearby markdown text color.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates2

中文说明

What This Plugin Does

LaTeX Color Sync keeps formula color aligned with nearby text color in Obsidian source mode.

It rewrites formulas to this format:

\\textcolor{#RRGGBB}{...}

Typical use case: when your heading/link/quote text has theme color, your math formula can follow the same color automatically.

Showcase

Two Ways It Works

1) Auto Sync While Typing

  • When your edit inserts a newline (\\n), the plugin auto-syncs nearby formula colors.
  • You can disable this in settings if you prefer fully manual control or work with very large notes.

2) Manual Commands

You can also trigger sync from the command palette for partial or full-document updates.

Commands

Command When to use What it changes
Sync LaTeX Color In Selection Or Current Line You only want to update part of a note Rewrites formulas in selected lines (or current line)
Sync LaTeX Color In Current Document You want to normalize one whole note Rewrites formulas across the current note

Recommended Workflow

  1. Start with Sync LaTeX Color In Selection Or Current Line.
  2. If result is good, run Sync LaTeX Color In Current Document.
  3. If needed, press Ctrl/Cmd+Z to rollback immediately.

Settings

Setting Default Keep it ON if... Turn it OFF if...
Language Auto You want UI to follow app language You want to force a fixed language
Show summary after manual command On You want feedback after each run You prefer no popups
Auto sync on newline insertion On You want formulas updated whenever editing inserts a newline (\\n) You edit very large files and prefer manual sync
Also process previous line on newline insertion On Your formula is often on the line you just broke You want minimal auto-processing
Prefer DOM color sampling On You want color to follow real rendered text Your theme is very custom and fallback behaves better
Overwrite existing top-level LaTeX color On You want plugin to keep formulas consistent You want to keep manually assigned top-level colors
Skip formulas containing embedded color commands On You want safe behavior for complex formulas You intentionally want plugin to wrap those formulas too

Why Sometimes "No Changes"

If command says no changes, common reasons are:

  • No valid $...$ or $$...$$ span in target lines.
  • Formula color already matches target color.
  • Formula is in excluded region (code block, inline code, frontmatter, HTML-like block).
  • Formula contains embedded color commands and skip setting is enabled.

Compatibility

  • Obsidian >= 1.5.0
  • Desktop and mobile (isDesktopOnly: false)
  • Source mode editor (CodeMirror 6)

Known Limits

  • Formula delimiters must open and close on the same line.
  • Extremely custom macros or unusual delimiter styles may need manual edits.

Development And Packaging

You can keep source code split in src/, but release output must be a single root main.js.

  1. Install tooling:
npm install
  1. Build a production bundle:
npm run build
  1. For local development watch mode:
npm run dev

Build result:

  • Input: src/main.js (+ imported modules in src/)
  • Output: main.js at repo root (single bundled file for Obsidian release)

GitHub Actions Release Flow

This repository includes .github/workflows/release.yml:

  • Trigger: push a tag like v0.3.2 (or 0.3.2)
  • Action: install dependencies, build main.js, upload release assets
  • Uploaded files: main.js, manifest.json, styles.css

Important: the tag version must match manifest.json version exactly.

Privacy

This plugin does not send note content to external services and does not collect telemetry.

Project Files

  • Changelog: CHANGELOG.md
  • Contributing: CONTRIBUTING.md
  • Issue templates: .github/ISSUE_TEMPLATE/

License

MIT. See LICENSE.

99%
HealthExcellent
ReviewPassed
About
Sync LaTeX formula colors with surrounding text in source mode by rewriting formulas to \textcolor{#RRGGBB}{...}. Auto-sync on newline insertion or run commands to update the current line, selection, or entire document.
LaTeXAutomationCommands
Details
Current version
0.3.2
Last updated
Last month
Created
Last month
Updates
2 releases
Downloads
34
Compatible with
Obsidian 1.5.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
lunevoileelunevoilee
GitHublunevoilee
  1. Community
  2. Plugins
  3. LaTeX
  4. LaTeX Color Sync

Related plugins

Task Collector (TC)

Change task status and collect tasks within a document using hotkeys and context menus.

Attachment Management

Customize attachment path, auto-rename attachments, etc.

Shell commands

Define system commands that you want to execute via command palette, hotkeys, URI links or automated events. E.g. open external applications or perform automated file modifications.

Actions URI

Add additional `x-callback-url` endpoints to the app for common actions — it's a clean, super-charged addition to Obsidian URI.

Doubleshift

Open the command palette by pressing Shift (or any other key) twice like in IntelliJ and create your own shortcuts.

QuickAdd

Quickly add new notes or content to your vault.

Templater

Create and use dynamic templates.

Homepage

Open a note, base, or workspace on startup, or set it for quick access later.

Quick Switcher++

Enhanced Quick Switcher, search open panels, and symbols.

BRAT

Easily install a beta version of a plugin for testing.