Zotero: Fix Latex math commands in Bibtex export

Locate your Zotero data directory and edit translators/BibTeX.js

1) Change

var alwaysMap = {
  "|":"{\\textbar}",
  "<":"{\\textless}",
  ">":"{\\textgreater}",
  "~":"{\\textasciitilde}",
  "^":"{\\textasciicircum}"
  "\\":"{\\textbackslash}",
  "{" : "\\{\\vphantom{\\}}",
  "}" : "\\vphantom{\\{}\\}"
}

to

var alwaysMap = {
  "|":"{\\textbar}",
  "<":"{\\textless}",
  ">":"{\\textgreater}",
  "~":"{\\textasciitilde}",
  "^":"^"
  "\\":"\\",
  "{" : "{",
  "}" : "}"
}

2) Change

function escapeSpecialCharacters(str) {
  var newStr = str.replace(/[|\<\>\~\^\\\{\}]/g, function(c) { return alwaysMap[c] })
    .replace(/([\#\$\%\&\_])/g, "\\$1");

to

function escapeSpecialCharacters(str) {
  var newStr = str.replace(/[|\<\>\~\^\\\{\}]/g, function(c) { return alwaysMap[c] })
    .replace(/([\#\%\&])/g, "\\$1");

This should do the trick. The instructions are tested for Zotero 4.0.28.1

This based on http://www.ohadsoft.com/2012/06/zotero-exporting-unicode-and-latex-constructs-to-bibtex/ which seems to be for an older version of Zotero.

This is somewhat related: When exporting items by right click… export as… zotero displays the option to use abbreviated journal names. This is not the case for exporting by using quick copy. This can be fixed by again editing the translator file. To do so, simply change the option “useJournalAbbreviation” of “displayOptions” to “true”. You find this entry in the header of the file.