Previous: , Up: Citations   [Contents][Index]

2.2 Recognizing Citations

Supercite also recognizes citations in the original article, and can transform these already cited lines in a number of ways. This is how Supercite suppresses the multiple citing of non-nested citations. Recognition of cited lines is controlled by variables analogous to those that make up the citation string as mentioned previously.

The variable sc-citation-leader-regexp describes how citation leaders can look, by default it matches any number of spaces or tabs. Note that since the lisp function looking-at is used to do the matching, if you change this variable it need not start with a leading "^".

Similarly, the variables sc-citation-delimiter-regexp and sc-citation-separator-regexp respectively describe how citation delimiters and separators can look. They follow the same rule as sc-citation-leader-regexp above.

When Supercite composes a citation string, it provides the attribution automatically. The analogous variable which handles recognition of the attribution part of citation strings is sc-citation-root-regexp. This variable describes the attribution root for both nested and non-nested citations. By default it can match zero-to-many alphanumeric characters (also “.”, “-”, and “_”). But in some situations, Supercite has to determine whether it is looking at a nested or non-nested citation. Thus the variable sc-citation-nonnested-root-regexp is used to describe only non-nested citation roots. It is important to remember that if you change sc-citation-root-regexp you should always also change sc-citation-nonnested-root-regexp.