When using emacs+reftex-mode I may hit "
C-c [" and get a nice citation search menu for
\cite command. Is there a way to get the same menu for
csquotes' integrated quotations (e.g.
The simplest way would probably be to add to your .emacs configuration the following (for the
(TeX-add-symbols '("textquote" [ TeX-arg-cite ] [ "Punctuation" ] t) )
(see AUCTeX adding Macros doc)
TeX-arg-cite should call the RefTeX citation search. It seems to behave oddly, as even if it's defined as an optional argument, it forces you to choose a citation.
The is also a way to add environment, so
(LaTeX-add-environments `("displayquote" LaTeX-env-args [TeX-arg-cite [ "Punctuation" ] t]))
should define the
displayquote environment according to the documentation, but for some reasons, that doesn't work for me.
As explained in the documentation, it would be cleaner to do this in a style hook to define the commands only for buffers that actually use the csquotes package:
(TeX-add-style-hook "csquotes" (lambda () (TeX-add-symbols '("textquote" [ TeX-arg-cite ] [ "Punctuation" ] t) ) (LaTeX-add-environments `("displayquote" LaTeX-env-args [TeX-arg-cite [ "Punctuation" ] t]) ) ) )
However, you should check that you do not override some AUCTeX default when doing this.
The not so clean way of doing it would be to hack a new cite format for the quotation by specifying a new reftex-cite-format, but that seems quite ugly to me.