Hello,
I am trying to disable MathJax / LaTeX rendering completely. I want to be able to type $$text$$ in my notes and see it as plain text, not a rendered equation.
I am using Live Preview mode and I’ve tried 3 separate themes so far:
Default theme, Minimal theme, Dracula Official theme
I have tried several generic CSS snippets, but they do not work—they either do nothing or leave a blank space. I believe the theme or the editor engine is overriding them.
What I’m trying to do:
Enter passwords or other text that look something like this:
asdf$adfsa$ | $abc$
…and have them appear as regular text, instead of one of the dollar signs disappearing and the text in between turning into italic.
Things I have tried:
I’ve tried several css snippets, changing themes, and changing all manner of settings and toggles. I’ve asked AI, googled it, etc.
The only way I got close to what I wanted was by:
Settings > Editor > Default editing mode: Source Mode
This makes it so that I can see both dollar signs, however they do still change color, cause the text inside to change to a different color, and still italicizes the text. It’s at least workable though because I can copy and paste like normal without losing characters.
But of course this makes everything look ugly, and exposes new lines or breaks as " " and makes titles look like this:
title: My Notes
updated: 2025-07-13 20:57:23Z
created: 2025-07-11 18:51:49Z
Thanks for your response. I know about those methods already, but the goal here is to be able to freely type out passwords and sentences without constantly having to think about escaping this or that.
This is a very serious problem for me. I just paid for the annual plan, and I’m already thinking about cancelling it. Not being able to completely disable Math / Latex / whatever this rendering is, adds needless time and stress in the middle of my work, when I just need to be able to freely type things quickly, without having to worry about losing characters, escaping phrases, etc.
AI gave up and is saying only the developers can fix this:
Source Code (JavaScript): They have the actual, human-readable JavaScript files that contain the application’s core logic. Inside one of those files is a line of code that says, in essence:
IF the editor detects a pattern that looks like ‘$text$’ THEN remove that text and insert a MathJax widget in its place.
Ability to Change Core Logic: They can go into that file and add a new condition:
IF a setting called ‘disableMathRendering’ is FALSE AND IF the editor detects a pattern that looks like ‘$text$’ THEN remove that text and insert a MathJax widget.
Yes, the AI is right. Currently, Obsidian’s markdown engine detects the presence of $, and removes them, along with the text between them, which gets replaced by the result produced by MathJax. The original text is not present in the DOM (not even as an attribute), so you can’t reveal it using CSS tricks.
But of course, your issue isn’t limited to dollar signs. You said:
the goal here is to be able to freely type out passwords and sentences without constantly having to think about escaping this or that.
However, the dollar sign is just one of many special characters in Obsidian. Underscores, asterisks, hashes—all of these have special meanings in markdown. You’ll run into similar problems as soon as a password includes any of them. Same goes for < > pairs, which may be interpreted as HTML tags.
It seems like what you need is a “plain text” editor rather than a markdown editor. But of course, that comes with the same downsides as using Source Mode—unpleasant rendering, manual line breaks, etc. It feels like two incompatible requirement sets to me. The only practical solution I can think of is to use code blocks to freely write any content that might include special symbols.
If your passwords or sequences of random characters come from the clipboard, one trick that might help is using the Templater plugin to bind a hotkey (e.g., Ctrl+Alt+V) to a small snippet that wraps the clipboard content in backticks before pasting it. For example:
<%*
let c = await tp.system.clipboard();
let result = `\`${c}\``;
tR = result;
%>
JLDiaz is correct. It’s not just about Math. For you specific use case, as ariehen pointed out, you really should put the password within inline code or in codeblock.
I think this actually worked, thank you!
Dollar signs now act like regular characters and don’t do anything unexpected.
However, typing “*" causes the characters after it to turn green, become italicized, and once I press Enter to go to a new line, the "*” disappears, again causing the issue of not being able to trust that when I’m typing out passwords, I don’t lose characters in the process.
The other characters that cause issues that I need to act like regular characters are: ^ `
Is there a similar piece of code that can fix these as well?
Yes that’s ultimately the best solution, if there was a simple toggle to disable markdown. Joplin has this sort of, except it’s a couple toggles that disables most/all of it. That’s what I’m looking for in Obsidian. But if we can make it so that just the characters I described in my previous comment behave normally (like plain text), then that will be good enough. Is there a way to extend the plugin that the_tree mentioned in order to encompass these 3 other characters?