I'm definitely not the first to think about having the possibility users having personalised $LaTeX$ \newcommands
(see e.g. here). But I thought of another way to do this while avoiding (I think) the problems mentioned in the linked thread.
What if we could define \newcommands
somewhere in our account, write the answer/question and before submitting click a little "magic button" that replace all calls to these \newcommands
by their associated $LaTeX$ codes? It would be a sort of "multi-search/replace" function running through the post.
To be more clear here's an example:
I define somewhere in my account
\newcommand{\trace}{\operatorname{Tr}}
I write an answer like:
Note that \$\trace(A)\neq 0\$ and thus \$A\neq 0\$. blabla...
I press the "magic button" and my answer gets automatically transformed into
Note that \$\operatorname{Tr}(A)\neq 0\$ and thus \$A\neq 0\$. blabla...
I submit my answer
This would avoid the three problems listed by Grigory M in the linked thread (if I understood them well). In worst case, if you define a lot of commands then it gets slow for you when you press the "magic button" but this doesn't affect the other members of the community.
I don't know how easy/hard this would be to implement but I'm interested to have your opinion on this feature and what kinds of problems it might raise.