Custom latex commands and environments


Hi there,

First of all, I want to congratulate the Benoit Schweblin for making this amazing tool. I have been looking for a browser based, offline, latex supporting, live-preview editor (such as the sort supported by stackexchange sites) for many years now. I’ve used tiddlywiki, but it’s live preview feature doesn’t work with latex expressions.

Stackedit is just beautiful. It would be perfect if I could define custom latex commands and environments in the raw markdown file itself. For instance, instead of having to type $\vert\Psi\rangle$ to write a state vector in quantum mechanics, it would be much simpler to write $\ket{\Psi}$, where \ket is a custom command defined as:

$\newcommand{\ket}[1]{\vert #1 \rangle}$

From what I can tell, it seems that KaTeX does not yet support \def, \newcommand etc. However, perhaps the brilliant mind(s) behind this project can come up with a way to make this work!

Once again, thanks for making this brilliant tool,

May 9, 2018 2:20 PM (Europe: Paris), May 9, 2018 5:20 AM (America: Los Angeles)