rightarrow in bibtex export

Currently zotero exports rightarrow used in bibtex reference(https://inspirehep.net/record/1706113?ln=en) as "{\rightarrow}" with all types of encoding available especially western encoding, which gives error in latex compilation. The correct format is $\rightarrow$.
Kindly take this style into consideration for latex compilers.
  • If you are using Zotero with BibTeX, you definitely want to be using the BetterBibTeX plugin.
  • edited July 4, 2019
    This should still be correct in Zotero, though. And I'm not sure there's actually a difference — I'm not seeing a different right-arrow mapping in BBT.

    Someone more familiar with BibTeX would need to weigh in, but we use similar mappings for various characters, and they've been in place for many years, so this might be an issue with the particular BibTeX workflow that @pasmon79 is using.
  • Pretty sure they're correct -- {\rightarrow} throws an error when used in standard LaTeX and would require math mode, i.e. $\rightarrow$
  • But BibTex.js doesn't use {\rightarrow}. It uses {\\textrightarrow}.

    That is provided by calling \usepackage{textcomp} in your document. I wonder if that's the issue here?
  • Thanks, it worked.
  • BBT maps to $\rightarrow$
  • Should Zotero do the same?
  • I'm not sure if there's a "right" answer here.

    In my opinion, no. A math-mode arrow and a text-mode arrow will be typeset slightly differently & it seems slighlty more likely that a text-mode arrow will be preferred in a bibliography (but who knows).

    Changing this one character wouldn't remove the need for textcomp.

    But textcomp is also a very common package, so the fact that Zotero's BibTeX.js translator relies on it for many mappings isn't worrisome. BetterBibTeX still seems to depend on it for some characters as well...
  • Oh yeah, I didn't mean that BBT got it better somehow, just that it did it differently, which is mostly coincidence - I got my initial mapping from https://www.w3.org/2003/entities/2007xml/unicode.xml, which only specifies the math mapping, and I only amend my mapping when a bug report asks for it. I don't have a comprehensive source for mappings -- I initially put it together from https://www.w3.org/2003/entities/2007xml/unicode.xml, http://www.w3.org/Math/characters/unicode.xml and http://milde.users.sourceforge.net/LUCR/Math/data/unimathsymbols.txt, which may well swing towards the math side.

    Indeed text characters do render differently than their text equivalents, although I couldn't say which of the two is more desirable -- this could well be domain dependent, and since Zotero doesn't "do" math, it's not currently possible to reliably infer the intent. In BBT you can set which mapping you prefer, but it's not fine-grained.

    I'll probably add textrightarrow to the BBT mapping and add a note to the QR that it requires textcomp.
  • In my test suite I have only one sample where this comes into play, and for that, math-mode would be preferred (albeit in the abstract): https://journals.aps.org/pra/abstract/10.1103/PhysRevA.7.957
  • I've updated BBT to use \textrightarrow by default, but you can switch it to prefer math mode if needed. Enabling the QR will show when textcomp is needed, but it's currently the only package detected that way, I'll add other package dependencies to the QR as I come across them.
Sign In or Register to comment.