Latex in bibtex entry title

I sometimes need to reference articles with latex in their names. For example, chemical formulas. I found that the latex commands in their title will be displayed directly by texmacs. Is there a way to render the latex commands?

There might be a solution proper for this issue; I tried putting a LaTeX command in a verb command and it almost works IMO: the command is not interpreted, but it is also typeset by TeXmacs in the style of the field which it belongs to; e.g. if \LaTeX is part of the title, and the title is in italics, then you get LaTeX in italics.

Thanks, but I don’t quite understand. If I import an article to Zotero and then export it, I get, for example (some entries omitted),

@article{tao2018direct-1,
  title = {Direct {{Visualization}} of the {{Nematic Superconductivity}} in \$\{\textbackslash mathrm\{\vphantom{\}\}}{{Cu}}\vphantom\{\}\vphantom\{\}\_\{x\}\{\textbackslash mathrm\{\vphantom{\}\}}{{Bi}}\vphantom\{\}\vphantom\{\}\_\{2\}\{\textbackslash mathrm\{\vphantom{\}\}}{{Se}}\vphantom\{\}\vphantom\{\}\_\{3\}\$},
  doi = {10.1103/PhysRevX.8.041024},
}

Do you mean changing the title field to this? Sorry I’m not very familiar with Latex.

title = {Direct {{Visualization}} of the {{Nematic Superconductivity}} in \verb|\$\{\textbackslash mathrm\{\vphantom{\}\}}{{Cu}}\vphantom\{\}\vphantom\{\}\_\{x\}\{\textbackslash mathrm\{\vphantom{\}\}}{{Bi}}\vphantom\{\}\vphantom\{\}\_\{2\}\{\textbackslash mathrm\{\vphantom{\}\}}{{Se}}\vphantom\{\}\vphantom\{\}\_\{3\}\$|}

I tested it and TeXmacs seems to display the commands verbatim, which is interesting. So TeXmacs can interpret certain latex commands.

I noticed that if I type Ctrl+\, a small latex “terminal” shows up and can interpret certain latex commands. Not sure what it is and if it’s relevant.

I think (I may be wrong) that in this case it is BibTeX, invoked through the TeXmacs bibliographic facility, that is interpreting, although TeXmacs can run LaTeX in other ways too; the small latex “terminal” you are referring too is one of the TeXmacs “Fold Executable” environments, by which TeXmacs runs other programs and places their input in the typeset document; see exempli gratia https://texmacs.github.io/notes/docs/embedding-tikz-figures-short.html; other people may correct some of what I wrote but I think the idea is right.

For your question: I had understood the opposite of what you meant the first time I read it. You want the LaTeX output, I thought you wanted the LaTeX code; because of this I proposed verb.

I did not test it, but for Zotero its Better BibTeX (BBT) plugin (at https://retorque.re/zotero-better-bibtex/) might export in the way that you need; from a brief reading in the Internet, I understood that Zotero BibTeX export aims at something other than use of BibTeX with LaTeX (I do not know what, I did not investigate enough).

The following, which I composed by hand, seems to me more sensible than the Zotero export that you have shown in your post

@article{tao2018direct-modified,
  title = {Direct {{Visualization}} of the {{Nematic Superconductivity}} in {$\mathrm{Cu}_x\mathrm{Bi}_2\mathrm{Se}_3$}},
  doi = {10.1103/PhysRevX.8.041024},
}

and I hope that the Better BibTeX plugin exports in this way (you have to test it).

1 Like

Ok. It turns out that Zotero doesn’t support LaTeX at all. And some scripts are needed for the zotero-better-bibtex add-on to work. The script on their website works. It can also be configured such that the add-on looks for a field other than title, so one can keep a non-latex version of the title in Zotero. Adding tex.title value in the Extra field also works.