0

I am trying to include a paper in my .bib file such as: Example paper

I used the mhchem package so I have amended the entry in Mendeley to read:

XPS investigation on the corrosion behavior of 13Cr martensitic stainless steel in \ce{CO2}-\ce{H2S}-\ce{Cl} environments

I am using natbib package in the form \usepackage[numbers,sort&compress,square]{natbib} and the IEEEtranN style but the output still shows the \ce commands in the pdf.

moewe
  • 175,683
phald
  • 105
  • Mendeley probably tries to escape characters like \ in the title, which means that the commands don't come out as commands in the .bib file. I have my doubts that it is possible to tell Mendeley to stop doing that. (I don't suppose you want to switch to Zotero, where Better BibTeX for Zotero would give you better control over the .bib output?) – moewe May 14 '20 at 16:29
  • Mendeley even incorrectly (it might be slightly oversimplified to say this is incorrect, but it's not far from the truth: almost all styles that use url assume people load url, which can deal with special characters) escapes URLs in the url field: https://tex.stackexchange.com/q/309980/35864 – moewe May 14 '20 at 16:32
  • Maybe this helps: http://danaernst.com/using-mendeley-with-bibtex/ – moewe May 14 '20 at 16:32
  • Take a look at the bib file and add the corresponding entry to your question. – leandriis May 15 '20 at 06:09

1 Answers1

0

Thanks for the help and suggestions. Turns out I hadnt provided you all with enough detail and it was a problem with Overleaf's Mendeley importer which uses Mendeley's Web Exporter API.

This process didnt escape underscores and LaTeX characters properly hence the incorrect formatting of .bib file.

For now, the workaround would be to export the .bib file from Mendeley Desktop so that the underscore would be unescaped, and upload this .bib file to your Overleaf project using Files > Upload from > Computer.

If you would like to be able to "sync" and refresh this .bib file, you can upload the .bib file to DropBox, or Google Drive, or any other cloud-storage services that would generate a URL to access the file. You can then add the .bib as a linked file to your Overleaf project using this URL. If you're interested in this idea, see https://www.overleaf.com/help/247

phald
  • 105