The
cite
commands copies the
HTMLfile
to standard output, looking for strings of the form [[label]].
The label may not include white space and the double pair of square
brackets must enclose the label without any spaces in between. If
cite
finds the label in the
bibfile,
the string is replaced by the
pattern.
The pattern can include certain variables. If the label is not found
in
bibfile,
it is left unchanged.
The default pattern replaces the string with a hyperlink, but if the
-p
option is used, the replacement can be any pattern. The input doesn't
even have to be HTML.
If the label is enclosed in {{...}} instead of [[...]], it is copied
to the output unchanged and not
replaced by the pattern, but the label is still searched in the
bibfile.
Specifies the pattern by which the string [[label]] is replaced.
The pattern may include the variables
%b
(which will be replaced by the value of the
-b
option),
%m
(which will be replaced by the value of the
-m
option) and
%L
(which will be replaced by the
label).
The default pattern is
<a href="%b#%L" rel="biblioentry">[%L]<!--{{%m%L}}--></a>
All labels that have been found and replaced are also written to a
file. This is so that
mkbib(1)
can find them and create a bibliography. The default
auxfile
is constructed from the name of the
HTMLfile
by removing the last extension (if any) and replacing it by ".aux".
If no
HTMLfile
is given, the default name is "aux.aux".
By default, the program looks for "[[name]]", but it can be
made to look for "[[#name]]" where # is some string, usually a
symbol such as '!' or '='. This allows references to be
classified, e.g., "[[!name]]" for normative references and
"[[name]]" for non-normative references.
The name of a bibliographic database must be given. It must be a file
in
refer(1)
format and every entry must have at least a
%L
field, which is used as label. (Entries without such a field will be
ignored.)
HTMLfile
The name of the input file is optional. If absent,
cite
will read from stdin. The file in fact does not have to be an HTML
file, but the default pattern (see the
-p
option) assumes HTML.
refer(1)
does not require the
%L
(label) field to be present in every entry. However,
cite
does not implement
refer's
keyword search and requires a key instead.