Hi everyone! I’m kinda new to Obsidian, and I mostly use it to take notes in class.
Recently I’ve been wanting to add chemistry formulas in a way that is easier to type and looks cleaner in the end.
From my understanding, I can use the Extended MathJax plugin and add the mhchem extension in the preamble file, however, I have a few struggles with that.
So far, I have installed the plugin, I have created a preamble.sty file, and I’ve tried typing \usepackage{mhchem} in it (I’m not sure if I’m supposed to add anything else, since I only care about enabling this one package in obsidian).
I’ve also tried \usepackage{chemfig}, since that’s what’s explained on Overleaf, but that’s also not working.
I refreshed Obsidian and I tried typing a formula as $\ch{formula}$ but it doesn’t work, and it just marks \ch in red, like a misspelled function.
I would really appreciate if anyone could tell me if I’m doing something wrong…
@giulsparola mhchem formulas work out of the box, without explicit package loading in Markdown file or preamble.sty. Just type something like $\ce{H2O}$ and it will be rendered in the preview.
Obsidian uses MathJax to render math. It is not a full-fledged LaTeX environment like e.g. Overleaf, so only math macros (and mhchem syntax) are supported.
or add a reaction scheme representing electron movements and such, I usually create it in LaTeX using the chemfig package, and then embed it in my notes as PNG file.
However, if someone has a better suggestion how to represent complex chemical structures in Obsidian, I would be glad to know.