TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 14 down vote accepted

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.

share|improve this answer
The OP mentions that he knows this trick. The questions seems to be about why this happens. – Seamus Feb 1 '11 at 12:05
Hm, I'm not sure about the reason. I add some explanation in my own opinion. – Leo Liu Feb 1 '11 at 12:43
BibTeX ignores commands for sorting purposes only if they immediately follow an opening brace. If the brace weren't necessary, you couldn't distinguish between ignored and observed commands. – Philipp Feb 1 '11 at 15:16
@ Leo Liu: thanks for the clarification. The strange thing is that I have used many diacritics thus far in BibTeX and this is the first time I have run into this restriction, potentially because the diacritic is in the first 3 letters of the first author's surname which means that a condensed reference would (similar to Gödel becoming [Göd31]) be [Peñ10]. This is hidden from me as I am using numerical references. – Richard Terrett Feb 2 '11 at 3:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.