How to insert mathematical formula/equation in Zotero's note?

By chance I've just found out how to do that! Combine the markdown-here add-on with mathjax.

You can add the following code to the note:

<script type="text/x-mathjax-config"> MathJax.Hub.Config({
MMLorHTML: { prefer: "HTML" },
tex2jax: {
displayMath: [['\\[', '\\]']],
inlineMath: [['\\(', '\\)']],
processEscapes: true
},
TeX: { extensions: ['enclose.js'] }
});
</script>
<script type="text/javascript"
  src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
Now your equation $\sqrt{a^2 + b^2} = \pm c$

Makrdown Toggle in File menu (or Ctrl+Alt+M), and you have nice equations.enter image description here


tl;dr: There is no good solution with Zotero, nor is there an add-on.

Long version: There is no way currently to write complex mathematical equations in Zotero. Zotero supports UTF-8 (so greek letters work) as well as simple html mark-up but nothing more complex (like fractions, squareroots, etc). Moreover, Zotero will not preserve LaTeX markup entered in Zotero fields. In other words, \sqrt{5} will be escaped to \\sqrt\{5\} on bibtex/biblatex export. There has been talk of either implementing ASCIIMathML or adding an option to leave LaTeX codes alone (such as exists e.g. for Mendeley). The former is still the preferred way forward, but someone has to do that, the latter has consistently met with significant skepticism from devs as it encourages data entry in a format that Zotero is otherwise unable to deal with (e.g. in generating its own citation). That all said, it isn't terribly hard to custom-hack Zotero's bib(la)tex export to leave LaTeX code alone and it might even be possible to convince the maintainer of the strongly recommended better-bibtex add-on for Zotero to implement that.