Disable markdown syntax pairing when in LaTeX expressions

Use case or problem

The underscore character is used for subscripts in LaTeX expressions. Sometimes Obsidian errantly pairs the underscore with a second underscore, as if it were Markdown.

Proposed solution

Disable markdown pairing within inline LaTeX, or block LaTeX. E.g.
Within a sentence $x_a=1$, or in a block:
$$
x_a=1
$$

Related feature requests

This has been mentioned a couple of times here on the forum, but I don’t see a feature request.

2 Likes

Rather than disabling it completely, I think it should be a separate option nested under “Auto pair Markdown syntax” to enable or disable auto pairing within LaTeX. That way, user’s can choose based on their own preference.

1 Like