Obsidian Plugins
I use obsidian a lot, here are some plugins that I use to make my life a bit easier when typing notes
Inline LaTeX
write latex directly in your notes. github.com/mehnai/inline-latex
install
- download
main.js,manifest.json,styles.css - drop them in
<vault>/.obsidian/plugins/inline-latex/ - restart, then enable under settings → community plugins
inline snippet
The result is `latex:\textbf{energy} $E=mc^2$` in this sentence.
document (html)
```latex-document
\section{Results}
This is \textbf{bold} and \textit{italic} text.
\[ E = \frac{1}{2}mv^2 \]
\begin{itemize}
\item First observation
\item Second observation
\end{itemize}
```
embed a .tex file
```latex-file
Research/paper.tex
```
pdf cell (tikz)
```latex-cell
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[blue,thick] (0,0) circle (1cm);
\end{tikzpicture}
\end{document}
```
shared setup
```latex-preamble
\usepackage{amsmath}
\newcommand{\vect}[1]{\mathbf{#1}}
```
```latex-cell
\[ \vect{F} = m\vect{a} \]
```
Chem Formulas
type chemical formulas as plain text and they format themselves. no latex, no subscript buttons. github.com/mehnai/chem-formulas
install
- download
main.js,manifest.json,styles.css - drop them in
<vault>/.obsidian/plugins/chem-formulas/ - restart, then enable under settings → community plugins
trigger
type ;; right after a formula. wrap it in ;; on both sides for several at once.
Sr2CuO3+delta;; → Sr₂CuO₃₊δ
;;2H2 + O2 -> 2H2O;; → 2H₂ + O₂ → 2H₂O
or select text (or put the cursor on a word) and press Cmd/Ctrl+Shift+E.
a companion command removes the formatting so you can edit.
syntax
| feature | you type | you get |
|---|---|---|
| subscripts | H2O;; Ca(OH)2;; | H₂O, Ca(OH)₂ |
| non-stoichiometry | SrTiO3-delta;; CeO2-x;; | SrTiO₃₋δ, CeO₂₋ₓ |
| charges | Fe3+;; Cl-;; NH4+;; | Fe³⁺, Cl⁻, NH₄⁺ |
| explicit charge | SO4^2-;; | SO₄²⁻ |
| isotopes | 14C;; 235U;; | ¹⁴C, ²³⁵U |
| phase prefix | alpha-Fe2O3;; | α-Fe₂O₃ |
| hydrates | CuSO4*5H2O;; | CuSO₄·5H₂O |
| state | H2O(l);; NaCl(aq);; | stays plain text |
| arrows | -> <- <-> <=> | → ← ↔ ⇌ |
notes: use ^ when a charge is ambiguous (SO4^2-, not SO42-).
two-letter symbols prefer element names, so Sn is tin; write S_n for the other reading.
capitalized prose only converts if it has digits, signs, brackets or greek letters.
output format
pick one in settings (shown for H2O):
| format | result |
|---|---|
| html tags (default) | H<sub>2</sub>O |
| unicode | H₂O |
| latex | $\mathrm{H_{2}O}$ |