Latex $newcommand does not work on reload

Steps to reproduce

Add latex newcommand declaration:

$\newcommand{\br}[1]{\{{#1}\}}$

Use the command:

$\br{test}$

Close and reopen obsidian. You will whitness that the custom command is not recognise, until you play with the declaration, delete and re-add it again

Did you follow the troubleshooting guide? Y

Expected result

Actual result

Environment

SYSTEM INFO:
Obsidian version: v1.9.14
Installer version: v1.6.7
Operating system: Darwin Kernel Version 25.1.0: Fri Sep 19 19:12:09 PDT 2025; root:xnu-12377.40.77.505.1~4/RELEASE_ARM64_T6020 25.1.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: off
Plugins installed: 2
Plugins enabled: 2
1: Custom Frames v2.5.0
2: Better Export PDF v1.11.0


if the \newcommand definition occurs in the same note before its usage then it should work even after reloading Obsidian, at least it does for me.

across different notes or if used before its definition, the command is not registered at first. closing the note and reopening should be sufficient.

the way i deal with these issues is to use the Extended MathJax community plugin which lets the user define commands in a separate file that get registered upon Obsidian.

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