566
|
1 |
\def\currversion{April 15, 2008}
|
|
2 |
|
|
3 |
%*****************************************************************%
|
|
4 |
%* *%
|
|
5 |
%* Prepared by Amy Hendrickson, TeXnology Inc. *%
|
|
6 |
%* Copyright (C) 2004 by Amy Hendrickson, TeXnology Inc., *%
|
|
7 |
%* All rights reserved. *%
|
|
8 |
%* *%
|
|
9 |
%* TeXnology Inc.: 617 738-8029 *%
|
|
10 |
%* amyh@texnology.com *%
|
|
11 |
%* www.texnology.com *%
|
|
12 |
%* *%
|
|
13 |
%* For assistance, please contact the PNAS Editorial Office: *%
|
|
14 |
%* 202-334-2679 *%
|
|
15 |
%* pnas@nas.edu *%
|
|
16 |
%* *%
|
|
17 |
%*****************************************************************%
|
|
18 |
|
|
19 |
\typeout{^^J^^J
|
|
20 |
Two Column Journal Style for the^^J
|
|
21 |
Proceedings of the National Academy of Science
|
|
22 |
^^J
|
|
23 |
Written by Amy Hendrickson, TeXnology, Inc., 9/04^^J
|
|
24 |
^^J
|
|
25 |
This version is dated \currversion^^J^^J}
|
|
26 |
|
|
27 |
\ProvidesClass{pnastwo}
|
|
28 |
\newcommand\@ptsize{}
|
|
29 |
\newif\if@restonecol
|
|
30 |
\newif\if@titlepage
|
|
31 |
\@titlepagefalse
|
|
32 |
\if@compatibility\else
|
|
33 |
\DeclareOption{a4paper}
|
|
34 |
{\setlength\paperheight {297mm}%
|
|
35 |
\setlength\paperwidth {210mm}}
|
|
36 |
\DeclareOption{a5paper}
|
|
37 |
{\setlength\paperheight {210mm}%
|
|
38 |
\setlength\paperwidth {148mm}}
|
|
39 |
\DeclareOption{b5paper}
|
|
40 |
{\setlength\paperheight {250mm}%
|
|
41 |
\setlength\paperwidth {176mm}}
|
|
42 |
\DeclareOption{letterpaper}
|
|
43 |
{\setlength\paperheight {11in}%
|
|
44 |
\setlength\paperwidth {8.5in}}
|
|
45 |
\DeclareOption{legalpaper}
|
|
46 |
{\setlength\paperheight {14in}%
|
|
47 |
\setlength\paperwidth {8.5in}}
|
|
48 |
\DeclareOption{executivepaper}
|
|
49 |
{\setlength\paperheight {10.5in}%
|
|
50 |
\setlength\paperwidth {7.25in}}
|
|
51 |
\DeclareOption{landscape}
|
|
52 |
{\setlength\@tempdima {\paperheight}%
|
|
53 |
\setlength\paperheight {\paperwidth}%
|
|
54 |
\setlength\paperwidth {\@tempdima}}
|
|
55 |
\fi
|
|
56 |
\if@compatibility
|
|
57 |
\renewcommand\@ptsize{0}
|
|
58 |
\else
|
|
59 |
\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
|
|
60 |
\fi
|
|
61 |
\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
|
|
62 |
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
|
|
63 |
\if@compatibility\else
|
|
64 |
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
|
|
65 |
\fi
|
|
66 |
\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
|
|
67 |
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
|
|
68 |
\if@compatibility\else
|
|
69 |
\DeclareOption{final}{\setlength\overfullrule{0pt}}
|
|
70 |
\fi
|
|
71 |
\DeclareOption{titlepage}{\@titlepagetrue}
|
|
72 |
\if@compatibility\else
|
|
73 |
\DeclareOption{notitlepage}{\@titlepagefalse}
|
|
74 |
\fi
|
|
75 |
\if@compatibility\else
|
|
76 |
\DeclareOption{onecolumn}{\@twocolumnfalse}
|
|
77 |
\fi
|
|
78 |
\DeclareOption{twocolumn}{\@twocolumntrue}
|
|
79 |
\DeclareOption{leqno}{\input{leqno.clo}}
|
|
80 |
\DeclareOption{fleqn}{\input{fleqn.clo}}
|
|
81 |
\DeclareOption{openbib}{%
|
|
82 |
\AtEndOfPackage{%
|
|
83 |
\renewcommand\@openbib@code{%
|
|
84 |
\advance\leftmargin\bibindent
|
|
85 |
\itemindent -\bibindent
|
|
86 |
\listparindent \itemindent
|
|
87 |
\parsep \z@
|
|
88 |
}%
|
|
89 |
\renewcommand\newblock{\par}}%
|
|
90 |
}
|
|
91 |
\ExecuteOptions{letterpaper,twoside,onecolumn,final}
|
|
92 |
\ProcessOptions
|
|
93 |
%% size10.clo ==>>
|
|
94 |
\renewcommand\normalsize{%
|
|
95 |
\@setfontsize\normalsize\@ixpt\@xpt
|
|
96 |
\abovedisplayskip 8\p@ \@plus2\p@ \@minus5\p@
|
|
97 |
\abovedisplayshortskip \z@ \@plus3\p@
|
|
98 |
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
|
|
99 |
\belowdisplayskip \abovedisplayskip
|
|
100 |
\topsep 0\p@
|
|
101 |
\parsep 0\p@
|
|
102 |
\let\@listi\@listI}
|
|
103 |
\normalsize
|
|
104 |
\topsep 0\p@
|
|
105 |
\parsep 0\p@
|
|
106 |
|
|
107 |
\newcommand\small{%
|
|
108 |
\@setfontsize\small\@viiipt{9}%
|
|
109 |
\abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
|
|
110 |
\abovedisplayshortskip \z@ \@plus2\p@
|
|
111 |
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
|
|
112 |
\def\@listi{\leftmargin\leftmargini
|
|
113 |
\topsep 0\p@
|
|
114 |
\parsep 0\p@
|
|
115 |
\itemsep \parsep}%
|
|
116 |
\belowdisplayskip \abovedisplayskip
|
|
117 |
}
|
|
118 |
\newcommand\footnotesize{%
|
|
119 |
\@setfontsize\footnotesize\@vipt{7}%
|
|
120 |
\abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
|
|
121 |
\abovedisplayshortskip \z@ \@plus\p@
|
|
122 |
\belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
|
|
123 |
\def\@listi{\leftmargin\leftmargini
|
|
124 |
\topsep 3\p@ \@plus\p@ \@minus\p@
|
|
125 |
\parsep 2\p@ \@plus\p@ \@minus\p@
|
|
126 |
\itemsep \parsep}%
|
|
127 |
\belowdisplayskip \abovedisplayskip
|
|
128 |
}
|
|
129 |
\newcommand\scriptsize{\@setfontsize\scriptsize\@vpt\@viipt}
|
|
130 |
\newcommand\tiny{\@setfontsize\tiny\@vpt\@vipt}
|
|
131 |
\newcommand\large{\@setfontsize\large\@xiipt{14}}
|
|
132 |
\newcommand\Large{\@setfontsize\Large\@xivpt{18}}
|
|
133 |
\newcommand\LARGE{\@setfontsize\LARGE\@xviipt{22}}
|
|
134 |
\newcommand\huge{\@setfontsize\huge\@xxpt{25}}
|
|
135 |
\newcommand\Huge{\@setfontsize\Huge\@xxvpt{30}}
|
|
136 |
\if@twocolumn
|
|
137 |
\setlength\parindent{1em}
|
|
138 |
\else
|
|
139 |
\setlength\parindent{15\p@}
|
|
140 |
\fi
|
|
141 |
\setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@}
|
|
142 |
\setlength\medskipamount{6\p@ \@plus 2\p@ \@minus 2\p@}
|
|
143 |
\setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@}
|
|
144 |
\setlength\headheight{12\p@}
|
|
145 |
\setlength\headsep {25\p@}
|
|
146 |
\setlength\topskip {10\p@}
|
|
147 |
\setlength\footskip{20\p@}
|
|
148 |
\if@compatibility \setlength\maxdepth{4\p@} \else
|
|
149 |
\setlength\maxdepth{.5\topskip} \fi
|
|
150 |
\if@compatibility
|
|
151 |
\if@twocolumn
|
|
152 |
\setlength\textwidth{410\p@}
|
|
153 |
\else
|
|
154 |
\setlength\textwidth{345\p@}
|
|
155 |
\fi
|
|
156 |
\else
|
|
157 |
\setlength\@tempdima{\paperwidth}
|
|
158 |
\addtolength\@tempdima{-2in}
|
|
159 |
\setlength\@tempdimb{345\p@}
|
|
160 |
\if@twocolumn
|
|
161 |
\ifdim\@tempdima>2\@tempdimb\relax
|
|
162 |
\setlength\textwidth{2\@tempdimb}
|
|
163 |
\else
|
|
164 |
\setlength\textwidth{\@tempdima}
|
|
165 |
\fi
|
|
166 |
\else
|
|
167 |
\ifdim\@tempdima>\@tempdimb\relax
|
|
168 |
\setlength\textwidth{\@tempdimb}
|
|
169 |
\else
|
|
170 |
\setlength\textwidth{\@tempdima}
|
|
171 |
\fi
|
|
172 |
\fi
|
|
173 |
\fi
|
|
174 |
\if@compatibility\else
|
|
175 |
\@settopoint\textwidth
|
|
176 |
\fi
|
|
177 |
\if@compatibility
|
|
178 |
\setlength\textheight{43\baselineskip}
|
|
179 |
\else
|
|
180 |
\setlength\@tempdima{\paperheight}
|
|
181 |
\addtolength\@tempdima{-2in}
|
|
182 |
\addtolength\@tempdima{-1.5in}
|
|
183 |
\divide\@tempdima\baselineskip
|
|
184 |
\@tempcnta=\@tempdima
|
|
185 |
\setlength\textheight{\@tempcnta\baselineskip}
|
|
186 |
\fi
|
|
187 |
\addtolength\textheight{\topskip}
|
|
188 |
\if@twocolumn
|
|
189 |
\setlength\marginparsep {10\p@}
|
|
190 |
\else
|
|
191 |
\setlength\marginparsep{11\p@}
|
|
192 |
\fi
|
|
193 |
\setlength\marginparpush{5\p@}
|
|
194 |
\if@compatibility
|
|
195 |
\if@twoside
|
|
196 |
\setlength\oddsidemargin {44\p@}
|
|
197 |
\setlength\evensidemargin {82\p@}
|
|
198 |
\setlength\marginparwidth {107\p@}
|
|
199 |
\else
|
|
200 |
\setlength\oddsidemargin {63\p@}
|
|
201 |
\setlength\evensidemargin {63\p@}
|
|
202 |
\setlength\marginparwidth {90\p@}
|
|
203 |
\fi
|
|
204 |
\if@twocolumn
|
|
205 |
\setlength\oddsidemargin {30\p@}
|
|
206 |
\setlength\evensidemargin {30\p@}
|
|
207 |
\setlength\marginparwidth {48\p@}
|
|
208 |
\fi
|
|
209 |
\else
|
|
210 |
\if@twoside
|
|
211 |
\setlength\@tempdima {\paperwidth}
|
|
212 |
\addtolength\@tempdima {-\textwidth}
|
|
213 |
\setlength\oddsidemargin {.4\@tempdima}
|
|
214 |
\addtolength\oddsidemargin {-1in}
|
|
215 |
\setlength\marginparwidth {.6\@tempdima}
|
|
216 |
\addtolength\marginparwidth {-\marginparsep}
|
|
217 |
\addtolength\marginparwidth {-0.4in}
|
|
218 |
\else
|
|
219 |
\setlength\@tempdima {\paperwidth}
|
|
220 |
\addtolength\@tempdima {-\textwidth}
|
|
221 |
\setlength\oddsidemargin {.5\@tempdima}
|
|
222 |
\addtolength\oddsidemargin {-1in}
|
|
223 |
\setlength\marginparwidth {.5\@tempdima}
|
|
224 |
\addtolength\marginparwidth {-\marginparsep}
|
|
225 |
\addtolength\marginparwidth {-0.4in}
|
|
226 |
\addtolength\marginparwidth {-.4in}
|
|
227 |
\fi
|
|
228 |
\ifdim \marginparwidth >2in
|
|
229 |
\setlength\marginparwidth{2in}
|
|
230 |
\fi
|
|
231 |
\@settopoint\oddsidemargin
|
|
232 |
\@settopoint\marginparwidth
|
|
233 |
\setlength\evensidemargin {\paperwidth}
|
|
234 |
\addtolength\evensidemargin{-2in}
|
|
235 |
\addtolength\evensidemargin{-\textwidth}
|
|
236 |
\addtolength\evensidemargin{-\oddsidemargin}
|
|
237 |
\@settopoint\evensidemargin
|
|
238 |
\fi
|
|
239 |
\if@compatibility
|
|
240 |
\setlength\topmargin{27pt}
|
|
241 |
\else
|
|
242 |
\setlength\topmargin{\paperheight}
|
|
243 |
\addtolength\topmargin{-2in}
|
|
244 |
\addtolength\topmargin{-\headheight}
|
|
245 |
\addtolength\topmargin{-\headsep}
|
|
246 |
\addtolength\topmargin{-\textheight}
|
|
247 |
\addtolength\topmargin{-\footskip} % this might be wrong!
|
|
248 |
\addtolength\topmargin{-.5\topmargin}
|
|
249 |
\@settopoint\topmargin
|
|
250 |
\fi
|
|
251 |
\setlength\footnotesep{6.65\p@}
|
|
252 |
\setlength{\skip\footins}{19\p@ \@plus 4\p@ \@minus 2\p@}
|
|
253 |
\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
|
|
254 |
\setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
|
|
255 |
\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
|
|
256 |
\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
|
|
257 |
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
|
|
258 |
\setlength\@fptop{0\p@ \@plus 1fil}
|
|
259 |
\setlength\@fpsep{8\p@ \@plus 2fil}
|
|
260 |
\setlength\@fpbot{0\p@ \@plus 1fil}
|
|
261 |
\setlength\@dblfptop{0\p@ \@plus 1fil}
|
|
262 |
\setlength\@dblfpsep{8\p@ \@plus 2fil}
|
|
263 |
\setlength\@dblfpbot{0\p@ \@plus 1fil}
|
|
264 |
\setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}
|
|
265 |
\def\@listi{\leftmargin\leftmargini
|
|
266 |
\parsep 1sp%4\p@ \@plus2\p@ \@minus\p@
|
|
267 |
\topsep 8\p@ \@plus2\p@ \@minus4\p@
|
|
268 |
\itemsep1sp%4\p@ \@plus2\p@ \@minus\p@
|
|
269 |
}
|
|
270 |
\let\@listI\@listi
|
|
271 |
\@listi
|
|
272 |
|
|
273 |
\def\@listii {\leftmargin\leftmarginii
|
|
274 |
\labelwidth\leftmarginii
|
|
275 |
\advance\labelwidth-\labelsep
|
|
276 |
\topsep 4\p@ \@plus2\p@ \@minus\p@
|
|
277 |
\parsep 2\p@ \@plus\p@ \@minus\p@
|
|
278 |
\itemsep \parsep}
|
|
279 |
\def\@listiii{\leftmargin\leftmarginiii
|
|
280 |
\labelwidth\leftmarginiii
|
|
281 |
\advance\labelwidth-\labelsep
|
|
282 |
\topsep 2\p@ \@plus\p@\@minus\p@
|
|
283 |
\parsep \z@
|
|
284 |
\partopsep \p@ \@plus\z@ \@minus\p@
|
|
285 |
\itemsep \topsep}
|
|
286 |
\def\@listiv {\leftmargin\leftmarginiv
|
|
287 |
\labelwidth\leftmarginiv
|
|
288 |
\advance\labelwidth-\labelsep}
|
|
289 |
\def\@listv {\leftmargin\leftmarginv
|
|
290 |
\labelwidth\leftmarginv
|
|
291 |
\advance\labelwidth-\labelsep}
|
|
292 |
\def\@listvi {\leftmargin\leftmarginvi
|
|
293 |
\labelwidth\leftmarginvi
|
|
294 |
\advance\labelwidth-\labelsep}
|
|
295 |
|
|
296 |
|
|
297 |
%% <<== size10.clo
|
|
298 |
|
|
299 |
\setlength\lineskip{1\p@}
|
|
300 |
\setlength\normallineskip{1\p@}
|
|
301 |
\renewcommand\baselinestretch{}
|
|
302 |
\setlength\parskip{0\p@ \@plus \p@}
|
|
303 |
\@lowpenalty 51
|
|
304 |
\@medpenalty 151
|
|
305 |
\@highpenalty 301
|
|
306 |
\setcounter{topnumber}{2}
|
|
307 |
\renewcommand\topfraction{.7}
|
|
308 |
\setcounter{bottomnumber}{1}
|
|
309 |
\renewcommand\bottomfraction{.3}
|
|
310 |
\setcounter{totalnumber}{3}
|
|
311 |
\renewcommand\textfraction{.2}
|
|
312 |
\renewcommand\floatpagefraction{.5}
|
|
313 |
\setcounter{dbltopnumber}{2}
|
|
314 |
\renewcommand\dbltopfraction{.7}
|
|
315 |
\renewcommand\dblfloatpagefraction{.5}
|
|
316 |
|
|
317 |
\newif\iftitlepage
|
|
318 |
\def\ps@headings{%
|
|
319 |
\let\@evenhead\relax
|
|
320 |
\def\@oddhead{\hfill\rlap{\hskip14pt\vtop to 0pt{\vskip-1pt\makesidesquares
|
|
321 |
\vss}}}%
|
|
322 |
\def\@oddfoot{{\dospecialaccents%
|
|
323 |
\iftitlepage\global\titlepagefalse%
|
|
324 |
\footlinefont
|
|
325 |
\ifodd\c@page
|
|
326 |
\hbox to \textwidth{\footlinefont \let\it\footlineit
|
|
327 |
\theurl\hfill\footlinefont PNAS\hskip6pt \vrule depth 2pt\hskip6pt
|
|
328 |
{\foliofont\theissuedate}\hskip6pt\vrule\hskip6pt\thevolume\hskip6pt
|
|
329 |
\vrule\hskip6pt\theissuenumber\hskip6pt \vrule\hskip6pt
|
|
330 |
\the\c@page{\footlineit--}\expandafter\ifx\csname
|
|
331 |
lastpage\endcsname\relax ??\else\lastpage\fi}%
|
|
332 |
\else
|
|
333 |
\hbox to \textwidth{\footlinefont \let\it\footlineit
|
|
334 |
{\foliofont\the\c@page{\footlineit--}\expandafter\ifx\csname
|
|
335 |
lastpage\endcsname\relax ??\else\lastpage\fi}\hskip6pt
|
|
336 |
\vrule depth 2pt\hskip6pt PNAS\hskip6pt
|
|
337 |
\vrule\hskip6pt{\foliofont\theissuedate}\hskip6pt\vrule\hskip6pt
|
|
338 |
\thevolume\hskip6pt\vrule\hskip6pt\theissuenumber\hfill
|
|
339 |
\theurl}%
|
|
340 |
\fi\else%
|
|
341 |
\ifodd\c@page
|
|
342 |
\hbox to\textwidth{{\let\it\footlineit\footlinefont\thefootlineauthor}\hfill
|
|
343 |
\footlinefont PNAS\hskip6pt\vrule depth 2pt\hskip6pt{\foliofont\theissuedate}%
|
|
344 |
\hskip6pt\vrule depth2pt\hskip6pt\thevolume\hskip6pt\vrule depth 2pt\hskip6pt\theissuenumber\hskip6pt\vrule\hskip6pt{\foliofont\the\c@page}}%
|
|
345 |
\else%
|
|
346 |
\hbox to\textwidth{\let\it\footlineit\footlinefont{\foliofont \the\c@page}%
|
|
347 |
\hskip6pt\vrule depth 2pt height 6pt\hskip6pt\theurl\hfill\thefootlineauthor}\fi\fi}}
|
|
348 |
\let\@evenfoot\@oddfoot
|
|
349 |
%
|
|
350 |
\let\@mkboth\markboth
|
|
351 |
\def\sectionmark##1{%
|
|
352 |
\markboth {\MakeUppercase{%
|
|
353 |
\ifnum \c@secnumdepth >\z@
|
|
354 |
\thesection\quad
|
|
355 |
\fi
|
|
356 |
##1}}{}}%
|
|
357 |
\def\subsectionmark##1{%
|
|
358 |
\markright {%
|
|
359 |
\ifnum \c@secnumdepth >\@ne
|
|
360 |
\thesubsection\quad
|
|
361 |
\fi
|
|
362 |
##1}}}
|
|
363 |
|
|
364 |
|
|
365 |
\newcount\affilcount
|
|
366 |
\newcount\saveaffilcount
|
|
367 |
\newcount\c@fnaffilcount
|
|
368 |
\def\affil#1#2{\normalsize\affilfont\ \affilcount=#1
|
|
369 |
\ifnum\affilcount>\saveaffilcount\global\saveaffilcount\affilcount\fi
|
|
370 |
\expandafter\ifx\csname affil\the\affilcount\endcsname\relax
|
|
371 |
\global\advance\c@footnote by1
|
|
372 |
\expandafter\xdef\csname affilsymb\the\affilcount\endcsname%
|
|
373 |
{\the\c@footnote}{$^{\@fnsymbol\c@footnote}$}%
|
|
374 |
\expandafter\gdef\csname affil\the\affilcount\endcsname{#2}\else
|
|
375 |
$^{\expandafter\@fnsymbol\csname affilsymb\the\affilcount\endcsname}$
|
|
376 |
\fi\authorfont}
|
|
377 |
|
|
378 |
\newcommand\maketitle{\par
|
|
379 |
\global\titlepagetrue
|
|
380 |
\begingroup
|
|
381 |
\dospecialaccents
|
|
382 |
\parindent=0pt
|
|
383 |
\def\and{ and }
|
|
384 |
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
|
|
385 |
\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
|
|
386 |
\long\def\@makefntext##1{\parindent0pt\noindent
|
|
387 |
\@textsuperscript{\normalfont\@thefnmark}##1}%
|
|
388 |
\newpage
|
|
389 |
\global\@topnum\z@ % Prevents figures from going at top of page.
|
|
390 |
\@maketitle
|
|
391 |
\@thanks
|
|
392 |
% according to sample, Dec 2007, copyright no longer wanted here
|
|
393 |
% \renewcommand\thefootnote{}%
|
|
394 |
% \footnotetext{\vrule height 8pt width0pt\copyright \thecopyrightyear\ by The % National Academy of Sciences of the USA}
|
|
395 |
\endgroup
|
|
396 |
\setcounter{footnote}{0}%
|
|
397 |
\global\let\thanks\relax
|
|
398 |
\global\let\maketitle\relax
|
|
399 |
\global\let\@maketitle\relax
|
|
400 |
\global\let\@thanks\@empty
|
|
401 |
\global\let\@author\@empty
|
|
402 |
\global\let\@date\@empty
|
|
403 |
\global\let\@title\@empty
|
|
404 |
\global\let\@contributor\@empty
|
|
405 |
\global\let\title\relax
|
|
406 |
\global\let\date\relax
|
|
407 |
\global\let\and\relax
|
|
408 |
}
|
|
409 |
\def\@maketitle{%
|
|
410 |
\global\firsttimetrue
|
|
411 |
%% To get equation numbers in square brackets and bold
|
|
412 |
\gdef\tagform@##1{\maketag@@@{\bf[\hskip1pt\ignorespaces##1\unskip\@@italiccorr\hskip1pt]}}
|
|
413 |
\gdef\@eqnnum{{\normalfont\bf \normalcolor [\hskip1pt\theequation\hskip1pt]}}
|
|
414 |
\newpage
|
|
415 |
\def\\ {\vskip1pt}
|
|
416 |
\let \footnote \thanks
|
|
417 |
{\hsize=\textwidth \raggedright
|
|
418 |
\noindent\huge\baselineskip= 24pt\titlefont \@title \par}%
|
|
419 |
\vskip6pt
|
|
420 |
{\normalsize\authorfont
|
|
421 |
\@author
|
|
422 |
\par
|
|
423 |
{\vskip4pt
|
|
424 |
\raggedright
|
|
425 |
\affilcount=0
|
|
426 |
\footnotesize\affilfont
|
|
427 |
\loop \ifnum\affilcount< \saveaffilcount
|
|
428 |
\expandafter\ifx\csname affil\the\affilcount\endcsname\relax\else
|
|
429 |
$^{\expandafter\@fnsymbol\csname affilsymb\the\affilcount\endcsname}$%
|
|
430 |
\csname affil\the\affilcount\endcsname,\fi
|
|
431 |
\global\advance\affilcount by1
|
|
432 |
\repeat\ifnum\saveaffilcount=1\else\ and \fi
|
|
433 |
$^{\expandafter\@fnsymbol\csname affilsymb\the\affilcount\endcsname}$%
|
|
434 |
\expandafter\csname affil\the\affilcount\endcsname
|
|
435 |
}}%
|
|
436 |
\vskip 4pt%
|
|
437 |
{\affilfont \@contributor}%
|
|
438 |
\par
|
|
439 |
\vskip 1.5em}
|
|
440 |
|
|
441 |
\def\contributor#1{\def\@contributor{#1}}
|
|
442 |
\let\@contributor\relax
|
|
443 |
|
|
444 |
\contributor{Submitted to Proceedings
|
|
445 |
of the National Academy of Sciences of the United States of America}
|
|
446 |
|
|
447 |
|
|
448 |
|
|
449 |
\setcounter{secnumdepth}{3}
|
|
450 |
\newcounter {part}
|
|
451 |
\newcounter {section}
|
|
452 |
\newcounter {subsection}[section]
|
|
453 |
\newcounter {subsubsection}[subsection]
|
|
454 |
\newcounter {paragraph}[subsubsection]
|
|
455 |
\newcounter {subparagraph}[paragraph]
|
|
456 |
\renewcommand \thepart {\@Roman\c@part}
|
|
457 |
\renewcommand \thesection {\@arabic\c@section}
|
|
458 |
\renewcommand\thesubsection {\thesection.\@arabic\c@subsection}
|
|
459 |
\renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection}
|
|
460 |
\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph}
|
|
461 |
\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
|
|
462 |
\newcommand\part{%
|
|
463 |
\if@noskipsec \leavevmode \fi
|
|
464 |
\par
|
|
465 |
\addvspace{4ex}%
|
|
466 |
\@afterindentfalse
|
|
467 |
\secdef\@part\@spart}
|
|
468 |
|
|
469 |
\def\@part[#1]#2{%
|
|
470 |
\ifnum \c@secnumdepth >\m@ne
|
|
471 |
\refstepcounter{part}%
|
|
472 |
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
|
|
473 |
\else
|
|
474 |
\addcontentsline{toc}{part}{#1}%
|
|
475 |
\fi
|
|
476 |
{\parindent \z@ \raggedright
|
|
477 |
\interlinepenalty \@M
|
|
478 |
\normalfont
|
|
479 |
\ifnum \c@secnumdepth >\m@ne
|
|
480 |
\Large\bfseries \partname~\thepart
|
|
481 |
\par\nobreak
|
|
482 |
\fi
|
|
483 |
\huge \bfseries #2%
|
|
484 |
\markboth{}{}\par}%
|
|
485 |
\nobreak
|
|
486 |
\vskip 3ex
|
|
487 |
\@afterheading}
|
|
488 |
\def\@spart#1{%
|
|
489 |
{\parindent \z@ \raggedright
|
|
490 |
\interlinepenalty \@M
|
|
491 |
\normalfont
|
|
492 |
\huge \bfseries #1\par}%
|
|
493 |
\nobreak
|
|
494 |
\vskip 3ex
|
|
495 |
\@afterheading}
|
|
496 |
|
|
497 |
\def\@startsection#1#2#3#4#5#6{%
|
|
498 |
\if@noskipsec \leavevmode \fi
|
|
499 |
\par
|
|
500 |
\@tempskipa #4\relax
|
|
501 |
\@afterindenttrue
|
|
502 |
\ifdim \@tempskipa <\z@
|
|
503 |
\@tempskipa -\@tempskipa \@afterindentfalse
|
|
504 |
\fi
|
|
505 |
\if@nobreak
|
|
506 |
\everypar{}%
|
|
507 |
\else
|
|
508 |
\addpenalty\@secpenalty\addvspace\@tempskipa
|
|
509 |
\fi
|
|
510 |
\@ifstar
|
|
511 |
{\@ssect{#3}{#4}{#5}{#6}}%
|
|
512 |
{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
|
|
513 |
|
|
514 |
\def\@sect#1#2#3#4#5#6[#7]#8{%
|
|
515 |
\ifnum #2>\c@secnumdepth
|
|
516 |
\let\@svsec\@empty
|
|
517 |
\else
|
|
518 |
\refstepcounter{#1}%
|
|
519 |
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
|
|
520 |
\fi
|
|
521 |
\@tempskipa #5\relax
|
|
522 |
\ifdim \@tempskipa>\z@
|
|
523 |
\begingroup
|
|
524 |
#6{%
|
|
525 |
\@hangfrom{\hskip #3\relax\@svsec
|
|
526 |
}%
|
|
527 |
\interlinepenalty \@M #8\@@par}%
|
|
528 |
\endgroup
|
|
529 |
\csname #1mark\endcsname{#7}%
|
|
530 |
\addcontentsline{toc}{#1}{%
|
|
531 |
\ifnum #2>\c@secnumdepth \else
|
|
532 |
\protect\numberline{\csname the#1\endcsname}%
|
|
533 |
\fi
|
|
534 |
#7}%
|
|
535 |
\else
|
|
536 |
\def\@svsechd{%
|
|
537 |
#6{\hskip #3\relax
|
|
538 |
\@svsec #8\ifnum#2=2.\fi}% <<==
|
|
539 |
\csname #1mark\endcsname{#7}%
|
|
540 |
\addcontentsline{toc}{#1}{%
|
|
541 |
\ifnum #2>\c@secnumdepth \else
|
|
542 |
\protect\numberline{\csname the#1\endcsname}%
|
|
543 |
\fi
|
|
544 |
#7}}%
|
|
545 |
\fi
|
|
546 |
\@xsect{#5}}
|
|
547 |
|
|
548 |
\newcommand\section{\@startsection {section}{1}{\z@}%
|
|
549 |
{-10pt \@plus -1ex \@minus -.2ex}%
|
|
550 |
{.5ex }%
|
|
551 |
{\normalfont\Large\bfseries\sectionfont}}
|
|
552 |
\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
|
|
553 |
{10pt\@plus 1ex \@minus .2ex}%
|
|
554 |
{-0.5ex \@plus .2ex}%
|
|
555 |
{\normalfont\large\bfseries\subsectionfont}}
|
|
556 |
\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
|
|
557 |
{-3.25ex\@plus -1ex \@minus -.2ex}%
|
|
558 |
{1.5ex \@plus .2ex}%
|
|
559 |
{\normalfont\normalsize\bfseries}}
|
|
560 |
\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
|
|
561 |
{3.25ex \@plus1ex \@minus.2ex}%
|
|
562 |
{-1em}%
|
|
563 |
{\normalfont\normalsize\bfseries}}
|
|
564 |
\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
|
|
565 |
{3.25ex \@plus1ex \@minus .2ex}%
|
|
566 |
{-1em}%
|
|
567 |
{\normalfont\normalsize\bfseries}}
|
|
568 |
|
|
569 |
\setlength\leftmargini {12pt}
|
|
570 |
\leftmargin \leftmargini
|
|
571 |
\setlength\leftmarginii {12pt}
|
|
572 |
\setlength\leftmarginiii {12pt}
|
|
573 |
\setlength\leftmarginiv {12pt}
|
|
574 |
|
|
575 |
\if@twocolumn
|
|
576 |
\setlength\leftmarginv {.5em}
|
|
577 |
\setlength\leftmarginvi {.5em}
|
|
578 |
\else
|
|
579 |
\setlength\leftmarginv {1em}
|
|
580 |
\setlength\leftmarginvi {1em}
|
|
581 |
\fi
|
|
582 |
\setlength \labelsep {.5em}
|
|
583 |
\setlength \labelwidth{\leftmargini}
|
|
584 |
\addtolength\labelwidth{-\labelsep}
|
|
585 |
\@beginparpenalty -\@lowpenalty
|
|
586 |
\@endparpenalty -\@lowpenalty
|
|
587 |
\@itempenalty -\@lowpenalty
|
|
588 |
\renewcommand\theenumi{\@arabic\c@enumi}
|
|
589 |
\renewcommand\theenumii{\@alph\c@enumii}
|
|
590 |
\renewcommand\theenumiii{\@roman\c@enumiii}
|
|
591 |
\renewcommand\theenumiv{\@Alph\c@enumiv}
|
|
592 |
\newcommand\labelenumi{\theenumi.}
|
|
593 |
\newcommand\labelenumii{(\theenumii)}
|
|
594 |
\newcommand\labelenumiii{\theenumiii.}
|
|
595 |
\newcommand\labelenumiv{\theenumiv.}
|
|
596 |
\renewcommand\p@enumii{\theenumi}
|
|
597 |
\renewcommand\p@enumiii{\theenumi(\theenumii)}
|
|
598 |
\renewcommand\p@enumiv{\p@enumiii\theenumiii}
|
|
599 |
\newcommand\labelitemi{\raise1.5pt\llap{\small\textbullet\hskip2pt}}
|
|
600 |
\newcommand\labelitemii{\normalfont\bfseries \textendash}
|
|
601 |
\newcommand\labelitemiii{\textasteriskcentered}
|
|
602 |
\newcommand\labelitemiv{\textperiodcentered}
|
|
603 |
\newenvironment{description}
|
|
604 |
{\list{}{\labelwidth\z@ \itemindent-\leftmargin
|
|
605 |
\let\makelabel\descriptionlabel}}
|
|
606 |
{\endlist}
|
|
607 |
\newcommand*\descriptionlabel[1]{\hspace\labelsep
|
|
608 |
\normalfont\bfseries #1}
|
|
609 |
|
|
610 |
\def\abstract{\bgroup
|
|
611 |
\parindent=0pt
|
|
612 |
\hsize=\columnwidth
|
|
613 |
\font\it\helveticaboldoblique at 8pt
|
|
614 |
\font\bf\helveticabold at 8pt
|
|
615 |
\def\textit##1{{\it ##1}}
|
|
616 |
\def\textbf##1{{\bf ##1}}
|
|
617 |
\small
|
|
618 |
\abstractfont\dospecialaccents}
|
|
619 |
|
|
620 |
\def\endabstract{\vskip11pt
|
|
621 |
\egroup}
|
|
622 |
|
|
623 |
|
|
624 |
|
|
625 |
\newenvironment{verse}
|
|
626 |
{\let\\\@centercr
|
|
627 |
\list{}{\itemsep \z@
|
|
628 |
\itemindent -1.5em%
|
|
629 |
\listparindent\itemindent
|
|
630 |
\rightmargin \leftmargin
|
|
631 |
\advance\leftmargin 1.5em}%
|
|
632 |
\item\relax}
|
|
633 |
{\endlist}
|
|
634 |
\newenvironment{quotation}
|
|
635 |
{\list{}{\listparindent 1.5em%
|
|
636 |
\itemindent \listparindent
|
|
637 |
\rightmargin \leftmargin
|
|
638 |
\parsep \z@ \@plus\p@}%
|
|
639 |
\item\relax}
|
|
640 |
{\endlist}
|
|
641 |
\newenvironment{quote}
|
|
642 |
{\list{}{\rightmargin\leftmargin}%
|
|
643 |
\item\relax}
|
|
644 |
{\endlist}
|
|
645 |
\if@compatibility
|
|
646 |
\newenvironment{titlepage}
|
|
647 |
{%
|
|
648 |
\if@twocolumn
|
|
649 |
\@restonecoltrue\onecolumn
|
|
650 |
\else
|
|
651 |
\@restonecolfalse\newpage
|
|
652 |
\fi
|
|
653 |
\setcounter{page}\z@
|
|
654 |
}%
|
|
655 |
{\if@restonecol\twocolumn \else \newpage \fi
|
|
656 |
}
|
|
657 |
\else
|
|
658 |
\newenvironment{titlepage}
|
|
659 |
{%
|
|
660 |
\if@twocolumn
|
|
661 |
\@restonecoltrue\onecolumn
|
|
662 |
\else
|
|
663 |
\@restonecolfalse\newpage
|
|
664 |
\fi
|
|
665 |
\setcounter{page}\@ne
|
|
666 |
}%
|
|
667 |
{\if@restonecol\twocolumn \else \newpage \fi
|
|
668 |
\if@twoside\else
|
|
669 |
\setcounter{page}\@ne
|
|
670 |
\fi
|
|
671 |
}
|
|
672 |
\fi
|
|
673 |
\newcommand\appendix{\par
|
|
674 |
\setcounter{section}{0}%
|
|
675 |
\setcounter{subsection}{0}%
|
|
676 |
\gdef\thesection{\@Alph\c@section}}
|
|
677 |
\setlength\arraycolsep{5\p@}
|
|
678 |
\setlength\tabcolsep{6\p@}
|
|
679 |
\setlength\arrayrulewidth{.4\p@}
|
|
680 |
\setlength\doublerulesep{2\p@}
|
|
681 |
\setlength\tabbingsep{\labelsep}
|
|
682 |
\skip\@mpfootins = \skip\footins
|
|
683 |
\setlength\fboxsep{3\p@}
|
|
684 |
\setlength\fboxrule{.4\p@}
|
|
685 |
\renewcommand \theequation {\@arabic\c@equation}
|
|
686 |
\newcounter{figure}
|
|
687 |
\renewcommand \thefigure {\@arabic\c@figure}
|
|
688 |
\def\fps@figure{tbp}
|
|
689 |
\def\ftype@figure{1}
|
|
690 |
\def\ext@figure{lof}
|
|
691 |
\def\fnum@figure{\figurename~\thefigure}
|
|
692 |
\newenvironment{figure}
|
|
693 |
{\@float{figure}}
|
|
694 |
{\end@float}
|
|
695 |
\newenvironment{figure*}
|
|
696 |
{\@dblfloat{figure}}
|
|
697 |
{\end@dblfloat}
|
|
698 |
\newcounter{table}
|
|
699 |
\renewcommand\thetable{\@arabic\c@table}
|
|
700 |
\def\fps@table{tbp}
|
|
701 |
\def\ftype@table{2}
|
|
702 |
\def\ext@table{lot}
|
|
703 |
\def\fnum@table{\tablename~\thetable}
|
|
704 |
\newenvironment{table}
|
|
705 |
{\@float{table}}
|
|
706 |
{\end@float}
|
|
707 |
\newenvironment{table*}
|
|
708 |
{\@dblfloat{table}}
|
|
709 |
{\end@dblfloat}
|
|
710 |
|
|
711 |
|
|
712 |
\newenvironment{xtable}
|
|
713 |
{\@dblfloat{table}}
|
|
714 |
{\end@dblfloat}
|
|
715 |
\newenvironment{xfigure}
|
|
716 |
{\@dblfloat{figure}}
|
|
717 |
{\end@dblfloat}
|
|
718 |
|
|
719 |
\newlength\abovecaptionskip
|
|
720 |
\newlength\belowcaptionskip
|
|
721 |
\setlength\abovecaptionskip{2\p@}
|
|
722 |
\setlength\belowcaptionskip{4\p@}
|
|
723 |
|
|
724 |
\long\def\@makecaption#1#2{%
|
|
725 |
\ifx\@captype\xtable
|
|
726 |
\let\currtabcaption\relax
|
|
727 |
\gdef\currtabcaption{
|
|
728 |
\tabnumfont\relax #1. \tabtextfont\relax#2\par
|
|
729 |
\vskip\belowcaptionskip
|
|
730 |
}
|
|
731 |
\else
|
|
732 |
\vskip\abovecaptionskip
|
|
733 |
\sbox\@tempboxa{\fignumfont#1.\figtextfont\hskip.5em\relax #2}%
|
|
734 |
\ifdim \wd\@tempboxa >\hsize
|
|
735 |
\fignumfont\relax #1.\figtextfont\hskip.5em\relax#2\par
|
|
736 |
\else
|
|
737 |
\global \@minipagefalse
|
|
738 |
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
|
|
739 |
\fi
|
|
740 |
\fi
|
|
741 |
}
|
|
742 |
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
|
|
743 |
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
|
|
744 |
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
|
|
745 |
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
|
|
746 |
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
|
|
747 |
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
|
|
748 |
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
|
|
749 |
\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
|
|
750 |
\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
|
|
751 |
\newcommand\@pnumwidth{1.55em}
|
|
752 |
\newcommand\@tocrmarg{2.55em}
|
|
753 |
\newcommand\@dotsep{4.5}
|
|
754 |
\setcounter{tocdepth}{3}
|
|
755 |
\newcommand\tableofcontents{%
|
|
756 |
\section*{\contentsname
|
|
757 |
\@mkboth{%
|
|
758 |
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
|
|
759 |
\@starttoc{toc}%
|
|
760 |
}
|
|
761 |
\newcommand*\l@part[2]{%
|
|
762 |
\ifnum \c@tocdepth >-2\relax
|
|
763 |
\addpenalty\@secpenalty
|
|
764 |
\addvspace{2.25em \@plus\p@}%
|
|
765 |
\begingroup
|
|
766 |
\parindent \z@ \rightskip \@pnumwidth
|
|
767 |
\parfillskip -\@pnumwidth
|
|
768 |
{\leavevmode
|
|
769 |
\large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
|
|
770 |
\nobreak
|
|
771 |
\if@compatibility
|
|
772 |
\global\@nobreaktrue
|
|
773 |
\everypar{\global\@nobreakfalse\everypar{}}%
|
|
774 |
\fi
|
|
775 |
\endgroup
|
|
776 |
\fi}
|
|
777 |
\newcommand*\l@section[2]{%
|
|
778 |
\ifnum \c@tocdepth >\z@
|
|
779 |
\addpenalty\@secpenalty
|
|
780 |
\addvspace{1.0em \@plus\p@}%
|
|
781 |
\setlength\@tempdima{1.5em}%
|
|
782 |
\begingroup
|
|
783 |
\parindent \z@ \rightskip \@pnumwidth
|
|
784 |
\parfillskip -\@pnumwidth
|
|
785 |
\leavevmode \bfseries
|
|
786 |
\advance\leftskip\@tempdima
|
|
787 |
\hskip -\leftskip
|
|
788 |
#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
|
|
789 |
\endgroup
|
|
790 |
\fi}
|
|
791 |
\newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
|
|
792 |
\newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
|
|
793 |
\newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
|
|
794 |
\newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
|
|
795 |
\newcommand\listoffigures{%
|
|
796 |
\section*{\listfigurename
|
|
797 |
\@mkboth{\MakeUppercase\listfigurename}%
|
|
798 |
{\MakeUppercase\listfigurename}}%
|
|
799 |
\@starttoc{lof}%
|
|
800 |
}
|
|
801 |
\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
|
|
802 |
\newcommand\listoftables{%
|
|
803 |
\section*{\listtablename
|
|
804 |
\@mkboth{%
|
|
805 |
\MakeUppercase\listtablename}{\MakeUppercase\listtablename}}%
|
|
806 |
\@starttoc{lot}%
|
|
807 |
}
|
|
808 |
\let\l@table\l@figure
|
|
809 |
\newdimen\bibindent
|
|
810 |
\setlength\bibindent{1.5em}
|
|
811 |
|
|
812 |
\newskip\bibskip
|
|
813 |
\bibskip=0pt plus 3pt
|
|
814 |
\newenvironment{thebibliography}[1]
|
|
815 |
{\endgroup\endtwocolumns\vskip24pt\twocolumns\begingroup
|
|
816 |
\def\@currenvir{thebibliography}
|
|
817 |
\let\savebibitem\bibitem
|
|
818 |
\def\bibitem{\vskip\bibskip\savebibitem}
|
|
819 |
\tiny\baselineskip=8pt\bibfont
|
|
820 |
\let\it\bibitfont
|
|
821 |
\let\bf\bibbffont
|
|
822 |
\let\em\bibitfont
|
|
823 |
\let\sc\bibfont
|
|
824 |
\def\textit##1{{\bibitfont ##1}}
|
|
825 |
\def\textbf##1{{\bibbffont ##1}}
|
|
826 |
\list{\@biblabel{\@arabic\c@enumiv}}%
|
|
827 |
{\settowidth\labelwidth{\@biblabel{#1}}%
|
|
828 |
\leftmargin\labelwidth
|
|
829 |
\advance\leftmargin\labelsep
|
|
830 |
\@openbib@code
|
|
831 |
\usecounter{enumiv}%
|
|
832 |
\let\p@enumiv\@empty
|
|
833 |
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
|
|
834 |
\sloppy
|
|
835 |
\clubpenalty4000
|
|
836 |
\@clubpenalty \clubpenalty
|
|
837 |
\widowpenalty4000%
|
|
838 |
\sfcode`\.\@m}
|
|
839 |
{\def\@noitemerr
|
|
840 |
{\@latex@warning{Empty `thebibliography' environment}}%
|
|
841 |
\endlist
|
|
842 |
}
|
|
843 |
\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
|
|
844 |
\let\@openbib@code\@empty
|
|
845 |
|
|
846 |
\renewcommand\footnoterule{%
|
|
847 |
\kern-3\p@
|
|
848 |
\hrule\@width6pc%.4\columnwidth
|
|
849 |
\kern2.6\p@}
|
|
850 |
\newcommand\@makefntext[1]{%
|
|
851 |
\parindent 1em%
|
|
852 |
\noindent
|
|
853 |
\hb@xt@1.8em{\hss\@makefnmark}#1}
|
|
854 |
\newcommand\contentsname{Contents}
|
|
855 |
\newcommand\listfigurename{List of Figures}
|
|
856 |
\newcommand\listtablename{List of Tables}
|
|
857 |
\newcommand\refname{References}
|
|
858 |
\newcommand\indexname{Index}
|
|
859 |
\newcommand\figurename{Fig.}
|
|
860 |
\newcommand\tablename{Table}
|
|
861 |
\newcommand\partname{Part}
|
|
862 |
\newcommand\appendixname{Appendix}
|
|
863 |
\newcommand\abstractname{Abstract}
|
|
864 |
\def\today{\ifcase\month\or
|
|
865 |
January\or February\or March\or April\or May\or June\or
|
|
866 |
July\or August\or September\or October\or November\or December\fi
|
|
867 |
\space\number\day, \number\year}
|
|
868 |
\setlength\columnsep{10\p@}
|
|
869 |
\setlength\columnseprule{0\p@}
|
|
870 |
\pagenumbering{arabic}
|
|
871 |
\if@twoside
|
|
872 |
\else
|
|
873 |
\raggedbottom
|
|
874 |
\fi
|
|
875 |
\if@twocolumn
|
|
876 |
\twocolumn
|
|
877 |
\sloppy
|
|
878 |
\flushbottom
|
|
879 |
\else
|
|
880 |
\onecolumn
|
|
881 |
\fi
|
|
882 |
|
|
883 |
%%%%%%%%%%%%%%%%%
|
|
884 |
% Additions to article.cls for PNASONE ==>>
|
|
885 |
%%%%%%%%%%%%%%%%%
|
|
886 |
\hoffset-.25in
|
|
887 |
\pagestyle{headings}
|
|
888 |
\textwidth= 42.5pc
|
|
889 |
\textheight= 56.5pc
|
|
890 |
|
|
891 |
\def\xrelax{\relax}
|
|
892 |
|
|
893 |
|
|
894 |
%%%%%%%%%%
|
|
895 |
%% Footnotes, endnotes
|
|
896 |
|
|
897 |
\newcount\footnum
|
|
898 |
\newcount\savefootnum
|
|
899 |
|
|
900 |
\def\notes{
|
|
901 |
{\ifnum\footnum=0\else
|
|
902 |
\savefootnum=\footnum
|
|
903 |
\footnum=0
|
|
904 |
\noindent\loop\ifnum\savefootnum>\footnum%
|
|
905 |
\global\advance\footnum by1\relax%
|
|
906 |
\csname foot\the\footnum\endcsname\relax%
|
|
907 |
\expandafter\gdef\csname foot\the\footnum\endcsname{\relax}\relax%
|
|
908 |
\repeat\global\footnum=0\relax\fi}}
|
|
909 |
|
|
910 |
|
|
911 |
\long\def\endnotes#1{\global\advance\footnum by 1\relax$^{\the\footnum}$%
|
|
912 |
\long\expandafter\gdef\csname foot\the\footnum\endcsname{%
|
|
913 |
\vbox{\footnotesize\everypar={\hskip-10pt\everypar={}}
|
|
914 |
\leftskip=10pt\relax
|
|
915 |
\noindent\hbox to10pt{\the\footnum.\hfill}{\def\@currentlabel{\the\footnum}%
|
|
916 |
#1\strut\vskip1sp}}\vskip1pt}}
|
|
917 |
|
|
918 |
\def\endnotetext#1{\global\advance\footnum by 1\relax
|
|
919 |
\long\expandafter\gdef\csname foot\the\footnum\endcsname{%
|
|
920 |
\vtop{\footnotesize%
|
|
921 |
\leftskip=12pt\relax\parindent=-12pt
|
|
922 |
\indent\hbox to12pt{\the\footnum.\hfill}{#1\strut\vskip1sp}}\vskip1pt}}
|
|
923 |
|
|
924 |
%\let\footnote\endnotes
|
|
925 |
|
|
926 |
\setlength\oddsidemargin {0\p@}
|
|
927 |
\setlength\evensidemargin {0\p@}
|
|
928 |
|
|
929 |
|
|
930 |
\def\dropcap#1{\setbox1=\hbox{\dropcapfont\uppercase{#1}\hskip1pt}
|
|
931 |
\hangindent=\wd1
|
|
932 |
\hangafter-2
|
|
933 |
\noindent\llap{\vbox to0pt{\vskip-7pt\copy1\vss}}}
|
|
934 |
|
|
935 |
%%% Theorem environment %%%%%%%%%
|
|
936 |
|
|
937 |
%% added \theoremfont for theorem name and number
|
|
938 |
|
|
939 |
\def\@begintheorem#1#2{\trivlist
|
|
940 |
\item[\hskip \labelsep{\theoremfont #1\ #2.}]\itshape}
|
|
941 |
\def\@opargbegintheorem#1#2#3{\trivlist
|
|
942 |
\item[\hskip \labelsep{\theoremfont #1\ #2.\ (#3)}]\itshape}
|
|
943 |
\def\@endtheorem{\endtrivlist}
|
|
944 |
|
|
945 |
%%%%%%
|
|
946 |
%%Macros for Footline on titlepage
|
|
947 |
|
|
948 |
\def\url#1{\def\theurl{#1}}
|
|
949 |
\def\issuedate#1{\def\theissuedate{#1}}
|
|
950 |
\def\copyrightyear#1{\def\thecopyrightyear{#1}}
|
|
951 |
\def\volume#1{\def\thevolume{#1}}
|
|
952 |
\def\issuenumber#1{\def\theissuenumber{#1}}
|
|
953 |
\def\footlineauthor#1{\def\thefootlineauthor{\let\it\footlineit#1}}
|
|
954 |
|
|
955 |
\ps@headings
|
|
956 |
|
|
957 |
%% References
|
|
958 |
|
|
959 |
\def\@biblabel#1{#1.}
|
|
960 |
|
|
961 |
%%% code to get text in tables to extend all the way to left and right
|
|
962 |
%%% of table
|
|
963 |
|
|
964 |
\def\xtable{table}
|
|
965 |
\def\@array[#1]#2{\tabletextfont
|
|
966 |
\setbox\@arstrutbox=\hbox{\vrule
|
|
967 |
height\arraystretch \ht\strutbox
|
|
968 |
depth\arraystretch \dp\strutbox
|
|
969 |
width\z@}\@mkpream{#2}\edef\@preamble{\halign \noexpand\@halignto
|
|
970 |
\bgroup%
|
|
971 |
\tabskip\z@\@arstrut\@preamble
|
|
972 |
\ifx\@captype\xtable\hskip-\tabcolsep\fi%% <==== Changed
|
|
973 |
\tabskip\z@ \cr}%
|
|
974 |
\let\@startpbox\@@startpbox \let\@endpbox\@@endpbox%
|
|
975 |
\if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi%
|
|
976 |
\bgroup\let\par\relax%
|
|
977 |
\let\@sharp##\let\protect\relax \lineskip\z@\baselineskip\z@\@preamble}
|
|
978 |
|
|
979 |
%% new
|
|
980 |
\def\new@tabacol{\edef\@preamble{\@preamble\hskip0pt}}
|
|
981 |
|
|
982 |
\def\@tabclassz{\ifcase \@lastchclass\@acolampacol%
|
|
983 |
\or \@ampacol \or
|
|
984 |
\or \or \@addamp \or \@acolampacol\or \@firstampfalse
|
|
985 |
\ifx\@captype\xtable \new@tabacol\else\@tabacol \fi%
|
|
986 |
\fi%
|
|
987 |
\edef\@preamble{\@preamble%
|
|
988 |
\ifcase \@chnum%
|
|
989 |
\hfil\ignorespaces\@sharp\unskip\hfil%
|
|
990 |
\or \ignorespaces\@sharp\unskip\hfil%
|
|
991 |
\or \hfil\hskip\z@ \ignorespaces\@sharp\unskip\fi}}
|
|
992 |
|
|
993 |
\setcounter{secnumdepth}{0}
|
|
994 |
|
|
995 |
\long\def\@makefntext#1{\parindent0pt\noindent
|
|
996 |
\@textsuperscript{\normalfont\@thefnmark}#1}%
|
|
997 |
|
|
998 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
999 |
%% %%
|
|
1000 |
%% LaTeX Style for Multiple Columns with Floating Insertions %%
|
|
1001 |
%% %%
|
|
1002 |
%% Copyright 2004, Amy Hendrickson, TeXnology Inc. %%
|
|
1003 |
%% All rights reserved %%
|
|
1004 |
%% %%
|
|
1005 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
1006 |
|
|
1007 |
%%%%%%%%
|
|
1008 |
%%% Double column output routines,
|
|
1009 |
%%% with single and double column insertions,
|
|
1010 |
%%% to be positioned at page or column top, page or column bottom, page
|
|
1011 |
%%% or column center, or full page floating insertion.
|
|
1012 |
%%% This code was originally based on Frank Mittlebach's multicol.sty.
|
|
1013 |
%%% The concept of how to balance columns is due to Donald Knuth. The
|
|
1014 |
%%% way to integrate the changed output routine into the standard LaTeX
|
|
1015 |
%%% output routine is due to Frank.
|
|
1016 |
%%% The method of making the single and double column insertions and the
|
|
1017 |
%%% changes in the output routines to accomodate these features are mine.
|
|
1018 |
%%% A.H., August 2004
|
|
1019 |
%%
|
|
1020 |
|
|
1021 |
\newskip\abovefigcaptionskip
|
|
1022 |
\newskip\abovetabcaptionskip
|
|
1023 |
\newskip\abovetableskip
|
|
1024 |
\newif\ifcentermultiplelines
|
|
1025 |
\newif\ifcentersingleline
|
|
1026 |
\newif\ifcentersingletabline
|
|
1027 |
\newif\iflineabovetabcaption
|
|
1028 |
\newif\iflinebelowtabcaption
|
|
1029 |
\newdimen\belowtabcaptionskip
|
|
1030 |
|
|
1031 |
%% Parameters you can set:
|
|
1032 |
\columnsep=16pt
|
|
1033 |
\newdimen\saveparskip
|
|
1034 |
\saveparskip=\parskip
|
|
1035 |
|
|
1036 |
%%
|
|
1037 |
\newdimen\captionskip %% space between caption and figure or table
|
|
1038 |
\captionskip=0pt
|
|
1039 |
%%%
|
|
1040 |
|
|
1041 |
\newdimen\PushOneColTopFig
|
|
1042 |
\newdimen\PushOneColBotFig
|
|
1043 |
|
|
1044 |
\PushOneColTopFig=5.5pt %% push down from top of text page
|
|
1045 |
\PushOneColBotFig=-4.5pt %
|
|
1046 |
|
|
1047 |
%%
|
|
1048 |
\newdimen\PushOneColTopTab
|
|
1049 |
\newdimen\PushOneColBotTab
|
|
1050 |
|
|
1051 |
\PushOneColTopTab=2.5pt %% push down from top of text page
|
|
1052 |
\PushOneColBotTab=0pt %% push up from bottom of text page
|
|
1053 |
|
|
1054 |
%%
|
|
1055 |
\newdimen\PushTwoColTopFig
|
|
1056 |
\newdimen\PushTwoColBotFig
|
|
1057 |
|
|
1058 |
\PushTwoColTopFig=2.5pt %% push down from top of text page
|
|
1059 |
\PushTwoColBotFig=1.5pt %% push up from bottom of text page
|
|
1060 |
|
|
1061 |
%%
|
|
1062 |
\newdimen\PushTwoColTopTab
|
|
1063 |
\newdimen\PushTwoColBotTab
|
|
1064 |
|
|
1065 |
\PushTwoColTopTab=1.5pt %% push down from top of text page
|
|
1066 |
\PushTwoColBotTab=1.5pt %% push up from bottom of text page
|
|
1067 |
|
|
1068 |
%%
|
|
1069 |
|
|
1070 |
\newskip\intextfloatskip
|
|
1071 |
\intextfloatskip=20pt %% Space between figure or table and text.
|
|
1072 |
%% (Need to subtract 4pt to get what you want)
|
|
1073 |
|
|
1074 |
%% Normal and Appendix Figure and Table Numbers
|
|
1075 |
|
|
1076 |
\def\appthefigure{\Alph{section}\the\c@appfigure\theletter}
|
|
1077 |
\def\appthetable{\Alph{section}\the\c@apptable\theletter}
|
|
1078 |
\def\apptheplate{\Alph{section}\the\c@appplate\theletter}
|
|
1079 |
|
|
1080 |
\newcount\c@appfigure
|
|
1081 |
\newcount\c@apptable
|
|
1082 |
\newcount\c@appplate
|
|
1083 |
|
|
1084 |
%% <=== end of parameters you can set
|
|
1085 |
|
|
1086 |
%% do one column at a time so that we can get single col
|
|
1087 |
%% floats for first col.
|
|
1088 |
|
|
1089 |
%%% New version of \@makecol that includes dbltopins and dblbotins,
|
|
1090 |
%%% insertions that span both columns at the top and bottom of text page.
|
|
1091 |
|
|
1092 |
%%%
|
|
1093 |
|
|
1094 |
\def\new@makecol{\setbox\@outputbox
|
|
1095 |
\vbox{\boxmaxdepth \maxdepth
|
|
1096 |
\ifdim\ht\dbltopins<1pt\else\unvbox\dbltopins\fi
|
|
1097 |
\unvbox\@cclv
|
|
1098 |
\ifdim\ht\dblbotins<1pt\else\unvbox\dblbotins\fi%
|
|
1099 |
\ifvoid\footins\else\vskip\skip\footins\footnoterule\unvbox\footins\fi\vss}
|
|
1100 |
%\global\savefigandtabnumber\figandtabnumber
|
|
1101 |
%\global\advance\savefigandtabnumber by 1 %% Because loop stops one short
|
|
1102 |
%% of the total number of figs
|
|
1103 |
\global\savedblfigandtabnumber\dblfigandtabnumber
|
|
1104 |
\xdef\@freelist{\@freelist\@midlist}\gdef\@midlist{}\@combinefloats
|
|
1105 |
\setbox\@outputbox\vbox to\@colht{\boxmaxdepth\maxdepth
|
|
1106 |
\@texttop\dimen128=\dp\@outputbox\unvbox\@outputbox
|
|
1107 |
\vskip-\dimen128\@textbottom}%
|
|
1108 |
\global\maxdepth\@maxdepth}
|
|
1109 |
|
|
1110 |
%%
|
|
1111 |
\let\@makecol\new@makecol %%
|
|
1112 |
|
|
1113 |
%% Default Latex output routine, to return to after balance columns
|
|
1114 |
%% This should make it possible to capture the output routine of
|
|
1115 |
%% any version of 2e as well as 2.09. ==>>
|
|
1116 |
|
|
1117 |
\edef\curroutput{\the\output}
|
|
1118 |
\let\latexoutput\curroutput
|
|
1119 |
|
|
1120 |
%% table* and figure* outside two columns keep default definitions.
|
|
1121 |
|
|
1122 |
\newif\ifnonewpage
|
|
1123 |
\def\nonewpage{\global\nonewpagetrue}
|
|
1124 |
|
|
1125 |
%% Begin twocolumns ==>>
|
|
1126 |
\newdimen\checkforspace
|
|
1127 |
\def\twocolumns{\par \penalty\z@
|
|
1128 |
\checkforspace=\pagegoal
|
|
1129 |
\advance\checkforspace-\pagetotal
|
|
1130 |
\advance\checkforspace-\ht\partialpage
|
|
1131 |
\advance\checkforspace-\dp\partialpage
|
|
1132 |
\advance\checkforspace by -2\ht\dbltopins
|
|
1133 |
\advance\checkforspace by -2\dp\dbltopins
|
|
1134 |
\advance\checkforspace by -2\ht\dblbotins
|
|
1135 |
\advance\checkforspace by -2\dp\dblbotins
|
|
1136 |
\ifdim\checkforspace<36pt\ifnonewpage\else\newpage\fi\fi
|
|
1137 |
\begingroup
|
|
1138 |
%
|
|
1139 |
\expandafter\gdef\csname plate*\endcsname{\twocolplate}
|
|
1140 |
\expandafter\gdef\csname endplate*\endcsname{\endtwocolfloat}
|
|
1141 |
%
|
|
1142 |
\expandafter\gdef\csname figure*\endcsname{\twocolfig}
|
|
1143 |
\expandafter\gdef\csname endfigure*\endcsname{\endtwocolfloat}
|
|
1144 |
%
|
|
1145 |
\expandafter\gdef\csname table*\endcsname{\twocoltable}
|
|
1146 |
\expandafter\gdef\csname endtable*\endcsname{\endtwocolfloat}
|
|
1147 |
%
|
|
1148 |
\let\figure\onecolfig
|
|
1149 |
\let\plate\onecolplate
|
|
1150 |
\let\table\onecoltable
|
|
1151 |
%
|
|
1152 |
\let\@makecol\new@makecol %%
|
|
1153 |
%% Confines new def of \@makecol to
|
|
1154 |
%% two column material, preserves normal topskip after twocolumns is
|
|
1155 |
%% finished.
|
|
1156 |
%%
|
|
1157 |
\output={\global\setbox\partialpage=\vbox{\unvbox\@cclv}}
|
|
1158 |
\vskip1sp %%
|
|
1159 |
\eject
|
|
1160 |
\vbadness10001 \hbadness5000
|
|
1161 |
\tolerance5000
|
|
1162 |
\parskip \saveparskip %plus .01pt %
|
|
1163 |
%\ifjdraft
|
|
1164 |
%\baselineskip=28pt\fi
|
|
1165 |
\pretolerance\m@ne %keeps TeX from trying to make up paragraph
|
|
1166 |
% without discretionary hyphens
|
|
1167 |
\advance\@colroom-\ht\partialpage
|
|
1168 |
\advance\@colroom-\dp\partialpage
|
|
1169 |
\vsize=\@colroom
|
|
1170 |
% Changed to \@colroom rather than 2\@colroom. Each column is output
|
|
1171 |
% separately so we can find out if there are top or bottom inserts
|
|
1172 |
% in first column.
|
|
1173 |
%%
|
|
1174 |
\hsize\textwidth \advance\hsize-\columnsep
|
|
1175 |
\divide\hsize by 2
|
|
1176 |
\linewidth\hsize %% particular to LaTeX
|
|
1177 |
\columnwidth=\hsize
|
|
1178 |
%% OR, you can substitute these lines:
|
|
1179 |
%\hsize=\mycolumnwidth
|
|
1180 |
%\linewidth=\hsize
|
|
1181 |
%%
|
|
1182 |
%% Output:
|
|
1183 |
% Set output to firstcolout, which checks to see if there are inserts
|
|
1184 |
% then doubles the vsize and send material back into input stream, then
|
|
1185 |
% sets the next output routine to \makeuppage
|
|
1186 |
%
|
|
1187 |
\output={\firstcolout}
|
|
1188 |
\vskip2sp\ignorespaces}
|
|
1189 |
|
|
1190 |
|
|
1191 |
\def\galleycolumns{\par \penalty\z@
|
|
1192 |
\checkforspace=\pagegoal
|
|
1193 |
\advance\checkforspace-\pagetotal
|
|
1194 |
\advance\checkforspace-\ht\partialpage
|
|
1195 |
\advance\checkforspace-\dp\partialpage
|
|
1196 |
\advance\checkforspace by -2\ht\dbltopins
|
|
1197 |
\advance\checkforspace by -2\dp\dbltopins
|
|
1198 |
\advance\checkforspace by -2\ht\dblbotins
|
|
1199 |
\advance\checkforspace by -2\dp\dblbotins
|
|
1200 |
\ifdim\checkforspace<36pt\newpage\fi
|
|
1201 |
\begingroup
|
|
1202 |
\expandafter\gdef\csname plate*\endcsname{\twocolplate}
|
|
1203 |
\expandafter\gdef\csname endplate*\endcsname{\endtwocolfloat}
|
|
1204 |
%
|
|
1205 |
\expandafter\gdef\csname figure*\endcsname{\twocolfig}
|
|
1206 |
\expandafter\gdef\csname endfigure*\endcsname{\endtwocolfloat}
|
|
1207 |
%
|
|
1208 |
\expandafter\gdef\csname table*\endcsname{\twocoltable}
|
|
1209 |
\expandafter\gdef\csname endtable*\endcsname{\endtwocolfloat}
|
|
1210 |
%
|
|
1211 |
\let\figure\onecolfig
|
|
1212 |
\let\plate\onecolplate
|
|
1213 |
\let\table\onecoltable
|
|
1214 |
%
|
|
1215 |
\global\firstsectionfalse
|
|
1216 |
\hsize=\mycolumnwidth
|
|
1217 |
\linewidth=\mycolumnwidth
|
|
1218 |
\vbadness10001
|
|
1219 |
\hbadness5000
|
|
1220 |
\tolerance5000
|
|
1221 |
\widowpenalty=0 \clubpenalty=0
|
|
1222 |
\parskip \saveparskip %plus .0001pt %
|
|
1223 |
\vskip1sp\ignorespaces}
|
|
1224 |
|
|
1225 |
\def\draftcolumns{\par \penalty\z@
|
|
1226 |
\begingroup
|
|
1227 |
\expandafter\gdef\csname plate*\endcsname{\twocolplate}
|
|
1228 |
\expandafter\gdef\csname endplate*\endcsname{\endtwocolfloat}
|
|
1229 |
%
|
|
1230 |
\expandafter\gdef\csname figure*\endcsname{\twocolfig}
|
|
1231 |
\expandafter\gdef\csname endfigure*\endcsname{\endtwocolfloat}
|
|
1232 |
%
|
|
1233 |
\expandafter\def\csname table*\endcsname{\twocoltable}
|
|
1234 |
\expandafter\def\csname endtable*\endcsname{\endtwocolfloat}
|
|
1235 |
%
|
|
1236 |
\let\figure\onecolfig
|
|
1237 |
\let\plate\onecolplate
|
|
1238 |
\let\table\onecoltable
|
|
1239 |
%
|
|
1240 |
\marginparsep=4pt
|
|
1241 |
\oddsidemargin-.25in
|
|
1242 |
\evensidemargin-.25in
|
|
1243 |
\advance\textwidth-.5in
|
|
1244 |
\hsize=\textwidth
|
|
1245 |
\linewidth=\textwidth
|
|
1246 |
\vbadness10001 \hbadness5000
|
|
1247 |
\tolerance5000
|
|
1248 |
\parskip \saveparskip
|
|
1249 |
\vskip1sp\ignorespaces}
|
|
1250 |
|
|
1251 |
\newbox\savetopinsert
|
|
1252 |
\newbox\savebotinsert
|
|
1253 |
\newbox\secondsavetopinsert
|
|
1254 |
\newbox\secondsavebotinsert
|
|
1255 |
\newbox\firstcolbox
|
|
1256 |
\newbox\secondcolbox
|
|
1257 |
\newbox\thefirstbox
|
|
1258 |
\newbox\thesecondbox
|
|
1259 |
|
|
1260 |
\newdimen\firstcol
|
|
1261 |
\newdimen\secondcol
|
|
1262 |
\newdimen\checkheight
|
|
1263 |
|
|
1264 |
\newcount\loopnum
|
|
1265 |
\newcount\firstcolsavefignum
|
|
1266 |
|
|
1267 |
\def\firstcolout{%
|
|
1268 |
%% The point of having firstcolout is to find out
|
|
1269 |
%% which figures/tables have been entered in the first column:
|
|
1270 |
\global\firstcolsavefignum=\figandtabnumber
|
|
1271 |
\global\advance\vsize by\@colroom
|
|
1272 |
\topskip=11pt %% ??
|
|
1273 |
\unvbox\@cclv
|
|
1274 |
\penalty\outputpenalty
|
|
1275 |
\global\output={\makeuppage}}
|
|
1276 |
|
|
1277 |
%% This is where the floats and text are put together to make page:
|
|
1278 |
|
|
1279 |
\newif\iffirstpage
|
|
1280 |
\newbox\footnotebox
|
|
1281 |
|
|
1282 |
\newdimen\ColUsed
|
|
1283 |
\newdimen\FigSpace
|
|
1284 |
\newbox\testdblbotins
|
|
1285 |
|
|
1286 |
\def\makeuppage{%
|
|
1287 |
%%
|
|
1288 |
\FigSpace=.9\@colroom %%
|
|
1289 |
\advance\FigSpace by-\ht\testdblbotins
|
|
1290 |
\advance\FigSpace by-\dp\testdblbotins
|
|
1291 |
\advance\FigSpace by-\ht\dbltopins
|
|
1292 |
\advance\FigSpace by-\dp\dbltopins
|
|
1293 |
%
|
|
1294 |
%% Save top inserts from first column: +++
|
|
1295 |
\global\setbox\savetopinsert=\vbox{%
|
|
1296 |
% write top figures and tables into this box
|
|
1297 |
\redefiningtrue
|
|
1298 |
\global\loopnum=0 \global\checkheight=0pt
|
|
1299 |
\loop\ifnum\loopnum<\firstcolsavefignum
|
|
1300 |
%
|
|
1301 |
\expandafter\ifx\csname topfloat\the\loopnum\endcsname\empty
|
|
1302 |
\else
|
|
1303 |
\expandafter\ifx\csname topfloat\the\loopnum\endcsname\relax
|
|
1304 |
\else
|
|
1305 |
\global\advance\checkheight by
|
|
1306 |
\expandafter\csname totalht\the\loopnum\endcsname\relax
|
|
1307 |
\fi\fi
|
|
1308 |
\ifdim\checkheight>\FigSpace \relax
|
|
1309 |
\global\loopnum=10000 % jump out of loop
|
|
1310 |
%
|
|
1311 |
\else
|
|
1312 |
\csname topfloat\the\loopnum\endcsname
|
|
1313 |
\fi
|
|
1314 |
%
|
|
1315 |
\global\advance\loopnum by1
|
|
1316 |
\repeat\relax
|
|
1317 |
}
|
|
1318 |
\ColUsed=\FigSpace %%
|
|
1319 |
\advance\ColUsed by-\ht\savetopinsert
|
|
1320 |
\advance\ColUsed by-\dp\savetopinsert
|
|
1321 |
%%
|
|
1322 |
\global\setbox\savebotinsert=\vbox{%
|
|
1323 |
%% Write bottom figures and tables into this box
|
|
1324 |
\redefiningtrue
|
|
1325 |
\global\loopnum=0
|
|
1326 |
\global\checkheight=0pt
|
|
1327 |
\loop\ifnum\loopnum<\firstcolsavefignum
|
|
1328 |
\expandafter\ifx\csname botfloat\the\loopnum\endcsname\empty
|
|
1329 |
\else
|
|
1330 |
\expandafter\ifx\csname botfloat\the\loopnum\endcsname\relax
|
|
1331 |
\else
|
|
1332 |
\global\advance\checkheight by
|
|
1333 |
\expandafter\csname totalht\the\loopnum\endcsname\relax
|
|
1334 |
\fi\fi
|
|
1335 |
\ifdim\checkheight>\ColUsed
|
|
1336 |
\global\loopnum=10000 % jump out of loop
|
|
1337 |
\else%
|
|
1338 |
\csname botfloat\the\loopnum\endcsname
|
|
1339 |
\global\expandafter\expandafter\let\csname botfloat\the\loopnum\endcsname\relax
|
|
1340 |
%% how come this reset is here and not in similar places????
|
|
1341 |
\fi
|
|
1342 |
%
|
|
1343 |
\global\advance\loopnum by1
|
|
1344 |
\repeat
|
|
1345 |
} %
|
|
1346 |
%
|
|
1347 |
%
|
|
1348 |
\iffirstpage\else
|
|
1349 |
\global\setbox\secondsavetopinsert=\vbox{%
|
|
1350 |
%% Write top figures and tables into this box
|
|
1351 |
%
|
|
1352 |
\global\loopnum=0 \global\checkheight=0pt
|
|
1353 |
\redefiningtrue
|
|
1354 |
\loop\ifnum\loopnum<\figandtabnumber %% ?
|
|
1355 |
%
|
|
1356 |
\expandafter\ifx\csname topfloat\the\loopnum\endcsname\empty
|
|
1357 |
\else
|
|
1358 |
\expandafter\ifx\csname topfloat\the\loopnum\endcsname\relax
|
|
1359 |
\else
|
|
1360 |
\global\advance\checkheight by
|
|
1361 |
\expandafter\csname totalht\the\loopnum\endcsname\relax
|
|
1362 |
\fi\fi
|
|
1363 |
\ifdim\checkheight>\FigSpace
|
|
1364 |
\global\loopnum=10000 % jump out of loop
|
|
1365 |
%
|
|
1366 |
\else%
|
|
1367 |
\csname topfloat\the\loopnum\endcsname
|
|
1368 |
\fi
|
|
1369 |
%
|
|
1370 |
\global\advance\loopnum by1\repeat
|
|
1371 |
%% one more, because it doesn't stop when number is =, only when it
|
|
1372 |
%% is less than.
|
|
1373 |
\global\advance\loopnum by1
|
|
1374 |
\csname topfloat\the\loopnum\endcsname
|
|
1375 |
}
|
|
1376 |
\fi
|
|
1377 |
%
|
|
1378 |
\ColUsed=\FigSpace %%
|
|
1379 |
\advance\ColUsed by-\ht\secondsavetopinsert
|
|
1380 |
\advance\ColUsed by-\dp\secondsavetopinsert
|
|
1381 |
%
|
|
1382 |
\iffirstpage\global\firstpagefalse\else
|
|
1383 |
\global\setbox\secondsavebotinsert=\vbox{%
|
|
1384 |
%% Write bottom figures and tables into this box
|
|
1385 |
%
|
|
1386 |
\redefiningtrue
|
|
1387 |
\global\loopnum=0 \global\checkheight=0pt
|
|
1388 |
\loop\ifnum\loopnum<\figandtabnumber
|
|
1389 |
\expandafter\ifx\csname botfloat\the\loopnum\endcsname\empty
|
|
1390 |
\else
|
|
1391 |
\expandafter\ifx\csname botfloat\the\loopnum\endcsname\relax
|
|
1392 |
\else
|
|
1393 |
\global\advance\checkheight by
|
|
1394 |
\expandafter\csname totalht\the\loopnum\endcsname\relax
|
|
1395 |
\fi\fi
|
|
1396 |
\ifdim\checkheight>\ColUsed
|
|
1397 |
\global\loopnum=10000 % jump out of loop
|
|
1398 |
%
|
|
1399 |
\else%
|
|
1400 |
\csname botfloat\the\loopnum\endcsname
|
|
1401 |
\fi
|
|
1402 |
%
|
|
1403 |
\global\advance\loopnum by1\repeat
|
|
1404 |
%% one more, because it doesn't stop when number is =, only when it
|
|
1405 |
%% is less than.
|
|
1406 |
\global\advance\loopnum by1
|
|
1407 |
\csname botfloat\the\loopnum\endcsname
|
|
1408 |
}
|
|
1409 |
%
|
|
1410 |
\global\dp\secondsavebotinsert=2.5pt
|
|
1411 |
\global\dp\savebotinsert=2.5pt
|
|
1412 |
\fi
|
|
1413 |
%
|
|
1414 |
\splittopskip=\topskip
|
|
1415 |
\splitmaxdepth\maxdepth
|
|
1416 |
\dimen@\@colroom
|
|
1417 |
%% Leave space if there is a two-column wide bottom insertion:
|
|
1418 |
%
|
|
1419 |
\global\setbox\dblbotins=\vbox{%
|
|
1420 |
\hsize=\textwidth
|
|
1421 |
\linewidth=\textwidth
|
|
1422 |
\captionwidth=\widecaptionwidth
|
|
1423 |
\unvbox\dblbotins %% avoid eradicating this if it has anything in it
|
|
1424 |
%% Write dblspan bottom figures and tables into this box
|
|
1425 |
\redefiningtrue
|
|
1426 |
\global\dblloopnum=0
|
|
1427 |
\loop\ifnum\dblloopnum<\savedblfigandtabnumber %%
|
|
1428 |
\csname dblbotfloat\the\dblloopnum\endcsname
|
|
1429 |
\global\advance\dblloopnum by1\repeat
|
|
1430 |
\csname dblbotfloat\the\dblloopnum\endcsname
|
|
1431 |
}
|
|
1432 |
\ifvoid\dblbotins \else
|
|
1433 |
\advance\dimen@-\ht\dblbotins
|
|
1434 |
\advance\dimen@-\dp\dblbotins
|
|
1435 |
\fi
|
|
1436 |
%
|
|
1437 |
%% Leave space if there is a two-column wide top insertion:
|
|
1438 |
\ifvoid\dbltopins\else
|
|
1439 |
\advance\dimen@-\ht\dbltopins
|
|
1440 |
\advance\dimen@-\dp\dbltopins
|
|
1441 |
\fi
|
|
1442 |
%%
|
|
1443 |
%% These changes are made to cut the column size down if we need
|
|
1444 |
%% to fit an insert into the column. This allows the right and
|
|
1445 |
%% left column to have differing amounts of text cut from box 255,
|
|
1446 |
%% called box \@cclv in LaTeX. See \vsplit below.
|
|
1447 |
\firstcol=\dimen@
|
|
1448 |
\ifvoid\savetopinsert\else
|
|
1449 |
\ifdim\ht\savetopinsert>0pt
|
|
1450 |
\advance\firstcol by-\ht\savetopinsert
|
|
1451 |
\advance\firstcol by-\dp\savetopinsert\fi\fi
|
|
1452 |
\ifvoid\savebotinsert\else
|
|
1453 |
\ifdim\ht\savebotinsert>0pt
|
|
1454 |
\advance\firstcol by-\ht\savebotinsert
|
|
1455 |
\advance\firstcol by-\dp\savebotinsert\fi
|
|
1456 |
\fi%
|
|
1457 |
%%% KLUDGE below
|
|
1458 |
\advance\firstcol by-3pt %% We need this to avoid
|
|
1459 |
%% error messages about overfull boxes.
|
|
1460 |
%
|
|
1461 |
\secondcol=\dimen@
|
|
1462 |
%%
|
|
1463 |
\ifvoid\secondsavetopinsert\else
|
|
1464 |
\ifdim\ht\secondsavetopinsert>0pt
|
|
1465 |
\advance\secondcol by-\ht\secondsavetopinsert
|
|
1466 |
\advance\secondcol by-\dp\secondsavetopinsert\fi\fi
|
|
1467 |
\ifvoid\secondsavebotinsert\else
|
|
1468 |
\ifdim\ht\secondsavebotinsert>0pt
|
|
1469 |
\advance\secondcol by-\ht\secondsavebotinsert
|
|
1470 |
\advance\secondcol by-\dp\secondsavebotinsert\fi\fi
|
|
1471 |
\ifvoid\footins\else
|
|
1472 |
\ifdim\ht\footins>0pt
|
|
1473 |
\global\setbox\footnotebox=\vbox{\vskip\skip\footins
|
|
1474 |
\footnoterule\unvbox\footins\vskip1sp}
|
|
1475 |
\advance\secondcol by-\ht\footnotebox
|
|
1476 |
\advance\secondcol by-\dp\footnotebox\fi\fi
|
|
1477 |
%%% KLUDGE below
|
|
1478 |
\advance\secondcol by-3pt %% We need this to avoid
|
|
1479 |
%% error messages about overfull boxes.
|
|
1480 |
%
|
|
1481 |
%% Cutting the amount of text that will fit from box255:
|
|
1482 |
\splittopskip=\topskip %%
|
|
1483 |
\splitmaxdepth\maxdepth
|
|
1484 |
\setbox\thefirstbox \vsplit\@cclv to\firstcol
|
|
1485 |
\setbox\thesecondbox \vsplit\@cclv to\secondcol
|
|
1486 |
%
|
|
1487 |
%% Making a text box that includes the inserts, column to the left:
|
|
1488 |
\setbox\firstcolbox\vbox to\dimen@{%
|
|
1489 |
\ifvoid\savetopinsert\else\unvbox\savetopinsert\fi%
|
|
1490 |
\box\thefirstbox%
|
|
1491 |
\ifvoid\savebotinsert\else\vfill\unvbox\savebotinsert\fi%
|
|
1492 |
}
|
|
1493 |
%
|
|
1494 |
%% Making a text box that includes the inserts, column to the right:
|
|
1495 |
\setbox\secondcolbox\vbox to\dimen@{%
|
|
1496 |
\ifvoid\secondsavetopinsert\else\unvbox\secondsavetopinsert\fi%
|
|
1497 |
\box\thesecondbox%%
|
|
1498 |
\ifvoid\secondsavebotinsert\else\vfill\unvbox\secondsavebotinsert\vskip1sp\fi%
|
|
1499 |
\ifvoid\footnotebox\else\unvbox\footnotebox\fi%
|
|
1500 |
}
|
|
1501 |
% Put back any text material that is not used:
|
|
1502 |
\ifvoid\@cclv \else
|
|
1503 |
\unvbox\@cclv
|
|
1504 |
\penalty\outputpenalty\fi
|
|
1505 |
\setbox\@cclv\vbox{\page@sofar}%
|
|
1506 |
\@makecol\@outputpage
|
|
1507 |
\global\@colroom\@colht
|
|
1508 |
% Changed this so that each column will be output separately,
|
|
1509 |
% so we have a chance to see if there are any insertions in the first
|
|
1510 |
% column.
|
|
1511 |
%
|
|
1512 |
%% Do Page Inserts here, so that if there are any two col top inserts
|
|
1513 |
%% They will be numbered after Page Inserts.
|
|
1514 |
%%
|
|
1515 |
\expandafter\ifx\csname pagefloat\the\pageloopnum\endcsname\relax
|
|
1516 |
\else
|
|
1517 |
\expandafter\ifx\csname pagefloat\the\pageloopnum\endcsname\empty
|
|
1518 |
\else
|
|
1519 |
\insertpage\fi\fi
|
|
1520 |
%
|
|
1521 |
%** doing this now gets the numbers right.
|
|
1522 |
\global\setbox\dbltopins=\vbox{%
|
|
1523 |
\hsize=\textwidth
|
|
1524 |
\linewidth=\textwidth
|
|
1525 |
\captionwidth=\widecaptionwidth
|
|
1526 |
\unvbox\dbltopins
|
|
1527 |
%% Write dblspan bottom figures and tables into this box
|
|
1528 |
\redefiningtrue %
|
|
1529 |
\global\dblloopnum=0
|
|
1530 |
\loop\ifnum\dblloopnum<\savedblfigandtabnumber
|
|
1531 |
\csname dbltopfloat\the\dblloopnum\endcsname
|
|
1532 |
\global\advance\dblloopnum by1\repeat
|
|
1533 |
\csname dbltopfloat\the\dblloopnum\endcsname%
|
|
1534 |
%Save one for next page?
|
|
1535 |
%\vskip24pt
|
|
1536 |
}
|
|
1537 |
%**
|
|
1538 |
%
|
|
1539 |
%% dblfigandtabnumber rather than savedblfigandtabnumber here
|
|
1540 |
\global\setbox\testdblbotins=\vbox{%
|
|
1541 |
\let\c@figure\bogus
|
|
1542 |
\let\c@table\bogus
|
|
1543 |
\let\c@plate\bogus
|
|
1544 |
\hsize=\textwidth
|
|
1545 |
\linewidth=\textwidth
|
|
1546 |
\captionwidth=\widecaptionwidth
|
|
1547 |
\copy\dblbotins %% avoid eradicating this if it has anything in it
|
|
1548 |
%% Write dblspan bottom figures and tables into this box
|
|
1549 |
\redefiningfalse
|
|
1550 |
\global\dblloopnum=0
|
|
1551 |
\loop\ifnum\dblloopnum<\dblfigandtabnumber %%
|
|
1552 |
\csname dblbotfloat\the\dblloopnum\endcsname
|
|
1553 |
\global\advance\dblloopnum by1\repeat
|
|
1554 |
\csname dblbotfloat\the\dblloopnum\endcsname
|
|
1555 |
}
|
|
1556 |
%
|
|
1557 |
\ifbalancing
|
|
1558 |
\global\balancingfalse
|
|
1559 |
\global\vsize=2\@colroom
|
|
1560 |
\else
|
|
1561 |
\global\vsize\@colroom
|
|
1562 |
\global\advance\vsize -\ht\dbltopins
|
|
1563 |
\global\advance\vsize -\dp\dbltopins
|
|
1564 |
\global\advance\vsize -\ht\testdblbotins
|
|
1565 |
\global\advance\vsize -\dp\testdblbotins
|
|
1566 |
\global\output={\firstcolout}%
|
|
1567 |
\fi
|
|
1568 |
}
|
|
1569 |
|
|
1570 |
|
|
1571 |
\newcount\pageloopnum
|
|
1572 |
|
|
1573 |
\def\secondoutput{{\makeuppage }}
|
|
1574 |
|
|
1575 |
\newbox\endcolsavetopinsert
|
|
1576 |
\newbox\endcolsavebotinsert
|
|
1577 |
\newbox\testpagesize
|
|
1578 |
\newif\ifbalancing
|
|
1579 |
|
|
1580 |
\newdimen\savelastskip
|
|
1581 |
%%+++
|
|
1582 |
\def\endtwocolumns{%
|
|
1583 |
%\par\penalty0
|
|
1584 |
\splittopskip=\topskip
|
|
1585 |
\splitmaxdepth\maxdepth
|
|
1586 |
\setboxesandredefine
|
|
1587 |
\ifdim\ht\endcolsavetopinsert>1pt
|
|
1588 |
\unvbox\endcolsavetopinsert%
|
|
1589 |
\fi
|
|
1590 |
\ifdim\ht\endcolsavebotinsert>1pt
|
|
1591 |
\unvbox\endcolsavebotinsert%
|
|
1592 |
\fi
|
|
1593 |
\par\penalty\z@
|
|
1594 |
\output={\global\setbox\testpagesize=\vbox{%
|
|
1595 |
\unvbox\@cclv\ifdim\savelastskip>0pt \vskip-\savelastskip\fi}}\eject
|
|
1596 |
%%
|
|
1597 |
%% We reset output routine below to \latexoutput
|
|
1598 |
%% since we had to set multicolout to be the global output routine.
|
|
1599 |
%%
|
|
1600 |
\dimen0=\ht\testpagesize
|
|
1601 |
\advance\dimen0 by\dp\testpagesize
|
|
1602 |
\unvbox\testpagesize %%
|
|
1603 |
%% Above needed to see if we have more than one page worth of text.
|
|
1604 |
%%
|
|
1605 |
\advance\dimen0 by \topskip
|
|
1606 |
\ifdim\dimen0>2\@colroom
|
|
1607 |
%\typeout{^^J^^J more than 2 colroom^^J^^J}
|
|
1608 |
%% More than one page of text:
|
|
1609 |
%%
|
|
1610 |
\balancingtrue %% need this to avoid turning on firstcolout output routine.
|
|
1611 |
\global\output={\settwocolboxes\makeuppage
|
|
1612 |
\global\output={\setboxesandredefine
|
|
1613 |
\balance@columns\global\output={\latexoutput}}}
|
|
1614 |
\else
|
|
1615 |
\settwocolboxes
|
|
1616 |
\advance\dimen0 by 2\ht\dbltopins
|
|
1617 |
\advance\dimen0 by 2\dp\dbltopins
|
|
1618 |
\ifdim\dimen0>2\@colroom
|
|
1619 |
%\typeout{^^J^^J Second more than 2 colroom^^J^^J}
|
|
1620 |
%%
|
|
1621 |
\balancingtrue %% need this to avoid turning on firstcolout output routine.
|
|
1622 |
\global\output={\makeuppage
|
|
1623 |
\global\output={\balance@columns\global\output={\latexoutput}}}
|
|
1624 |
\else
|
|
1625 |
%\typeout{^^J^^J NOT more than 2 colroom^^J^^J}
|
|
1626 |
\balancingtrue %% need this to avoid turning on firstcolout output routine.
|
|
1627 |
\global\output={\balance@columns\global\output={\latexoutput}}\fi\fi
|
|
1628 |
\par
|
|
1629 |
\eject
|
|
1630 |
\endgroup
|
|
1631 |
\par\penalty\z@\relax
|
|
1632 |
\hsize=\textwidth
|
|
1633 |
}
|
|
1634 |
|
|
1635 |
%% to get rid of spurious error message when triple col is used:
|
|
1636 |
%\def\@checkend#1{\def\reserved@a{#1}\ifx
|
|
1637 |
% \reserved@a\@currenvir \else\iftriplecol
|
|
1638 |
%\else\@badend{#1}\fi\fi}
|
|
1639 |
|
|
1640 |
\def\endgalley{\vskip1sp\endgroup\newpage
|
|
1641 |
\vspace*{1in}
|
|
1642 |
\unvbox\figinsert}
|
|
1643 |
|
|
1644 |
\def\enddraft{\vskip1sp\endgroup
|
|
1645 |
\ifdim\ht\figinsert <2pt\else
|
|
1646 |
\newpage
|
|
1647 |
\vspace*{1in}
|
|
1648 |
\unvbox\figinsert\fi}
|
|
1649 |
|
|
1650 |
\def\setboxesandredefine{%
|
|
1651 |
\global\setbox\dbltopins=\vbox{%
|
|
1652 |
\hsize=\textwidth
|
|
1653 |
\linewidth=\textwidth
|
|
1654 |
\captionwidth=\widecaptionwidth
|
|
1655 |
\unvbox\dbltopins
|
|
1656 |
%% Write dblspan bottom figures and tables into this box
|
|
1657 |
\redefiningtrue %
|
|
1658 |
\global\dblloopnum=0
|
|
1659 |
\loop\ifnum\dblloopnum<\dblfigandtabnumber
|
|
1660 |
\csname dbltopfloat\the\dblloopnum\endcsname
|
|
1661 |
\global\advance\dblloopnum by1\repeat
|
|
1662 |
\csname dbltopfloat\the\dblloopnum\endcsname%
|
|
1663 |
% %Save one for next page?
|
|
1664 |
\vskip3pt%% kludge
|
|
1665 |
\vskip-\intextfloatskip
|
|
1666 |
}
|
|
1667 |
%
|
|
1668 |
\global\setbox\endcolsavetopinsert=\vbox{%
|
|
1669 |
%% dropping figures and tables into this box
|
|
1670 |
\loopnum=0
|
|
1671 |
\redefiningtrue
|
|
1672 |
\loop\ifnum\loopnum<\figandtabnumber
|
|
1673 |
\csname topfloat\the\loopnum\endcsname
|
|
1674 |
\global\advance\loopnum by1\repeat
|
|
1675 |
\csname topfloat\the\loopnum\endcsname%
|
|
1676 |
}
|
|
1677 |
%
|
|
1678 |
\global\setbox\endcolsavebotinsert=\vbox{%
|
|
1679 |
%% drop figures and tables into this box
|
|
1680 |
\global\loopnum=0
|
|
1681 |
\redefiningtrue
|
|
1682 |
\loop\ifnum\loopnum<\figandtabnumber
|
|
1683 |
\csname botfloat\the\loopnum\endcsname
|
|
1684 |
\global\advance\loopnum by1\repeat
|
|
1685 |
\csname botfloat\the\loopnum\endcsname}
|
|
1686 |
%
|
|
1687 |
\global\setbox\dblbotins=\vbox{%
|
|
1688 |
\hsize=\textwidth
|
|
1689 |
\linewidth=\textwidth
|
|
1690 |
\captionwidth=\widecaptionwidth
|
|
1691 |
\unvbox\dblbotins %% avoid eradicating this if it has anything in it
|
|
1692 |
% Write dblspan bottom figures and tables into this box
|
|
1693 |
\redefiningtrue
|
|
1694 |
\global\dblloopnum=0
|
|
1695 |
\loop\ifnum\dblloopnum<\dblfigandtabnumber %%
|
|
1696 |
\csname dblbotfloat\the\dblloopnum\endcsname
|
|
1697 |
\global\advance\dblloopnum by1\repeat
|
|
1698 |
\csname dblbotfloat\the\dblloopnum\endcsname}%
|
|
1699 |
}%% end of setboxes and redefine
|
|
1700 |
|
|
1701 |
\def\settwocolboxes{%
|
|
1702 |
\global\setbox\dbltopins=\vbox{%
|
|
1703 |
\hsize=\textwidth
|
|
1704 |
\linewidth=\textwidth
|
|
1705 |
\captionwidth=\widecaptionwidth
|
|
1706 |
\unvbox\dbltopins
|
|
1707 |
% Write dblspan bottom figures and tables into this box
|
|
1708 |
\redefiningtrue %
|
|
1709 |
\global\dblloopnum=0
|
|
1710 |
\loop\ifnum\dblloopnum<\dblfigandtabnumber
|
|
1711 |
\csname dbltopfloat\the\dblloopnum\endcsname
|
|
1712 |
\global\advance\dblloopnum by1\repeat
|
|
1713 |
\csname dbltopfloat\the\dblloopnum\endcsname%
|
|
1714 |
%
|
|
1715 |
%\global\setbox\dblbotins=\vbox
|
|
1716 |
\hsize=\textwidth
|
|
1717 |
\linewidth=\textwidth
|
|
1718 |
\captionwidth=\widecaptionwidth
|
|
1719 |
\unvbox\dblbotins %% avoid eradicating this if it has anything in it
|
|
1720 |
% Write dblspan bottom figures and tables into this box
|
|
1721 |
\redefiningtrue
|
|
1722 |
\global\dblloopnum=0
|
|
1723 |
\loop\ifnum\dblloopnum<\dblfigandtabnumber %%
|
|
1724 |
\csname dblbotfloat\the\dblloopnum\endcsname
|
|
1725 |
\global\advance\dblloopnum by1\repeat
|
|
1726 |
\csname dblbotfloat\the\dblloopnum\endcsname%
|
|
1727 |
\vskip\intextfloatskip%% new++
|
|
1728 |
}}
|
|
1729 |
|
|
1730 |
\def\setonecolboxesandredefine{%
|
|
1731 |
\global\setbox\endcolsavetopinsert=\vbox{%
|
|
1732 |
%% dropping figures and tables into this box
|
|
1733 |
\loopnum=0
|
|
1734 |
\redefiningtrue
|
|
1735 |
\loop\ifnum\loopnum<\figandtabnumber
|
|
1736 |
\csname topfloat\the\loopnum\endcsname
|
|
1737 |
\expandafter\ifx\csname topfloat\the\loopnum\endcsname\relax\else
|
|
1738 |
\vskip12pt\goodbreak\fi
|
|
1739 |
\global\advance\loopnum by1\repeat
|
|
1740 |
\csname topfloat\the\loopnum\endcsname%
|
|
1741 |
}
|
|
1742 |
%
|
|
1743 |
\global\setbox\endcolsavebotinsert=\vbox{%
|
|
1744 |
%% drop figures and tables into this box
|
|
1745 |
\global\loopnum=0
|
|
1746 |
\redefiningtrue
|
|
1747 |
\loop\ifnum\loopnum<\figandtabnumber
|
|
1748 |
\csname botfloat\the\loopnum\endcsname
|
|
1749 |
% we don't want a space here because it is at the bottom of a column:
|
|
1750 |
%\expandafter\ifx\csname botfloat\the\loopnum\endcsname\relax\else
|
|
1751 |
%\vskip12pt\goodbreak\fi
|
|
1752 |
\global\advance\loopnum by1\repeat
|
|
1753 |
\csname botfloat\the\loopnum\endcsname%
|
|
1754 |
}
|
|
1755 |
%
|
|
1756 |
}%% end of setonecol boxes and redefine
|
|
1757 |
|
|
1758 |
\newbox\partialpage
|
|
1759 |
\def\process@cols#1#2{\count@#1\relax
|
|
1760 |
\loop #2%
|
|
1761 |
\advance\count@\tw@
|
|
1762 |
\ifnum\count@<4
|
|
1763 |
\repeat}
|
|
1764 |
|
|
1765 |
%%% Version for balanced column output.
|
|
1766 |
|
|
1767 |
%% this version to get topskip right on balanced page at end of article.
|
|
1768 |
|
|
1769 |
\def\Bpage@sofar{
|
|
1770 |
\unvbox\partialpage
|
|
1771 |
%% major kludge! but it works ==>>
|
|
1772 |
\null
|
|
1773 |
\vskip-\topskip
|
|
1774 |
\vskip-12pt
|
|
1775 |
%% <<==
|
|
1776 |
\process@cols\z@{\wd\count@\hsize}%
|
|
1777 |
\hbox to\textwidth{%
|
|
1778 |
\process@cols\tw@{\box\count@
|
|
1779 |
\hss\vrule\@width\columnseprule\hss}%
|
|
1780 |
\box\z@}}
|
|
1781 |
|
|
1782 |
%%% AH: Version for two column output. %%
|
|
1783 |
\def\page@sofar{\unvbox\partialpage
|
|
1784 |
\wd\firstcolbox\hsize
|
|
1785 |
\wd\secondcolbox\hsize
|
|
1786 |
\hbox to\textwidth{%
|
|
1787 |
\box\firstcolbox
|
|
1788 |
\hss\vrule\@width\columnseprule\hss
|
|
1789 |
\box\secondcolbox}%%
|
|
1790 |
}
|
|
1791 |
|
|
1792 |
|
|
1793 |
%% Variant on \@outputpage to use for floating page insert:
|
|
1794 |
\def\insertpage{\begingroup\catcode`\ =10
|
|
1795 |
\let\-\@dischyph \let\'\@acci \let\`\@accii \let\=\@acciii
|
|
1796 |
\if@twoside
|
|
1797 |
\ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
|
|
1798 |
\let\@themargin\oddsidemargin
|
|
1799 |
\else \let\@thehead\@evenhead
|
|
1800 |
\let\@thefoot\@evenfoot \let\@themargin\evensidemargin
|
|
1801 |
\fi\fi
|
|
1802 |
\shipout
|
|
1803 |
\vbox{\normalsize \baselineskip\z@ \lineskip\z@
|
|
1804 |
\let\par\@@par %%
|
|
1805 |
\vskip \topmargin \moveright\@themargin
|
|
1806 |
\vbox{\setbox\@tempboxa
|
|
1807 |
\vbox to\headheight{\vfil \hbox to\textwidth
|
|
1808 |
{\let\label\@gobble \let\index\@gobble
|
|
1809 |
\@thehead}} %%
|
|
1810 |
\dp\@tempboxa\z@
|
|
1811 |
\box\@tempboxa
|
|
1812 |
\vskip \headsep
|
|
1813 |
%% change from \@outputpage below
|
|
1814 |
\vbox to\textheight{\vfil
|
|
1815 |
\hsize=\textwidth
|
|
1816 |
\linewidth=\textwidth
|
|
1817 |
\csname pagefloat\the\pageloopnum \endcsname
|
|
1818 |
}
|
|
1819 |
\baselineskip\footskip
|
|
1820 |
\hbox to\textwidth{\let\label\@gobble
|
|
1821 |
\let\index\@gobble %%
|
|
1822 |
\@thefoot}}}\global\@colht\textheight
|
|
1823 |
\endgroup\stepcounter{page}\let\firstmark\botmark
|
|
1824 |
\global\advance\pageloopnum by1
|
|
1825 |
\expandafter\ifx\csname pagefloat\the\pageloopnum\endcsname\relax\else%
|
|
1826 |
\insertpage\fi%
|
|
1827 |
}
|
|
1828 |
|
|
1829 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
1830 |
|
|
1831 |
\def\balance@columns{% can't throw in figs here because we
|
|
1832 |
% aren't doing eject, so they will be lost
|
|
1833 |
\ifdim\ht\dbltopins>1pt
|
|
1834 |
\advance\@colroom-\ht\dbltopins
|
|
1835 |
\advance\@colroom-\dp\dbltopins
|
|
1836 |
\advance\@colroom-\baselineskip
|
|
1837 |
\fi
|
|
1838 |
\ifdim\ht\dblbotins>1pt
|
|
1839 |
\advance\@colroom-\ht\dblbotins
|
|
1840 |
\advance\@colroom-\dp\dblbotins
|
|
1841 |
\fi
|
|
1842 |
\setbox\z@\vbox{\unvbox\@cclv}
|
|
1843 |
\dimen@\ht\z@
|
|
1844 |
%\advance\dimen@\dp\z@
|
|
1845 |
\advance\dimen@ 2\topskip
|
|
1846 |
\advance\dimen@-2\baselineskip %% ?? was 2\baselineskip, 4 gives better
|
|
1847 |
%topskip
|
|
1848 |
\divide\dimen@2%
|
|
1849 |
%
|
|
1850 |
{\vbadness\@M
|
|
1851 |
\splittopskip=\topskip
|
|
1852 |
\loop{\process@cols\@ne{\global\setbox\count@
|
|
1853 |
\box\voidb@x}}%
|
|
1854 |
\global\setbox\@ne\copy\z@
|
|
1855 |
{\process@cols\thr@@{\global\setbox\count@
|
|
1856 |
\vsplit\@ne to\dimen@}}%
|
|
1857 |
\ifdim\ht\@ne >\ht\thr@@
|
|
1858 |
\global\advance\dimen@\p@
|
|
1859 |
\repeat}
|
|
1860 |
%
|
|
1861 |
\dimen@\ht\thr@@
|
|
1862 |
\process@cols\z@{\@tempcnta\count@
|
|
1863 |
\advance\@tempcnta\@ne
|
|
1864 |
\setbox\count@\vtop to\dimen@ %%
|
|
1865 |
{\unvbox\@tempcnta}}%
|
|
1866 |
\global\vsize\@colroom
|
|
1867 |
\global\advance\vsize\ht\partialpage
|
|
1868 |
\Bpage@sofar}
|
|
1869 |
|
|
1870 |
\@ifundefined{emergencystretch}
|
|
1871 |
{\newdimen\emergencystretch}{}
|
|
1872 |
|
|
1873 |
\emergencystretch 1pt
|
|
1874 |
|
|
1875 |
\def\setemergencystretch#1#2{%
|
|
1876 |
\emergencystretch 4pt
|
|
1877 |
\multiply\emergencystretch#1}
|
|
1878 |
|
|
1879 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
1880 |
%%% Figure and table captions in two column text and spanning both
|
|
1881 |
%%% columns.
|
|
1882 |
|
|
1883 |
%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
1884 |
%% Single column inserts:
|
|
1885 |
|
|
1886 |
\let\savecaption\caption
|
|
1887 |
\let\xsavecaption\savecaption
|
|
1888 |
|
|
1889 |
\def\onecolfig{\ifvmode\else\unskip\fi
|
|
1890 |
\global\captypefigtrue
|
|
1891 |
\global\captypeplatefalse
|
|
1892 |
\@ifnextchar[\lookforposition{\lookforposition[e]}}
|
|
1893 |
|
|
1894 |
\def\onecolplate{\ifvmode\else\unskip\fi
|
|
1895 |
\global\advance\c@plate -1\relax
|
|
1896 |
\global\captypeplatetrue
|
|
1897 |
\global\captypefigfalse
|
|
1898 |
\@ifnextchar[\lookforposition{\lookforposition[e]}}
|
|
1899 |
|
|
1900 |
\def\onecoltable{\ifvmode\else\unskip\vskip1pt\fi\tabletextsize
|
|
1901 |
\global\captypefigfalse
|
|
1902 |
\global\captypeplatefalse
|
|
1903 |
\@ifnextchar[\lookforposition{\lookforposition[e]}
|
|
1904 |
}
|
|
1905 |
|
|
1906 |
%% This is used in case we get more than one letter, i.e.,
|
|
1907 |
%% \begin{figure}[htp]. This macro picks up only the first letter.
|
|
1908 |
|
|
1909 |
\def\defone#1#2*{\def\one{#1}}
|
|
1910 |
|
|
1911 |
\newcount\figandtabnumber
|
|
1912 |
\newbox\figandtabbox
|
|
1913 |
\newif\ifcaptypefig
|
|
1914 |
\newif\ifcaptypeplate
|
|
1915 |
|
|
1916 |
\long\def\catchcaption#1{%
|
|
1917 |
\ifcaptypefig%
|
|
1918 |
\expandafter\gdef\csname caption\the\figandtabnumber\endcsname{%
|
|
1919 |
\def\@captype{figure}\savecaption{#1}}%
|
|
1920 |
\else%
|
|
1921 |
\ifcaptypeplate
|
|
1922 |
\expandafter\gdef\csname caption\the\figandtabnumber\endcsname{%
|
|
1923 |
\def\@captype{plate}\savecaption{#1}}%
|
|
1924 |
\else
|
|
1925 |
\expandafter\gdef\csname caption\the\figandtabnumber\endcsname{%
|
|
1926 |
\def\@captype{table}\savecaption{#1}}%
|
|
1927 |
\fi\fi}
|
|
1928 |
|
|
1929 |
\long\def\dblcatchcaption#1{%
|
|
1930 |
\ifcaptypefig%
|
|
1931 |
\expandafter\gdef\csname dblcaption\the\dblfigandtabnumber\endcsname{%
|
|
1932 |
\def\@captype{figure}\savecaption{#1}}%
|
|
1933 |
\else%
|
|
1934 |
\ifcaptypeplate
|
|
1935 |
\expandafter\gdef\csname dblcaption\the\dblfigandtabnumber\endcsname{%
|
|
1936 |
\def\@captype{plate}\savecaption{#1}}%
|
|
1937 |
\else
|
|
1938 |
\expandafter\gdef\csname dblcaption\the\dblfigandtabnumber\endcsname{%
|
|
1939 |
\def\@captype{table}\savecaption{#1}}%
|
|
1940 |
\fi\fi}
|
|
1941 |
|
|
1942 |
\long\def\pcatchcaption#1{%
|
|
1943 |
\ifcaptypefig%
|
|
1944 |
\expandafter\gdef\csname pcaption\the\pagefloatnumber\endcsname{%
|
|
1945 |
\def\@captype{figure}\savecaption{#1}}%
|
|
1946 |
\else%
|
|
1947 |
\ifcaptypeplate
|
|
1948 |
\expandafter\gdef\csname pcaption\the\pagefloatnumber\endcsname{%
|
|
1949 |
\def\@captype{plate}\savecaption{#1}}%
|
|
1950 |
\else
|
|
1951 |
\expandafter\gdef\csname pcaption\the\pagefloatnumber\endcsname{%
|
|
1952 |
\def\@captype{table}\savecaption{#1}}%
|
|
1953 |
\fi\fi}
|
|
1954 |
%%%
|
|
1955 |
|
|
1956 |
\long\def\catchletteredcaption#1#2{%
|
|
1957 |
\ifcaptypefig%
|
|
1958 |
\expandafter\gdef\csname letteredcaption\the\figandtabnumber\endcsname{%
|
|
1959 |
\def\@captype{figure}\letteredcaption{#1}{#2}}%
|
|
1960 |
\else%
|
|
1961 |
\ifcaptypeplate
|
|
1962 |
\expandafter\gdef\csname letteredcaption\the\figandtabnumber\endcsname{%
|
|
1963 |
\def\@captype{plate}\letteredcaption{#1}{#2}}%
|
|
1964 |
\else
|
|
1965 |
\expandafter\gdef\csname letteredcaption\the\figandtabnumber\endcsname{%
|
|
1966 |
\def\@captype{table}\letteredcaption{#1}{#2}}%
|
|
1967 |
\fi\fi}
|
|
1968 |
|
|
1969 |
|
|
1970 |
\long\def\dblcatchletteredcaption#1#2{%
|
|
1971 |
\ifcaptypefig%
|
|
1972 |
\expandafter\gdef\csname dblletteredcaption\the\dblfigandtabnumber\endcsname{%
|
|
1973 |
\def\@captype{figure}%
|
|
1974 |
\letteredcaption{#1}{#2}}%
|
|
1975 |
\else%
|
|
1976 |
\ifcaptypeplate
|
|
1977 |
\expandafter\gdef\csname dblletteredcaption\the\dblfigandtabnumber\endcsname{%
|
|
1978 |
\def\@captype{plate}%
|
|
1979 |
\letteredcaption{#1}{#2}}%
|
|
1980 |
\else
|
|
1981 |
\expandafter\gdef\csname dblletteredcaption\the\dblfigandtabnumber\endcsname{%
|
|
1982 |
\def\@captype{table}%
|
|
1983 |
\letteredcaption{#1}{#2}}%
|
|
1984 |
\fi\fi}
|
|
1985 |
|
|
1986 |
\long\def\pcatchletteredcaption#1#2{%
|
|
1987 |
\ifcaptypefig%
|
|
1988 |
\expandafter\gdef\csname pletteredcaption\the\pagefloatnumber\endcsname{%
|
|
1989 |
\def\@captype{figure}%
|
|
1990 |
\letteredcaption{#1}{#2}}%
|
|
1991 |
\else%
|
|
1992 |
\ifcaptypeplate%
|
|
1993 |
\expandafter\gdef\csname pletteredcaption\the\pagefloatnumber\endcsname{%
|
|
1994 |
\def\@captype{plate}%
|
|
1995 |
\letteredcaption{#1}{#2}}%
|
|
1996 |
\else
|
|
1997 |
\expandafter\gdef\csname pletteredcaption\the\pagefloatnumber\endcsname{%
|
|
1998 |
\def\@captype{table}%
|
|
1999 |
\letteredcaption{#1}{#2}}%
|
|
2000 |
\fi\fi}
|
|
2001 |
|
|
2002 |
%%%
|
|
2003 |
\long\def\catchcontinuedcaption{%
|
|
2004 |
\ifcaptypefig%
|
|
2005 |
\expandafter\gdef\csname continuedcaption\the\figandtabnumber\endcsname{%
|
|
2006 |
\def\@captype{figure}\continuedcaption}%
|
|
2007 |
\else%
|
|
2008 |
\ifcaptypeplate
|
|
2009 |
\expandafter\gdef\csname continuedcaption\the\figandtabnumber\endcsname{%
|
|
2010 |
\def\@captype{plate}\continuedcaption}%
|
|
2011 |
\else
|
|
2012 |
\expandafter\gdef\csname continuedcaption\the\figandtabnumber\endcsname{%
|
|
2013 |
\def\@captype{table}\continuedcaption}%
|
|
2014 |
\fi\fi}
|
|
2015 |
|
|
2016 |
\long\def\dblcatchcontinuedcaption{%
|
|
2017 |
\ifcaptypefig%
|
|
2018 |
\expandafter\gdef\csname dblcontinuedcaption\the\dblfigandtabnumber\endcsname{%
|
|
2019 |
\def\@captype{figure}\continuedcaption}%
|
|
2020 |
\else%
|
|
2021 |
\ifcaptypeplate
|
|
2022 |
\expandafter\gdef\csname dblcontinuedcaption\the\dblfigandtabnumber\endcsname{%
|
|
2023 |
\def\@captype{plate}\continuedcaption}%
|
|
2024 |
\else
|
|
2025 |
\expandafter\gdef\csname dblcontinuedcaption\the\dblfigandtabnumber\endcsname{%
|
|
2026 |
\def\@captype{table}\continuedcaption}%
|
|
2027 |
\fi\fi}
|
|
2028 |
|
|
2029 |
\long\def\pcatchcontinuedcaption{%
|
|
2030 |
\ifcaptypefig%
|
|
2031 |
\expandafter\gdef\csname pcontinuedcaption\the\pagefloatnumber\endcsname{%
|
|
2032 |
\def\@captype{figure}\continuedcaption}%
|
|
2033 |
\else%
|
|
2034 |
\ifcaptypeplate
|
|
2035 |
\expandafter\gdef\csname pcontinuedcaption\the\pagefloatnumber\endcsname{%
|
|
2036 |
\def\@captype{plate}\continuedcaption}%
|
|
2037 |
\else
|
|
2038 |
\expandafter\gdef\csname pcontinuedcaption\the\pagefloatnumber\endcsname{%
|
|
2039 |
\def\@captype{table}\continuedcaption}%
|
|
2040 |
\fi\fi}
|
|
2041 |
|
|
2042 |
%%%
|
|
2043 |
\long\def\catchletteredcontinuedcaption#1{%
|
|
2044 |
\ifcaptypefig%
|
|
2045 |
\expandafter\gdef\csname letteredcontcaption\the\figandtabnumber\endcsname{%
|
|
2046 |
\def\@captype{figure}\letteredcontinuedcaption{#1}}%
|
|
2047 |
\else%
|
|
2048 |
\ifcaptypeplate%
|
|
2049 |
\expandafter\gdef\csname letteredcontcaption\the\figandtabnumber\endcsname{%
|
|
2050 |
\def\@captype{plate}\letteredcontinuedcaption{#1}}%
|
|
2051 |
\else
|
|
2052 |
\expandafter\gdef\csname letteredcontcaption\the\figandtabnumber\endcsname{%
|
|
2053 |
\def\@captype{table}\letteredcontinuedcaption{#1}}%
|
|
2054 |
\fi\fi}
|
|
2055 |
|
|
2056 |
|
|
2057 |
\long\def\dblcatchletteredcontinuedcaption#1{%
|
|
2058 |
\ifcaptypefig%
|
|
2059 |
\expandafter%
|
|
2060 |
\gdef\csname dblletteredcontcaption\the\dblfigandtabnumber\endcsname{%
|
|
2061 |
\def\@captype{figure}\letteredcontinuedcaption{#1}}%
|
|
2062 |
\else%
|
|
2063 |
\ifcaptypeplate
|
|
2064 |
\expandafter%
|
|
2065 |
\gdef\csname dblletteredcontcaption\the\dblfigandtabnumber\endcsname{%
|
|
2066 |
\def\@captype{plate}\letteredcontinuedcaption{#1}}%
|
|
2067 |
\else
|
|
2068 |
\expandafter%
|
|
2069 |
\gdef\csname dblletteredcontcaption\the\dblfigandtabnumber\endcsname{%
|
|
2070 |
\def\@captype{table}\letteredcontinuedcaption{#1}}%
|
|
2071 |
\fi\fi}
|
|
2072 |
|
|
2073 |
\long\def\pcatchletteredcontinuedcaption#1{%
|
|
2074 |
\ifcaptypefig%
|
|
2075 |
\expandafter%
|
|
2076 |
\gdef\csname pletteredcontcaption\the\pagefloatnumber\endcsname{%
|
|
2077 |
\def\@captype{figure}\letteredcontinuedcaption{#1}}%
|
|
2078 |
\else%
|
|
2079 |
\ifcaptypeplate%
|
|
2080 |
\expandafter%
|
|
2081 |
\gdef\csname pletteredcontcaption\the\pagefloatnumber\endcsname{%
|
|
2082 |
\def\@captype{plate}\letteredcontinuedcaption{#1}}%
|
|
2083 |
\else
|
|
2084 |
\expandafter%
|
|
2085 |
\gdef\csname pletteredcontcaption\the\pagefloatnumber\endcsname{%
|
|
2086 |
\def\@captype{table}\letteredcontinuedcaption{#1}}%
|
|
2087 |
\fi\fi}
|
|
2088 |
|
|
2089 |
%%%
|
|
2090 |
|
|
2091 |
|
|
2092 |
\newcount\pagefloatnumber
|
|
2093 |
|
|
2094 |
\let\savelabel\label
|
|
2095 |
\def\catchlabel#1{%
|
|
2096 |
\expandafter\gdef\csname label\the\figandtabnumber\endcsname{\savelabel{#1}}}
|
|
2097 |
|
|
2098 |
\def\pcatchlabel#1{%
|
|
2099 |
\expandafter\gdef\csname plabel\the\pagefloatnumber\endcsname{\savelabel{#1}}}
|
|
2100 |
|
|
2101 |
\def\dblcatchlabel#1{\expandafter%
|
|
2102 |
\gdef\csname dbllabel\the\dblfigandtabnumber\endcsname{\savelabel{#1}}}
|
|
2103 |
|
|
2104 |
%%
|
|
2105 |
|
|
2106 |
\def\startonecolfloat{%
|
|
2107 |
\expandafter\newbox\csname figandtabbox\the\figandtabnumber\endcsname%
|
|
2108 |
\global\setbox\csname figandtabbox\the\figandtabnumber\endcsname=
|
|
2109 |
\vbox\bgroup%
|
|
2110 |
\ifcaptypefig\else
|
|
2111 |
\ifcaptypeplate\def\@captype{plate}
|
|
2112 |
\else
|
|
2113 |
\def\@captype{table}\centering\tabletextsize\fi\fi%
|
|
2114 |
\let\continuedcaption\catchcontinuedcaption
|
|
2115 |
\let\letteredcaption\catchletteredcaption
|
|
2116 |
\let\letteredcontinuedcaption\catchletteredcontinuedcaption
|
|
2117 |
\let\caption\catchcaption
|
|
2118 |
\let\label\catchlabel}
|
|
2119 |
|
|
2120 |
\def\xtopfloat{topfloat}
|
|
2121 |
\def\xbotfloat{botfloat}
|
|
2122 |
|
|
2123 |
\newif\ifredefining
|
|
2124 |
|
|
2125 |
|
|
2126 |
\newbox\sizeoffloat
|
|
2127 |
|
|
2128 |
\def\endonecolfloat{%
|
|
2129 |
%\ifcaptypefig\else%
|
|
2130 |
%\ifnobottomtabline\global\nobottomtablinefalse\vskip-6.5pt\else
|
|
2131 |
%\vskip2pt
|
|
2132 |
%\thetablelines\fi\fi%
|
|
2133 |
%
|
|
2134 |
\egroup%
|
|
2135 |
\DonormalEndcol%
|
|
2136 |
%% make room in column for this insert:
|
|
2137 |
\setbox\sizeoffloat=\vbox{\let\unvbox\copy
|
|
2138 |
\let\c@table\bogus
|
|
2139 |
\let\c@figure\bogus
|
|
2140 |
\redefiningfalse \loopnum=\figandtabnumber
|
|
2141 |
\expandafter\csname \toporbotfloat\the\figandtabnumber\endcsname}%
|
|
2142 |
%%
|
|
2143 |
\expandafter\xdef\csname totalht\the\figandtabnumber\endcsname{%
|
|
2144 |
\the\ht\sizeoffloat}% <=== use before \sizeoffloat is unboxed
|
|
2145 |
\global\advance\figandtabnumber by1\relax}
|
|
2146 |
|
|
2147 |
\newcount\bogus
|
|
2148 |
\def\DonormalEndcol{%
|
|
2149 |
%% top float ==>
|
|
2150 |
\ifx\toporbotfloat\xtopfloat%
|
|
2151 |
%% figure ==>
|
|
2152 |
\ifcaptypefig%
|
|
2153 |
\expandafter\gdef\csname topfloat\the\figandtabnumber\endcsname{%
|
|
2154 |
\vbox{\vskip\PushOneColTopFig%
|
|
2155 |
\unvbox\csname figandtabbox\the\loopnum\endcsname%
|
|
2156 |
\vskip\abovefigcaptionskip%
|
|
2157 |
\csname caption\the\loopnum\endcsname%
|
|
2158 |
\csname letteredcaption\the\loopnum\endcsname%
|
|
2159 |
\csname continuedcaption\the\loopnum\endcsname%
|
|
2160 |
\csname letteredcontcaption\the\loopnum\endcsname}%
|
|
2161 |
\vskip\intextfloatskip%%
|
|
2162 |
\vskip-4pt %% probably an artifact of topskip??
|
|
2163 |
\ifredefining%
|
|
2164 |
\csname label\the\loopnum\endcsname%
|
|
2165 |
\expandafter\gdef\csname topfloat\the\loopnum\endcsname{}\fi}%
|
|
2166 |
\else%
|
|
2167 |
%% plate ==>
|
|
2168 |
\ifcaptypeplate%
|
|
2169 |
\expandafter\gdef\csname topfloat\the\figandtabnumber\endcsname{%
|
|
2170 |
\vbox{\vskip\PushOneColTopFig%
|
|
2171 |
\unvbox\csname figandtabbox\the\loopnum\endcsname
|
|
2172 |
\vskip\abovefigcaptionskip
|
|
2173 |
\csname caption\the\loopnum\endcsname
|
|
2174 |
\csname letteredcaption\the\loopnum\endcsname
|
|
2175 |
\csname continuedcaption\the\loopnum\endcsname
|
|
2176 |
\csname letteredcontcaption\the\loopnum\endcsname}
|
|
2177 |
\vskip\intextfloatskip %%
|
|
2178 |
\vskip-4pt %% probably an artifact of topskip??
|
|
2179 |
\ifredefining
|
|
2180 |
\csname label\the\loopnum\endcsname
|
|
2181 |
\expandafter\gdef\csname topfloat\the\loopnum\endcsname{}\fi}%
|
|
2182 |
%
|
|
2183 |
\else% table ==>
|
|
2184 |
\expandafter\gdef\csname topfloat\the\figandtabnumber\endcsname{%
|
|
2185 |
\vbox{\vskip\PushOneColTopTab %%
|
|
2186 |
\csname caption\the\loopnum\endcsname
|
|
2187 |
\csname letteredcaption\the\loopnum\endcsname
|
|
2188 |
\csname continuedcaption\the\loopnum\endcsname
|
|
2189 |
\csname letteredcontcaption\the\loopnum\endcsname
|
|
2190 |
\vskip\captionskip
|
|
2191 |
\unvbox\csname figandtabbox\the\loopnum\endcsname
|
|
2192 |
}\vskip\intextfloatskip %% why don't we need this?
|
|
2193 |
\vskip-10pt
|
|
2194 |
\ifredefining
|
|
2195 |
\csname label\the\loopnum\endcsname
|
|
2196 |
\expandafter\gdef\csname topfloat\the\loopnum\endcsname{}\fi}
|
|
2197 |
\fi\fi%
|
|
2198 |
%
|
|
2199 |
\else% bottom float
|
|
2200 |
%
|
|
2201 |
\ifcaptypefig
|
|
2202 |
\expandafter\gdef\csname botfloat\the\figandtabnumber\endcsname{%
|
|
2203 |
\vskip\intextfloatskip
|
|
2204 |
\vbox{\unvbox\csname figandtabbox\the\loopnum\endcsname
|
|
2205 |
\vskip\abovefigcaptionskip
|
|
2206 |
\csname caption\the\loopnum\endcsname
|
|
2207 |
\csname letteredcaption\the\loopnum\endcsname%
|
|
2208 |
\csname continuedcaption\the\loopnum\endcsname%
|
|
2209 |
\csname letteredcontcaption\the\loopnum\endcsname%
|
|
2210 |
\vskip\PushOneColBotFig%%
|
|
2211 |
}%
|
|
2212 |
\ifredefining%
|
|
2213 |
%\xdef\@currentlabel{\thefigure}%
|
|
2214 |
\csname label\the\loopnum\endcsname
|
|
2215 |
\expandafter\gdef\csname botfloat\the\loopnum\endcsname{}\fi}%
|
|
2216 |
\else
|
|
2217 |
\ifcaptypeplate
|
|
2218 |
\expandafter\gdef\csname botfloat\the\figandtabnumber\endcsname{%
|
|
2219 |
\vskip\intextfloatskip
|
|
2220 |
\vbox{\unvbox\csname figandtabbox\the\loopnum\endcsname
|
|
2221 |
\vskip\abovefigcaptionskip
|
|
2222 |
\csname caption\the\loopnum\endcsname
|
|
2223 |
\csname letteredcaption\the\loopnum\endcsname%
|
|
2224 |
\csname continuedcaption\the\loopnum\endcsname%
|
|
2225 |
\csname letteredcontcaption\the\loopnum\endcsname%
|
|
2226 |
\vskip\PushOneColBotFig%%
|
|
2227 |
}%
|
|
2228 |
\ifredefining%
|
|
2229 |
%\xdef\@currentlabel{\thefigure}%
|
|
2230 |
\csname label\the\loopnum\endcsname
|
|
2231 |
\expandafter\gdef\csname botfloat\the\loopnum\endcsname{}\fi}%
|
|
2232 |
\else% TABLE
|
|
2233 |
\expandafter\gdef\csname botfloat\the\figandtabnumber\endcsname{%
|
|
2234 |
\vskip\intextfloatskip
|
|
2235 |
\vbox{\csname caption\the\loopnum\endcsname
|
|
2236 |
\csname letteredcaption\the\loopnum\endcsname
|
|
2237 |
\csname continuedcaption\the\loopnum\endcsname
|
|
2238 |
\csname letteredcontcaption\the\loopnum\endcsname%
|
|
2239 |
\vskip.5\intextfloatskip
|
|
2240 |
\unvbox\csname figandtabbox\the\loopnum\endcsname%
|
|
2241 |
\vskip\PushOneColBotTab
|
|
2242 |
}%
|
|
2243 |
\ifredefining%
|
|
2244 |
\csname label\the\loopnum\endcsname
|
|
2245 |
\expandafter\gdef\csname botfloat\the\loopnum\endcsname{}\fi}%
|
|
2246 |
\fi\fi\fi}
|
|
2247 |
|
|
2248 |
%
|
|
2249 |
\def\startpagefloat{%
|
|
2250 |
\expandafter\newbox\csname pagebox\the\pagefloatnumber\endcsname%
|
|
2251 |
\global\setbox\csname pagebox\the\pagefloatnumber\endcsname=\vbox\bgroup%
|
|
2252 |
\hsize=\textwidth%
|
|
2253 |
\linewidth=\textwidth%
|
|
2254 |
\captionwidth=\widecaptionwidth
|
|
2255 |
\let\label\pcatchlabel\ifcaptypefig\else\centering\fi%
|
|
2256 |
\let\caption\pcatchcaption \let\letteredcaption\pcatchletteredcaption
|
|
2257 |
\let\continuedcaption\pcatchcontinuedcaption
|
|
2258 |
\let\letteredcontinuedcaption\pcatchletteredcontinuedcaption
|
|
2259 |
}
|
|
2260 |
|
|
2261 |
\def\endpagefloat{\egroup
|
|
2262 |
\DoNormalPage
|
|
2263 |
\global\advance\pagefloatnumber by1
|
|
2264 |
}
|
|
2265 |
|
|
2266 |
\def\DoNormalPage{\ifcaptypefig
|
|
2267 |
%
|
|
2268 |
\expandafter\gdef\csname pagefloat\the\pagefloatnumber\endcsname{%
|
|
2269 |
\vbox{\hsize=\textwidth
|
|
2270 |
\linewidth=\textwidth
|
|
2271 |
\twocolfigortabtrue
|
|
2272 |
\captionwidth=\widecaptionwidth
|
|
2273 |
\unvbox\csname pagebox\the\pageloopnum\endcsname
|
|
2274 |
\vskip\captionskip
|
|
2275 |
\csname pcaption\the\pageloopnum\endcsname
|
|
2276 |
\csname pletteredcaption\the\pageloopnum\endcsname
|
|
2277 |
\csname pcontinuedcaption\the\pageloopnum\endcsname
|
|
2278 |
\csname pletteredcontcaption\the\pageloopnum\endcsname
|
|
2279 |
} \vskip\intextfloatskip %%
|
|
2280 |
\xdef\@currentlabel{\thefigure}%
|
|
2281 |
\csname plabel\the\pageloopnum\endcsname
|
|
2282 |
\expandafter\gdef\csname pagefloat\the\pageloopnum\endcsname{}}%
|
|
2283 |
\else
|
|
2284 |
\ifcaptypeplate
|
|
2285 |
\expandafter\gdef\csname pagefloat\the\pagefloatnumber\endcsname{%
|
|
2286 |
\vbox{\hsize=\textwidth
|
|
2287 |
\linewidth=\textwidth
|
|
2288 |
\twocolfigortabtrue
|
|
2289 |
\captionwidth=\widecaptionwidth
|
|
2290 |
\unvbox\csname pagebox\the\pageloopnum\endcsname
|
|
2291 |
\vskip\captionskip
|
|
2292 |
\csname pcaption\the\pageloopnum\endcsname
|
|
2293 |
\csname pletteredcaption\the\pageloopnum\endcsname
|
|
2294 |
\csname pcontinuedcaption\the\pageloopnum\endcsname
|
|
2295 |
\csname pletteredcontcaption\the\pageloopnum\endcsname
|
|
2296 |
} \vskip\intextfloatskip %%
|
|
2297 |
\xdef\@currentlabel{\thefigure}%
|
|
2298 |
\csname plabel\the\pageloopnum\endcsname
|
|
2299 |
\expandafter\gdef\csname pagefloat\the\pageloopnum\endcsname{}}%
|
|
2300 |
\else
|
|
2301 |
\expandafter\gdef\csname pagefloat\the\pagefloatnumber\endcsname{%
|
|
2302 |
\vbox{%%
|
|
2303 |
\hsize=\textwidth
|
|
2304 |
\linewidth=\textwidth
|
|
2305 |
\iflandscapetable
|
|
2306 |
\dimen0=\textheight
|
|
2307 |
\advance\dimen0 by-\textwidth
|
|
2308 |
\hsize=\textheight
|
|
2309 |
\linewidth=\textheight\fi%
|
|
2310 |
\csname pcaption\the\pageloopnum\endcsname
|
|
2311 |
\csname pletteredcaption\the\pageloopnum\endcsname
|
|
2312 |
\csname pcontinuedcaption\the\pageloopnum\endcsname
|
|
2313 |
\csname pletteredcontcaption\the\pageloopnum\endcsname
|
|
2314 |
\vskip\intextfloatskip
|
|
2315 |
\unvbox\csname pagebox\the\pageloopnum\endcsname}
|
|
2316 |
\vskip\intextfloatskip %%
|
|
2317 |
\csname plabel\the\pageloopnum\endcsname
|
|
2318 |
\expandafter\gdef\csname pagefloat\the\pageloopnum\endcsname{}}\fi\fi}
|
|
2319 |
|
|
2320 |
\newif\iffirstfighere
|
|
2321 |
\global\firstfigheretrue
|
|
2322 |
|
|
2323 |
\newif\iffirsttabhere
|
|
2324 |
\global\firsttabheretrue
|
|
2325 |
|
|
2326 |
\def\dofigmessage{\iffirstfighere\global\firstfigherefalse
|
|
2327 |
\typeout{^^J
|
|
2328 |
========================================================================
|
|
2329 |
^^J
|
|
2330 |
C A R E F U L !!!!!^^J
|
|
2331 |
^^J
|
|
2332 |
You have used \string\begin{figure}[h]\space !^^J
|
|
2333 |
If there are any figures that appear earlier on the page^^J
|
|
2334 |
they may be numbered incorrectly.^^J
|
|
2335 |
^^J
|
|
2336 |
Please check this and every other page on which you have used ^^J
|
|
2337 |
\string\begin{figure}[h]\space !^^J
|
|
2338 |
^^J
|
|
2339 |
========================================================================
|
|
2340 |
^^J}
|
|
2341 |
\else
|
|
2342 |
\typeout{^^J^^J
|
|
2343 |
C A R E F U L !! \string\begin{figure}[h] used on this page !^^J^^J}
|
|
2344 |
\fi}
|
|
2345 |
|
|
2346 |
\def\dotabmessage{\iffirsttabhere\global\firsttabherefalse
|
|
2347 |
\typeout{^^J
|
|
2348 |
========================================================================
|
|
2349 |
^^J
|
|
2350 |
C A R E F U L !!!!!^^J
|
|
2351 |
^^J
|
|
2352 |
You have used \string\begin{table}[h]\space !^^J
|
|
2353 |
If there are any tables that appear earlier on the page^^J
|
|
2354 |
they may be numbered incorrectly.^^J
|
|
2355 |
^^J
|
|
2356 |
Please check this and every other page on which you have used ^^J
|
|
2357 |
\string\begin{table}[h]\space !^^J
|
|
2358 |
^^J
|
|
2359 |
========================================================================
|
|
2360 |
^^J}
|
|
2361 |
\else
|
|
2362 |
\typeout{^^J^^J
|
|
2363 |
C A R E F U L !! \string\begin{table}[h] used on this page !^^J^^J}
|
|
2364 |
\fi}
|
|
2365 |
|
|
2366 |
\def\lookforposition[#1]{\defone#1*%
|
|
2367 |
\let\go\startonecolfloat
|
|
2368 |
\let\endtable\endonecolfloat
|
|
2369 |
\let\endfigure\endonecolfloat
|
|
2370 |
\let\endplate\endonecolfloat
|
|
2371 |
\ifgalley
|
|
2372 |
\if\one p \def\one{s}
|
|
2373 |
\else
|
|
2374 |
\def\one{i}\fi
|
|
2375 |
%\else\ifappendon\def\one{h}\fi
|
|
2376 |
\fi%
|
|
2377 |
\ifjdraft
|
|
2378 |
\expandafter\ifx\csname setkeys\endcsname\relax\else
|
|
2379 |
\setkeys{Gin}{draft=false}\fi
|
|
2380 |
\if\one p \def\one{s}
|
|
2381 |
\else
|
|
2382 |
\def\one{i}\fi
|
|
2383 |
\else%\ifappendon\def\one{h}\fi
|
|
2384 |
\fi%
|
|
2385 |
\if\one h
|
|
2386 |
\ifcaptypeplate\else
|
|
2387 |
\ifcaptypefig
|
|
2388 |
\dofigmessage
|
|
2389 |
\else
|
|
2390 |
\dotabmessage
|
|
2391 |
\fi\fi%
|
|
2392 |
\let\go\doonecolfighere
|
|
2393 |
\let\endtable\endonecolfighere
|
|
2394 |
\let\endfigure\endonecolfighere
|
|
2395 |
\let\endplate\endonecolfighere
|
|
2396 |
\else%
|
|
2397 |
\if\one t%
|
|
2398 |
\gdef\toporbotfloat{topfloat}%
|
|
2399 |
\else%
|
|
2400 |
\if\one b%
|
|
2401 |
\gdef\toporbotfloat{botfloat}%
|
|
2402 |
\else%
|
|
2403 |
\if\one p%
|
|
2404 |
\let\go\startpagefloat%
|
|
2405 |
\let\endtable\endpagefloat%
|
|
2406 |
\let\endfigure\endpagefloat%
|
|
2407 |
\let\endplate\endpagefloat%
|
|
2408 |
\else%
|
|
2409 |
\if\one e% for either
|
|
2410 |
\ifdim\pagetotal>.6\pagegoal%
|
|
2411 |
\gdef\toporbotfloat{botfloat}%
|
|
2412 |
\else%
|
|
2413 |
\gdef\toporbotfloat{topfloat}%
|
|
2414 |
\fi%
|
|
2415 |
\else%
|
|
2416 |
\if\one i% for galley mode
|
|
2417 |
\let\go\dofiginsert%
|
|
2418 |
\let\endtable\endfiginsert%
|
|
2419 |
\let\endfigure\endfiginsert%
|
|
2420 |
\let\endplate\endfiginsert%
|
|
2421 |
\else%
|
|
2422 |
\if\one s% for special galley mode, for [p]
|
|
2423 |
\let\go\dodblfiginsert%
|
|
2424 |
\let\endtable\endspfiginsert%
|
|
2425 |
\let\endfigure\endspfiginsert%
|
|
2426 |
\let\endplate\endspfiginsert%
|
|
2427 |
\else%
|
|
2428 |
\doerr%
|
|
2429 |
\ifdim\pagetotal>.5\pagegoal%
|
|
2430 |
\gdef\toporbotfloat{botfloat}%
|
|
2431 |
\else%
|
|
2432 |
\gdef\toporbotfloat{topfloat}%
|
|
2433 |
\fi%
|
|
2434 |
\fi\fi\fi\fi\fi\fi\fi\go}
|
|
2435 |
|
|
2436 |
\newinsert\figinsert
|
|
2437 |
\skip\figinsert=0pt % space added when figinsert is used
|
|
2438 |
\count\figinsert=0 % insert magnification factor (1 to 1)
|
|
2439 |
\dimen\figinsert=\maxdimen % maximum space for figures
|
|
2440 |
|
|
2441 |
\def\dofiginsert{\setbox0=\vbox\bgroup
|
|
2442 |
\ifcaptypefig\def\@captype{figure}\else
|
|
2443 |
\ifcaptypeplate\def\@captype{plate}\else
|
|
2444 |
\def\@captype{table}\centering\tabletextsize\fi\fi}
|
|
2445 |
\def\endfiginsert{\egroup\insert\figinsert{\vskip24pt\vbox{\unvbox0}\vskip24pt}%
|
|
2446 |
\ignorespaces}
|
|
2447 |
|
|
2448 |
\def\endspfiginsert{\egroup\insert\figinsert{\newpage\vbox to\textheight{\vss
|
|
2449 |
\unvbox0}\newpage}%
|
|
2450 |
\ignorespaces}
|
|
2451 |
|
|
2452 |
\def\dodblfiginsert{\setbox0=\vbox\bgroup
|
|
2453 |
\captionwidth=\widecaptionwidth
|
|
2454 |
\hsize=\textwidth
|
|
2455 |
\linewidth=\textwidth
|
|
2456 |
\ifcaptypefig\def\@captype{figure}\else
|
|
2457 |
\ifcaptypeplate\def\@captype{plate}\else
|
|
2458 |
\def\@captype{table}\centering\fi\fi
|
|
2459 |
}
|
|
2460 |
|
|
2461 |
\def\enddblfiginsert{\egroup\insert\figinsert{\vskip24pt\vbox{\unvbox0}\vskip24pt}}
|
|
2462 |
|
|
2463 |
\long\def\saveherecaption#1{\gdef\thesavedcaption{\savecaption{#1}}}
|
|
2464 |
|
|
2465 |
\long\def\saveherecontinuedcaption{\gdef\thesavedcaption{\continuedcaption}}
|
|
2466 |
|
|
2467 |
\long\def\savehereletteredcaption#1#2{\gdef\thesavedcaption{%
|
|
2468 |
\gdef\theletter{#1}\savecaption{#2}}}
|
|
2469 |
|
|
2470 |
\long\def\savehereletteredcontinuedcaption#1{\gdef\thesavedcaption{%
|
|
2471 |
\letteredcontinuedcaption{#1}}}
|
|
2472 |
|
|
2473 |
\long\def\saveherelabel#1{\gdef\thesavedlabel{#1}}
|
|
2474 |
\saveherelabel{\relax}
|
|
2475 |
|
|
2476 |
\def\thesavedcaption{\relax}
|
|
2477 |
|
|
2478 |
\newbox\herebox
|
|
2479 |
%% either figure [h] or table [h]
|
|
2480 |
\newif\ifhere
|
|
2481 |
\def\doonecolfighere{\vskip1sp\bgroup%
|
|
2482 |
\heretrue%
|
|
2483 |
\ifcaptypefig\def\@captype{figure}\else%
|
|
2484 |
\ifcaptypeplate\def\@captype{plate}\else%
|
|
2485 |
\def\@captype{table}\centering\fi\fi%
|
|
2486 |
\setbox\herebox\vbox\bgroup%
|
|
2487 |
\let\label\saveherelabel%
|
|
2488 |
\let\caption\saveherecaption%
|
|
2489 |
\let\letteredcaption\savehereletteredcaption%
|
|
2490 |
\let\continuedcaption\saveherecontinuedcaption%
|
|
2491 |
\let\letteredcontinuedcaption\savehereletteredcontinuedcaption%
|
|
2492 |
}
|
|
2493 |
|
|
2494 |
\def\xrelax{\relax}
|
|
2495 |
|
|
2496 |
\def\endonecolfighere{%
|
|
2497 |
\egroup%
|
|
2498 |
\vskip\intextfloatskip%
|
|
2499 |
\vtop{\vskip-5.5pt
|
|
2500 |
%\ifappendon
|
|
2501 |
%\let\thefigure\appthefigure
|
|
2502 |
%\let\thetable\appthetable
|
|
2503 |
%\let\theplate\apptheplate
|
|
2504 |
%\let\savecaption\appcaption
|
|
2505 |
%\fi
|
|
2506 |
%
|
|
2507 |
\ifx\thesavedcaption\xrelax
|
|
2508 |
\unvbox\herebox
|
|
2509 |
\else
|
|
2510 |
\ifcaptypefig
|
|
2511 |
\unvbox\herebox
|
|
2512 |
\thesavedcaption
|
|
2513 |
\else
|
|
2514 |
\ifcaptypeplate
|
|
2515 |
\unvbox\herebox
|
|
2516 |
\thesavedcaption
|
|
2517 |
%
|
|
2518 |
\else
|
|
2519 |
%
|
|
2520 |
\thesavedcaption
|
|
2521 |
\unvbox\herebox
|
|
2522 |
\fi
|
|
2523 |
\fi\fi
|
|
2524 |
%
|
|
2525 |
\gdef\thesavedcaption{\relax}
|
|
2526 |
\ifx\thesavedlabel\xrelax\else%
|
|
2527 |
\ifcaptypefig\else\edef\@currentlabel{\thetable}\fi
|
|
2528 |
\savelabel{\thesavedlabel}
|
|
2529 |
\gdef\thesavedlabel{\relax}
|
|
2530 |
\fi
|
|
2531 |
\gdef\theletter{\relax}
|
|
2532 |
}\vskip1sp
|
|
2533 |
\egroup
|
|
2534 |
\vskip\intextfloatskip
|
|
2535 |
}
|
|
2536 |
|
|
2537 |
\newbox\endfigbox
|
|
2538 |
|
|
2539 |
\def\doerr{%
|
|
2540 |
\typeout{\space\space\space\space\space\space\space\space\space}
|
|
2541 |
\typeout{Sorry!
|
|
2542 |
Your choices following \string\figure\space or \string\table\space^^J%
|
|
2543 |
are only [h] for `here', [t] for `top', [b] for `bottom', or [p]
|
|
2544 |
for `page'.^^J%
|
|
2545 |
I have ignored the [\one] and inserted the figure or table at this
|
|
2546 |
point^^J%
|
|
2547 |
on the page. See documentation if you need more help.}
|
|
2548 |
\typeout{\space\space\space\space\space\space\space\space\space}}
|
|
2549 |
|
|
2550 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
2551 |
%%% Inserts spanning both columns:
|
|
2552 |
|
|
2553 |
\newbox\spanbox
|
|
2554 |
|
|
2555 |
\def\centertabular{\bgroup\centering\savetabular}
|
|
2556 |
\def\endcentertabular{\saveendtabular\vskip1pt\egroup}
|
|
2557 |
|
|
2558 |
%%%
|
|
2559 |
|
|
2560 |
\newbox\dbltopins
|
|
2561 |
\newbox\dblbotins
|
|
2562 |
|
|
2563 |
\newskip\dblbotskip
|
|
2564 |
\dblbotskip=12pt plus 3pt
|
|
2565 |
|
|
2566 |
\def\twocolfig{\global\captypefigtrue
|
|
2567 |
\global\captypeplatefalse
|
|
2568 |
\def\@captype{figure}
|
|
2569 |
\@ifnextchar[\twolookforposition{\twolookforposition[t]}}%
|
|
2570 |
|
|
2571 |
\def\twocolplate{\global\captypeplatetrue
|
|
2572 |
\global\captypefigfalse
|
|
2573 |
\def\@captype{plate}
|
|
2574 |
\@ifnextchar[\twolookforposition{\twolookforposition[t]}}%
|
|
2575 |
|
|
2576 |
\def\twocoltable{\vskip1pt\tabletextsize
|
|
2577 |
\global\captypefigfalse
|
|
2578 |
\global\captypeplatefalse
|
|
2579 |
\def\@captype{table}
|
|
2580 |
\@ifnextchar[\twolookforposition{\twolookforposition[t]}}%
|
|
2581 |
|
|
2582 |
\newcount\dblfigandtabnumber
|
|
2583 |
\dblfigandtabnumber=1
|
|
2584 |
\newbox\dblfigandtabbox
|
|
2585 |
|
|
2586 |
\def\starttwocolfloat{\ifvmode\else\unskip\fi\expandafter%
|
|
2587 |
\ifx\csname dblfigandtabbox\the\dblfigandtabnumber\endcsname\relax%
|
|
2588 |
\expandafter%
|
|
2589 |
\newbox\csname dblfigandtabbox\the\dblfigandtabnumber\endcsname%
|
|
2590 |
\fi%
|
|
2591 |
\global\setbox\csname dblfigandtabbox\the\dblfigandtabnumber\endcsname=
|
|
2592 |
\vbox\bgroup\let\label\dblcatchlabel%
|
|
2593 |
%
|
|
2594 |
\ifcaptypefig\def\@captype{figure}\else%
|
|
2595 |
\ifcaptypeplate\def\@captype{plate}\else%
|
|
2596 |
\def\@captype{table}\centering\tabletextsize%
|
|
2597 |
\fi%
|
|
2598 |
\fi%
|
|
2599 |
\captionwidth=\widecaptionwidth
|
|
2600 |
\hsize=\textwidth
|
|
2601 |
\linewidth=\textwidth\relax
|
|
2602 |
%
|
|
2603 |
\let\caption\dblcatchcaption
|
|
2604 |
\let\letteredcaption\dblcatchletteredcaption
|
|
2605 |
\let\continuedcaption\dblcatchcontinuedcaption
|
|
2606 |
\let\letteredcontinuedcaption\dblcatchletteredcontinuedcaption
|
|
2607 |
\let\label\dblcatchlabel
|
|
2608 |
}
|
|
2609 |
|
|
2610 |
\newcount\dblloopnum
|
|
2611 |
\newcount\savedblfigandtabnumber
|
|
2612 |
%\newcount\savefigandtabnumber
|
|
2613 |
|
|
2614 |
\def\xdbltopfloat{dbltopfloat}
|
|
2615 |
\def\xdblbotfloat{dblbotfloat}
|
|
2616 |
|
|
2617 |
\def\endtwocolfloat{%
|
|
2618 |
%\ifcaptypefig\else%
|
|
2619 |
%\ifcaptypeplate\else%
|
|
2620 |
%\ifnobottomtabline\global\nobottomtablinefalse\vskip-6.5pt\else%
|
|
2621 |
%\vskip2pt
|
|
2622 |
%\thetablelines\fi\fi\fi%
|
|
2623 |
%
|
|
2624 |
\egroup%
|
|
2625 |
\ifx\dbltoporbotfloat\xdbltopfloat%
|
|
2626 |
%%++
|
|
2627 |
\ifcaptypefig%
|
|
2628 |
\expandafter\gdef\csname dbltopfloat\the\dblfigandtabnumber\endcsname{%
|
|
2629 |
\vbox{\vskip\PushTwoColTopFig%
|
|
2630 |
\copy\csname dblfigandtabbox\the\dblloopnum\endcsname%
|
|
2631 |
\vskip\captionskip%
|
|
2632 |
\csname dblcaption\the\dblloopnum\endcsname%
|
|
2633 |
\csname dblletteredcaption\the\dblloopnum\endcsname%
|
|
2634 |
\csname dblcontinuedcaption\the\dblloopnum\endcsname%
|
|
2635 |
\csname dblletteredcontcaption\the\dblloopnum\endcsname%
|
|
2636 |
\ifredefining%
|
|
2637 |
\xdef\@currentlabel{\thefigure}%
|
|
2638 |
\csname dbllabel\the\dblloopnum\endcsname\fi}%
|
|
2639 |
\vskip\intextfloatskip %%
|
|
2640 |
\vskip-5pt% because there is a space above the top of text, from topskip?
|
|
2641 |
\ifredefining%
|
|
2642 |
\expandafter\gdef\csname dbltopfloat\the\dblloopnum\endcsname{}\fi}%
|
|
2643 |
\else\ifcaptypeplate%
|
|
2644 |
\expandafter\gdef\csname dbltopfloat\the\dblfigandtabnumber\endcsname{%
|
|
2645 |
\vbox{\vskip\PushTwoColTopFig%
|
|
2646 |
\copy\csname dblfigandtabbox\the\dblloopnum\endcsname%
|
|
2647 |
\vskip\captionskip%
|
|
2648 |
\csname dblcaption\the\dblloopnum\endcsname%
|
|
2649 |
\csname dblletteredcaption\the\dblloopnum\endcsname%
|
|
2650 |
\csname dblcontinuedcaption\the\dblloopnum\endcsname%
|
|
2651 |
\csname dblletteredcontcaption\the\dblloopnum\endcsname%
|
|
2652 |
\ifredefining%
|
|
2653 |
\xdef\@currentlabel{\theplate}%
|
|
2654 |
\csname dbllabel\the\dblloopnum\endcsname\fi}%
|
|
2655 |
\vskip\intextfloatskip %%
|
|
2656 |
\vskip-5pt% because there is a space above the top of text, from topskip?
|
|
2657 |
\ifredefining%
|
|
2658 |
\expandafter\gdef\csname dbltopfloat\the\dblloopnum\endcsname{}\fi}%
|
|
2659 |
\else% table
|
|
2660 |
\expandafter\gdef\csname dbltopfloat\the\dblfigandtabnumber\endcsname{%
|
|
2661 |
\vbox{\vskip\PushTwoColTopTab%
|
|
2662 |
\csname dblcaption\the\dblloopnum\endcsname%
|
|
2663 |
\csname dblletteredcaption\the\dblloopnum\endcsname%
|
|
2664 |
\csname dblcontinuedcaption\the\dblloopnum\endcsname%
|
|
2665 |
\csname dblletteredcontcaption\the\dblloopnum\endcsname%
|
|
2666 |
\vskip\captionskip%
|
|
2667 |
\copy\csname dblfigandtabbox\the\dblloopnum\endcsname}%
|
|
2668 |
\vskip\intextfloatskip %%
|
|
2669 |
\vskip-5pt% because there is a space above the top of text, from topskip?
|
|
2670 |
\ifredefining%
|
|
2671 |
\csname dbllabel\the\dblloopnum\endcsname%
|
|
2672 |
\expandafter\gdef\csname dbltopfloat\the\dblloopnum\endcsname{}\fi}%
|
|
2673 |
%
|
|
2674 |
\fi\fi%
|
|
2675 |
%
|
|
2676 |
\else% bottom float
|
|
2677 |
%
|
|
2678 |
\ifcaptypefig%
|
|
2679 |
\expandafter\gdef\csname dblbotfloat\the\dblfigandtabnumber\endcsname{%
|
|
2680 |
\vskip\intextfloatskip%
|
|
2681 |
\vbox{\copy\csname dblfigandtabbox\the\dblloopnum\endcsname%
|
|
2682 |
\vskip\captionskip%
|
|
2683 |
\csname dblcaption\the\dblloopnum\endcsname%
|
|
2684 |
\csname dblletteredcaption\the\dblloopnum\endcsname%
|
|
2685 |
\csname dblcontinuedcaption\the\dblloopnum\endcsname%
|
|
2686 |
\csname dblletteredcontcaption\the\dblloopnum\endcsname%
|
|
2687 |
\ifredefining%
|
|
2688 |
\csname dbllabel\the\dblloopnum\endcsname\fi%
|
|
2689 |
\vskip\PushTwoColBotFig}%???
|
|
2690 |
\ifredefining%
|
|
2691 |
\expandafter\gdef\csname dblbotfloat\the\dblloopnum\endcsname{}\fi}%
|
|
2692 |
\else%
|
|
2693 |
%%
|
|
2694 |
\ifcaptypeplate%
|
|
2695 |
\expandafter\gdef\csname dblbotfloat\the\dblfigandtabnumber\endcsname{%
|
|
2696 |
\vskip\intextfloatskip%
|
|
2697 |
\vbox{\copy\csname dblfigandtabbox\the\dblloopnum\endcsname%
|
|
2698 |
\vskip\captionskip%
|
|
2699 |
\csname dblcaption\the\dblloopnum\endcsname%
|
|
2700 |
\csname dblletteredcaption\the\dblloopnum\endcsname%
|
|
2701 |
\csname dblcontinuedcaption\the\dblloopnum\endcsname%
|
|
2702 |
\csname dblletteredcontcaption\the\dblloopnum\endcsname%
|
|
2703 |
\ifredefining%
|
|
2704 |
\csname dbllabel\the\dblloopnum\endcsname\fi%
|
|
2705 |
\vskip\PushTwoColBotFig}%
|
|
2706 |
\ifredefining%
|
|
2707 |
\expandafter\gdef\csname dblbotfloat\the\dblloopnum\endcsname{}\fi
|
|
2708 |
}%
|
|
2709 |
\else% table
|
|
2710 |
\expandafter\gdef\csname dblbotfloat\the\dblfigandtabnumber\endcsname{%
|
|
2711 |
\vskip\intextfloatskip
|
|
2712 |
\vbox{%
|
|
2713 |
\csname dblcaption\the\dblloopnum\endcsname%
|
|
2714 |
\csname dblletteredcaption\the\dblloopnum\endcsname%
|
|
2715 |
\csname dblcontinuedcaption\the\dblloopnum\endcsname%
|
|
2716 |
\csname dblletteredcontcaption\the\dblloopnum\endcsname%
|
|
2717 |
\vskip\captionskip
|
|
2718 |
\ifredefining%
|
|
2719 |
\csname dbllabel\the\dblloopnum\endcsname\fi%
|
|
2720 |
\copy\csname dblfigandtabbox\the\dblloopnum\endcsname%
|
|
2721 |
\vskip\PushTwoColBotTab}%
|
|
2722 |
\ifredefining%
|
|
2723 |
\expandafter\gdef\csname dblbotfloat\the\dblloopnum\endcsname{}\fi}%
|
|
2724 |
%
|
|
2725 |
\fi\fi\fi%
|
|
2726 |
%%
|
|
2727 |
\global\advance\dblfigandtabnumber by1 \relax}
|
|
2728 |
|
|
2729 |
\newbox\dblspanherebox
|
|
2730 |
|
|
2731 |
\def\dodblfigurehere{\global\setbox\dblspanherebox=\vbox\bgroup
|
|
2732 |
\let\label\saveherelabel
|
|
2733 |
\ifcaptypefig\def\@captype{figure}\else
|
|
2734 |
\ifcaptypeplate\def\@captype{plate}\else
|
|
2735 |
\def\@captype{table}\centering\fi\fi
|
|
2736 |
\vskip\intextfloatskip
|
|
2737 |
\captionwidth=\widecaptionwidth
|
|
2738 |
\hsize=\textwidth
|
|
2739 |
\linewidth=\textwidth
|
|
2740 |
\let\label\saveherelabel
|
|
2741 |
\let\caption\saveherecaption
|
|
2742 |
\let\letteredcaption\savehereletteredcaption
|
|
2743 |
\let\continuedcaption\saveherecontinuedcaption
|
|
2744 |
\let\letteredcontinuedcaption\savehereletteredcontinuedcaption}
|
|
2745 |
|
|
2746 |
\def\enddodblfigurehere{\vskip\intextfloatskip\egroup%
|
|
2747 |
\aftergroup\endcolsneatly}
|
|
2748 |
|
|
2749 |
|
|
2750 |
%%
|
|
2751 |
\def\endcolsneatly{\ifdim\lastskip=2sp
|
|
2752 |
\vskip-9.5pt\null\fi
|
|
2753 |
\endtwocolumns
|
|
2754 |
\vbox{\vskip\intextfloatskip
|
|
2755 |
\captionwidth=\widecaptionwidth
|
|
2756 |
\ifcaptypefig\def\@captype{figure}\else
|
|
2757 |
\ifcaptypeplate\def\@captype{plate}\else
|
|
2758 |
\def\@captype{table}\centering\fi\fi
|
|
2759 |
%\ifappendon
|
|
2760 |
%\let\thefigure\appthefigure
|
|
2761 |
%\let\thetable\appthetable
|
|
2762 |
%\let\theplate\apptheplate
|
|
2763 |
%\let\savecaption\appcaption
|
|
2764 |
%\fi
|
|
2765 |
%
|
|
2766 |
\ifx\thesavedcaption\xrelax
|
|
2767 |
\unvbox\dblspanherebox
|
|
2768 |
\vskip\intextfloatskip
|
|
2769 |
\else
|
|
2770 |
\ifcaptypefig
|
|
2771 |
\unvbox\dblspanherebox
|
|
2772 |
\thesavedcaption
|
|
2773 |
\vskip\intextfloatskip
|
|
2774 |
%
|
|
2775 |
\else
|
|
2776 |
\ifcaptypeplate
|
|
2777 |
\unvbox\dblspanherebox
|
|
2778 |
\thesavedcaption
|
|
2779 |
\vskip\intextfloatskip
|
|
2780 |
%
|
|
2781 |
\else
|
|
2782 |
\vskip\intextfloatskip
|
|
2783 |
\thesavedcaption
|
|
2784 |
\unvbox\dblspanherebox
|
|
2785 |
\vskip\intextfloatskip
|
|
2786 |
\fi
|
|
2787 |
\fi\fi
|
|
2788 |
%
|
|
2789 |
\gdef\thesavedcaption{\relax}
|
|
2790 |
\ifx\thesavedlabel\xrelax\else\savelabel{\thesavedlabel}
|
|
2791 |
\gdef\thesavedlabel{\relax}\fi
|
|
2792 |
\gdef\theletter{\relax}
|
|
2793 |
\vskip\intextfloatskip}
|
|
2794 |
\twocolumns\null
|
|
2795 |
\vskip2sp}
|
|
2796 |
|
|
2797 |
\def\twolookforposition[#1]{\defone#1*%
|
|
2798 |
\let\go\starttwocolfloat%
|
|
2799 |
\ifgalley%
|
|
2800 |
\if\one p \def\one{s}%
|
|
2801 |
\else%
|
|
2802 |
\def\one{i}%
|
|
2803 |
\fi%
|
|
2804 |
\fi%
|
|
2805 |
\ifjdraft%
|
|
2806 |
\expandafter\ifx\csname setkeys\endcsname\relax\else
|
|
2807 |
\setkeys{Gin}{draft=false}\fi
|
|
2808 |
\if\one p \def\one{s}%
|
|
2809 |
\else%
|
|
2810 |
\def\one{i}%
|
|
2811 |
\fi%
|
|
2812 |
\fi%
|
|
2813 |
%\ifappendon\def\one{h}\fi%
|
|
2814 |
%%
|
|
2815 |
\if\one h%
|
|
2816 |
\ifcaptypeplate%
|
|
2817 |
\else%
|
|
2818 |
\ifcaptypefig%
|
|
2819 |
\dofigmessage%
|
|
2820 |
\else%
|
|
2821 |
\dotabmessage%
|
|
2822 |
\fi%
|
|
2823 |
\fi%
|
|
2824 |
\ifgalley%
|
|
2825 |
\gdef\dbltoporbotfloat{dbltopfloat}%
|
|
2826 |
\else% not galley ==>
|
|
2827 |
\let\go\dodblfigurehere%
|
|
2828 |
\expandafter\gdef\csname endfigure*\endcsname{\enddodblfigurehere}%
|
|
2829 |
\expandafter\gdef\csname endtable*\endcsname{\enddodblfigurehere}%
|
|
2830 |
\expandafter\gdef\csname endplate*\endcsname{\enddodblfigurehere}%
|
|
2831 |
\fi% end ifgalley
|
|
2832 |
\else%
|
|
2833 |
\if\one t%
|
|
2834 |
\gdef\dbltoporbotfloat{dbltopfloat}%
|
|
2835 |
\else%
|
|
2836 |
\if\one b%
|
|
2837 |
\gdef\dbltoporbotfloat{dblbotfloat}%
|
|
2838 |
\else%
|
|
2839 |
\if\one p%
|
|
2840 |
\let\go\startpagefloat%
|
|
2841 |
\expandafter\gdef\csname endfigure*\endcsname{\endpagefloat}
|
|
2842 |
\expandafter\gdef\csname endtable*\endcsname{\endpagefloat}
|
|
2843 |
\expandafter\gdef\csname endplate*\endcsname{\endpagefloat}
|
|
2844 |
\else%
|
|
2845 |
\if\one i% for galley mode
|
|
2846 |
\let\go\dodblfiginsert%
|
|
2847 |
\expandafter\gdef\csname endfigure*\endcsname{\enddblfiginsert}
|
|
2848 |
\expandafter\gdef\csname endtable*\endcsname{\enddblfiginsert}
|
|
2849 |
\expandafter\gdef\csname endplate*\endcsname{\enddblfiginsert}
|
|
2850 |
\else%
|
|
2851 |
\if\one s% for special galley mode, for [p]
|
|
2852 |
\let\go\dodblfiginsert%
|
|
2853 |
\expandafter\gdef\csname endfigure*\endcsname{\endspfiginsert}%
|
|
2854 |
\expandafter\gdef\csname endtable*\endcsname{\endspfiginsert}
|
|
2855 |
\expandafter\gdef\csname endplate*\endcsname{\endspfiginsert}
|
|
2856 |
\else%
|
|
2857 |
\doerr%
|
|
2858 |
\fi%
|
|
2859 |
\fi%
|
|
2860 |
\fi%
|
|
2861 |
\fi%
|
|
2862 |
\fi%
|
|
2863 |
\fi\go}%
|
|
2864 |
|
|
2865 |
\let\saveenddocument\enddocument
|
|
2866 |
|
|
2867 |
\def\enddocument{%
|
|
2868 |
\ifdim\ht\dbltopins>0pt\vbox{\unvbox\dbltopins}\fi
|
|
2869 |
\ifdim\ht\dblbotins>0pt\vbox{\unvbox\dblbotins}\fi
|
|
2870 |
\ifnum\pagefloatnumber>\pageloopnum
|
|
2871 |
\newpage
|
|
2872 |
\insertpage{\hsize=\textwidth
|
|
2873 |
\linewidth=\textwidth
|
|
2874 |
\csname pagefloat\the\pageloopnum \endcsname}\fi%
|
|
2875 |
\immediate\write\@auxout{\string\gdef\string\lastpage{\thepage}}
|
|
2876 |
\saveenddocument}
|
|
2877 |
|
|
2878 |
\splittopskip=\topskip
|
|
2879 |
|
|
2880 |
\def~{\penalty\@M{ }}
|
|
2881 |
|
|
2882 |
\def\mathleftline{\vskip-\parskip
|
|
2883 |
\hbox to\textwidth{\hrulefill\hskip.5\textwidth}\vskip-\abovedisplayskip}
|
|
2884 |
|
|
2885 |
\def\mathrightline{\hbox to\textwidth{\hskip.5\textwidth\hrulefill}\vskip18pt}
|
|
2886 |
|
|
2887 |
\let\topline\mathleftline
|
|
2888 |
\let\botline\mathrightline
|
|
2889 |
|
|
2890 |
%% End Two Column Macros
|
|
2891 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
2892 |
|
|
2893 |
\let\savefigure\figure
|
|
2894 |
\let\saveendfigure\endfigure
|
|
2895 |
|
|
2896 |
\def\article{\twocolumns
|
|
2897 |
\bgroup
|
|
2898 |
\renewcommand\thefootnote{}%
|
|
2899 |
\footnotetext{\vbox to 3.7cm{\sectionfont Reserved for Publication Footnotes\vfill}}
|
|
2900 |
\egroup
|
|
2901 |
}
|
|
2902 |
\def\endarticle{\endtwocolumns\newpage
|
|
2903 |
\expandafter\gdef\csname table*\endcsname{\@dblfloat{table}}
|
|
2904 |
\expandafter\gdef\csname endtable*\endcsname{\end@dblfloat}
|
|
2905 |
\expandafter\gdef\csname figure*\endcsname{\@dblfloat{figure}}
|
|
2906 |
\expandafter\gdef\csname endfigure*\endcsname{\end@dblfloat}
|
|
2907 |
\gdef\figure{\futurelet\next\lookforbrac}}
|
|
2908 |
|
|
2909 |
\def\lookforbrac{\if\next[
|
|
2910 |
\let\go\figone\else \let\go\figtwo\fi\go}
|
|
2911 |
|
|
2912 |
\def\figone[#1]{\@float{figure}[#1]\hsize276pt}
|
|
2913 |
\def\figtwo{\@float{figure}\hsize276pt}
|
|
2914 |
|
|
2915 |
|
|
2916 |
\newif\ifjdraft
|
|
2917 |
\newdimen\captionwidth
|
|
2918 |
\newdimen\widecaptionwidth
|
|
2919 |
\newif\ifgalley
|
|
2920 |
\let\tabletextsize\normalsize
|
|
2921 |
|
|
2922 |
|
|
2923 |
|
|
2924 |
|
|
2925 |
\def\inlinefrac#1#2{%
|
|
2926 |
\mbox{\raisebox{.8mm}{%
|
|
2927 |
$\textstyle #1$%
|
|
2928 |
}
|
|
2929 |
$\!\!\! / \!\!\!$
|
|
2930 |
\raisebox{-.8mm}{$\textstyle #2$}}%
|
|
2931 |
}
|
|
2932 |
|
|
2933 |
\newcount\tablenoteloopnum
|
|
2934 |
\newcount\tablenotenum
|
|
2935 |
|
|
2936 |
\def\tablenote#1{\global\advance\tablenotenum by 1\relax
|
|
2937 |
$^{\@fnsymbol{\the\tablenotenum}}$\expandafter\gdef\csname
|
|
2938 |
tabnote\the\tablenotenum\endcsname{#1}}
|
|
2939 |
|
|
2940 |
\def\tablenotes{\tablenoteloopnum=\tablenotenum
|
|
2941 |
\global\advance\tablenoteloopnum by 1
|
|
2942 |
\tablenotenum=0
|
|
2943 |
{\figtextfont
|
|
2944 |
\leftskip=0pt \rightskip=\leftskip
|
|
2945 |
\parfillskip=0pt plus 1 fil
|
|
2946 |
\loop
|
|
2947 |
\vskip2pt
|
|
2948 |
\noindent
|
|
2949 |
\global\advance\tablenotenum by 1
|
|
2950 |
\ifnum\tablenotenum<\tablenoteloopnum
|
|
2951 |
$^{\@fnsymbol{\the\tablenotenum}}$\csname
|
|
2952 |
tabnote\the\tablenotenum\endcsname
|
|
2953 |
\repeat}
|
|
2954 |
}
|
|
2955 |
|
|
2956 |
%% convenient macros from author:
|
|
2957 |
|
|
2958 |
|
|
2959 |
\def\o{\omega}
|
|
2960 |
\def\pr{\partial}
|
|
2961 |
\def\d{\delta}
|
|
2962 |
\def\a{\alpha}
|
|
2963 |
\def\p{\phi}
|
|
2964 |
\def\dst{\displaystyle}
|
|
2965 |
\def\chit{\tilde{\chi}}
|
|
2966 |
\def\etat{\tilde{\eta}}
|
|
2967 |
|
|
2968 |
\def\fdb{\mathbb{R}/_{\dst{ \mathbb{Z}}}}
|
|
2969 |
\def\fd{\mathbb{R}/_{\scriptstyle \mathbb{Z}}}
|
|
2970 |
\def\f12{\frac{1}{2}}
|
|
2971 |
\def\fr32{\frac{3}{2}}
|
|
2972 |
\def\vs{\vspace{10pt}}
|
|
2973 |
\def\vsm{\vspace{-10pt}}
|
|
2974 |
\def\xb{\bar{x}}
|
|
2975 |
\def\yb{\bar{y}}
|
|
2976 |
\def\tb{\bar{t}}
|
|
2977 |
\def\xt{\tilde{x}}
|
|
2978 |
\def\yt{\tilde{y}}
|
|
2979 |
\def\gtt{\tilde{g}}
|
|
2980 |
\def\vptt{\tilde{\varphi}}
|
|
2981 |
\def\htt{\tilde{h}}
|
|
2982 |
\def\ktt{\tilde{k}}
|
|
2983 |
\def\ub{\bar{u}}
|
|
2984 |
\def\hb{\bar{h}}
|
|
2985 |
\def\vep{\varepsilon}
|
|
2986 |
\def\vs{\vspace{10pt}}
|
|
2987 |
\def\be{\begin{equation}}
|
|
2988 |
\def\ee{\end{equation}}
|
|
2989 |
\newcommand{\mfrac}[2]{\frac{\displaystyle{#1}}{\displaystyle{#2}}}
|
|
2990 |
|
|
2991 |
|
|
2992 |
\newtheorem{theorem}{Theorem}
|
|
2993 |
\newtheorem{lemma}{Lemma}
|
|
2994 |
\newtheorem{corollary}[theorem]{Corollary}
|
|
2995 |
\newtheorem{proposition}[theorem]{Proposition}
|
|
2996 |
\newtheorem{definition}{Def\,inition}
|
|
2997 |
\newtheorem{claim}{Claim}
|
|
2998 |
\newtheorem{conjecture}[theorem]{Conjecture}
|
|
2999 |
\newtheorem{observation}[theorem]{Observation}
|
|
3000 |
\newtheorem{problem}[theorem]{Problem}
|
|
3001 |
\newtheorem{notation}[theorem]{Notation}
|
|
3002 |
\newtheorem{alemma}{Lemma}
|
|
3003 |
\newtheorem{remark}{Remark}
|
|
3004 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
3005 |
|
|
3006 |
|
|
3007 |
\def\acknowledgments{\vskip14pt\bgroup\footnotesize\baselineskip 8pt
|
|
3008 |
\materialfont
|
|
3009 |
\def\textit##1{{\materialitfont ##1}}
|
|
3010 |
\def\it{\materialitfont}
|
|
3011 |
\def\bf{\materialbffont}
|
|
3012 |
\def\textbf##1{{\materialbffont ##1}}
|
|
3013 |
\noindent{\bf ACKNOWLEDGMENTS.} \relax\ignorespaces}
|
|
3014 |
\def\endacknowledgments{\vskip1sp\egroup}
|
|
3015 |
|
|
3016 |
%% Just in case author enters any of the below, it will still work correctly
|
|
3017 |
\let\acknowledgment\acknowledgements
|
|
3018 |
\let\endacknowledgment\endacknowledgments
|
|
3019 |
|
|
3020 |
\let\acknowledgement\acknowledgements
|
|
3021 |
\let\endacknowledgement\endacknowledgments
|
|
3022 |
|
|
3023 |
\let\acknowledgements\acknowledgements
|
|
3024 |
\let\endacknowledgements\endacknowledgments
|
|
3025 |
|
|
3026 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
3027 |
%% April 25, 2006
|
|
3028 |
\let\dospecialaccents\relax
|
|
3029 |
\def\blackbox#1{}
|
|
3030 |
|
|
3031 |
% turn off side squares
|
|
3032 |
\def\dosidesquare#1#2#3{}
|
|
3033 |
\let\resetsidesquares\relax
|
|
3034 |
\let\makesidesquares\relax
|
|
3035 |
\newif\iffirsttime
|
|
3036 |
|
|
3037 |
\def\thanks#1{\footnotemark \protected@xdef \@thanks
|
|
3038 |
{\@thanks \protect \footnotetext [\the \c@footnote ]{\hsize=247pt\relax #1}}}
|
|
3039 |
|
|
3040 |
%% Keywords
|
|
3041 |
{\global\let\saveline|
|
|
3042 |
\gdef\linewithspace{\hskip3pt$\saveline$\hskip6pt}
|
|
3043 |
\catcode`|=\active
|
|
3044 |
\gdef\keywords{\bgroup\catcode`|=\active\xkeywords}
|
|
3045 |
\gdef\xkeywords#1{\vskip1sp\noindent{\let|=\linewithspace
|
|
3046 |
\affilfont#1}\vskip11pt\egroup}
|
|
3047 |
}
|
|
3048 |
|
|
3049 |
\def\abbreviations#1{\vskip1sp\noindent{\affilfont Abbreviations: #1}\vskip12pt}
|
|
3050 |
|
|
3051 |
%% Authors can change this dimension to move the
|
|
3052 |
%% printed page up or down on the physical page. Making
|
|
3053 |
%% the negative dimension larger will move it up on the
|
|
3054 |
%% page, smaller will move it down.
|
|
3055 |
|
|
3056 |
\voffset-.75in
|
|
3057 |
|
|
3058 |
%%% Default copyright year
|
|
3059 |
\copyrightyear{2007}
|
|
3060 |
|
|
3061 |
\def\conflictofinterest#1{{\let\@thefnmark\relax\@footnotetext{\vrule height8pt width0pt\relax\hsize=247pt
|
|
3062 |
\relax\footnotesize\footnotefont #1\vrule depth 6pt width0pt}}}
|
|
3063 |
|
|
3064 |
\def\footcomment#1{{\let\@thefnmark\relax\@footnotetext{\vrule height8pt width0pt\relax\hsize=247pt\relax\footnotesize\footnotefont #1\vrule depth 6pt width0pt}}}
|
|
3065 |
|
|
3066 |
\def\track#1{\footcomment{#1}}
|
|
3067 |
|
|
3068 |
\url{www.pnas.org --- ---}
|
|
3069 |
\issuedate{Issue Date}
|
|
3070 |
\copyrightyear{2007}
|
|
3071 |
\volume{Volume}
|
|
3072 |
\issuenumber{Issue Number}
|
|
3073 |
%\setcounter{page}{2687}
|
|
3074 |
\footlineauthor{Footline Author}
|
|
3075 |
|
|
3076 |
\long\def\@footnotetext#1{\insert\footins{%
|
|
3077 |
\reset@font\footnotesize
|
|
3078 |
\interlinepenalty\interfootnotelinepenalty
|
|
3079 |
\splittopskip\footnotesep
|
|
3080 |
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM
|
|
3081 |
\hsize\columnwidth \@parboxrestore
|
|
3082 |
\protected@edef\@currentlabel{%
|
|
3083 |
\csname p@footnote\endcsname\@thefnmark
|
|
3084 |
}%
|
|
3085 |
\color@begingroup
|
|
3086 |
\@makefntext{%
|
|
3087 |
\rule\z@\footnotesep\ignorespaces\footnotefont
|
|
3088 |
\hsize=247pt
|
|
3089 |
#1\@finalstrut\strutbox}%
|
|
3090 |
\color@endgroup}}%
|
|
3091 |
|
|
3092 |
|
|
3093 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
3094 |
%% Special Use Fonts
|
|
3095 |
%%
|
|
3096 |
|
|
3097 |
%% Computer Modern font calls. These will be redefined
|
|
3098 |
%% if PostScript fonts are used, \usepackage{pnastwof}
|
|
3099 |
|
|
3100 |
%% Times-Roman
|
|
3101 |
\def\timesroman{cmr10 }
|
|
3102 |
\def\timesbold{cmbx10 }
|
|
3103 |
\def\timesitalic{cmti10 }
|
|
3104 |
\def\timesbolditalic{cmbx10 }
|
|
3105 |
|
|
3106 |
%% Helvetica
|
|
3107 |
\def\helvetica{cmss10 }
|
|
3108 |
\def\helveticabold{cmssbx10 }
|
|
3109 |
\def\helveticaboldoblique{cmssbx10 }
|
|
3110 |
\def\helveticaoblique{cmssi10 }
|
|
3111 |
|
|
3112 |
\def\frutiger{cmss10 }
|
|
3113 |
\def\frutigermed{cmss10 }
|
|
3114 |
\def\frutigerbold{cmssbx10 }
|
|
3115 |
\def\frutigerboldoblique{cmssi10 }
|
|
3116 |
\def\frutigeroblique{cmssi10 }
|
|
3117 |
|
|
3118 |
\let\frutigerboldcondensed\helveticabold
|
|
3119 |
|
|
3120 |
%% Special Use Fonts ==>>
|
|
3121 |
|
|
3122 |
|
|
3123 |
\font\footnotefont\helvetica at 6pt
|
|
3124 |
|
|
3125 |
\font\dropcapfont=\frutigerbold at 26pt
|
|
3126 |
\font\sideboxfont= \helvetica at 6pt
|
|
3127 |
|
|
3128 |
%% Running feet
|
|
3129 |
\font\footlinefont=\frutiger at7pt
|
|
3130 |
\font\footlineit=\helveticaoblique at7pt
|
|
3131 |
\font\foliofont=\frutigerbold at 7pt
|
|
3132 |
|
|
3133 |
\font\titlefont=\frutigerboldcondensed at 22pt % 24pt baseline
|
|
3134 |
\font\authorfont=\frutigerbold at 9pt % 11 pt baseline
|
|
3135 |
\font\affilfont=\frutiger at 7pt % 8pt baseline
|
|
3136 |
|
|
3137 |
|
|
3138 |
\font\copyrightfont=\frutiger at 6pt
|
|
3139 |
\font\copyrighttextfont=\frutiger at 6pt
|
|
3140 |
|
|
3141 |
%% Abstract fonts
|
|
3142 |
\font\xabstractfont=\frutigerbold at 8pt
|
|
3143 |
\def\abstractfont{\sf\xabstractfont\dospecialaccents}
|
|
3144 |
\font\abstractit=\helveticaboldoblique at 8pt
|
|
3145 |
|
|
3146 |
%% Section fonts
|
|
3147 |
\font\sectionfont=\frutigerbold at 10pt
|
|
3148 |
\font\subsectionfont=\frutigerbold at9pt
|
|
3149 |
|
|
3150 |
%% Theorem fonts
|
|
3151 |
\font\theoremfont=\frutigerbold at 8pt
|
|
3152 |
|
|
3153 |
%ok
|
|
3154 |
%% Caption
|
|
3155 |
\font\fignumfont=\frutigerbold at 9pt
|
|
3156 |
\font\xfigtextfont=\frutiger at 7pt
|
|
3157 |
\def\figtextfont{\small\dospecialaccents\xfigtextfont}
|
|
3158 |
|
|
3159 |
%% Table font
|
|
3160 |
\font\tabletextfont=\frutiger at 9pt
|
|
3161 |
\font\tabtextfont\frutigerbold at 9pt
|
|
3162 |
\font\tabnumfont\frutigerbold at 9pt
|
|
3163 |
|
|
3164 |
%% Materials and Methods Fonts
|
|
3165 |
\font\materialfont=\frutiger at 7pt
|
|
3166 |
\font\materialbffont=\helveticabold at 7pt
|
|
3167 |
\font\materialitfont=\helveticaboldoblique at 7pt
|
|
3168 |
|
|
3169 |
%% Bibliography fonts
|
|
3170 |
\font\xbibfont=\frutigerbold at 6pt
|
|
3171 |
\def\bibfont{\sf\xbibfont\dospecialaccents}
|
|
3172 |
\font\bibitfont\helveticaboldoblique at 6pt
|
|
3173 |
\font\bibbffont\helveticabold at 6pt
|
|
3174 |
|
|
3175 |
%% dec 4, 2006
|
|
3176 |
\def\@tabular{\global\tablenotenum=0\relax
|
|
3177 |
\leavevmode \hbox \bgroup $\let\@acol\@tabacol
|
|
3178 |
\let\@classz\@tabclassz
|
|
3179 |
\let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}
|
|
3180 |
|
|
3181 |
%% dec 4, 2006
|
|
3182 |
\def\@tabular{\global\tablenotenum=0\relax
|
|
3183 |
\leavevmode \hbox \bgroup $\let\@acol\@tabacol
|
|
3184 |
\let\@classz\@tabclassz
|
|
3185 |
\let\@classiv\@tabclassiv \let\\\@tabularcr\@tabarray}
|
|
3186 |
|
|
3187 |
%%%%%%% Jan 2008 Changes:
|
|
3188 |
\def\materials{\vskip6pt\bgroup
|
|
3189 |
\parskip=8pt
|
|
3190 |
\baselineskip=9pt
|
|
3191 |
\materialfont
|
|
3192 |
\def\textit##1{{\materialitfont ##1}}
|
|
3193 |
\def\it{\materialitfont}
|
|
3194 |
\def\bf{\materialbffont}
|
|
3195 |
\def\textbf##1{{\materialbffont ##1}}
|
|
3196 |
\def\section##1{\noindent{\materialbffont ##1. }}
|
|
3197 |
\def\subsection##1{\noindent{\materialbffont ##1. }}
|
|
3198 |
\noindent {\subsectionfont Materials and Methods}\\[2pt]
|
|
3199 |
}
|
|
3200 |
\def\endmaterials{\vskip1sp\egroup}
|
|
3201 |
|
|
3202 |
|
|
3203 |
\def\appendix{\originalappendix
|
|
3204 |
\vskip12pt\noindent{\subsectionfont Appendix}\@ifnextchar[{\xappendix}{\yappendix}}
|
|
3205 |
|
|
3206 |
\def\xappendix[#1]{\subsectionfont:\hskip10pt\relax #1\vskip2pt
|
|
3207 |
\normalsize\noindent\ignorespaces}
|
|
3208 |
\def\yappendix{\vskip2pt\normalsize\noindent\ignorespaces}
|
|
3209 |
|
|
3210 |
\widowpenalty=10000
|
|
3211 |
\clubpenalty=10000
|
|
3212 |
|
|
3213 |
\newbox\tablewide
|
|
3214 |
\def\endtabular{\crcr\egroup\egroup $\egroup\egroup
|
|
3215 |
\centerline{\vbox{\hsize\wd\tablewide
|
|
3216 |
\currtabcaption\vskip1pt
|
|
3217 |
}}
|
|
3218 |
\dimen0=\wd\tablewide
|
|
3219 |
\centerline{\hbox{\unhbox\tablewide}}
|
|
3220 |
\centerline{\vtop{\hsize=\dimen0 \tablenotes}}
|
|
3221 |
\global\let\currtabcaption\relax}
|
|
3222 |
|
|
3223 |
\expandafter \let \csname endtabular*\endcsname = \endtabular
|
|
3224 |
|
|
3225 |
\def\tabular{\global\setbox\tablewide\hbox\bgroup
|
|
3226 |
\let\@halignto\@empty\@tabular}
|
|
3227 |
|
|
3228 |
\@namedef{tabular*}#1{%
|
|
3229 |
\global\setbox\tablewide\hbox\bgroup
|
|
3230 |
\setlength\dimen@{#1}%
|
|
3231 |
\edef\@halignto{to\the\dimen@}\@tabular}
|
|
3232 |
|
|
3233 |
\newcommand\originalappendix{\par
|
|
3234 |
\setcounter{section}{0}%
|
|
3235 |
\setcounter{subsection}{0}%
|
|
3236 |
\gdef\thesection{\@Alph\c@section}}
|
|
3237 |
|
|
3238 |
\let\currtabcaption\relax
|
|
3239 |
|
|
3240 |
|
|
3241 |
\def\footcomment#1{\typeout{^^J^^J The \string\footcomment{}\space command is
|
|
3242 |
No Longer Used^^J^^J}}
|
|
3243 |
|
|
3244 |
\def\track#1{\typeout{^^J^^J The \string\track{}\space command is
|
|
3245 |
No Longer Used^^J^^J}}
|
|
3246 |
|
|
3247 |
\def\conflictofinterest#1{\typeout{^^J^^J The \string\conflictofinterest{}\space command is
|
|
3248 |
No Longer Used^^J^^J}}
|
|
3249 |
|
|
3250 |
%% nothing will happen, so PNAS can get info, but nothing will be printed
|
|
3251 |
\def\nothanks#1{}
|
|
3252 |
|
|
3253 |
\let\thanks\nothanks
|
|
3254 |
|
|
3255 |
|
|
3256 |
% substitute for \footcomment:
|
|
3257 |
|
|
3258 |
\def\abbreviations#1{\vskip1sp\noindent{\affilfont Abbreviations: #1}
|
|
3259 |
\vskip12pt}
|
|
3260 |
\endinput
|
|
3261 |
Change Log:
|
|
3262 |
October 18, 2006
|
|
3263 |
Changed the counter used in loop in maketitle to
|
|
3264 |
fix bug that prevented all affiliations from being
|
|
3265 |
listed; added $\saveline$ to make line work right
|
|
3266 |
in keywords
|
|
3267 |
|
|
3268 |
dec 4, 2006: fixed bug in table notes, by
|
|
3269 |
resetting tablenotenum every time tabular
|
|
3270 |
is used
|
|
3271 |
|
|
3272 |
%\def\currversion{October 18, 2006}
|
|
3273 |
%\def\currversion{July 10, 2006}
|
|
3274 |
%\def\currversion{May 1, 2006}
|
|
3275 |
%\def\currversion{August 27, 2004} |