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

I've been exploring several reference manager by now and ends up using Zotero, because of it's simplicity. Previously I had mostly been using Citavi, which had this feature of storing mathematical formula written in LaTeX, which I had not found in Zotero.

How to get Zotero to store a mathematical formula? Is there any add-ons, or a workaround for this?

I would like to write the mathematical equation in LaTeX and save it still in LaTeX and not convert it to pdf/image. Is there an add-on that also serves as LaTeX equation editor and viewer in Zotero?

• This looks borderline for on-topic to me. It's really about Zotero, which is a browser plug-in rather than a TeX tool. – Joseph Wright Mar 7 '14 at 13:37
• well, it's yes and no, in a broader sense, take a look at questions with zotero tag they were also mostly about latex zotero integration, (note: the zotero which i mention here is the standalone version) – Firhat Nawfan H. Mar 7 '14 at 13:54
• I did say 'borderline'. Is there a reason you can't just enter your LaTeX commands directly, e.g. 'This is a \emph{title} containing some maths: $y = mx + c$'? – Joseph Wright Mar 7 '14 at 13:57

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.

• Are you sure? I tried your method, but the equation is not mathjax, they are pictures. – user15964 Jun 3 '16 at 8:04
• @user15964 You are right. The script part is not used, because Markdown-here has math support enabled since version v2.11.3 – yapphdorlw Jun 6 '16 at 8:34
• so do you mean before v2.11.3, the mathjax is working, right? Is it possible to make it work now? – user15964 Jun 6 '16 at 12:23

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.

• yes i accepted although it's not what i expected this is more than just an insight for me, so this means that if i wanted a new collection of several equations, i should write it in a separated .tex file? – Firhat Nawfan H. Mar 7 '14 at 20:28
• probably using separate .tex files is the best you can do, yes. – adam.smith Mar 8 '14 at 0:06
• Version 0.5.33 of better bibtex allows inclusion of literal latex by enclosing it in <pre>...</pre> tags – retorquere Jun 11 '14 at 19:35