~durga/maus/rel709

« back to all changes in this revision

Viewing changes to doc/doc_src/detectors/tracker/01-Current/99-Styles/revtex4-1/revtex4-1-tds/tex/latex/revtex/reftest4-1.tex

  • Committer: Durga Rajaram
  • Date: 2013-08-27 04:36:50 UTC
  • mfrom: (659.1.73 rc)
  • Revision ID: durga@fnal.gov-20130827043650-me0hgsbzlzikdoik
Tags: MAUS-v0.7.0
MAUS-v0.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
% ****** Start of file reftest.tex ******
 
2
%
 
3
%   This file is part of the APS files in the REVTeX 4.1 distribution.
 
4
%   Version 4.1 of REVTeX, July 1, 2008.
 
5
%
 
6
%   Copyright (c) 2009 The American Physical Society.
 
7
%
 
8
%   See the REVTeX 4.1 README file for restrictions and more information.
 
9
%
 
10
\documentclass{revtex4}%
 
11
\begin{document}%
 
12
 
 
13
\typeout{Filename: reftest4-1.tex for revtex 4.1i 2009/10/19 (AO)}
 
14
% This document, when typeset, prompts for the name of a LaTeX auxiliary (.aux) file 
 
15
% and then processes that file, paying attention to 
 
16
% keys that have been cited (via \citation)
 
17
% or defined (via \bibcite).
 
18
% It then prints out diagnostics indicating 
 
19
% * any keys that were cited but never defined,
 
20
% * any keys that were defined but never cited, and
 
21
% * keys that were cited and defined, but not in the same order.
 
22
%
 
23
% BibTeX takes care of such things automatically,
 
24
% so there is little use for such a test when using BibTeX.
 
25
%
 
26
% A separate question: will this file run under revtex4.cls?
 
27
% I can see two lines in my .aux with the potential for problems: 
 
28
% \global \mathchardef \firstnote@num\z@ \relax 
 
29
% \global\NAT@numberstrue
 
30
 
 
31
\makeatletter
 
32
 
 
33
\def\g@bbletw@#1#2{}%
 
34
\def\g@bble@ne#1{}%
 
35
 
 
36
\let\bibdata\g@bble@ne
 
37
\let\newlabel\g@bbletw@
 
38
\let\@writefile\g@bbletw@
 
39
\let\bibstyle\g@bble@ne
 
40
 
 
41
\@tempcnta\z@
 
42
\@tempcntb\z@
 
43
 
 
44
\def\bibcite#1#2{%
 
45
 \advance\@tempcnta\@ne
 
46
 \expandafter\bib@one\csname bib#1\expandafter\endcsname\expandafter{\the\@tempcnta}{#1}%
 
47
}
 
48
 
 
49
\def\bib@one#1#2#3{%
 
50
 \@ifnotrelax#1{%
 
51
  \typeout{*** Tag "#3" used in more than one \string\bibitem.}%
 
52
  \typeout{\space\space\space\space You must correct this problem before continuing (Bailing out).}%
 
53
  \@@end
 
54
 }{%
 
55
  \def#1{#2}%
 
56
  \expandafter\def\csname bib@num#2\endcsname{#3}%
 
57
 }%
 
58
}%
 
59
 
 
60
\def\citation#1{%
 
61
 \@for\@tempa:={#1}\do{%
 
62
  \expandafter\cite@one\csname cite\@tempa\expandafter\endcsname\expandafter{\@tempa}%
 
63
 }%
 
64
}
 
65
 
 
66
\def\cite@one#1#2{%
 
67
 \expandafter\@ifx\expandafter{\csname cite*\endcsname#1}{%
 
68
  \@booleantrue\@cite@star@sw
 
69
 }{%
 
70
  \@ifnotrelax#1{%
 
71
  }{%
 
72
   \advance\@tempcntb\@ne
 
73
   \expandafter\cite@one@\expandafter#1\expandafter{\the\@tempcntb}{#2}%
 
74
  }%
 
75
 }%
 
76
}%
 
77
\expandafter\def\csname cite*\endcsname{*}%
 
78
\@booleanfalse\@cite@star@sw
 
79
 
 
80
\def\cite@one@#1#2#3{%
 
81
 \def#1{#2}%
 
82
 \expandafter\def\csname cite@num#2\endcsname{#3}%
 
83
}%
 
84
 
 
85
\def\strut{\vrule height12pt depth4pt width0pt}%
 
86
 
 
87
\typein[\filename]{Type in file name (no extension)}%
 
88
\expandafter\input\expandafter{\filename.aux}%
 
89
 
 
90
\expandafter\def\expandafter\bibtotal\expandafter{\the\@tempcnta}%
 
91
\expandafter\def\expandafter\citetotal\expandafter{\the\@tempcntb}%
 
92
 
 
93
\def\app@undefined#1#2#3{%
 
94
 \expandafter\@ifnotrelax\csname#2#1\endcsname{}{%
 
95
   \appdef#3{#1, }%
 
96
  }
 
97
}%
 
98
 
 
99
\let\uncitedbibs\@empty
 
100
\@tempcnta\z@
 
