1

I use Emacs with RefTeX all the times. When I run C-c [ that is the function M-x reftex-citation, the following selection buffer open


screenshot of emacs C-c [ selection

then I select one of the option, and the Minibuffer prompt to a search in the .bib database. I wonder if it is possible to customize this command in a way that the selection step above is simplified.

I only use \cite{} that I modify depending on the bibliography setting I am using, so I don't need to select one of all this formats. Basically I'd like to press C-c [ then I am prompted to search through .bib file, then I select a bib entry and I get \cite{selected-bibkey} in my TeX document.

Any idea on how to achieve this?

1 Answer 1

1

RefTeX is loading support for natbib macros; this is the reason why you are queried for the citation macro. I suspect you're also using AUCTeX in addition to RefTeX and you're loading natbib package as well or are using a document class which loads natbib. I presume you're not fiddling with the variable reftex-cite-format yourself.

If you don't need natbib, comment out the \usepackage line, restart Emacs, load your .tex file again and hit C-c [, it should bring you directly to regexp-query.

1
  • Even if I don't use natbib the bahavior is the same. I just discovered that putting (setq reftex-cite-format nil) before to redefine reftex-cite-format it works, although If I load natbib once again it show up the slection prompt screenshotted above. There must be something that happen when I load the TeX file and RefTeX sees natbib loaded. May 23, 2020 at 6:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .