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

I have built my .bib file using parentheses, like this:

author="Campbell, K. and McKay, M.D. and Williams, B.J.",
title="Sensitivity Analysis when Model Outputs are Functions",
journal="{Reliability Engineering \& System Safety}",

When typing C-c [ and then CampbTab, RefTeX correctly proposes Campbell2006, but on pressing Ret, I get the message Sorry, no matches found.

I found that replacing the opening and closing parentheses by braces makes it work. However I suppose that it is possible to configure Emacs and RefTeX so as to spare with this reformatting. Is it?

share|improve this question
up vote 7 down vote accepted

The correct place to fix this is the regular expressions that RefTeX uses to parse the BibTeX file. However, in the version of RefTeX (4.31) that I am looking at it seems that [{(] shows up every place you would expect.

EDIT: After poking at it a bit, it seems the issue is that in reftex.el ( and ) are defined as punctuation is the reftex-syntax-table and not a deliminator characters. This causes the (up-list 1) in reftex-extract-bib-entries (which calls it's body in in a way that uses the modified syntax table) to fail and go on to the next result.

To get this to work you need to change

(unless reftex-syntax-table
  (setq reftex-syntax-table (copy-syntax-table))
  (modify-syntax-entry ?\( "." reftex-syntax-table)
  (modify-syntax-entry ?\) "." reftex-syntax-table))


(unless reftex-syntax-table
  (setq reftex-syntax-table (copy-syntax-table))
  (modify-syntax-entry ?\( "(" reftex-syntax-table)
  (modify-syntax-entry ?\) ")" reftex-syntax-table))

in reftex.el (in my version it is on line 314). However, there is some reason that the developers went out of there way to make () punctuation (which I do not know) which makes me a little nervous about making this change.

edit: patch submitted to auctex.devel http://article.gmane.org/gmane.emacs.auctex.devel/2707/

share|improve this answer

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.