Rendering Issue: All text becomes italic/monospace after a single $$

Steps to reproduce

type $$ anywhere in the editor

(see the gif below)

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

text shouldn’t be rendered with $ typed.

Actual result

all the text that follows is rendered in an italic, monospaced font.

Environment

SYSTEM INFO:
	Obsidian version: v1.9.9
	Installer version: v1.8.10
	Operating system: Darwin Kernel Version 25.0.0: Tue Aug  5 22:47:28 PDT 2025; root:xnu-12377.1.6~5/RELEASE_ARM64_T8122 25.0.0
	Login status: logged in
	Language: en
	Catalyst license: insider
	Insider build toggle: on
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

Additional information

Screen Recording 2025-08-17 at 14.47.29.mov

That’s the syntax for math formatting. You can “escape” it by putting a backslash first: \$$.

1 Like

I understand the technical reasons, but the user experience is flawed. When I try to insert inline math using $$ delimiters, the editor incorrectly renders the entire remainder of the document as a math block until I have finished typing my expression and closed the delimiters.

This entire workflow is highly misleading for the following reasons:

  • My simple intention is to insert inline math.
  • The editor’s immediate feedback, however, is to incorrectly render a large portion of the document as a math block.

To put it concisely:

  • From a technical specification standpoint, this may not be a bug. The renderer is simply following its rules for unclosed tags.
  • From a UX design standpoint, this is absolutely a bug or a serious design flaw. The behavior is counter-intuitive, provides false visual feedback, and creates unnecessary confusion and disruption for the user.

My understanding is that you use one opening$ and one closing $ for inline math (see the link Cawlin shared above). Opening with a single $ doesn’t change/reformat any lines below.

While this solves the rendering error, it’s impractical for complex formula editing. Take this for example:

It is a sentence and a formula $y \cos ^{-1}(x y)=\frac{-3 \sqrt{2}}{4} \pi ; \quad P\left(\frac{1}{2},-\sqrt{2}\right)

The formula only previews correctly (with the LaTeX Suite plugin) after I pre-emptively type two $ signs.

$y \cos ^{-1}(x y)=\frac{-3 \sqrt{2}}{4} \pi ; \quad P\left(\frac{1}{2},-\sqrt{2}\right)$

To be honest, this method (start with single $ and at last type the other $) actually adds workload.


btw, the command toggle inline math will type two $s directly and incorrectly render a large portion of the document as a math block.

This behavior isn’t specific to the math syntax. If you start a comment or code block, the rest of the note becomes one until you add the closing symbols. As far as I know, this is correct and not misleading.

As a workaround you could add both the starting and ending symbols before typing between them. Or you could type the math first and then select and use the formatting command.

Something I noticed that might be either a bug or a feature to request is that typing 3 backtick la to start a code block automatically produces another 3 to close it (if the setting for that is enabked), but typing tildes instead (and alternate syntax for the same thing), or the dollar signs for math, doesn’t. If it did, you wouldn’t see this behavior. The code block inconsistency seems like a bug; I don’t know if the math syntax is behaving as intended or not.

1 Like

Thanks and sorry if my previous explanation wasn’t clear.

Here is the thing/bug I’d like to report:

  1. After typing two dollar signs ($$), the page’s appearance changes.
  2. As soon as I start typing a math equation between the $$ symbols, the page reverts to its original state.
    (see gif)

While I can speculate on the relevant part of the code, but from a product perspective, this temporary UI change seems unnecessary/misleading/maybeBug.

Screen Recording 2025-08-17 at 18.50.10.mov


It’s true that your suggestion would prevent this from happening, but perhaps a better approach is to address the problem directly, instead of having users get into the habit of typing the opening ‘$’, the formula, and then the closing ‘$’ in sequence, just to maintain a clean, flawless render throughout the editor.

Just in case you don’t know, I want to add a piece of information.

$$ is also a valid delimiter for “start/end of a displayed equation”, in addition to $ being the delimiter for “start/end of inline math”.

So, when you type $$ you actually open a displayed equation environment that lasts until the next $$ (or the end of the document). That’s why the rest of the document changes its appearance: it’s being interpreted as part of the equation environment you opened.

(La)TeX also accepts \[ and \] as equation delimiters, and MathJax (the JavaScript renderer Obsidian uses for math) can be configured to use these delimiters instead of $$. However, Obsidian does not provide any mechanism, as far as I know, to configure MathJax this way. I should also mention that in the TeX world very few people actually use \[ ... \] anyway.

Thank you! I’m actually already familiar with what $$…$$ means, as I regularly use Overleaf for writing in TeX myself. But I really appreciate your patient explanation!

I see, I thought you were using $$ as the start of a math block, not as the start and end of an inline block. So you type that, then arrow back and type your equation between them?

Exactly. But There’s a rendering bug in the process that sometimes breaks my concentration while I’m typing a formula. That’s why I reported it as a bug at first:

It’s not a bug. You’re starting a math block and then changing it to an inline, so you briefly see math block rendering. The solution is to start with an inline by typing only 1 opening symbol.

You say above:

But I don’t understand how. It’s the same amount of typing, in a different order. Typing $$ saves a Shift press but adds an arrow press.

So here’s why I type two $s:
When I put $$ before my inline math, it lets me see a preview of the formula in Obsidian’s preview mode and the linked reading view.

Honestly, if you used Obsidian for math a lot, we wouldn’t even be talking this much about whether it should be one $ or two.

What I really want to know is whether this will be fixed as a bug or a FR, rather than how to elegantly use the editor by typing a $ symbol. And I’m going to pull the main ideas from this post together and write up a bug report once again.

Do it as a feature request, and explain your use case in it so the purpose is clear.

I see you mention “The formula only previews correctly (with the LaTeX Suite plugin) after I…”. If this workflow is only needed with that plugin, it would be more appropriate to file an issue on its GitHub.

It result in inconvenience in both the plugin and the linked reading-source mode pages, as I mentioned in Editor incorrectly parses inline math as a math block. Use obsidian original capacity to write math formula is also a tough work without double $