Download RefTEX User Manual

Transcript
Chapter 4: Citations
14
4 Citations
Citations in LaTeX are done with the \cite macro or variations of it. The argument of
the macro is a citation key which identifies an article or book in either a BibTeX database
file or in an explicit thebibliography environment in the document. RefTEX’s support for
citations helps to select the correct key quickly.
4.1 Creating Citations
In order to create a citation, press C-c [. RefTEX then prompts for a regular expression
which will be used to search through the database and present the list of matches to choose
from in a selection process similar to that for selecting labels (see Section 3.2 [Referencing
Labels], page 6).
The regular expression uses an extended syntax: ‘&&’ defines a logic and for regular
expressions. For example ‘Einstein&&Bose’ will match all articles which mention BoseEinstein condensation, or which are co-authored by Bose and Einstein. When entering the
regular expression, you can complete on known citation keys.
RefTEX prefers to use BibTeX database files specified with a \bibliography macro to
collect its information. Just like BibTeX, it will search for the specified files in the current
directory and along the path given in the environment variable BIBINPUTS. If you do not
use BibTeX, but the document contains an explicit thebibliography environment, RefTEX
will collect its information from there. Note that in this case the information presented in
the selection buffer will just be a copy of relevant \bibitem entries, not the structured
listing available with BibTeX database files.
In the selection buffer, the following keys provide special commands. A summary of this
information is always available from the selection process by pressing ?.
0-9,-
Prefix argument.
a
Accept all entries in the selection buffer and create a single \cite macro referring to them.
A
Accept all entries in the selection buffer and create a \cite macro for each of
it.
f
Toggle follow mode. When follow mode is active, the other window will always
display the full database entry of the current article. This is equivalent to
pressing hSPCi after each cursor motion. With BibTeX entries, follow mode can
be rather slow.
g
Start over with a new regular expression. The full database will be rescanned
with the new expression (see also r).
n
Go to next article.
p
Go to previous article.
q
Exit the selection process without inserting a citation into the buffer.
r
Refine the current selection with another regular expression. This will not
rescan the entire database, but just the already selected entries.