Underscores being paired in the LaTeX environment when following a curly brace

Steps to reproduce

  1. Create the following LaTeX block:

  2. Observe that if you type an underscore after the curly bracket, it gets auto-paired as the following:

  3. Observe that if you were to not have curly braces preceding the underscore that it wont be paired:

Expected result

I expect that when in the LaTeX editing environment, that underscores wont be paired when writing math. It gets annoying to have to delete the duplicate underscore for the specific circumstance of it following a curly brace.

Actual result

The underscore gets paired.


  • Operating system: Arch Linux with Gnome 42.2 Wayland
  • Debug info:
    Obsidian version: v0.14.15
    Installer version: v0.14.15
    Operating system: #1 SMP PREEMPT_DYNAMIC Thu, 09 Jun 2022 16:14:10 +0000 5.18.3-arch1-1
    Login status: not logged in
    Insider build toggle: off
    Live preview: off
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Safe mode: on


Additional information


Check to make sure you have Auto pair markdown syntax toggled off in the editor tab of the settings.

If there isn’t a fr for this, open one.

The thing is is that it shouldn’t be pairing underscores in the latex environment, i don’t think, as it’s very particular about when it pairs them: It only pairs them if they directly follow a curly brace.