Latex blocks with space immediately before/after $ don't work

Steps to reproduce

Create a new note and type in $x $, or try take $x$ and add + 1 + 2 + 3 to the expression. You will see that whenever there is a space just before the $ the preview doesn’t get rendered and it is just treated as regular text.

it works
it doesn’t work

Expected result

I would expect $x $ to be rendered exactly like $x$.

Actual result

The latex block is not interpreted as latex.


  • Operating system:
  • Debug info:
    Obsidian version: v0.15.9
    Installer version: v0.15.9
    Operating system: #202207312230~1660780566~22.04~9d60db1 SMP PREEMPT_DYNAMIC Thu A 5.19.0-76051900-generic
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Restricted mode: off
    Plugins installed: 1
    Plugins enabled: 1
    1: Obsidian Git v2.4.1

From the discord: This is expected, and if you want spaces to work you can use $$ blocks $$.

This is probably the case because otherwise you can’t make a single $ somewhere in text work without having to escape it.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.