[Tex/LaTex] Why is this n with tilde disappearing in a BibTeX reference


Working with the following abridged line in a BibTeX entry:

author = {J. Pe\~{n}a}

For some reason results in a BibTeX compilation to:

J.~P. {n}a

With a period and a space appearing and the tilde diacritic and the letter e vanishing. I can fix this by wrapping the surname in braces, but am mystified as to why this happens in the first place. Is this expected behaviour?

Thanks for any explanation anyone can offer.

Best Answer

Use Pe{\~{n}}a or simply Pe{\~n}a instead.

See http://www.tex.ac.uk/cgi-bin/texfaq2html?label=bibaccent

This is BibTeX's restriction, which is explained in BibTeX's manual btxdoc. Maybe one should check the source code of BibTeX for detailed explanation. However, I think this is not very hard to understand --- In BibTeX, one can use

author = "Kurt G{\"o}del"

How about missing braces? It will be more difficult to write the program for lexical analysis, if the braces can be omitted.

Related Question