1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
.TH ORDERREFS 1L "2 June 2004" ""
.SH NAME
orderrefs \- order the references in a LaTeX document in order of citation
.SH SYNOPSIS
.B orderrefs [options] [file]
.SH DESCRIPTION
.I Orderrefs
rearranges the bibitems in a LaTeX file in the order in which they are
cited.
.PP
It determines the order of citations from the aux file, so as to be
immune from the many possibilities of the \\cite commands being
redefined by macro packages. Therefore you should run \fIlatex\fR on
the LaTeX file before running \fIorderrefs\fR, in order to ensure that
the aux file exists and is up-to-date. Uncited bibitems and bibitems
with an explicit label are kept in the order they are in the original
file, after the list of ordered bibitems.
If the bibitems are correctly ordered, no change is made to the files.
If they need to be reordered, the original LaTeX file is replaced by a
file with the reordered bibitems, and a backup copy is made of the
original LaTeX file, in a file with the same name as the LaTeX file,
but with .bak added.
The bibitems are identified as being in a LaTeX environment with a
name that, by default, is "thebibliography". In the LaTeX file, it is
assumed that the \\begin{thebibliography}, the \\end{thebibliography},
and the \\bibitem commands all start a line preceeded at most by white
space.
.SH ORDERREFS OPTIONS AND ARGUMENTS
.TP
.B file
At most one file can be specified. If no files are specified,
\fIorderrefs\fR will print a brief help message.
If a file is specified without an extension, then the ".tex" extension is
automatically added, just as LaTeX does. (e.g. If you specify:
orderrefs foo
then \fIorderrefs\fR will operate on the file "foo.tex".
.TP
.B -b name
synonym for --bibname=name
.TP
.B --bibname=name
specifies name of LaTeX environment containing
the bibliography. (Default: "thebibliography".)
.TP
.B -a file
synonym for --auxfile=file
.TP
.B --auxfile=file
specifies name of .aux file. (Default is constructed
from name of LaTeX file with extension .aux.)
.TP
.B -h, --help
Print help information.
.TP
.B -v, --version
Show version information
.SH EXAMPLES
To reorder the citations in the file
.B thesis.tex
first run latex on it:
.IP
.B latex thesis
.PP
then orderrefs:
.IP
.B orderrefs thesis
.PP
If the bibliography is in a file
.B refs.tex
which is input from the main file
.B thesis.tex
then you should do
.IP
.B latex thesis
.IP
.B orderrefs --auxfile=thesis.aux refs
.PP
.SH AVAILABILITY
See the home page at
.IP
http://www.phys.psu.edu/~collins/software/orderrefs/
.PP
.SH SEE ALSO
latex(1).
.SH BUGS
None known.
.SH IDENTIFICATION
Current version by John Collins (collins at phys.psu.edu). (Version 1.00).
|