I use Mendeley to generate the .bib
file and this results in articles with <sub>
and <sup>
tags in the title.
@article{Testtest2016,
author = {Testtest},
title = {{Why O{\textless}sub{\textgreater}2{\textless}/sub{\textgreater} and O{\textless}sup{\textgreater}2-{\textless}/sup{\textgreater}?}},
year = {2016}
}
Currently they are compiled in the bibliography as [2] Testtest. Why O<sub>2</sub> and O<sup>2-</sup>? 2016.
whereas I'd like O2 and O2-
Can I make LaTeX replace the tags with $_{...}$
and $^{...}$
? If not I'll find another way (e.g. editing bib.bib
on-the-fly) but I'd prefer LaTeX doing it automatically. I do not want to change the title inside Mendeley as the titles are coming from the DOI search.
I'm sorry if this has already been adressed but I can't find any answer.
Best Answer
You should edit the entries and tell the maintainers of Mendeley to stop outputting such rubbish.
Here's a workaround that assumes you don't need
\textless
anywhere else and that the tags are just<sup>...</sup>
and<sub>...</sub>
, without nesting.