A certain LaTeX syntax causes linked mentions not to appear

I was puzzled by a backlink not appearing in the linked mentions pane, and I was able to track down a way to reproduce it. Basically if you enter an equation without a newline after it, like this

Here is an equation
$$
   x = x + 1
$$and here is some text after it

instead of

Here is an equation
$$
   x = x + 1
$$
and here is some text after it

then any links after that won’t be counted as backlinks in the document they link to. This is hard to spot because the live preview renders identically in both cases, so you can’t easily see if you’ve done this.

Steps to reproduce

  • open the sandbox vault
  • create a file ‘Test 1’ with the following text
Here is an equation
$$
   x = x + 1
$$and here is some text after it

[[Test 2]]
  • click the link to create the ‘Test 2’ file
  • open the linked mentions panel

The link from ‘Test 1’ won’t be listed as a backlink.

However, either of the following will cause it to be listed again

  • put a newline (or even a space) after the second $$, or
  • move the [[Test 2]] link before the equation

Did you follow the troubleshooting guide? [Y]

Expected result

Either backlinks should appear in both cases or else there should be an error or other indication that the syntax is incorrect.

Actual result

If a document contains an equation entered this way, any links after the equation are not counted as backlinks.

Environment

SYSTEM INFO:
Obsidian version: v1.9.14
Installer version: v1.8.4
Operating system: Darwin Kernel Version 23.6.0: Thu Apr 24 20:26:36 PDT 2025; root:xnu-10063.141.1.705.2~1/RELEASE_X86_64 23.6.0
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


I’m fairly certain the opening and closing double $$s for MathJax blocks need to be on their own lines with nothing else. Your

Here is an equation
$$
   x = x + 1
$$and here is some text after it

[[Test 2]]

example isn’t working/rendering in Reading view (in addition to causing the backlinks issue).

source mode | reading view

Obsidian_Ms12Py4Bds

The issue is that in live preview they render identically. So if you always work in the live preview pane as I do, then you can’t tell if you’ve made this mistake or not. It can easily happen by accident, and then the backlinks stop working with no indication as to why.

I agree that it should probably be considered incorrect syntax, but then it shouldn’t render as if it’s correct in the live preview.

Even though it is incorrect syntax, I guess that shouldn’t prevent backlinks from working. This message suggests that bugs of the form “a specific kind of bad syntax stops backlinks from working” have been fixed before.

I didn’t think to check before, but this also affects the graph view, not just backlinks. (To reproduce, follow the steps above and enter the graph view - the nodes “Test 1” and “Test 2” will not be linked.)

similar bugs/syntax errors:

1 Like