101
\@ifnum{\bibtotal>\@tempcnta}{%
 
102
 \loopwhile{%
 
103
  \advance\@tempcnta\@ne
 
104
  \expandafter\app@undefined\csname bib@num\the\@tempcnta\endcsname{cite}\uncitedbibs
 
105
  \@ifnum{\bibtotal>\@tempcnta}%
 
106
 }%
 
107
}%
 
108
 
 
109
\let\undefinedcites\@empty
 
110
\@tempcnta\z@
 
111
\@ifnum{\citetotal>\@tempcnta}{%
 
112
 \loopwhile{%
 
113
  \advance\@tempcnta\@ne
 
114
  \expandafter\app@undefined\csname cite@num\the\@tempcnta\endcsname{bib}\undefinedcites
 
115
  \@ifnum{\citetotal>\@tempcnta}%
 
116
 }%
 
117
}%
 
118
 
 
119
\def\addit@bad#1#2{%
 
120
 \expandafter\@ifnotrelax\csname bib#1\endcsname{%
 
121
  \@ifx{#1#2}{%
 
122
   \addit{#1}{OK}%
 
123
  }{%
 
124
   \advance\@tempcntb\@ne
 
125
   \addit{#1}{\bf Out of order}%
 
126
  }%
 
127
 }{%
 
128
  \addit{#1}{\bf Undefined}%
 
129
 }%
 
130
}%
 
131
\def\ordertable{}%
 
132
\def\table@line#1#2{%
 
133
  \hbox to\hsize{%
 
134
   \vrule
 
135
   \hbox to.5\hsize{\ #1\hss}%
 
136
   \hss\vrule\hss\strut
 
137
   \hbox to.5\hsize{\ #2\hss}%
 
138
   \vrule
 
139
  }%
 
140
  \hrule
 
141
  \vskip\z@skip
 
142
}%
 
143
\def\addit#1#2{%
 
144
 \appdef\ordertable{\table@line{#1}{#2}}%
 
145
}%
 
146
 
 
147
\@tempcnta\z@
 
148
\@tempcntb\z@
 
149
\@ifnum{\citetotal>\@tempcnta}{%
 
150
 \loopwhile{%
 
151
  \advance\@tempcnta\@ne
 
152
  \expandafter\addit@bad\csname cite@num\the\@tempcnta\expandafter\endcsname\csname bib@num\the\@tempcnta\endcsname
 
153
  \@ifnum{\citetotal>\@tempcnta}%
 
154
 }%
 
155
}{}%
 
156
\expandafter\def\expandafter\citesdisordered\expandafter{\the\@tempcntb}%
 
157
 
 
158
Analysis of \filename.aux, according to rules of \emph{Physical Review}:
 
159
All bibitems must occur in the bibliography in order of their first citation in the
 
160
file, and all bibitems must be cited in the paper.
 
161
 
 
162
\def\@tempa{\textbf{Bibitems that were not explicitly cited:} }%
 
163
\@ifx@empty\uncitedbibs{%
 
164
 \appdef\@tempa{none.}%
 
165
}{%
 
166
 \appdef\@tempa{\uncitedbibs\ \@cite@star@sw{were implicitly cited.}{please cite or remove bibitem(s).}}%
 
167
}%
 
168
\@tempa\expandafter\typeout\expandafter{\@tempa}\par
 
169
 
 
170
\def\@tempa{\textbf{Citations not defined in bibliography:} }%
 
171
\@ifx@empty\undefinedcites{%
 
172
 \appdef\@tempa{none.}%
 
173
}{%
 
174
 \appdef\@tempa{\undefinedcites\space please add bibitem(s) or remove cite(s).}%
 
175
}%
 
176
\@tempa\expandafter\typeout\expandafter{\@tempa}\par
 
177
 
 
178
\@ifnum{\citesdisordered=\z@}{%
 
179
 \def\@tempa{\textbf{The order of the bibitems is OK.}}%
 
180
 \@tempa\expandafter\typeout\expandafter{\@tempa}\par
 
181
}{%
 
182
 \def\@tempa{%
 
183
  \textbf{There 
 
184
  \@ifnum{\citesdisordered<\tw@}{was an error}{were \citesdisordered\ errors}
 
185
  in the order of your bibitems.}%
 
186
 }%
 
187
 \@tempa\expandafter\typeout\expandafter{\@tempa}
 
188
 \@ifx@empty\uncitedbibs{\@ifx@empty\undefinedcites{\true@sw}{\false@sw}}{\false@sw}%
 
189
 {(This is in addition to the problems noted above.) }{}%
 
190
 Please check the following table to see what the problems were.
 
191
 Status in boldface signifies that a correction is needed. \par
 
192
}%
 
193
 \emph{NOTE:
 
194
  This table is a complete listing of all your citations, in order of their first occurrence: 
 
195
  your bibitems should be in the order shown in the first column of this table.
 
196
 }\par
 
197
 \small
 
198
 \smallskip
 
199
 \hrule
 
200
 \table@line{\textbf{Citation key}}{\textbf{Status}}%
 
201
 \smallskip
 
202
 \hrule
 
203
 \ordertable
 
204
\end{document}
 
205
% ****** End of file reftest.tex ******