Mercurial > hg > Papers > 2015 > kaito-lola
comparison IEEEtran.cls @ 0:c0d36568602d
1st commit
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 10 May 2015 22:54:12 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c0d36568602d |
---|---|
1 %% | |
2 %% IEEEtran.cls 2014/09/17 version V1.8a | |
3 %% | |
4 %% This is the IEEEtran LaTeX class for authors of the Institute of | |
5 %% Electrical and Electronics Engineers (IEEE) Transactions journals and | |
6 %% conferences. | |
7 %% | |
8 %% Support sites: | |
9 %% http://www.michaelshell.org/tex/ieeetran/ | |
10 %% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/ | |
11 %% and | |
12 %% http://www.ieee.org/ | |
13 %% | |
14 %% Based on the original 1993 IEEEtran.cls, but with many bug fixes | |
15 %% and enhancements (from both JVH and MDS) over the 1996/7 version. | |
16 %% | |
17 %% | |
18 %% Contributors: | |
19 %% Gerry Murray (1993), Silvano Balemi (1993), | |
20 %% Jon Dixon (1996), Peter N"uchter (1996), | |
21 %% Juergen von Hagen (2000), and Michael Shell (2001-2014) | |
22 %% | |
23 %% | |
24 %% Copyright (c) 1993-2000 by Gerry Murray, Silvano Balemi, | |
25 %% Jon Dixon, Peter N"uchter, | |
26 %% Juergen von Hagen | |
27 %% and | |
28 %% Copyright (c) 2001-2014 by Michael Shell | |
29 %% | |
30 %% Current maintainer (V1.3 to V1.8a): Michael Shell | |
31 %% See: | |
32 %% http://www.michaelshell.org/ | |
33 %% for current contact information. | |
34 %% | |
35 %% Special thanks to Peter Wilson (CUA) and Donald Arseneau | |
36 %% for allowing the inclusion of the \@ifmtarg command | |
37 %% from their ifmtarg LaTeX package. | |
38 %% | |
39 %%************************************************************************* | |
40 %% Legal Notice: | |
41 %% This code is offered as-is without any warranty either expressed or | |
42 %% implied; without even the implied warranty of MERCHANTABILITY or | |
43 %% FITNESS FOR A PARTICULAR PURPOSE! | |
44 %% User assumes all risk. | |
45 %% In no event shall IEEE or any contributor to this code be liable for | |
46 %% any damages or losses, including, but not limited to, incidental, | |
47 %% consequential, or any other damages, resulting from the use or misuse | |
48 %% of any information contained here. | |
49 %% | |
50 %% All comments are the opinions of their respective authors and are not | |
51 %% necessarily endorsed by the IEEE. | |
52 %% | |
53 %% This work is distributed under the LaTeX Project Public License (LPPL) | |
54 %% ( http://www.latex-project.org/ ) version 1.3, and may be freely used, | |
55 %% distributed and modified. A copy of the LPPL, version 1.3, is included | |
56 %% in the base LaTeX documentation of all distributions of LaTeX released | |
57 %% 2003/12/01 or later. | |
58 %% Retain all contribution notices and credits. | |
59 %% ** Modified files should be clearly indicated as such, including ** | |
60 %% ** renaming them and changing author support contact information. ** | |
61 %% | |
62 %% File list of work: IEEEtran.cls, IEEEtran_HOWTO.pdf, bare_adv.tex, | |
63 %% bare_conf.tex, bare_jrnl.tex, bare_conf_compsoc.tex, | |
64 %% bare_jrnl_compsoc.tex | |
65 %% | |
66 %% Major changes to the user interface should be indicated by an | |
67 %% increase in the version numbers. If a version is a beta, it will | |
68 %% be indicated with a BETA suffix, i.e., 1.4 BETA. | |
69 %% Small changes can be indicated by appending letters to the version | |
70 %% such as "IEEEtran_v14a.cls". | |
71 %% In all cases, \Providesclass, any \typeout messages to the user, | |
72 %% \IEEEtransversionmajor and \IEEEtransversionminor must reflect the | |
73 %% correct version information. | |
74 %% The changes should also be documented via source comments. | |
75 %%************************************************************************* | |
76 %% | |
77 % | |
78 % Available class options | |
79 % e.g., \documentclass[10pt,conference]{IEEEtran} | |
80 % | |
81 % *** choose only one from each category *** | |
82 % | |
83 % 9pt, 10pt, 11pt, 12pt | |
84 % Sets normal font size. The default is 10pt. | |
85 % | |
86 % conference, journal, technote, peerreview, peerreviewca | |
87 % determines format mode - conference papers, journal papers, | |
88 % correspondence papers (technotes), or peer review papers. The user | |
89 % should also select 9pt when using technote. peerreview is like | |
90 % journal mode, but provides for a single-column "cover" title page for | |
91 % anonymous peer review. The paper title (without the author names) is | |
92 % repeated at the top of the page after the cover page. For peer review | |
93 % papers, the \IEEEpeerreviewmaketitle command must be executed (will | |
94 % automatically be ignored for non-peerreview modes) at the place the | |
95 % cover page is to end, usually just after the abstract (keywords are | |
96 % not normally used with peer review papers). peerreviewca is like | |
97 % peerreview, but allows the author names to be entered and formatted | |
98 % as with conference mode so that author affiliation and contact | |
99 % information can be easily seen on the cover page. | |
100 % The default is journal. | |
101 % | |
102 % draft, draftcls, draftclsnofoot, final | |
103 % determines if paper is formatted as a widely spaced draft (for | |
104 % handwritten editor comments) or as a properly typeset final version. | |
105 % draftcls restricts draft mode to the class file while all other LaTeX | |
106 % packages (i.e., \usepackage{graphicx}) will behave as final - allows | |
107 % for a draft paper with visible figures, etc. draftclsnofoot is like | |
108 % draftcls, but does not display the date and the word "DRAFT" at the foot | |
109 % of the pages. If using one of the draft modes, the user will probably | |
110 % also want to select onecolumn. | |
111 % The default is final. | |
112 % | |
113 % letterpaper, a4paper, cspaper | |
114 % determines paper size: 8.5in X 11in, 210mm X 297mm or 7.875in X 10.75in. | |
115 % Changing the paper size in the standard journal and conference modes | |
116 % will not alter the typesetting of the document - only the margins will | |
117 % be affected. In particular, documents using the a4paper option will | |
118 % have reduced side margins (A4 is narrower than US letter) and a longer | |
119 % bottom margin (A4 is longer than US letter). For both cases, the top | |
120 % margins will be the same and the text will be horizontally centered. | |
121 % For the compsoc conference and draft modes, it is the margins that will | |
122 % remain constant, and thus the text area size will vary, with changes in | |
123 % the paper size. | |
124 % The cspaper option is the special ``trim'' paper size (7.875in x 10.75in) | |
125 % used in the actual publication of Computer Society journals. Under | |
126 % compsoc journal mode, this option does not alter the typesetting of the | |
127 % document. Authors should invoke the cspaper option only if requested to | |
128 % do so by the editors of the specific journal they are submitting to. | |
129 % For final submission to the IEEE, authors should generally use US letter | |
130 % (8.5 X 11in) paper unless otherwise instructed. Note that authors should | |
131 % ensure that all post-processing (ps, pdf, etc.) uses the same paper | |
132 % specificiation as the .tex document. Problems here are by far the number | |
133 % one reason for incorrect margins. IEEEtran will automatically set the | |
134 % default paper size under pdflatex (without requiring any change to | |
135 % pdftex.cfg), so this issue is more important to dvips users. Fix | |
136 % config.ps, config.pdf, or ~/.dvipsrc for dvips, or use the | |
137 % dvips -t papersize option instead as needed. For the cspaper option, | |
138 % the corresponding dvips paper name is "ieeecs". | |
139 % See the testflow documentation | |
140 % http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/testflow | |
141 % for more details on dvips paper size configuration. | |
142 % The default is letterpaper. | |
143 % | |
144 % oneside, twoside | |
145 % determines if layout follows single sided or two sided (duplex) | |
146 % printing. The only notable change is with the headings at the top of | |
147 % the pages. | |
148 % The default is oneside. | |
149 % | |
150 % onecolumn, twocolumn | |
151 % determines if text is organized into one or two columns per page. One | |
152 % column mode is usually used only with draft papers. | |
153 % The default is twocolumn. | |
154 % | |
155 % compsoc, transmag | |
156 % Use the format of the IEEE Computer Society or IEEE Transactions on Magnetics | |
157 % | |
158 % romanappendices | |
159 % Use the "Appendix I" convention when numbering appendices. IEEEtran.cls | |
160 % now defaults to Alpha "Appendix A" convention - the opposite of what | |
161 % v1.6b and earlier did. | |
162 % | |
163 % captionsoff | |
164 % disables the display of the figure/table captions. Some IEEE journals | |
165 % request that captions be removed and figures/tables be put on pages | |
166 % of their own at the end of an initial paper submission. The endfloat | |
167 % package can be used with this class option to achieve this format. | |
168 % | |
169 % nofonttune | |
170 % turns off tuning of the font interword spacing. Maybe useful to those | |
171 % not using the standard Times fonts or for those who have already "tuned" | |
172 % their fonts. | |
173 % The default is to enable IEEEtran to tune font parameters. | |
174 % | |
175 % | |
176 %---------- | |
177 % Available CLASSINPUTs provided (all are macros unless otherwise noted): | |
178 % \CLASSINPUTbaselinestretch | |
179 % \CLASSINPUTinnersidemargin | |
180 % \CLASSINPUToutersidemargin | |
181 % \CLASSINPUTtoptextmargin | |
182 % \CLASSINPUTbottomtextmargin | |
183 % | |
184 % Available CLASSINFOs provided: | |
185 % \ifCLASSINFOpdf (TeX if conditional) | |
186 % \CLASSINFOpaperwidth (macro) | |
187 % \CLASSINFOpaperheight (macro) | |
188 % \CLASSINFOnormalsizebaselineskip (length) | |
189 % \CLASSINFOnormalsizeunitybaselineskip (length) | |
190 % | |
191 % Available CLASSOPTIONs provided: | |
192 % all class option flags (TeX if conditionals) unless otherwise noted, | |
193 % e.g., \ifCLASSOPTIONcaptionsoff | |
194 % point size options provided as a single macro: | |
195 % \CLASSOPTIONpt | |
196 % which will be defined as 9, 10, 11, or 12 depending on the document's | |
197 % normalsize point size. | |
198 % also, class option peerreviewca implies the use of class option peerreview | |
199 % and classoption draft implies the use of class option draftcls | |
200 | |
201 | |
202 | |
203 | |
204 | |
205 \ProvidesClass{IEEEtran}[2014/09/17 V1.8a by Michael Shell] | |
206 \typeout{-- See the "IEEEtran_HOWTO" manual for usage information.} | |
207 \typeout{-- http://www.michaelshell.org/tex/ieeetran/} | |
208 \NeedsTeXFormat{LaTeX2e} | |
209 | |
210 % IEEEtran.cls version numbers, provided as of V1.3 | |
211 % These values serve as a way a .tex file can | |
212 % determine if the new features are provided. | |
213 % The version number of this IEEEtrans.cls can be obtained from | |
214 % these values. i.e., V1.4 | |
215 % KEEP THESE AS INTEGERS! i.e., NO {4a} or anything like that- | |
216 % (no need to enumerate "a" minor changes here) | |
217 \def\IEEEtransversionmajor{1} | |
218 \def\IEEEtransversionminor{8} | |
219 | |
220 | |
221 % hook to allow easy changeover to IEEEtran.cls/tools.sty error reporting | |
222 \def\@IEEEclspkgerror{\ClassError{IEEEtran}} | |
223 | |
224 | |
225 % These do nothing, but provide them like in article.cls | |
226 \newif\if@restonecol | |
227 \newif\if@titlepage | |
228 | |
229 | |
230 % class option conditionals | |
231 \newif\ifCLASSOPTIONonecolumn \CLASSOPTIONonecolumnfalse | |
232 \newif\ifCLASSOPTIONtwocolumn \CLASSOPTIONtwocolumntrue | |
233 | |
234 \newif\ifCLASSOPTIONoneside \CLASSOPTIONonesidetrue | |
235 \newif\ifCLASSOPTIONtwoside \CLASSOPTIONtwosidefalse | |
236 | |
237 \newif\ifCLASSOPTIONfinal \CLASSOPTIONfinaltrue | |
238 \newif\ifCLASSOPTIONdraft \CLASSOPTIONdraftfalse | |
239 \newif\ifCLASSOPTIONdraftcls \CLASSOPTIONdraftclsfalse | |
240 \newif\ifCLASSOPTIONdraftclsnofoot \CLASSOPTIONdraftclsnofootfalse | |
241 | |
242 \newif\ifCLASSOPTIONpeerreview \CLASSOPTIONpeerreviewfalse | |
243 \newif\ifCLASSOPTIONpeerreviewca \CLASSOPTIONpeerreviewcafalse | |
244 | |
245 \newif\ifCLASSOPTIONjournal \CLASSOPTIONjournaltrue | |
246 \newif\ifCLASSOPTIONconference \CLASSOPTIONconferencefalse | |
247 \newif\ifCLASSOPTIONtechnote \CLASSOPTIONtechnotefalse | |
248 | |
249 \newif\ifCLASSOPTIONnofonttune \CLASSOPTIONnofonttunefalse | |
250 | |
251 \newif\ifCLASSOPTIONcaptionsoff \CLASSOPTIONcaptionsofffalse | |
252 | |
253 \newif\ifCLASSOPTIONcompsoc \CLASSOPTIONcompsocfalse | |
254 \newif\ifCLASSOPTIONtransmag \CLASSOPTIONtransmagfalse | |
255 | |
256 \newif\ifCLASSOPTIONromanappendices \CLASSOPTIONromanappendicesfalse | |
257 | |
258 | |
259 % class info conditionals | |
260 | |
261 % indicates if pdf (via pdflatex) output | |
262 \newif\ifCLASSINFOpdf \CLASSINFOpdffalse | |
263 | |
264 | |
265 % V1.6b internal flag to show if using a4paper | |
266 \newif\if@IEEEusingAfourpaper \@IEEEusingAfourpaperfalse | |
267 % V1.6b internal flag to show if using cspaper | |
268 \newif\if@IEEEusingcspaper \@IEEEusingcspaperfalse | |
269 | |
270 | |
271 % IEEEtran class scratch pad registers | |
272 % dimen | |
273 \newdimen\@IEEEtrantmpdimenA | |
274 \newdimen\@IEEEtrantmpdimenB | |
275 \newdimen\@IEEEtrantmpdimenC | |
276 % count | |
277 \newcount\@IEEEtrantmpcountA | |
278 \newcount\@IEEEtrantmpcountB | |
279 \newcount\@IEEEtrantmpcountC | |
280 % token list | |
281 \newtoks\@IEEEtrantmptoksA | |
282 | |
283 % we use \CLASSOPTIONpt so that we can ID the point size (even for 9pt docs) | |
284 % as well as LaTeX's \@ptsize to retain some compatability with some | |
285 % external packages | |
286 \def\@ptsize{0} | |
287 % LaTeX does not support 9pt, so we set \@ptsize to 0 - same as that of 10pt | |
288 \DeclareOption{9pt}{\def\CLASSOPTIONpt{9}\def\@ptsize{0}} | |
289 \DeclareOption{10pt}{\def\CLASSOPTIONpt{10}\def\@ptsize{0}} | |
290 \DeclareOption{11pt}{\def\CLASSOPTIONpt{11}\def\@ptsize{1}} | |
291 \DeclareOption{12pt}{\def\CLASSOPTIONpt{12}\def\@ptsize{2}} | |
292 | |
293 | |
294 | |
295 \DeclareOption{letterpaper}{\setlength{\paperwidth}{8.5in}% | |
296 \setlength{\paperheight}{11in}% | |
297 \@IEEEusingAfourpaperfalse | |
298 \@IEEEusingcspaperfalse | |
299 \def\CLASSOPTIONpaper{letter}% | |
300 \def\CLASSINFOpaperwidth{8.5in}% | |
301 \def\CLASSINFOpaperheight{11in}} | |
302 | |
303 | |
304 \DeclareOption{a4paper}{\setlength{\paperwidth}{210mm}% | |
305 \setlength{\paperheight}{297mm}% | |
306 \@IEEEusingAfourpapertrue | |
307 \@IEEEusingcspaperfalse | |
308 \def\CLASSOPTIONpaper{a4}% | |
309 \def\CLASSINFOpaperwidth{210mm}% | |
310 \def\CLASSINFOpaperheight{297mm}} | |
311 | |
312 % special paper option for compsoc journals | |
313 \DeclareOption{cspaper}{\setlength{\paperwidth}{7.875in}% | |
314 \setlength{\paperheight}{10.75in}% | |
315 \@IEEEusingcspapertrue | |
316 \@IEEEusingAfourpaperfalse | |
317 \def\CLASSOPTIONpaper{ieeecs}% | |
318 \def\CLASSINFOpaperwidth{7.875in}% | |
319 \def\CLASSINFOpaperheight{10.75in}} | |
320 | |
321 \DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse | |
322 \CLASSOPTIONonesidetrue\CLASSOPTIONtwosidefalse} | |
323 \DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue | |
324 \CLASSOPTIONtwosidetrue\CLASSOPTIONonesidefalse} | |
325 | |
326 \DeclareOption{onecolumn}{\CLASSOPTIONonecolumntrue\CLASSOPTIONtwocolumnfalse} | |
327 \DeclareOption{twocolumn}{\CLASSOPTIONtwocolumntrue\CLASSOPTIONonecolumnfalse} | |
328 | |
329 % If the user selects draft, then this class AND any packages | |
330 % will go into draft mode. | |
331 \DeclareOption{draft}{\CLASSOPTIONdrafttrue\CLASSOPTIONdraftclstrue | |
332 \CLASSOPTIONdraftclsnofootfalse} | |
333 % draftcls is for a draft mode which will not affect any packages | |
334 % used by the document. | |
335 \DeclareOption{draftcls}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclstrue | |
336 \CLASSOPTIONdraftclsnofootfalse} | |
337 % draftclsnofoot is like draftcls, but without the footer. | |
338 \DeclareOption{draftclsnofoot}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclstrue | |
339 \CLASSOPTIONdraftclsnofoottrue} | |
340 \DeclareOption{final}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclsfalse | |
341 \CLASSOPTIONdraftclsnofootfalse} | |
342 | |
343 \DeclareOption{journal}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse | |
344 \CLASSOPTIONjournaltrue\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse} | |
345 | |
346 \DeclareOption{conference}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse | |
347 \CLASSOPTIONjournalfalse\CLASSOPTIONconferencetrue\CLASSOPTIONtechnotefalse} | |
348 | |
349 \DeclareOption{technote}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse | |
350 \CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotetrue} | |
351 | |
352 \DeclareOption{peerreview}{\CLASSOPTIONpeerreviewtrue\CLASSOPTIONpeerreviewcafalse | |
353 \CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse} | |
354 | |
355 \DeclareOption{peerreviewca}{\CLASSOPTIONpeerreviewtrue\CLASSOPTIONpeerreviewcatrue | |
356 \CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse} | |
357 | |
358 \DeclareOption{nofonttune}{\CLASSOPTIONnofonttunetrue} | |
359 | |
360 \DeclareOption{captionsoff}{\CLASSOPTIONcaptionsofftrue} | |
361 | |
362 \DeclareOption{compsoc}{\CLASSOPTIONcompsoctrue\CLASSOPTIONtransmagfalse} | |
363 | |
364 \DeclareOption{transmag}{\CLASSOPTIONtransmagtrue\CLASSOPTIONcompsocfalse} | |
365 | |
366 \DeclareOption{romanappendices}{\CLASSOPTIONromanappendicestrue} | |
367 | |
368 | |
369 % default to US letter paper, 10pt, twocolumn, one sided, final, journal | |
370 \ExecuteOptions{letterpaper,10pt,twocolumn,oneside,final,journal} | |
371 % overrride these defaults per user requests | |
372 \ProcessOptions | |
373 | |
374 | |
375 | |
376 %% -- Command Argument Scanning Support Functions -- | |
377 % | |
378 % usage: \@IEEEextracttoken*{} | |
379 % \@IEEEextracttoken fully expands its argument (which it then stores in | |
380 % \@IEEEextracttokenarg) via \edef and then the meaning of the first | |
381 % nonbrace (but including the empty group) token found is assigned via \let | |
382 % to \@IEEEextractedtoken as well as stored in the macro | |
383 % \@IEEEextractedtokenmacro. Tokens that would otherwise be discarded during | |
384 % the acquisition of the first are stored in \@IEEEextractedtokensdiscarded, | |
385 % however their original relative brace nesting depths are not guaranteed to | |
386 % be preserved. | |
387 % If the argument is empty, or if a first nonbrace token does not exist (or | |
388 % is an empty group), \@IEEEextractedtoken will be \relax and | |
389 % \@IEEEextractedtokenmacro and \@IEEEextractedtokensdiscarded will be empty. | |
390 % | |
391 % For example: | |
392 % \@IEEEextracttoken{{{ab}{cd}}{{ef}g}} | |
393 % results in: | |
394 % | |
395 % \@IEEEextracttokenarg ==> a macro containing {{ab}{cd}}{{ef}g} | |
396 % \@IEEEextractedtoken ==> the letter a | |
397 % \@IEEEextractedtokenmacro ==> a macro containing a | |
398 % \@IEEEextractedtokensdiscarded ==> a macro containing bcd{ef}g | |
399 % | |
400 % the *-star form, \@IEEEextracttoken*, does not expand its argument | |
401 % contents during processing. | |
402 \def\@IEEEextracttoken{\@ifstar{\let\@IEEEextracttokendef=\def\@@IEEEextracttoken}{\let\@IEEEextracttokendef=\edef\@@IEEEextracttoken}} | |
403 | |
404 \def\@@IEEEextracttoken#1{\@IEEEextracttokendef\@IEEEextracttokenarg{#1}\relax | |
405 \def\@IEEEextractedtokensdiscarded{}\relax % initialize to empty | |
406 % if the macro is unchanged after being acquired as a single undelimited argument | |
407 % with anything after it being stripped off as a delimited argument | |
408 % we know we have one token without any enclosing braces. loop until this is true. | |
409 \let\@IEEEextracttokencurgroup\@IEEEextracttokenarg | |
410 \loop | |
411 % trap case of an empty argument as this would cause a problem with | |
412 % \@@@IEEEextracttoken's first (nondelimited) argument acquisition | |
413 \ifx\@IEEEextracttokencurgroup\@empty | |
414 \def\@IEEEextractedtokenmacro{}\relax | |
415 \else | |
416 \expandafter\@@@IEEEextracttoken\@IEEEextracttokencurgroup\@IEEEgeneralsequenceDELIMITER\relax | |
417 \fi | |
418 \ifx\@IEEEextractedtokenmacro\@IEEEextracttokencurgroup | |
419 \else | |
420 \let\@IEEEextracttokencurgroup=\@IEEEextractedtokenmacro | |
421 \repeat | |
422 % we can safely do a \let= here because there should be at most one token | |
423 % the relax is needed to handle the case of no token found | |
424 \expandafter\let\expandafter\@IEEEextractedtoken\@IEEEextractedtokenmacro\relax} | |
425 | |
426 \def\@@@IEEEextracttoken#1#2\@IEEEgeneralsequenceDELIMITER{\def\@IEEEextractedtokenmacro{#1}\relax | |
427 \def\@@IEEEextractedtokensdiscarded{#2}\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter | |
428 \@IEEEextractedtokensdiscarded\expandafter\expandafter\expandafter | |
429 {\expandafter\@@IEEEextractedtokensdiscarded\@IEEEextractedtokensdiscarded}} | |
430 %% | |
431 %% -- End of Command Argument Scanning Support Functions -- | |
432 | |
433 | |
434 | |
435 % Computer Society conditional execution command | |
436 \long\def\@IEEEcompsoconly#1{\relax\ifCLASSOPTIONcompsoc\relax#1\relax\fi\relax} | |
437 % inverse | |
438 \long\def\@IEEEnotcompsoconly#1{\relax\ifCLASSOPTIONcompsoc\else\relax#1\relax\fi\relax} | |
439 % compsoc conference | |
440 \long\def\@IEEEcompsocconfonly#1{\relax\ifCLASSOPTIONcompsoc\ifCLASSOPTIONconference\relax#1\relax\fi\fi\relax} | |
441 % compsoc not conference | |
442 \long\def\@IEEEcompsocnotconfonly#1{\relax\ifCLASSOPTIONcompsoc\ifCLASSOPTIONconference\else\relax#1\relax\fi\fi\relax} | |
443 | |
444 | |
445 % IEEE uses Times Roman font, so we'll default to Times. | |
446 % These three commands make up the entire times.sty package. | |
447 \renewcommand{\sfdefault}{phv} | |
448 \renewcommand{\rmdefault}{ptm} | |
449 \renewcommand{\ttdefault}{pcr} | |
450 | |
451 \@IEEEcompsoconly{\typeout{-- Using IEEE Computer Society mode.}} | |
452 | |
453 % V1.7 compsoc nonconference papers, use Palatino/Palladio as the main text font, | |
454 % not Times Roman. | |
455 \@IEEEcompsocnotconfonly{\renewcommand{\rmdefault}{ppl}} | |
456 | |
457 % enable Times/Palatino main text font | |
458 \normalfont\selectfont | |
459 | |
460 | |
461 | |
462 | |
463 | |
464 % V1.7 conference notice message hook | |
465 \def\@IEEEconsolenoticeconference{\typeout{}% | |
466 \typeout{** Conference Paper **}% | |
467 \typeout{Before submitting the final camera ready copy, remember to:}% | |
468 \typeout{}% | |
469 \typeout{ 1. Manually equalize the lengths of two columns on the last page}% | |
470 \typeout{ of your paper;}% | |
471 \typeout{}% | |
472 \typeout{ 2. Ensure that any PostScript and/or PDF output post-processing}% | |
473 \typeout{ uses only Type 1 fonts and that every step in the generation}% | |
474 \typeout{ process uses the appropriate paper size.}% | |
475 \typeout{}} | |
476 | |
477 | |
478 % we can send console reminder messages to the user here | |
479 \AtEndDocument{\ifCLASSOPTIONconference\@IEEEconsolenoticeconference\fi} | |
480 | |
481 | |
482 % warn about the use of single column other than for draft mode | |
483 \ifCLASSOPTIONtwocolumn\else% | |
484 \ifCLASSOPTIONdraftcls\else% | |
485 \typeout{** ATTENTION: Single column mode is not typically used with IEEE publications.}% | |
486 \fi% | |
487 \fi | |
488 | |
489 | |
490 % V1.7 improved paper size setting code. | |
491 % Set pdfpage and dvips paper sizes. Conditional tests are similar to that | |
492 % of ifpdf.sty. Retain within {} to ensure tested macros are never altered, | |
493 % even if only effect is to set them to \relax. | |
494 % if \pdfoutput is undefined or equal to relax, output a dvips special | |
495 {\@ifundefined{pdfoutput}{\AtBeginDvi{\special{papersize=\CLASSINFOpaperwidth,\CLASSINFOpaperheight}}}{% | |
496 % pdfoutput is defined and not equal to \relax | |
497 % check for pdfpageheight existence just in case someone sets pdfoutput | |
498 % under non-pdflatex. If exists, set them regardless of value of \pdfoutput. | |
499 \@ifundefined{pdfpageheight}{\relax}{\global\pdfpagewidth\paperwidth | |
500 \global\pdfpageheight\paperheight}% | |
501 % if using \pdfoutput=0 under pdflatex, send dvips papersize special | |
502 \ifcase\pdfoutput | |
503 \AtBeginDvi{\special{papersize=\CLASSINFOpaperwidth,\CLASSINFOpaperheight}}% | |
504 \else | |
505 % we are using pdf output, set CLASSINFOpdf flag | |
506 \global\CLASSINFOpdftrue | |
507 \fi}} | |
508 | |
509 % let the user know the selected papersize | |
510 \typeout{-- Using \CLASSINFOpaperwidth\space x \CLASSINFOpaperheight\space | |
511 (\CLASSOPTIONpaper)\space paper.} | |
512 | |
513 \ifCLASSINFOpdf | |
514 \typeout{-- Using PDF output.} | |
515 \else | |
516 \typeout{-- Using DVI output.} | |
517 \fi | |
518 | |
519 | |
520 % The idea hinted here is for LaTeX to generate markleft{} and markright{} | |
521 % automatically for you after you enter \author{}, \journal{}, | |
522 % \journaldate{}, journalvol{}, \journalnum{}, etc. | |
523 % However, there may be some backward compatibility issues here as | |
524 % well as some special applications for IEEEtran.cls and special issues | |
525 % that may require the flexible \markleft{}, \markright{} and/or \markboth{}. | |
526 % We'll leave this as an open future suggestion. | |
527 %\newcommand{\journal}[1]{\def\@journal{#1}} | |
528 %\def\@journal{} | |
529 | |
530 | |
531 | |
532 % pointsize values | |
533 % used with ifx to determine the document's normal size | |
534 \def\@IEEEptsizenine{9} | |
535 \def\@IEEEptsizeten{10} | |
536 \def\@IEEEptsizeeleven{11} | |
537 \def\@IEEEptsizetwelve{12} | |
538 | |
539 | |
540 | |
541 % FONT DEFINITIONS (No sizexx.clo file needed) | |
542 % V1.6 revised font sizes, displayskip values and | |
543 % revised normalsize baselineskip to reduce underfull vbox problems | |
544 % on the 58pc = 696pt = 9.5in text height we want | |
545 % normalsize #lines/column baselineskip (aka leading) | |
546 % 9pt 63 11.0476pt (truncated down) | |
547 % 10pt 58 12pt (exact) | |
548 % 11pt 52 13.3846pt (truncated down) | |
549 % 12pt 50 13.92pt (exact) | |
550 % | |
551 | |
552 % we need to store the nominal baselineskip for the given font size | |
553 % in case baselinestretch ever changes. | |
554 % this is a dimen, so it will not hold stretch or shrink | |
555 \newdimen\@IEEEnormalsizeunitybaselineskip | |
556 \@IEEEnormalsizeunitybaselineskip\baselineskip | |
557 | |
558 | |
559 | |
560 %% ******* WARNING! ******* | |
561 %% | |
562 %% Authors should not alter font sizes, baselineskip ("leading"), | |
563 %% margins or other spacing values in an attempt to squeeze more | |
564 %% material on each page. | |
565 %% | |
566 %% The IEEE's own typesetting software will restore the correct | |
567 %% values when re-typesetting/proofing the submitted document, | |
568 %% possibly resulting in unexpected article over length charges. | |
569 %% | |
570 %% ******* WARNING! ******* | |
571 | |
572 | |
573 % 9pt option defaults | |
574 \ifx\CLASSOPTIONpt\@IEEEptsizenine | |
575 \typeout{-- This is a 9 point document.} | |
576 \def\normalsize{\@setfontsize{\normalsize}{9}{11.0476pt}} | |
577 \setlength{\@IEEEnormalsizeunitybaselineskip}{11.0476pt} | |
578 \normalsize | |
579 \abovedisplayskip 1.5ex plus 3pt minus 1pt | |
580 \belowdisplayskip \abovedisplayskip | |
581 \abovedisplayshortskip 0pt plus 3pt | |
582 \belowdisplayshortskip 1.5ex plus 3pt minus 1pt | |
583 \def\small{\@setfontsize{\small}{8.5}{10pt}} | |
584 \def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}} | |
585 \def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}} | |
586 \def\tiny{\@setfontsize{\tiny}{5}{6pt}} | |
587 % sublargesize is the same as large - 10pt | |
588 \def\sublargesize{\@setfontsize{\sublargesize}{10}{12pt}} | |
589 \def\large{\@setfontsize{\large}{10}{12pt}} | |
590 \def\Large{\@setfontsize{\Large}{12}{14pt}} | |
591 \def\LARGE{\@setfontsize{\LARGE}{14}{17pt}} | |
592 \def\huge{\@setfontsize{\huge}{17}{20pt}} | |
593 \def\Huge{\@setfontsize{\Huge}{20}{24pt}} | |
594 \fi | |
595 % | |
596 % 10pt option defaults | |
597 \ifx\CLASSOPTIONpt\@IEEEptsizeten | |
598 \typeout{-- This is a 10 point document.} | |
599 \def\normalsize{\@setfontsize{\normalsize}{10}{12.00pt}} | |
600 \setlength{\@IEEEnormalsizeunitybaselineskip}{12pt} | |
601 \normalsize | |
602 \abovedisplayskip 1.5ex plus 4pt minus 2pt | |
603 \belowdisplayskip \abovedisplayskip | |
604 \abovedisplayshortskip 0pt plus 4pt | |
605 \belowdisplayshortskip 1.5ex plus 4pt minus 2pt | |
606 \def\small{\@setfontsize{\small}{9}{10pt}} | |
607 \def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}} | |
608 \def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}} | |
609 \def\tiny{\@setfontsize{\tiny}{5}{6pt}} | |
610 % sublargesize is a tad smaller than large - 11pt | |
611 \def\sublargesize{\@setfontsize{\sublargesize}{11}{13.4pt}} | |
612 \def\large{\@setfontsize{\large}{12}{14pt}} | |
613 \def\Large{\@setfontsize{\Large}{14}{17pt}} | |
614 \def\LARGE{\@setfontsize{\LARGE}{17}{20pt}} | |
615 \def\huge{\@setfontsize{\huge}{20}{24pt}} | |
616 \def\Huge{\@setfontsize{\Huge}{24}{28pt}} | |
617 \fi | |
618 % | |
619 % 11pt option defaults | |
620 \ifx\CLASSOPTIONpt\@IEEEptsizeeleven | |
621 \typeout{-- This is an 11 point document.} | |
622 \def\normalsize{\@setfontsize{\normalsize}{11}{13.3846pt}} | |
623 \setlength{\@IEEEnormalsizeunitybaselineskip}{13.3846pt} | |
624 \normalsize | |
625 \abovedisplayskip 1.5ex plus 5pt minus 3pt | |
626 \belowdisplayskip \abovedisplayskip | |
627 \abovedisplayshortskip 0pt plus 5pt | |
628 \belowdisplayshortskip 1.5ex plus 5pt minus 3pt | |
629 \def\small{\@setfontsize{\small}{10}{12pt}} | |
630 \def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}} | |
631 \def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}} | |
632 \def\tiny{\@setfontsize{\tiny}{6}{7pt}} | |
633 % sublargesize is the same as large - 12pt | |
634 \def\sublargesize{\@setfontsize{\sublargesize}{12}{14pt}} | |
635 \def\large{\@setfontsize{\large}{12}{14pt}} | |
636 \def\Large{\@setfontsize{\Large}{14}{17pt}} | |
637 \def\LARGE{\@setfontsize{\LARGE}{17}{20pt}} | |
638 \def\huge{\@setfontsize{\huge}{20}{24pt}} | |
639 \def\Huge{\@setfontsize{\Huge}{24}{28pt}} | |
640 \fi | |
641 % | |
642 % 12pt option defaults | |
643 \ifx\CLASSOPTIONpt\@IEEEptsizetwelve | |
644 \typeout{-- This is a 12 point document.} | |
645 \def\normalsize{\@setfontsize{\normalsize}{12}{13.92pt}} | |
646 \setlength{\@IEEEnormalsizeunitybaselineskip}{13.92pt} | |
647 \normalsize | |
648 \abovedisplayskip 1.5ex plus 6pt minus 4pt | |
649 \belowdisplayskip \abovedisplayskip | |
650 \abovedisplayshortskip 0pt plus 6pt | |
651 \belowdisplayshortskip 1.5ex plus 6pt minus 4pt | |
652 \def\small{\@setfontsize{\small}{10}{12pt}} | |
653 \def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}} | |
654 \def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}} | |
655 \def\tiny{\@setfontsize{\tiny}{6}{7pt}} | |
656 % sublargesize is the same as large - 14pt | |
657 \def\sublargesize{\@setfontsize{\sublargesize}{14}{17pt}} | |
658 \def\large{\@setfontsize{\large}{14}{17pt}} | |
659 \def\Large{\@setfontsize{\Large}{17}{20pt}} | |
660 \def\LARGE{\@setfontsize{\LARGE}{20}{24pt}} | |
661 \def\huge{\@setfontsize{\huge}{22}{26pt}} | |
662 \def\Huge{\@setfontsize{\Huge}{24}{28pt}} | |
663 \fi | |
664 | |
665 | |
666 | |
667 % V1.8a compsoc font sizes | |
668 % compsoc font sizes use bp "Postscript" point units (1/72in) | |
669 % rather than the traditional pt (1/72.27) | |
670 \ifCLASSOPTIONcompsoc | |
671 % -- compsoc defaults -- | |
672 % ** will override some of these values later ** | |
673 % 9pt | |
674 \ifx\CLASSOPTIONpt\@IEEEptsizenine | |
675 \def\normalsize{\@setfontsize{\normalsize}{9bp}{11bp}} | |
676 \setlength{\@IEEEnormalsizeunitybaselineskip}{11bp} | |
677 \normalsize | |
678 \abovedisplayskip 1.5ex plus 3bp minus 1bp | |
679 \belowdisplayskip \abovedisplayskip | |
680 \abovedisplayshortskip 0bp plus 3bp | |
681 \belowdisplayshortskip 1.5ex plus 3bp minus 1bp | |
682 \def\small{\@setfontsize{\small}{8.5bp}{10bp}} | |
683 \def\footnotesize{\@setfontsize{\footnotesize}{8bp}{9bp}} | |
684 \def\scriptsize{\@setfontsize{\scriptsize}{7bp}{8bp}} | |
685 \def\tiny{\@setfontsize{\tiny}{5bp}{6bp}} | |
686 % sublargesize is the same as large - 10bp | |
687 \def\sublargesize{\@setfontsize{\sublargesize}{10bp}{12bp}} | |
688 \def\large{\@setfontsize{\large}{10bp}{12bp}} | |
689 \def\Large{\@setfontsize{\Large}{12bp}{14bp}} | |
690 \def\LARGE{\@setfontsize{\LARGE}{14bp}{17bp}} | |
691 \def\huge{\@setfontsize{\huge}{17bp}{20bp}} | |
692 \def\Huge{\@setfontsize{\Huge}{20bp}{24bp}} | |
693 \fi | |
694 % | |
695 % 10pt | |
696 \ifx\CLASSOPTIONpt\@IEEEptsizeten | |
697 \def\normalsize{\@setfontsize{\normalsize}{10bp}{12bp}} | |
698 \setlength{\@IEEEnormalsizeunitybaselineskip}{12bp} | |
699 \normalsize | |
700 \abovedisplayskip 1.5ex plus 4bp minus 2bp | |
701 \belowdisplayskip \abovedisplayskip | |
702 \abovedisplayshortskip 0pt plus 4bp | |
703 \belowdisplayshortskip 1.5ex plus 4bp minus 2bp | |
704 \def\small{\@setfontsize{\small}{9bp}{10bp}} | |
705 \def\footnotesize{\@setfontsize{\footnotesize}{8bp}{9bp}} | |
706 \def\scriptsize{\@setfontsize{\scriptsize}{7bp}{8bp}} | |
707 \def\tiny{\@setfontsize{\tiny}{5bp}{6bp}} | |
708 % sublargesize is a tad smaller than large - 11bp | |
709 \def\sublargesize{\@setfontsize{\sublargesize}{11bp}{13.5bp}} | |
710 \def\large{\@setfontsize{\large}{12bp}{14bp}} | |
711 \def\Large{\@setfontsize{\Large}{14bp}{17bp}} | |
712 \def\LARGE{\@setfontsize{\LARGE}{17bp}{20bp}} | |
713 \def\huge{\@setfontsize{\huge}{20bp}{24bp}} | |
714 \def\Huge{\@setfontsize{\Huge}{24bp}{28bp}} | |
715 \fi | |
716 % | |
717 % 11pt | |
718 \ifx\CLASSOPTIONpt\@IEEEptsizeeleven | |
719 \def\normalsize{\@setfontsize{\normalsize}{11bp}{13.5bp}} | |
720 \setlength{\@IEEEnormalsizeunitybaselineskip}{13.5bp} | |
721 \normalsize | |
722 \abovedisplayskip 1.5ex plus 5bp minus 3bp | |
723 \belowdisplayskip \abovedisplayskip | |
724 \abovedisplayshortskip 0pt plus 5bp | |
725 \belowdisplayshortskip 1.5ex plus 5bp minus 3bp | |
726 \def\small{\@setfontsize{\small}{10bp}{12bp}} | |
727 \def\footnotesize{\@setfontsize{\footnotesize}{9bp}{10.5bp}} | |
728 \def\scriptsize{\@setfontsize{\scriptsize}{8bp}{9bp}} | |
729 \def\tiny{\@setfontsize{\tiny}{6bp}{7bp}} | |
730 % sublargesize is the same as large - 12bp | |
731 \def\sublargesize{\@setfontsize{\sublargesize}{12bp}{14bp}} | |
732 \def\large{\@setfontsize{\large}{12bp}{14bp}} | |
733 \def\Large{\@setfontsize{\Large}{14bp}{17bp}} | |
734 \def\LARGE{\@setfontsize{\LARGE}{17bp}{20bp}} | |
735 \def\huge{\@setfontsize{\huge}{20bp}{24bp}} | |
736 \def\Huge{\@setfontsize{\Huge}{24bp}{28bp}} | |
737 \fi | |
738 % | |
739 % 12pt | |
740 \ifx\CLASSOPTIONpt\@IEEEptsizetwelve | |
741 \def\normalsize{\@setfontsize{\normalsize}{12bp}{14bp}}% | |
742 \setlength{\@IEEEnormalsizeunitybaselineskip}{14bp}% | |
743 \normalsize | |
744 \abovedisplayskip 1.5ex plus 6bp minus 4bp | |
745 \belowdisplayskip \abovedisplayskip | |
746 \abovedisplayshortskip 0pt plus 6bp | |
747 \belowdisplayshortskip 1.5ex plus 6bp minus 4bp | |
748 \def\small{\@setfontsize{\small}{10bp}{12bp}} | |
749 \def\footnotesize{\@setfontsize{\footnotesize}{9bp}{10.5bp}} | |
750 \def\scriptsize{\@setfontsize{\scriptsize}{8bp}{9bp}} | |
751 \def\tiny{\@setfontsize{\tiny}{6bp}{7bp}} | |
752 % sublargesize is the same as large - 14bp | |
753 \def\sublargesize{\@setfontsize{\sublargesize}{14bp}{17bp}} | |
754 \def\large{\@setfontsize{\large}{14bp}{17bp}} | |
755 \def\Large{\@setfontsize{\Large}{17bp}{20bp}} | |
756 \def\LARGE{\@setfontsize{\LARGE}{20bp}{24bp}} | |
757 \def\huge{\@setfontsize{\huge}{22bp}{26bp}} | |
758 \def\Huge{\@setfontsize{\Huge}{24bp}{28bp}} | |
759 \fi | |
760 % | |
761 % -- override defaults: compsoc journals use special normalsizes -- | |
762 \ifCLASSOPTIONconference | |
763 % | |
764 % compsoc conferences | |
765 % 9pt | |
766 \ifx\CLASSOPTIONpt\@IEEEptsizenine | |
767 \def\normalsize{\@setfontsize{\normalsize}{9bp}{10.8bp}} | |
768 \setlength{\@IEEEnormalsizeunitybaselineskip}{10.8bp} | |
769 \normalsize | |
770 \abovedisplayskip 1.5ex plus 3bp minus 1bp | |
771 \belowdisplayskip \abovedisplayskip | |
772 \abovedisplayshortskip 0bp plus 3bp | |
773 \belowdisplayshortskip 1.5ex plus 3bp minus 1bp | |
774 \fi | |
775 % 10pt | |
776 \ifx\CLASSOPTIONpt\@IEEEptsizeten | |
777 \def\normalsize{\@setfontsize{\normalsize}{10bp}{11.2bp}} | |
778 \setlength{\@IEEEnormalsizeunitybaselineskip}{11.2bp} | |
779 \normalsize | |
780 \abovedisplayskip 1.5ex plus 4bp minus 2bp | |
781 \belowdisplayskip \abovedisplayskip | |
782 \abovedisplayshortskip 0pt plus 4bp | |
783 \belowdisplayshortskip 1.5ex plus 4bp minus 2bp | |
784 \fi | |
785 % 11pt | |
786 \ifx\CLASSOPTIONpt\@IEEEptsizeeleven | |
787 \def\normalsize{\@setfontsize{\normalsize}{11bp}{13.2bp}} | |
788 \setlength{\@IEEEnormalsizeunitybaselineskip}{13.2bp} | |
789 \normalsize | |
790 \abovedisplayskip 1.5ex plus 5bp minus 3bp | |
791 \belowdisplayskip \abovedisplayskip | |
792 \abovedisplayshortskip 0pt plus 5bp | |
793 \belowdisplayshortskip 1.5ex plus 5bp minus 3bp | |
794 \fi | |
795 % 12pt | |
796 \ifx\CLASSOPTIONpt\@IEEEptsizetwelve | |
797 \def\normalsize{\@setfontsize{\normalsize}{12bp}{14.4bp}} | |
798 \setlength{\@IEEEnormalsizeunitybaselineskip}{14.4bp} | |
799 \normalsize | |
800 \abovedisplayskip 1.5ex plus 6bp minus 4bp | |
801 \belowdisplayskip \abovedisplayskip | |
802 \abovedisplayshortskip 0pt plus 6bp | |
803 \belowdisplayshortskip 1.5ex plus 6bp minus 4bp | |
804 \fi | |
805 % | |
806 % compsoc nonconferences | |
807 \else | |
808 % 9pt | |
809 \ifx\CLASSOPTIONpt\@IEEEptsizenine | |
810 \def\normalsize{\@setfontsize{\normalsize}{9bp}{10.8bp}} | |
811 \setlength{\@IEEEnormalsizeunitybaselineskip}{10.8bp} | |
812 \normalsize | |
813 \abovedisplayskip 1.5ex plus 3bp minus 1bp | |
814 \belowdisplayskip \abovedisplayskip | |
815 \abovedisplayshortskip 0bp plus 3bp | |
816 \belowdisplayshortskip 1.5ex plus 3bp minus 1bp | |
817 \fi | |
818 % 10pt | |
819 \ifx\CLASSOPTIONpt\@IEEEptsizeten | |
820 % the official spec is 9.5bp with 11.4bp leading for 10pt, | |
821 % but measurements of proofs suggest upto 11.723bp leading | |
822 % here we'll use 11.54bp which gives 61 lines per column | |
823 % with the standard compsoc margins | |
824 \def\normalsize{\@setfontsize{\normalsize}{9.5bp}{11.54bp}} | |
825 \setlength{\@IEEEnormalsizeunitybaselineskip}{11.54bp} | |
826 \normalsize | |
827 \abovedisplayskip 1.5ex plus 4bp minus 2bp | |
828 \belowdisplayskip \abovedisplayskip | |
829 \abovedisplayshortskip 0pt plus 4bp | |
830 \belowdisplayshortskip 1.5ex plus 4bp minus 2bp | |
831 \fi | |
832 % 11pt | |
833 \ifx\CLASSOPTIONpt\@IEEEptsizeeleven | |
834 \def\normalsize{\@setfontsize{\normalsize}{11bp}{13.2bp}} | |
835 \setlength{\@IEEEnormalsizeunitybaselineskip}{13.2bp} | |
836 \normalsize | |
837 \abovedisplayskip 1.5ex plus 5bp minus 3bp | |
838 \belowdisplayskip \abovedisplayskip | |
839 \abovedisplayshortskip 0pt plus 5bp | |
840 \belowdisplayshortskip 1.5ex plus 5bp minus 3bp | |
841 \fi | |
842 % 12pt | |
843 \ifx\CLASSOPTIONpt\@IEEEptsizetwelve | |
844 \def\normalsize{\@setfontsize{\normalsize}{12bp}{14.4bp}} | |
845 \setlength{\@IEEEnormalsizeunitybaselineskip}{14.4bp} | |
846 \normalsize | |
847 \abovedisplayskip 1.5ex plus 6bp minus 4bp | |
848 \belowdisplayskip \abovedisplayskip | |
849 \abovedisplayshortskip 0pt plus 6bp | |
850 \belowdisplayshortskip 1.5ex plus 6bp minus 4bp | |
851 \fi | |
852 \fi\fi | |
853 | |
854 | |
855 | |
856 | |
857 % V1.6 The Computer Modern Fonts will issue a substitution warning for | |
858 % 24pt titles (24.88pt is used instead, but the default and correct | |
859 % Times font will scale exactly as needed) increase the substitution | |
860 % tolerance to turn off this warning. | |
861 % | |
862 % V1.8a, the compsoc bp font sizes can also cause bogus font substitution | |
863 % warnings with footnote or scriptsize math and the $\bullet$ itemized | |
864 % list of \IEEEcompsocitemizethanks. So, increase this to 1.5pt or more. | |
865 \def\fontsubfuzz{1.7bp} | |
866 | |
867 | |
868 % warn the user in case they forget to use the 9pt option with | |
869 % technote | |
870 \ifCLASSOPTIONtechnote% | |
871 \ifx\CLASSOPTIONpt\@IEEEptsizenine\else% | |
872 \typeout{** ATTENTION: Technotes are normally 9pt documents.}% | |
873 \fi% | |
874 \fi | |
875 | |
876 | |
877 % V1.7 | |
878 % Improved \textunderscore to provide a much better fake _ when used with | |
879 % OT1 encoding. Under OT1, detect use of pcr or cmtt \ttfamily and use | |
880 % available true _ glyph for those two typewriter fonts. | |
881 \def\@IEEEstringptm{ptm} % Times Roman family | |
882 \def\@IEEEstringppl{ppl} % Palatino Roman family | |
883 \def\@IEEEstringphv{phv} % Helvetica Sans Serif family | |
884 \def\@IEEEstringpcr{pcr} % Courier typewriter family | |
885 \def\@IEEEstringcmtt{cmtt} % Computer Modern typewriter family | |
886 \DeclareTextCommandDefault{\textunderscore}{\leavevmode | |
887 \ifx\f@family\@IEEEstringpcr\string_\else | |
888 \ifx\f@family\@IEEEstringcmtt\string_\else | |
889 \ifx\f@family\@IEEEstringptm\kern 0em\vbox{\hrule\@width 0.5em\@height 0.5pt\kern -0.3ex}\else | |
890 \ifx\f@family\@IEEEstringppl\kern 0em\vbox{\hrule\@width 0.5em\@height 0.5pt\kern -0.3ex}\else | |
891 \ifx\f@family\@IEEEstringphv\kern -0.03em\vbox{\hrule\@width 0.62em\@height 0.52pt\kern -0.33ex}\kern -0.03em\else | |
892 \kern 0.09em\vbox{\hrule\@width 0.6em\@height 0.44pt\kern -0.63pt\kern -0.42ex}\kern 0.09em\fi\fi\fi\fi\fi\relax} | |
893 | |
894 | |
895 | |
896 | |
897 % set the default \baselinestretch | |
898 \def\baselinestretch{1} | |
899 \ifCLASSOPTIONdraftcls | |
900 \def\baselinestretch{1.5}% default baselinestretch for draft modes | |
901 \fi | |
902 | |
903 | |
904 % process CLASSINPUT baselinestretch | |
905 \ifx\CLASSINPUTbaselinestretch\@IEEEundefined | |
906 \else | |
907 \edef\baselinestretch{\CLASSINPUTbaselinestretch} % user CLASSINPUT override | |
908 \typeout{** ATTENTION: Overriding \string\baselinestretch\space to | |
909 \baselinestretch\space via \string\CLASSINPUT.} | |
910 \fi | |
911 | |
912 \small\normalsize % make \baselinestretch take affect | |
913 | |
914 | |
915 | |
916 | |
917 % store the normalsize baselineskip | |
918 \newdimen\CLASSINFOnormalsizebaselineskip | |
919 \CLASSINFOnormalsizebaselineskip=\baselineskip\relax | |
920 % and the normalsize unity (baselinestretch=1) baselineskip | |
921 % we could save a register by giving the user access to | |
922 % \@IEEEnormalsizeunitybaselineskip. However, let's protect | |
923 % its read only internal status | |
924 \newdimen\CLASSINFOnormalsizeunitybaselineskip | |
925 \CLASSINFOnormalsizeunitybaselineskip=\@IEEEnormalsizeunitybaselineskip\relax | |
926 % store the nominal value of jot | |
927 \newdimen\IEEEnormaljot | |
928 \IEEEnormaljot=0.25\baselineskip\relax | |
929 | |
930 % set \jot | |
931 \jot=\IEEEnormaljot\relax | |
932 | |
933 | |
934 | |
935 | |
936 % V1.6, we are now going to fine tune the interword spacing | |
937 % The default interword glue for Times under TeX appears to use a | |
938 % nominal interword spacing of 25% (relative to the font size, i.e., 1em) | |
939 % a maximum of 40% and a minimum of 19%. | |
940 % For example, 10pt text uses an interword glue of: | |
941 % | |
942 % 2.5pt plus 1.49998pt minus 0.59998pt | |
943 % | |
944 % However, IEEE allows for a more generous range which reduces the need | |
945 % for hyphenation, especially for two column text. Furthermore, IEEE | |
946 % tends to use a little bit more nominal space between the words. | |
947 % IEEE's interword spacing percentages appear to be: | |
948 % 35% nominal | |
949 % 23% minimum | |
950 % 50% maximum | |
951 % (They may even be using a tad more for the largest fonts such as 24pt.) | |
952 % | |
953 % for bold text, IEEE increases the spacing a little more: | |
954 % 37.5% nominal | |
955 % 23% minimum | |
956 % 55% maximum | |
957 | |
958 % here are the interword spacing ratios we'll use | |
959 % for medium (normal weight) | |
960 \def\@IEEEinterspaceratioM{0.35} | |
961 \def\@IEEEinterspaceMINratioM{0.23} | |
962 \def\@IEEEinterspaceMAXratioM{0.50} | |
963 | |
964 % for bold | |
965 \def\@IEEEinterspaceratioB{0.375} | |
966 \def\@IEEEinterspaceMINratioB{0.23} | |
967 \def\@IEEEinterspaceMAXratioB{0.55} | |
968 | |
969 | |
970 % compsoc nonconference papers use Palatino, | |
971 % tweak settings to better match the proofs | |
972 \ifCLASSOPTIONcompsoc | |
973 \ifCLASSOPTIONconference\else | |
974 % for medium (normal weight) | |
975 \def\@IEEEinterspaceratioM{0.28} | |
976 \def\@IEEEinterspaceMINratioM{0.21} | |
977 \def\@IEEEinterspaceMAXratioM{0.47} | |
978 % for bold | |
979 \def\@IEEEinterspaceratioB{0.305} | |
980 \def\@IEEEinterspaceMINratioB{0.21} | |
981 \def\@IEEEinterspaceMAXratioB{0.52} | |
982 \fi\fi | |
983 | |
984 | |
985 % command to revise the interword spacing for the current font under TeX: | |
986 % \fontdimen2 = nominal interword space | |
987 % \fontdimen3 = interword stretch | |
988 % \fontdimen4 = interword shrink | |
989 % since all changes to the \fontdimen are global, we can enclose these commands | |
990 % in braces to confine any font attribute or length changes | |
991 \def\@@@IEEEsetfontdimens#1#2#3{{% | |
992 \setlength{\@IEEEtrantmpdimenB}{\f@size pt}% grab the font size in pt, could use 1em instead. | |
993 \setlength{\@IEEEtrantmpdimenA}{#1\@IEEEtrantmpdimenB}% | |
994 \fontdimen2\font=\@IEEEtrantmpdimenA\relax | |
995 \addtolength{\@IEEEtrantmpdimenA}{-#2\@IEEEtrantmpdimenB}% | |
996 \fontdimen3\font=-\@IEEEtrantmpdimenA\relax | |
997 \setlength{\@IEEEtrantmpdimenA}{#1\@IEEEtrantmpdimenB}% | |
998 \addtolength{\@IEEEtrantmpdimenA}{-#3\@IEEEtrantmpdimenB}% | |
999 \fontdimen4\font=\@IEEEtrantmpdimenA\relax}} | |
1000 | |
1001 % revise the interword spacing for each font weight | |
1002 \def\@@IEEEsetfontdimens{{% | |
1003 \mdseries | |
1004 \@@@IEEEsetfontdimens{\@IEEEinterspaceratioM}{\@IEEEinterspaceMAXratioM}{\@IEEEinterspaceMINratioM}% | |
1005 \bfseries | |
1006 \@@@IEEEsetfontdimens{\@IEEEinterspaceratioB}{\@IEEEinterspaceMAXratioB}{\@IEEEinterspaceMINratioB}% | |
1007 }} | |
1008 | |
1009 % revise the interword spacing for each font shape | |
1010 % \slshape is not often used for IEEE work and is not altered here. The \scshape caps are | |
1011 % already a tad too large in the free LaTeX fonts (as compared to what IEEE uses) so we | |
1012 % won't alter these either. | |
1013 \def\@IEEEsetfontdimens{{% | |
1014 \normalfont | |
1015 \@@IEEEsetfontdimens | |
1016 \normalfont\itshape | |
1017 \@@IEEEsetfontdimens | |
1018 }} | |
1019 | |
1020 % command to revise the interword spacing for each font size (and shape | |
1021 % and weight). Only the \rmfamily is done here as \ttfamily uses a | |
1022 % fixed spacing and \sffamily is not used as the main text of IEEE papers. | |
1023 \def\@IEEEtunefonts{{\selectfont\rmfamily | |
1024 \tiny\@IEEEsetfontdimens | |
1025 \scriptsize\@IEEEsetfontdimens | |
1026 \footnotesize\@IEEEsetfontdimens | |
1027 \small\@IEEEsetfontdimens | |
1028 \normalsize\@IEEEsetfontdimens | |
1029 \sublargesize\@IEEEsetfontdimens | |
1030 \large\@IEEEsetfontdimens | |
1031 \LARGE\@IEEEsetfontdimens | |
1032 \huge\@IEEEsetfontdimens | |
1033 \Huge\@IEEEsetfontdimens}} | |
1034 | |
1035 % if the nofonttune class option is not given, revise the interword spacing | |
1036 % now - in case IEEEtran makes any default length measurements, and make | |
1037 % sure all the default fonts are loaded | |
1038 \ifCLASSOPTIONnofonttune\else | |
1039 \@IEEEtunefonts | |
1040 \fi | |
1041 | |
1042 % and again at the start of the document in case the user loaded different fonts | |
1043 \AtBeginDocument{\ifCLASSOPTIONnofonttune\else\@IEEEtunefonts\fi} | |
1044 | |
1045 | |
1046 | |
1047 | |
1048 | |
1049 % -- V1.8a page setup commands -- | |
1050 | |
1051 % The default sample text for calculating margins | |
1052 % Note that IEEE publications use \scriptsize for headers and footers. | |
1053 \def\IEEEdefaultsampletext{\normalfont\normalsize gT} | |
1054 \def\IEEEdefaultheadersampletext{\normalfont\scriptsize T}% IEEE headers default to uppercase | |
1055 \def\IEEEdefaultfootersampletext{\normalfont\scriptsize gT} | |
1056 | |
1057 | |
1058 | |
1059 % usage: \IEEEsettextwidth{inner margin}{outer margin} | |
1060 % Sets \textwidth to allow the specified inner and outer margins | |
1061 % for the current \paperwidth. | |
1062 \def\IEEEsettextwidth#1#2{\@IEEEtrantmpdimenA\paperwidth | |
1063 \@IEEEtrantmpdimenB#1\relax | |
1064 \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB | |
1065 \@IEEEtrantmpdimenB#2\relax | |
1066 \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB | |
1067 \textwidth\@IEEEtrantmpdimenA} | |
1068 | |
1069 | |
1070 | |
1071 % usage: \IEEEsetsidemargin{mode: i, o, c, a}{margin/offset} | |
1072 % Sets \oddsidemargin and \evensidemargin to yield the specified margin | |
1073 % of the given mode. | |
1074 % The available modes are: | |
1075 % i = inner margin | |
1076 % o = outer margin | |
1077 % c = centered, with the given offset | |
1078 % a = adjust the margins using the given offset | |
1079 % For the offsets, positive values increase the inner margin. | |
1080 % \textwidth should be set properly for the given margins before calling this | |
1081 % function. | |
1082 \def\IEEEsetsidemargin#1#2{\@IEEEtrantmpdimenA #2\relax | |
1083 \@IEEEextracttoken{#1}\relax | |
1084 % check for mode errors | |
1085 \ifx\@IEEEextractedtokenmacro\@empty | |
1086 \@IEEEclspkgerror{Empty mode type in \string\IEEEsetsidemargin\space (line \the\inputlineno).\MessageBreak | |
1087 Defaulting to `i'}{Valid modes for \string\IEEEsetsidemargin\space are: i, o, c and a.}\relax | |
1088 \let\@IEEEextractedtoken=i\relax | |
1089 \def\@IEEEextractedtokenmacro{i}\relax | |
1090 \else | |
1091 \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
1092 \typeout{** WARNING: \string\IEEEsetsidemargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
1093 \fi | |
1094 \fi | |
1095 % handle each mode | |
1096 \if\@IEEEextractedtoken a\relax | |
1097 \advance\oddsidemargin by \@IEEEtrantmpdimenA\relax | |
1098 \else | |
1099 \if\@IEEEextractedtoken c\relax | |
1100 \oddsidemargin\paperwidth | |
1101 \advance\oddsidemargin by -\textwidth | |
1102 \divide\oddsidemargin by 2\relax | |
1103 \advance\oddsidemargin by -1in\relax | |
1104 \advance\oddsidemargin by \@IEEEtrantmpdimenA\relax | |
1105 \else | |
1106 \if\@IEEEextractedtoken o\relax | |
1107 \oddsidemargin\paperwidth | |
1108 \advance\oddsidemargin by -\textwidth | |
1109 \advance\oddsidemargin by -\@IEEEtrantmpdimenA | |
1110 \advance\oddsidemargin by -1in\relax | |
1111 \else | |
1112 \if\@IEEEextractedtoken i\relax | |
1113 \else | |
1114 \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetsidemargin\space (line \the\inputlineno).\MessageBreak | |
1115 Defaulting to `i'}% | |
1116 {Valid modes for \string\IEEEsetsidemargin\space are: i, o, c and a.}% | |
1117 \fi | |
1118 \oddsidemargin\@IEEEtrantmpdimenA | |
1119 \advance\oddsidemargin by -1in\relax | |
1120 \fi\fi\fi | |
1121 % odd and even side margins both mean "inner" for single sided pages | |
1122 \evensidemargin\oddsidemargin | |
1123 % but are mirrors of each other when twosided is in effect | |
1124 \if@twoside | |
1125 \evensidemargin\paperwidth | |
1126 \advance\evensidemargin by -\textwidth | |
1127 \advance\evensidemargin by -\oddsidemargin | |
1128 % have to compensate for both the builtin 1in LaTex offset | |
1129 % and the fact we already subtracted this offset from \oddsidemargin | |
1130 \advance\evensidemargin -2in\relax | |
1131 \fi} | |
1132 | |
1133 | |
1134 | |
1135 % usage: \IEEEsettextheight[sample text]{top text margin}{bottom text margin} | |
1136 % Sets \textheight based on the specified top margin and bottom margin. | |
1137 % Takes into consideration \paperheight, \topskip, and (by default) the | |
1138 % the actual height and depth of the \IEEEdefaultsampletext text. | |
1139 \def\IEEEsettextheight{\@ifnextchar [{\@IEEEsettextheight}{\@IEEEsettextheight[\IEEEdefaultsampletext]}} | |
1140 \def\@IEEEsettextheight[#1]#2#3{\textheight\paperheight\relax | |
1141 \@IEEEtrantmpdimenA #2\relax | |
1142 \advance \textheight by -\@IEEEtrantmpdimenA% subtract top margin | |
1143 \@IEEEtrantmpdimenA #3\relax | |
1144 \advance \textheight by -\@IEEEtrantmpdimenA% subtract bottom margin | |
1145 \advance \textheight by \topskip% add \topskip | |
1146 % subtract off everything above the top, and below the bottom, baselines | |
1147 \settoheight{\@IEEEtrantmpdimenA}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1148 \advance \textheight by -\@IEEEtrantmpdimenA | |
1149 \settodepth{\@IEEEtrantmpdimenA}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1150 \advance \textheight by -\@IEEEtrantmpdimenA} | |
1151 | |
1152 | |
1153 | |
1154 \newdimen\IEEEquantizedlength | |
1155 \IEEEquantizedlength 0sp\relax | |
1156 \newdimen\IEEEquantizedlengthdiff | |
1157 \IEEEquantizedlengthdiff 0sp\relax | |
1158 \def\IEEEquantizedlengthint{0} | |
1159 | |
1160 % usage: \IEEEquantizelength{mode: d, c, i}{base unit}{length} | |
1161 % Sets the length \IEEEquantizedlength to be an integer multiple of the given | |
1162 % (nonzero) base unit such that \IEEEquantizedlength approximates the given | |
1163 % length. | |
1164 % \IEEEquantizedlengthdiff is a length equal to the difference between the | |
1165 % \IEEEquantizedlength and the given length. | |
1166 % \IEEEquantizedlengthint is a macro containing the integer number of base units | |
1167 % in \IEEEquantizedlength. | |
1168 % i.e., \IEEEquantizedlength = \IEEEquantizedlengthint * base unit | |
1169 % The mode determines how \IEEEquantizedlength is quantized: | |
1170 % d = always decrease (always round down \IEEEquantizeint) | |
1171 % c = use the closest match | |
1172 % i = always increase (always round up \IEEEquantizeint) | |
1173 % In anycase, if the given length is already quantized, | |
1174 % \IEEEquantizedlengthdiff will be set to zero. | |
1175 \def\IEEEquantizelength#1#2#3{\begingroup | |
1176 % work in isolation so as not to externally disturb the \@IEEEtrantmp | |
1177 % variables | |
1178 % load the argument values indirectly via \IEEEquantizedlengthdiff | |
1179 % in case the user refers to our \@IEEEtrantmpdimenX, \IEEEquantizedlength, | |
1180 % etc. in the arguments. we also will work with these as counters, | |
1181 % i.e., in sp units | |
1182 % A has the base unit | |
1183 \IEEEquantizedlengthdiff #2\relax\relax\relax\relax | |
1184 \@IEEEtrantmpcountA\IEEEquantizedlengthdiff | |
1185 % B has the input length | |
1186 \IEEEquantizedlengthdiff #3\relax\relax\relax\relax | |
1187 \@IEEEtrantmpcountB\IEEEquantizedlengthdiff | |
1188 \@IEEEtrantmpdimenA\the\@IEEEtrantmpcountA sp\relax | |
1189 \@IEEEtrantmpdimenB\the\@IEEEtrantmpcountB sp\relax | |
1190 % \@IEEEtrantmpcountC will have the quantized int | |
1191 % \IEEEquantizedlength will have the quantized length | |
1192 % \@IEEEtrantmpdimenC will have the quantized diff | |
1193 % initialize them to zero as this is what will be | |
1194 % exported if an error occurs | |
1195 \@IEEEtrantmpcountC 0\relax | |
1196 \IEEEquantizedlength 0sp\relax | |
1197 \@IEEEtrantmpdimenC 0sp\relax | |
1198 % extract mode | |
1199 \@IEEEextracttoken{#1}\relax | |
1200 % check for mode errors | |
1201 \ifx\@IEEEextractedtokenmacro\@empty | |
1202 \@IEEEclspkgerror{Empty mode type in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak | |
1203 Defaulting to `d'}{Valid modes for \string\IEEEquantizelength\space are: d, c and i.}\relax | |
1204 \let\@IEEEextractedtoken=d\relax | |
1205 \def\@IEEEextractedtokenmacro{d}\relax | |
1206 \else | |
1207 \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
1208 \typeout{** WARNING: \string\IEEEquantizelength\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
1209 \fi | |
1210 \fi | |
1211 % check for base unit is zero error | |
1212 \ifnum\@IEEEtrantmpcountA=0\relax | |
1213 \@IEEEclspkgerror{Base unit is zero in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak | |
1214 \string\IEEEquantizedlength\space and \string\IEEEquantizedlengthdiff\space are set to zero}{Division by zero is not allowed.}\relax | |
1215 \else% base unit is nonzero | |
1216 % \@IEEEtrantmpcountC carries the number of integer units | |
1217 % in the quantized length (integer length \ base) | |
1218 \@IEEEtrantmpcountC\@IEEEtrantmpcountB\relax | |
1219 \divide\@IEEEtrantmpcountC by \@IEEEtrantmpcountA\relax | |
1220 % \IEEEquantizedlength has the (rounded down) quantized length | |
1221 % = base * int | |
1222 \IEEEquantizedlength\@IEEEtrantmpdimenA\relax | |
1223 \multiply\IEEEquantizedlength by \@IEEEtrantmpcountC\relax | |
1224 % \@IEEEtrantmpdimenC has the difference | |
1225 % = quantized length - length | |
1226 \@IEEEtrantmpdimenC\IEEEquantizedlength\relax | |
1227 \advance\@IEEEtrantmpdimenC by -\@IEEEtrantmpdimenB\relax | |
1228 % trap special case of length being already quantized | |
1229 % to avoid a roundup under i option | |
1230 \ifdim\@IEEEtrantmpdimenC=0sp\relax | |
1231 \else % length not is already quantized | |
1232 % set dimenA to carry the upper quantized (absolute value) difference: | |
1233 % quantizedlength + base - length | |
1234 \advance\@IEEEtrantmpdimenA by \IEEEquantizedlength\relax | |
1235 \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB\relax | |
1236 % set dimenB to carry the lower quantized (absolute value) difference: | |
1237 % length - quantizedlength | |
1238 \advance\@IEEEtrantmpdimenB by -\IEEEquantizedlength\relax | |
1239 % handle each mode | |
1240 \if\@IEEEextractedtoken c\relax | |
1241 % compare upper and lower amounts, select upper if lower > upper | |
1242 \ifdim\@IEEEtrantmpdimenB>\@IEEEtrantmpdimenA\relax | |
1243 % use upper | |
1244 \advance\IEEEquantizedlength by \the\@IEEEtrantmpcountA sp\relax | |
1245 \advance\@IEEEtrantmpcountC by 1\relax | |
1246 \@IEEEtrantmpdimenC\@IEEEtrantmpdimenA | |
1247 \else% <=. uselower | |
1248 % no need to do anything for lower, use output values already setup | |
1249 \fi | |
1250 \else% not mode c | |
1251 \if\@IEEEextractedtoken i\relax | |
1252 % always round up under i mode | |
1253 \advance\IEEEquantizedlength by \the\@IEEEtrantmpcountA sp\relax | |
1254 \advance\@IEEEtrantmpcountC by 1\relax | |
1255 \@IEEEtrantmpdimenC\@IEEEtrantmpdimenA | |
1256 \else | |
1257 \if\@IEEEextractedtoken d\relax | |
1258 \else | |
1259 \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak | |
1260 Defaulting to `d'}% | |
1261 {Valid modes for \string\IEEEquantizelength\space are: d, c, and i.}\relax | |
1262 \fi % if d | |
1263 % no need to do anything for d, use output values already setup | |
1264 \fi\fi % if i, c | |
1265 \fi % if length is already quantized | |
1266 \fi% if base unit is zero | |
1267 % globally assign the results to macros we use here to escape the enclosing | |
1268 % group without needing to call \global on any of the \@IEEEtrantmp variables. | |
1269 % \@IEEEtrantmpcountC has the quantized int | |
1270 % \IEEEquantizedlength has the quantized length | |
1271 % \@IEEEtrantmpdimenC has the quantized diff | |
1272 \xdef\@IEEEquantizedlengthintmacro{\the\@IEEEtrantmpcountC}\relax | |
1273 \@IEEEtrantmpcountC\IEEEquantizedlength\relax | |
1274 \xdef\@IEEEquantizedlengthmacro{\the\@IEEEtrantmpcountC}\relax | |
1275 \@IEEEtrantmpcountC\@IEEEtrantmpdimenC\relax | |
1276 \xdef\@IEEEquantizedlengthdiffmacro{\the\@IEEEtrantmpcountC}\relax | |
1277 \endgroup | |
1278 % locally assign the outputs here from the macros | |
1279 \expandafter\IEEEquantizedlength\@IEEEquantizedlengthmacro sp\relax | |
1280 \expandafter\IEEEquantizedlengthdiff\@IEEEquantizedlengthdiffmacro sp\relax | |
1281 \edef\IEEEquantizedlengthint{\@IEEEquantizedlengthintmacro}\relax} | |
1282 | |
1283 | |
1284 | |
1285 \newdimen\IEEEquantizedtextheightdiff | |
1286 \IEEEquantizedtextheightdiff 0sp\relax | |
1287 | |
1288 % usage: \IEEEquantizetextheight[base unit]{mode: d, c, i} | |
1289 % Sets \textheight to be an integer multiple of the current \baselineskip | |
1290 % (or the optionally specified base unit) plus the first (\topskip) line. | |
1291 % \IEEEquantizedtextheightdiff is a length equal to the difference between | |
1292 % the new quantized and original \textheight. | |
1293 % \IEEEquantizedtextheightlpc is a macro containing the integer number of | |
1294 % lines per column under the quantized \textheight. i.e., | |
1295 % \textheight = \IEEEquantizedtextheightlpc * \baselineskip + \topskip | |
1296 % The mode determines how \textheight is quantized: | |
1297 % d = always decrease (always round down the number of lines per column) | |
1298 % c = use the closest match | |
1299 % i = always increase (always round up the number of lines per column) | |
1300 % In anycase, if \textheight is already quantized, it will remain unchanged, | |
1301 % and \IEEEquantizedtextheightdiff will be set to zero. | |
1302 % Depends on: \IEEEquantizelength | |
1303 \def\IEEEquantizetextheight{\@ifnextchar [{\@IEEEquantizetextheight}{\@IEEEquantizetextheight[\baselineskip]}} | |
1304 \def\@IEEEquantizetextheight[#1]#2{\begingroup | |
1305 % use our \IEEEquantizedtextheightdiff as a scratch pad | |
1306 % we need to subtract off \topskip before quantization | |
1307 \IEEEquantizedtextheightdiff\textheight | |
1308 \advance\IEEEquantizedtextheightdiff by -\topskip\relax | |
1309 \IEEEquantizelength{#2}{#1}{\IEEEquantizedtextheightdiff} | |
1310 % add back \topskip line | |
1311 \advance\IEEEquantizedlength by \topskip | |
1312 \@IEEEtrantmpcountC\IEEEquantizedlengthint\relax | |
1313 \advance\@IEEEtrantmpcountC by 1\relax | |
1314 % globally assign the results to macros we use here to escape the enclosing | |
1315 % group without needing to call \global on any of the \@IEEEtrantmp variables. | |
1316 \xdef\@IEEEquantizedtextheightlpcmacro{\the\@IEEEtrantmpcountC}\relax | |
1317 \@IEEEtrantmpcountC\IEEEquantizedlength\relax | |
1318 \xdef\@IEEEquantizedtextheightmacro{\the\@IEEEtrantmpcountC}\relax | |
1319 \@IEEEtrantmpcountC\IEEEquantizedlengthdiff\relax | |
1320 \xdef\@IEEEquantizedtextheightdiffmacro{\the\@IEEEtrantmpcountC}\relax | |
1321 \endgroup | |
1322 % locally assign the outputs here from the macros | |
1323 \textheight\@IEEEquantizedtextheightmacro sp\relax | |
1324 \IEEEquantizedtextheightdiff\@IEEEquantizedtextheightdiffmacro sp\relax | |
1325 \edef\IEEEquantizedtextheightlpc{\@IEEEquantizedtextheightlpcmacro}} | |
1326 | |
1327 | |
1328 | |
1329 % usage: \IEEEsettopmargin[sample text]{mode: t, b, c, a, q}{margin/offset} | |
1330 % Sets \topmargin based on the specified vertical margin. | |
1331 % Takes into consideration the base 1in offset, \headheight, \headsep, | |
1332 % \topskip, and (by default) the the actual height (or, for the bottom, depth) | |
1333 % of the \IEEEdefaultsampletext text. | |
1334 % The available modes are: | |
1335 % t = top margin | |
1336 % b = bottom margin | |
1337 % c = vertically centered, with the given offset | |
1338 % a = adjust the vertical margins using the given offset | |
1339 % q = adjust the margins using \IEEEquantizedtextheightdiff and the given offset | |
1340 % For the offsets, positive values increase the top margin. | |
1341 % \headheight, \headsep, \topskip and \textheight should be set properly for the | |
1342 % given margins before calling this function. | |
1343 \def\IEEEsettopmargin{\@ifnextchar [{\@IEEEsettopmargin}{\@IEEEsettopmargin[\IEEEdefaultsampletext]}} | |
1344 \def\@IEEEsettopmargin[#1]#2#3{\@IEEEtrantmpdimenA #3\relax | |
1345 \@IEEEextracttoken{#2}\relax | |
1346 % check for mode errors | |
1347 \ifx\@IEEEextractedtokenmacro\@empty | |
1348 \@IEEEclspkgerror{Empty mode type in \string\IEEEsettopmargin\space (line \the\inputlineno).\MessageBreak | |
1349 Defaulting to `t'}{Valid modes for \string\IEEEsettopmargin\space are: t, b, c, a and q.}\relax | |
1350 \let\@IEEEextractedtoken=t\relax | |
1351 \def\@IEEEextractedtokenmacro{t}\relax | |
1352 \else | |
1353 \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
1354 \typeout{** WARNING: \string\IEEEsettopmargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
1355 \fi | |
1356 \fi | |
1357 % handle each mode | |
1358 \if\@IEEEextractedtoken a\relax | |
1359 \advance\topmargin by \@IEEEtrantmpdimenA\relax | |
1360 \else | |
1361 \if\@IEEEextractedtoken q\relax | |
1362 % we need to adjust by half the \IEEEquantizedtextheightdiff value | |
1363 \@IEEEtrantmpdimenB\IEEEquantizedtextheightdiff\relax | |
1364 \divide\@IEEEtrantmpdimenB by 2\relax | |
1365 % a positive \IEEEquantizedtextheightdiff means we need to reduce \topmargin | |
1366 % because \textheight has been lenghtened | |
1367 \advance\topmargin by -\@IEEEtrantmpdimenB\relax | |
1368 \advance\topmargin by \@IEEEtrantmpdimenA\relax | |
1369 \else | |
1370 \if\@IEEEextractedtoken c\relax | |
1371 \topmargin\paperheight | |
1372 \advance\topmargin by -\textheight | |
1373 % \textheight includes \topskip, but we should not count topskip whitespace here, backout | |
1374 \advance \topmargin by \topskip | |
1375 \settoheight{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1376 \advance\topmargin by -\@IEEEtrantmpdimenB\relax | |
1377 \settodepth{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1378 \advance\topmargin by -\@IEEEtrantmpdimenB\relax | |
1379 \divide\topmargin by 2\relax | |
1380 \advance\topmargin by \@IEEEtrantmpdimenA\relax | |
1381 \else | |
1382 \if\@IEEEextractedtoken b\relax | |
1383 \topmargin\paperheight | |
1384 \advance\topmargin by -\textheight | |
1385 % \textheight includes \topskip, but we should not count topskip whitespace here, backout | |
1386 \advance \topmargin by \topskip | |
1387 \settodepth{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1388 \advance\topmargin by -\@IEEEtrantmpdimenB\relax | |
1389 \advance\topmargin by -\@IEEEtrantmpdimenA\relax | |
1390 \else | |
1391 \if\@IEEEextractedtoken t\relax | |
1392 \else | |
1393 \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsettopmargin\space (line \the\inputlineno).\MessageBreak | |
1394 Defaulting to `t'}% | |
1395 {Valid modes for \string\IEEEsettopmargin\space are: t, b, c, a and q.}\relax | |
1396 \fi | |
1397 \topmargin\@IEEEtrantmpdimenA\relax | |
1398 \settoheight{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1399 \advance\topmargin by \@IEEEtrantmpdimenB\relax | |
1400 \fi\fi % if t, b, c | |
1401 % convert desired top margin into actual \topmargin | |
1402 % this is not done for the q or a modes because they are only adjustments | |
1403 \advance \topmargin by -\topskip | |
1404 \advance \topmargin by -1in | |
1405 \advance \topmargin by -\headheight | |
1406 \advance \topmargin by -\headsep | |
1407 \fi\fi % if q, a | |
1408 } | |
1409 | |
1410 | |
1411 | |
1412 % usage: \IEEEsetheadermargin[header sample][text sample]{mode: t, b, c, a}{margin/offset} | |
1413 % Differentially adjusts \topmargin and \headsep (such that their sum is unchanged) | |
1414 % based on the specified header margin. | |
1415 % Takes into consideration the base 1in offset, \headheight, \topskip, and (by default) | |
1416 % the actual height (or depth) of the \IEEEdefaultheadersampletext and | |
1417 % \IEEEdefaultsampletext text. | |
1418 % The available modes are: | |
1419 % t = top margin (top of the header text to the top of the page) | |
1420 % b = bottom margin (bottom of the header text to the top of the main text) | |
1421 % c = vertically centered between the main text and the top of the page, | |
1422 % with the given offset | |
1423 % a = adjust the vertical position using the given offset | |
1424 % For the offsets, positive values move the header downward. | |
1425 % \headheight, \headsep, \topskip and \topmargin should be set properly before | |
1426 % calling this function. | |
1427 \def\IEEEsetheadermargin{\@ifnextchar [{\@IEEEsetheadermargin}{\@IEEEsetheadermargin[\IEEEdefaultheadersampletext]}} | |
1428 \def\@IEEEsetheadermargin[#1]{\@ifnextchar [{\@@IEEEsetheadermargin[#1]}{\@@IEEEsetheadermargin[#1][\IEEEdefaultsampletext]}} | |
1429 \def\@@IEEEsetheadermargin[#1][#2]#3#4{\@IEEEtrantmpdimenA #4\relax | |
1430 \@IEEEextracttoken{#3}\relax | |
1431 % check for mode errors | |
1432 \ifx\@IEEEextractedtokenmacro\@empty | |
1433 \@IEEEclspkgerror{Empty mode type in \string\IEEEsetheadermargin\space (line \the\inputlineno).\MessageBreak | |
1434 Defaulting to `t'}{Valid modes for \string\IEEEsetheadermargin\space are: t, b, c, and a.}\relax | |
1435 \let\@IEEEextractedtoken=t\relax | |
1436 \def\@IEEEextractedtokenmacro{t}\relax | |
1437 \else | |
1438 \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
1439 \typeout{** WARNING: \string\IEEEsetheadermargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
1440 \fi | |
1441 \fi | |
1442 % handle each mode | |
1443 \if\@IEEEextractedtoken a\relax | |
1444 % No need to do anything here and can pass through the adjustment | |
1445 % value as is. The end adjustment of \topmargin and \headsep will | |
1446 % do all that is needed | |
1447 \else | |
1448 \if\@IEEEextractedtoken c\relax | |
1449 % get the bottom margin | |
1450 \@IEEEtrantmpdimenB\headsep\relax | |
1451 \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1452 \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1453 \advance\@IEEEtrantmpdimenB by \topskip | |
1454 \settoheight{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax | |
1455 \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1456 % at this point \@IEEEtrantmpdimenB has the actual header bottom margin | |
1457 % subtract from it the top header margin | |
1458 \advance\@IEEEtrantmpdimenB -1in\relax % take into consideration the system 1in offset of the top margin | |
1459 \advance\@IEEEtrantmpdimenB by -\topmargin | |
1460 \advance\@IEEEtrantmpdimenB by -\headheight | |
1461 \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1462 \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC | |
1463 % at this point \@IEEEtrantmpdimenB has the difference between the bottom and top margins | |
1464 % we need to adjust by half this amount to center the header | |
1465 \divide\@IEEEtrantmpdimenB by 2\relax | |
1466 % and add to offset | |
1467 \advance\@IEEEtrantmpdimenA by \@IEEEtrantmpdimenB | |
1468 \else | |
1469 \if\@IEEEextractedtoken b\relax | |
1470 \@IEEEtrantmpdimenB\headsep\relax | |
1471 \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1472 \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1473 \advance\@IEEEtrantmpdimenB by \topskip | |
1474 \settoheight{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax | |
1475 \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1476 % at this point \@IEEEtrantmpdimenB has the actual header bottom margin | |
1477 % get the difference between the actual and the desired | |
1478 \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenA | |
1479 \@IEEEtrantmpdimenA\@IEEEtrantmpdimenB | |
1480 \else | |
1481 \if\@IEEEextractedtoken t\relax | |
1482 \else | |
1483 \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetheadermargin\space (line \the\inputlineno).\MessageBreak | |
1484 Defaulting to `t'}% | |
1485 {Valid modes for \string\IEEEsetheadermargin\space are: t, b, c and a.}\relax | |
1486 \fi | |
1487 \@IEEEtrantmpdimenB 1in\relax % take into consideration the system 1in offset of the top margin | |
1488 \advance\@IEEEtrantmpdimenB by \topmargin | |
1489 \advance\@IEEEtrantmpdimenB by \headheight | |
1490 \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1491 \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1492 % at this point \@IEEEtrantmpdimenB has the actual header top margin | |
1493 % get the difference between the desired and the actual | |
1494 \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB | |
1495 \fi\fi % if t, b, c | |
1496 \fi % if a | |
1497 % advance \topmargin by the needed amount and reduce \headsep by the same | |
1498 % so as not to disturb the location of the main text | |
1499 \advance\topmargin by \@IEEEtrantmpdimenA\relax | |
1500 \advance\headsep by -\@IEEEtrantmpdimenA\relax | |
1501 } | |
1502 | |
1503 | |
1504 | |
1505 % usage: \IEEEsetfootermargin[footer sample][text sample]{mode: t, b, c, a}{margin/offset} | |
1506 % Adjusts \footskip based on the specified footer margin. | |
1507 % Takes into consideration the base 1in offset, \paperheight, \headheight, | |
1508 % \headsep, \textheight and (by default) the actual height (or depth) of the | |
1509 % \IEEEdefaultfootersampletext and \IEEEdefaultsampletext text. | |
1510 % The available modes are: | |
1511 % t = top margin (top of the footer text to the bottom of the main text) | |
1512 % b = bottom margin (bottom of the footer text to the bottom of page) | |
1513 % c = vertically centered between the main text and the bottom of the page, | |
1514 % with the given offset | |
1515 % a = adjust the vertical position using the given offset | |
1516 % For the offsets, positive values move the footer downward. | |
1517 % \headheight, \headsep, \topskip, \topmargin, and \textheight should be set | |
1518 % properly before calling this function. | |
1519 \def\IEEEsetfootermargin{\@ifnextchar [{\@IEEEsetfootermargin}{\@IEEEsetfootermargin[\IEEEdefaultfootersampletext]}} | |
1520 \def\@IEEEsetfootermargin[#1]{\@ifnextchar [{\@@IEEEsetfootermargin[#1]}{\@@IEEEsetfootermargin[#1][\IEEEdefaultsampletext]}} | |
1521 \def\@@IEEEsetfootermargin[#1][#2]#3#4{\@IEEEtrantmpdimenA #4\relax | |
1522 \@IEEEextracttoken{#3}\relax | |
1523 % check for mode errors | |
1524 \ifx\@IEEEextractedtokenmacro\@empty | |
1525 \@IEEEclspkgerror{Empty mode type in \string\IEEEsetfootermargin\space (line \the\inputlineno).\MessageBreak | |
1526 Defaulting to `t'}{Valid modes for \string\IEEEsetfootermargin\space are: t, b, c, and a.}\relax | |
1527 \let\@IEEEextractedtoken=t\relax | |
1528 \def\@IEEEextractedtokenmacro{t}\relax | |
1529 \else | |
1530 \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
1531 \typeout{** WARNING: \string\IEEEsetfootermargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
1532 \fi | |
1533 \fi | |
1534 % handle each mode | |
1535 \if\@IEEEextractedtoken a\relax | |
1536 % No need to do anything here and can pass through the adjustment | |
1537 % value as is. The end adjustment of \footskip will do all that | |
1538 % is needed | |
1539 \else | |
1540 \if\@IEEEextractedtoken c\relax | |
1541 % calculate the bottom margin | |
1542 \@IEEEtrantmpdimenB 1in\relax % system 1in offset | |
1543 \advance\@IEEEtrantmpdimenB\topmargin\relax | |
1544 \advance\@IEEEtrantmpdimenB\headheight\relax | |
1545 \advance\@IEEEtrantmpdimenB\headsep\relax | |
1546 \advance\@IEEEtrantmpdimenB\textheight\relax | |
1547 \advance\@IEEEtrantmpdimenB\footskip\relax | |
1548 \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1549 \advance\@IEEEtrantmpdimenC by \@IEEEtrantmpdimenB | |
1550 \@IEEEtrantmpdimenB\paperheight | |
1551 \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1552 % at this point \@IEEEtrantmpdimenB has the actual footer bottom margin | |
1553 % now subtract off the footer top margin | |
1554 \advance\@IEEEtrantmpdimenB -\footskip\relax | |
1555 \settodepth{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax | |
1556 \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC | |
1557 \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1558 \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC | |
1559 % at this point \@IEEEtrantmpdimenB has the difference between the bottom | |
1560 % and top footer margins | |
1561 % our adjustment must be half this value to center the footer | |
1562 \divide\@IEEEtrantmpdimenB by 2\relax | |
1563 % add to the offset | |
1564 \advance\@IEEEtrantmpdimenA by \@IEEEtrantmpdimenB | |
1565 \else | |
1566 \if\@IEEEextractedtoken b\relax | |
1567 % calculate the bottom margin | |
1568 \@IEEEtrantmpdimenB 1in\relax % system 1in offset | |
1569 \advance\@IEEEtrantmpdimenB\topmargin\relax | |
1570 \advance\@IEEEtrantmpdimenB\headheight\relax | |
1571 \advance\@IEEEtrantmpdimenB\headsep\relax | |
1572 \advance\@IEEEtrantmpdimenB\textheight\relax | |
1573 \advance\@IEEEtrantmpdimenB\footskip\relax | |
1574 \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1575 \advance\@IEEEtrantmpdimenC by \@IEEEtrantmpdimenB | |
1576 \@IEEEtrantmpdimenB\paperheight | |
1577 \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1578 % at this point \@IEEEtrantmpdimenB has the actual footer bottom margin | |
1579 % get the difference between the actual and the desired | |
1580 \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenA | |
1581 \@IEEEtrantmpdimenA\@IEEEtrantmpdimenB | |
1582 \else | |
1583 \if\@IEEEextractedtoken t\relax | |
1584 \else | |
1585 \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetfootermargin\space (line \the\inputlineno).\MessageBreak | |
1586 Defaulting to `t'}% | |
1587 {Valid modes for \string\IEEEsetfootermargin\space are: t, b, c and a.}\relax | |
1588 \fi | |
1589 \@IEEEtrantmpdimenB\footskip\relax | |
1590 \settodepth{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax | |
1591 \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1592 \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1593 \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1594 % at this point \@IEEEtrantmpdimenB has the actual footer top margin | |
1595 % get the difference between the desired and the actual | |
1596 \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB | |
1597 \fi\fi % if t, b, c | |
1598 \fi % if a | |
1599 % advance \footskip by the needed amount | |
1600 \advance\footskip by \@IEEEtrantmpdimenA\relax | |
1601 } | |
1602 | |
1603 % -- End V1.8a page setup commands -- | |
1604 | |
1605 | |
1606 | |
1607 | |
1608 | |
1609 % V1.6 | |
1610 % LaTeX is a little to quick to use hyphenations | |
1611 % So, we increase the penalty for their use and raise | |
1612 % the badness level that triggers an underfull hbox | |
1613 % warning. The author may still have to tweak things, | |
1614 % but the appearance will be much better "right out | |
1615 % of the box" than that under V1.5 and prior. | |
1616 % TeX default is 50 | |
1617 \hyphenpenalty=750 | |
1618 \ifCLASSOPTIONcompsoc | |
1619 \hyphenpenalty 500 | |
1620 \fi | |
1621 % If we didn't adjust the interword spacing, 2200 might be better. | |
1622 % The TeX default is 1000 | |
1623 \hbadness=1350 | |
1624 % IEEE does not use extra spacing after punctuation | |
1625 \frenchspacing | |
1626 | |
1627 % V1.7 increase this a tad to discourage equation breaks | |
1628 \binoppenalty=1000 % default 700 | |
1629 \relpenalty=800 % default 500 | |
1630 | |
1631 % v1.8a increase these to discourage widows and orphans | |
1632 \clubpenalty=1000 % default 150 | |
1633 \widowpenalty=1000 % default 150 | |
1634 \displaywidowpenalty=1000 % default 50 | |
1635 | |
1636 | |
1637 % margin note stuff | |
1638 \marginparsep 10pt | |
1639 \marginparwidth 20pt | |
1640 \marginparpush 25pt | |
1641 | |
1642 | |
1643 % if things get too close, go ahead and let them touch | |
1644 \lineskip 0pt | |
1645 \normallineskip 0pt | |
1646 \lineskiplimit 0pt | |
1647 \normallineskiplimit 0pt | |
1648 | |
1649 % The distance from the lower edge of the text body to the | |
1650 % footline | |
1651 \footskip 0.4in | |
1652 | |
1653 % normally zero, should be relative to font height. | |
1654 % put in a little rubber to help stop some bad breaks (underfull vboxes) | |
1655 \parskip 0ex plus 0.2ex minus 0.1ex | |
1656 | |
1657 \parindent 1.0em | |
1658 \ifCLASSOPTIONcompsoc | |
1659 \parindent 1.5em | |
1660 \fi | |
1661 | |
1662 \headheight 12pt | |
1663 \headsep 18pt | |
1664 % use the normal font baselineskip | |
1665 % so that \topskip is unaffected by changes in \baselinestretch | |
1666 \topskip=\@IEEEnormalsizeunitybaselineskip | |
1667 | |
1668 | |
1669 % V1.8 \maxdepth defaults to 4pt, but should be font size dependent | |
1670 \maxdepth=0.5\@IEEEnormalsizeunitybaselineskip | |
1671 \textheight 58pc % 9.63in, 696pt | |
1672 | |
1673 % set the default top margin to 58pt | |
1674 % which results in a \topmargin of -49.59pt for 10pt documents | |
1675 \IEEEsettopmargin{t}{58pt} | |
1676 % tweak textheight to a perfect integer number of lines/column. | |
1677 % standard is: 9pt/63 lpc; 10pt/58 lpc; 11pt/52 lpc; 12pt/50 lpc | |
1678 \IEEEquantizetextheight{c} | |
1679 % tweak top margin so that the error is shared equally at the top and bottom | |
1680 \IEEEsettopmargin{q}{0sp} | |
1681 | |
1682 | |
1683 \columnsep 1pc | |
1684 \textwidth 43pc % 2 x 21pc + 1pc = 43pc | |
1685 | |
1686 % set the default side margins to center the text | |
1687 \IEEEsetsidemargin{c}{0pt} | |
1688 | |
1689 | |
1690 % adjust margins for default conference mode | |
1691 \ifCLASSOPTIONconference | |
1692 \textheight 9.25in % The standard for conferences (668.4975pt) | |
1693 \IEEEsettopmargin{t}{0.75in} | |
1694 % tweak textheight to a perfect integer number of lines/page. | |
1695 % standard is: 9pt/61 lpc; 10pt/56 lpc; 11pt/50 lpc; 12pt/48 lpc | |
1696 \IEEEquantizetextheight{c} | |
1697 % tweak top margin so that the error is shared equally at the top and bottom | |
1698 \IEEEsettopmargin{q}{0sp} | |
1699 \fi | |
1700 | |
1701 | |
1702 % compsoc text sizes, margins and spacings | |
1703 \ifCLASSOPTIONcompsoc | |
1704 \columnsep 12bp | |
1705 % CS specs for \textwdith are 6.875in | |
1706 % \textwidth 6.875in | |
1707 % however, measurements from proofs show they are using 3.5in columns | |
1708 \textwidth 7in | |
1709 \advance\textwidth by \columnsep | |
1710 % set the side margins to center the text | |
1711 \IEEEsetsidemargin{c}{0pt} | |
1712 % top/bottom margins to center | |
1713 % could just set \textheight to 9.75in for all the different paper sizes | |
1714 % and then quantize, but we'll do it the long way here to allow for easy | |
1715 % future per-paper size adjustments | |
1716 \IEEEsettextheight{0.625in}{0.625in}% 11in - 2 * 0.625in = 9.75in is the standard text height for compsoc journals | |
1717 \IEEEsettopmargin{t}{0.625in} | |
1718 \if@IEEEusingcspaper | |
1719 \IEEEsettextheight{0.5in}{0.5in}% 10.75in - 2 * 0.5in = 9.75in | |
1720 \IEEEsettopmargin{t}{0.5in} | |
1721 \fi | |
1722 \if@IEEEusingAfourpaper | |
1723 \IEEEsettextheight{24.675mm}{24.675mm}% 297mm - 2 * 24.675mm = 247.650mm (9.75in) | |
1724 \IEEEsettopmargin{t}{24.675mm} | |
1725 \fi | |
1726 % tweak textheight to a perfect integer number of lines/page. | |
1727 % standard is: 9pt/65 lpc; 10pt/61 lpc; 11pt/53 lpc; 12pt/49 lpc | |
1728 \IEEEquantizetextheight{c} | |
1729 % tweak top margin so that the error is shared equally at the top and bottom | |
1730 \IEEEsettopmargin{q}{0sp} | |
1731 | |
1732 % compsoc conference | |
1733 \ifCLASSOPTIONconference | |
1734 % compsoc conference use a larger value for columnsep | |
1735 \columnsep 0.25in | |
1736 \IEEEsettextwidth{0.75in}{0.75in} | |
1737 % set the side margins to center the text (0.75in for letterpaper) | |
1738 \IEEEsetsidemargin{c}{0pt} | |
1739 % compsoc conferences want 1in top and bottom margin | |
1740 \IEEEsettextheight{1in}{1in} | |
1741 \IEEEsettopmargin{t}{1in} | |
1742 % tweak textheight to a perfect integer number of lines/page. | |
1743 % standard is: 9pt/58 lpc; 10pt/53 lpc; 11pt/48 lpc; 12pt/46 lpc | |
1744 \IEEEquantizetextheight{c} | |
1745 % tweak top margin so that the error is shared equally at the top and bottom | |
1746 \IEEEsettopmargin{q}{0sp} | |
1747 \fi | |
1748 \fi | |
1749 | |
1750 | |
1751 | |
1752 % draft mode settings override that of all other modes | |
1753 % provides a nice 1in margin all around the paper and extra | |
1754 % space between the lines for editor's comments | |
1755 \ifCLASSOPTIONdraftcls | |
1756 % we want 1in side margins regardless of paper type | |
1757 \IEEEsettextwidth{1in}{1in} | |
1758 \IEEEsetsidemargin{c}{0pt} | |
1759 % want 1in top and bottom margins | |
1760 \IEEEsettextheight{1in}{1in} | |
1761 \IEEEsettopmargin{t}{1in} | |
1762 % digitize textheight to be an integer number of lines. | |
1763 % this may cause the top and bottom margins to be off a tad | |
1764 \IEEEquantizetextheight{c} | |
1765 % tweak top margin so that the error is shared equally at the top and bottom | |
1766 \IEEEsettopmargin{q}{0sp} | |
1767 \fi | |
1768 | |
1769 | |
1770 | |
1771 % process CLASSINPUT inner/outer margin | |
1772 % if inner margin defined, but outer margin not, set outer to inner. | |
1773 \ifx\CLASSINPUTinnersidemargin\@IEEEundefined | |
1774 \else | |
1775 \ifx\CLASSINPUToutersidemargin\@IEEEundefined | |
1776 \edef\CLASSINPUToutersidemargin{\CLASSINPUTinnersidemargin} | |
1777 \fi | |
1778 \fi | |
1779 | |
1780 \ifx\CLASSINPUToutersidemargin\@IEEEundefined | |
1781 \else | |
1782 % if outer margin defined, but inner margin not, set inner to outer. | |
1783 \ifx\CLASSINPUTinnersidemargin\@IEEEundefined | |
1784 \edef\CLASSINPUTinnersidemargin{\CLASSINPUToutersidemargin} | |
1785 \fi | |
1786 \IEEEsettextwidth{\CLASSINPUTinnersidemargin}{\CLASSINPUToutersidemargin} | |
1787 \IEEEsetsidemargin{i}{\CLASSINPUTinnersidemargin} | |
1788 \typeout{** ATTENTION: Overriding inner side margin to \CLASSINPUTinnersidemargin\space and | |
1789 outer side margin to \CLASSINPUToutersidemargin\space via \string\CLASSINPUT.} | |
1790 \fi | |
1791 | |
1792 | |
1793 | |
1794 % process CLASSINPUT top/bottom text margin | |
1795 % if toptext margin defined, but bottomtext margin not, set bottomtext to toptext margin | |
1796 \ifx\CLASSINPUTtoptextmargin\@IEEEundefined | |
1797 \else | |
1798 \ifx\CLASSINPUTbottomtextmargin\@IEEEundefined | |
1799 \edef\CLASSINPUTbottomtextmargin{\CLASSINPUTtoptextmargin} | |
1800 \fi | |
1801 \fi | |
1802 | |
1803 \ifx\CLASSINPUTbottomtextmargin\@IEEEundefined | |
1804 \else | |
1805 % if bottomtext margin defined, but toptext margin not, set toptext to bottomtext margin | |
1806 \ifx\CLASSINPUTtoptextmargin\@IEEEundefined | |
1807 \edef\CLASSINPUTtoptextmargin{\CLASSINPUTbottomtextmargin} | |
1808 \fi | |
1809 \IEEEsettextheight{\CLASSINPUTtoptextmargin}{\CLASSINPUTbottomtextmargin} | |
1810 \IEEEsettopmargin{t}{\CLASSINPUTtoptextmargin} | |
1811 \typeout{** ATTENTION: Overriding top text margin to \CLASSINPUTtoptextmargin\space and | |
1812 bottom text margin to \CLASSINPUTbottomtextmargin\space via \string\CLASSINPUT.} | |
1813 \fi | |
1814 | |
1815 | |
1816 | |
1817 % default to center header and footer text in the margins | |
1818 \IEEEsetheadermargin{c}{0pt} | |
1819 \IEEEsetfootermargin{c}{0pt} | |
1820 | |
1821 % adjust header and footer positions for compsoc journals | |
1822 \ifCLASSOPTIONcompsoc | |
1823 \ifCLASSOPTIONjournal | |
1824 \IEEEsetheadermargin{b}{\@IEEEnormalsizeunitybaselineskip} | |
1825 \IEEEsetfootermargin{t}{\@IEEEnormalsizeunitybaselineskip} | |
1826 \fi | |
1827 \fi | |
1828 | |
1829 | |
1830 % V1.8a display lines per column info message on user's console | |
1831 \def\IEEEdisplayinfolinespercolumn{\@IEEEtrantmpdimenA=\textheight | |
1832 % topskip represents only one line even if > baselineskip | |
1833 \advance\@IEEEtrantmpdimenA by -1\topskip | |
1834 \@IEEEtrantmpcountA=\@IEEEtrantmpdimenA | |
1835 \@IEEEtrantmpcountB=\@IEEEtrantmpdimenA | |
1836 \divide\@IEEEtrantmpcountB by \baselineskip | |
1837 % need to add one line to include topskip (first) line | |
1838 \advance\@IEEEtrantmpcountB by 1 | |
1839 % save lines per column value as text | |
1840 \edef\@IEEEnumlinespercolumninfotxt{\the\@IEEEtrantmpcountB} | |
1841 % backout topskip advance to allow direct \@IEEEtrantmpcountA comparison | |
1842 \advance\@IEEEtrantmpcountB by -1 | |
1843 % restore value as text height (without topskip) rather than just as number of lines | |
1844 \multiply\@IEEEtrantmpcountB by \baselineskip | |
1845 % is the column height an integer number of lines per column? | |
1846 \ifnum\@IEEEtrantmpcountA=\@IEEEtrantmpcountB | |
1847 \edef\@IEEEnumlinespercolumnexactinfotxt{exact} | |
1848 \else | |
1849 \@IEEEtrantmpdimenA\@IEEEtrantmpcountA sp\relax | |
1850 \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpcountB sp\relax | |
1851 \edef\@IEEEnumlinespercolumnexactinfotxt{approximate, difference = \the\@IEEEtrantmpdimenA} | |
1852 \fi | |
1853 \typeout{-- Lines per column: \@IEEEnumlinespercolumninfotxt\space (\@IEEEnumlinespercolumnexactinfotxt).}} | |
1854 % delay execution till start of document to allow for user changes | |
1855 \AtBeginDocument{\IEEEdisplayinfolinespercolumn} | |
1856 | |
1857 | |
1858 | |
1859 % LIST SPACING CONTROLS | |
1860 | |
1861 % Controls the amount of EXTRA spacing | |
1862 % above and below \trivlist | |
1863 % Both \list and IED lists override this. | |
1864 % However, \trivlist will use this as will most | |
1865 % things built from \trivlist like the \center | |
1866 % environment. | |
1867 \topsep 0.5\baselineskip | |
1868 | |
1869 % Controls the additional spacing around lists preceded | |
1870 % or followed by blank lines. IEEE does not increase | |
1871 % spacing before or after paragraphs so it is set to zero. | |
1872 % \z@ is the same as zero, but faster. | |
1873 \partopsep \z@ | |
1874 | |
1875 % Controls the spacing between paragraphs in lists. | |
1876 % IEEE does not increase spacing before or after paragraphs | |
1877 % so this is also zero. | |
1878 % With IEEEtran.cls, global changes to | |
1879 % this value DO affect lists (but not IED lists). | |
1880 \parsep \z@ | |
1881 | |
1882 % Controls the extra spacing between list items. | |
1883 % IEEE does not put extra spacing between items. | |
1884 % With IEEEtran.cls, global changes to this value DO affect | |
1885 % lists (but not IED lists). | |
1886 \itemsep \z@ | |
1887 | |
1888 % \itemindent is the amount to indent the FIRST line of a list | |
1889 % item. It is auto set to zero within the \list environment. To alter | |
1890 % it, you have to do so when you call the \list. | |
1891 % However, IEEE uses this for the theorem environment | |
1892 % There is an alternative value for this near \leftmargini below | |
1893 \itemindent -1em | |
1894 | |
1895 % \leftmargin, the spacing from the left margin of the main text to | |
1896 % the left of the main body of a list item is set by \list. | |
1897 % Hence this statement does nothing for lists. | |
1898 % But, quote and verse do use it for indention. | |
1899 \leftmargin 2em | |
1900 | |
1901 % we retain this stuff from the older IEEEtran.cls so that \list | |
1902 % will work the same way as before. However, itemize, enumerate and | |
1903 % description (IED) could care less about what these are as they | |
1904 % all are overridden. | |
1905 \leftmargini 2em | |
1906 %\itemindent 2em % Alternative values: sometimes used. | |
1907 %\leftmargini 0em | |
1908 \leftmarginii 1em | |
1909 \leftmarginiii 1.5em | |
1910 \leftmarginiv 1.5em | |
1911 \leftmarginv 1.0em | |
1912 \leftmarginvi 1.0em | |
1913 \labelsep 0.5em | |
1914 \labelwidth \z@ | |
1915 | |
1916 | |
1917 % The old IEEEtran.cls behavior of \list is retained. | |
1918 % However, the new V1.3 IED list environments override all the | |
1919 % @list stuff (\@listX is called within \list for the | |
1920 % appropriate level just before the user's list_decl is called). | |
1921 % \topsep is now 2pt as IEEE puts a little extra space around | |
1922 % lists - used by those non-IED macros that depend on \list. | |
1923 % Note that \parsep and \itemsep are not redefined as in | |
1924 % the sizexx.clo \@listX (which article.cls uses) so global changes | |
1925 % of these values DO affect \list | |
1926 % | |
1927 \def\@listi{\leftmargin\leftmargini \topsep 2pt plus 1pt minus 1pt} | |
1928 \let\@listI\@listi | |
1929 \def\@listii{\leftmargin\leftmarginii\labelwidth\leftmarginii% | |
1930 \advance\labelwidth-\labelsep \topsep 2pt} | |
1931 \def\@listiii{\leftmargin\leftmarginiii\labelwidth\leftmarginiii% | |
1932 \advance\labelwidth-\labelsep \topsep 2pt} | |
1933 \def\@listiv{\leftmargin\leftmarginiv\labelwidth\leftmarginiv% | |
1934 \advance\labelwidth-\labelsep \topsep 2pt} | |
1935 \def\@listv{\leftmargin\leftmarginv\labelwidth\leftmarginv% | |
1936 \advance\labelwidth-\labelsep \topsep 2pt} | |
1937 \def\@listvi{\leftmargin\leftmarginvi\labelwidth\leftmarginvi% | |
1938 \advance\labelwidth-\labelsep \topsep 2pt} | |
1939 | |
1940 | |
1941 % IEEE uses 5) not 5. | |
1942 \def\labelenumi{\theenumi)} \def\theenumi{\arabic{enumi}} | |
1943 | |
1944 % IEEE uses a) not (a) | |
1945 \def\labelenumii{\theenumii)} \def\theenumii{\alph{enumii}} | |
1946 | |
1947 % IEEE uses iii) not iii. | |
1948 \def\labelenumiii{\theenumiii)} \def\theenumiii{\roman{enumiii}} | |
1949 | |
1950 % IEEE uses A) not A. | |
1951 \def\labelenumiv{\theenumiv)} \def\theenumiv{\Alph{enumiv}} | |
1952 | |
1953 % exactly the same as in article.cls | |
1954 \def\p@enumii{\theenumi} | |
1955 \def\p@enumiii{\theenumi(\theenumii)} | |
1956 \def\p@enumiv{\p@enumiii\theenumiii} | |
1957 | |
1958 % itemized list label styles | |
1959 \def\labelitemi{$\scriptstyle\bullet$} | |
1960 \def\labelitemii{\textbf{--}} | |
1961 \def\labelitemiii{$\ast$} | |
1962 \def\labelitemiv{$\cdot$} | |
1963 | |
1964 | |
1965 | |
1966 % **** V1.3 ENHANCEMENTS **** | |
1967 % Itemize, Enumerate and Description (IED) List Controls | |
1968 % *************************** | |
1969 % | |
1970 % | |
1971 % IEEE seems to use at least two different values by | |
1972 % which ITEMIZED list labels are indented to the right | |
1973 % For The Journal of Lightwave Technology (JLT) and The Journal | |
1974 % on Selected Areas in Communications (JSAC), they tend to use | |
1975 % an indention equal to \parindent. For Transactions on Communications | |
1976 % they tend to indent ITEMIZED lists a little more--- 1.3\parindent. | |
1977 % We'll provide both values here for you so that you can choose | |
1978 % which one you like in your document using a command such as: | |
1979 % setlength{\IEEEilabelindent}{\IEEEilabelindentB} | |
1980 \newdimen\IEEEilabelindentA | |
1981 \IEEEilabelindentA \parindent | |
1982 | |
1983 \newdimen\IEEEilabelindentB | |
1984 \IEEEilabelindentB 1.3\parindent | |
1985 % However, we'll default to using \parindent | |
1986 % which makes more sense to me | |
1987 \newdimen\IEEEilabelindent | |
1988 \IEEEilabelindent \IEEEilabelindentA | |
1989 | |
1990 | |
1991 % This controls the default amount the enumerated list labels | |
1992 % are indented to the right. | |
1993 % Normally, this is the same as the paragraph indention | |
1994 \newdimen\IEEEelabelindent | |
1995 \IEEEelabelindent \parindent | |
1996 | |
1997 % This controls the default amount the description list labels | |
1998 % are indented to the right. | |
1999 % Normally, this is the same as the paragraph indention | |
2000 \newdimen\IEEEdlabelindent | |
2001 \IEEEdlabelindent \parindent | |
2002 | |
2003 % This is the value actually used within the IED lists. | |
2004 % The IED environments automatically set its value to | |
2005 % one of the three values above, so global changes do | |
2006 % not have any effect | |
2007 \newdimen\IEEElabelindent | |
2008 \IEEElabelindent \parindent | |
2009 | |
2010 % The actual amount labels will be indented is | |
2011 % \IEEElabelindent multiplied by the factor below | |
2012 % corresponding to the level of nesting depth | |
2013 % This provides a means by which the user can | |
2014 % alter the effective \IEEElabelindent for deeper | |
2015 % levels | |
2016 % There may not be such a thing as correct "standard IEEE" | |
2017 % values. What IEEE actually does may depend on the specific | |
2018 % circumstances. | |
2019 % The first list level almost always has full indention. | |
2020 % The second levels I've seen have only 75% of the normal indentation | |
2021 % Three level or greater nestings are very rare. I am guessing | |
2022 % that they don't use any indentation. | |
2023 \def\IEEElabelindentfactori{1.0} % almost always one | |
2024 \def\IEEElabelindentfactorii{0.75} % 0.0 or 1.0 may be used in some cases | |
2025 \def\IEEElabelindentfactoriii{0.0} % 0.75? 0.5? 0.0? | |
2026 \def\IEEElabelindentfactoriv{0.0} | |
2027 \def\IEEElabelindentfactorv{0.0} | |
2028 \def\IEEElabelindentfactorvi{0.0} | |
2029 | |
2030 % value actually used within IED lists, it is auto | |
2031 % set to one of the 6 values above | |
2032 % global changes here have no effect | |
2033 \def\IEEElabelindentfactor{1.0} | |
2034 | |
2035 % This controls the default spacing between the end of the IED | |
2036 % list labels and the list text, when normal text is used for | |
2037 % the labels. | |
2038 % compsoc uses a larger value here, but we'll set that later | |
2039 % in the class so that this code block area can be extracted | |
2040 % as-is for IEEEtrantools.sty | |
2041 \newdimen\IEEEiednormlabelsep | |
2042 \IEEEiednormlabelsep 0.6em | |
2043 | |
2044 % This controls the default spacing between the end of the IED | |
2045 % list labels and the list text, when math symbols are used for | |
2046 % the labels (nomenclature lists). IEEE usually increases the | |
2047 % spacing in these cases | |
2048 \newdimen\IEEEiedmathlabelsep | |
2049 \IEEEiedmathlabelsep 1.2em | |
2050 | |
2051 % This controls the extra vertical separation put above and | |
2052 % below each IED list. IEEE usually puts a little extra spacing | |
2053 % around each list. However, this spacing is barely noticeable. | |
2054 % compsoc uses a larger value here, but we'll set that later | |
2055 % in the class so that this code block area can be extracted | |
2056 % as-is for IEEEtrantools.sty | |
2057 \newskip\IEEEiedtopsep | |
2058 \IEEEiedtopsep 2pt plus 1pt minus 1pt | |
2059 | |
2060 | |
2061 % This command is executed within each IED list environment | |
2062 % at the beginning of the list. You can use this to set the | |
2063 % parameters for some/all your IED list(s) without disturbing | |
2064 % global parameters that affect things other than lists. | |
2065 % i.e., renewcommand{\IEEEiedlistdecl}{\setlength{\labelsep}{5em}} | |
2066 % will alter the \labelsep for the next list(s) until | |
2067 % \IEEEiedlistdecl is redefined. | |
2068 \def\IEEEiedlistdecl{\relax} | |
2069 | |
2070 % This command provides an easy way to set \leftmargin based | |
2071 % on the \labelwidth, \labelsep and the argument \IEEElabelindent | |
2072 % Usage: \IEEEcalcleftmargin{width-to-indent-the-label} | |
2073 % output is in the \leftmargin variable, i.e., effectively: | |
2074 % \leftmargin = argument + \labelwidth + \labelsep | |
2075 % Note controlled spacing here, shield end of lines with % | |
2076 \def\IEEEcalcleftmargin#1{\setlength{\leftmargin}{#1}% | |
2077 \addtolength{\leftmargin}{\labelwidth}% | |
2078 \addtolength{\leftmargin}{\labelsep}} | |
2079 | |
2080 % This command provides an easy way to set \labelwidth to the | |
2081 % width of the given text. It is the same as | |
2082 % \settowidth{\labelwidth}{label-text} | |
2083 % and useful as a shorter alternative. | |
2084 % Typically used to set \labelwidth to be the width | |
2085 % of the longest label in the list | |
2086 \def\IEEEsetlabelwidth#1{\settowidth{\labelwidth}{#1}} | |
2087 | |
2088 % When this command is executed, IED lists will use the | |
2089 % IEEEiedmathlabelsep label separation rather than the normal | |
2090 % spacing. To have an effect, this command must be executed via | |
2091 % the \IEEEiedlistdecl or within the option of the IED list | |
2092 % environments. | |
2093 \def\IEEEusemathlabelsep{\setlength{\labelsep}{\IEEEiedmathlabelsep}} | |
2094 | |
2095 % A flag which controls whether the IED lists automatically | |
2096 % calculate \leftmargin from \IEEElabelindent, \labelwidth and \labelsep | |
2097 % Useful if you want to specify your own \leftmargin | |
2098 % This flag must be set (\IEEEnocalcleftmargintrue or \IEEEnocalcleftmarginfalse) | |
2099 % via the \IEEEiedlistdecl or within the option of the IED list | |
2100 % environments to have an effect. | |
2101 \newif\ifIEEEnocalcleftmargin | |
2102 \IEEEnocalcleftmarginfalse | |
2103 | |
2104 % A flag which controls whether \IEEElabelindent is multiplied by | |
2105 % the \IEEElabelindentfactor for each list level. | |
2106 % This flag must be set via the \IEEEiedlistdecl or within the option | |
2107 % of the IED list environments to have an effect. | |
2108 \newif\ifIEEEnolabelindentfactor | |
2109 \IEEEnolabelindentfactorfalse | |
2110 | |
2111 | |
2112 % internal variable to indicate type of IED label | |
2113 % justification | |
2114 % 0 - left; 1 - center; 2 - right | |
2115 \def\@IEEEiedjustify{0} | |
2116 | |
2117 | |
2118 % commands to allow the user to control IED | |
2119 % label justifications. Use these commands within | |
2120 % the IED environment option or in the \IEEEiedlistdecl | |
2121 % Note that changing the normal list justifications | |
2122 % is nonstandard and IEEE may not like it if you do so! | |
2123 % I include these commands as they may be helpful to | |
2124 % those who are using these enhanced list controls for | |
2125 % other non-IEEE related LaTeX work. | |
2126 % itemize and enumerate automatically default to right | |
2127 % justification, description defaults to left. | |
2128 \def\IEEEiedlabeljustifyl{\def\@IEEEiedjustify{0}}%left | |
2129 \def\IEEEiedlabeljustifyc{\def\@IEEEiedjustify{1}}%center | |
2130 \def\IEEEiedlabeljustifyr{\def\@IEEEiedjustify{2}}%right | |
2131 | |
2132 | |
2133 | |
2134 | |
2135 % commands to save to and restore from the list parameter copies | |
2136 % this allows us to set all the list parameters within | |
2137 % the list_decl and prevent \list (and its \@list) | |
2138 % from overriding any of our parameters | |
2139 % V1.6 use \edefs instead of dimen's to conserve dimen registers | |
2140 % Note controlled spacing here, shield end of lines with % | |
2141 \def\@IEEEsavelistparams{\edef\@IEEEiedtopsep{\the\topsep}% | |
2142 \edef\@IEEEiedlabelwidth{\the\labelwidth}% | |
2143 \edef\@IEEEiedlabelsep{\the\labelsep}% | |
2144 \edef\@IEEEiedleftmargin{\the\leftmargin}% | |
2145 \edef\@IEEEiedpartopsep{\the\partopsep}% | |
2146 \edef\@IEEEiedparsep{\the\parsep}% | |
2147 \edef\@IEEEieditemsep{\the\itemsep}% | |
2148 \edef\@IEEEiedrightmargin{\the\rightmargin}% | |
2149 \edef\@IEEEiedlistparindent{\the\listparindent}% | |
2150 \edef\@IEEEieditemindent{\the\itemindent}} | |
2151 | |
2152 % Note controlled spacing here | |
2153 \def\@IEEErestorelistparams{\topsep\@IEEEiedtopsep\relax% | |
2154 \labelwidth\@IEEEiedlabelwidth\relax% | |
2155 \labelsep\@IEEEiedlabelsep\relax% | |
2156 \leftmargin\@IEEEiedleftmargin\relax% | |
2157 \partopsep\@IEEEiedpartopsep\relax% | |
2158 \parsep\@IEEEiedparsep\relax% | |
2159 \itemsep\@IEEEieditemsep\relax% | |
2160 \rightmargin\@IEEEiedrightmargin\relax% | |
2161 \listparindent\@IEEEiedlistparindent\relax% | |
2162 \itemindent\@IEEEieditemindent\relax} | |
2163 | |
2164 | |
2165 % v1.6b provide original LaTeX IED list environments | |
2166 % note that latex.ltx defines \itemize and \enumerate, but not \description | |
2167 % which must be created by the base classes | |
2168 % save original LaTeX itemize and enumerate | |
2169 \let\LaTeXitemize\itemize | |
2170 \let\endLaTeXitemize\enditemize | |
2171 \let\LaTeXenumerate\enumerate | |
2172 \let\endLaTeXenumerate\endenumerate | |
2173 | |
2174 % provide original LaTeX description environment from article.cls | |
2175 \newenvironment{LaTeXdescription} | |
2176 {\list{}{\labelwidth\z@ \itemindent-\leftmargin | |
2177 \let\makelabel\descriptionlabel}} | |
2178 {\endlist} | |
2179 \newcommand*\descriptionlabel[1]{\hspace\labelsep | |
2180 \normalfont\bfseries #1} | |
2181 | |
2182 | |
2183 % override LaTeX's default IED lists | |
2184 \def\itemize{\@IEEEitemize} | |
2185 \def\enditemize{\@endIEEEitemize} | |
2186 \def\enumerate{\@IEEEenumerate} | |
2187 \def\endenumerate{\@endIEEEenumerate} | |
2188 \def\description{\@IEEEdescription} | |
2189 \def\enddescription{\@endIEEEdescription} | |
2190 | |
2191 % provide the user with aliases - may help those using packages that | |
2192 % override itemize, enumerate, or description | |
2193 \def\IEEEitemize{\@IEEEitemize} | |
2194 \def\endIEEEitemize{\@endIEEEitemize} | |
2195 \def\IEEEenumerate{\@IEEEenumerate} | |
2196 \def\endIEEEenumerate{\@endIEEEenumerate} | |
2197 \def\IEEEdescription{\@IEEEdescription} | |
2198 \def\endIEEEdescription{\@endIEEEdescription} | |
2199 | |
2200 | |
2201 % V1.6 we want to keep the IEEEtran IED list definitions as our own internal | |
2202 % commands so they are protected against redefinition | |
2203 \def\@IEEEitemize{\@ifnextchar[{\@@IEEEitemize}{\@@IEEEitemize[\relax]}} | |
2204 \def\@IEEEenumerate{\@ifnextchar[{\@@IEEEenumerate}{\@@IEEEenumerate[\relax]}} | |
2205 \def\@IEEEdescription{\@ifnextchar[{\@@IEEEdescription}{\@@IEEEdescription[\relax]}} | |
2206 \def\@endIEEEitemize{\endlist} | |
2207 \def\@endIEEEenumerate{\endlist} | |
2208 \def\@endIEEEdescription{\endlist} | |
2209 | |
2210 | |
2211 % DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS | |
2212 % AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS | |
2213 % IEEEtran itemized list MDS 1/2001 | |
2214 % Note controlled spacing here, shield end of lines with % | |
2215 \def\@@IEEEitemize[#1]{% | |
2216 \ifnum\@itemdepth>3\relax\@toodeep\else% | |
2217 \ifnum\@listdepth>5\relax\@toodeep\else% | |
2218 \advance\@itemdepth\@ne% | |
2219 \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% | |
2220 % get the IEEElabelindentfactor for this level | |
2221 \advance\@listdepth\@ne% we need to know what the level WILL be | |
2222 \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}% | |
2223 \advance\@listdepth-\@ne% undo our increment | |
2224 \def\@IEEEiedjustify{2}% right justified labels are default | |
2225 % set other defaults | |
2226 \IEEEnocalcleftmarginfalse% | |
2227 \IEEEnolabelindentfactorfalse% | |
2228 \topsep\IEEEiedtopsep% | |
2229 \IEEElabelindent\IEEEilabelindent% | |
2230 \labelsep\IEEEiednormlabelsep% | |
2231 \partopsep 0ex% | |
2232 \parsep 0ex% | |
2233 \itemsep 0ex% | |
2234 \rightmargin 0em% | |
2235 \listparindent 0em% | |
2236 \itemindent 0em% | |
2237 % calculate the label width | |
2238 % the user can override this later if | |
2239 % they specified a \labelwidth | |
2240 \settowidth{\labelwidth}{\csname labelitem\romannumeral\the\@itemdepth\endcsname}% | |
2241 \@IEEEsavelistparams% save our list parameters | |
2242 \list{\csname\@itemitem\endcsname}{% | |
2243 \@IEEErestorelistparams% override any list{} changes | |
2244 % to our globals | |
2245 \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel | |
2246 \IEEEiedlistdecl% let user alter parameters | |
2247 #1\relax% | |
2248 % If the user has requested not to use the | |
2249 % IEEElabelindent factor, don't revise \IEEElabelindent | |
2250 \ifIEEEnolabelindentfactor\relax% | |
2251 \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent% | |
2252 \fi% | |
2253 % Unless the user has requested otherwise, | |
2254 % calculate our left margin based | |
2255 % on \IEEElabelindent, \labelwidth and | |
2256 % \labelsep | |
2257 \ifIEEEnocalcleftmargin\relax% | |
2258 \else\IEEEcalcleftmargin{\IEEElabelindent}% | |
2259 \fi}\fi\fi}% | |
2260 | |
2261 | |
2262 % DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS | |
2263 % AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS | |
2264 % IEEEtran enumerate list MDS 1/2001 | |
2265 % Note controlled spacing here, shield end of lines with % | |
2266 \def\@@IEEEenumerate[#1]{% | |
2267 \ifnum\@enumdepth>3\relax\@toodeep\else% | |
2268 \ifnum\@listdepth>5\relax\@toodeep\else% | |
2269 \advance\@enumdepth\@ne% | |
2270 \edef\@enumctr{enum\romannumeral\the\@enumdepth}% | |
2271 % get the IEEElabelindentfactor for this level | |
2272 \advance\@listdepth\@ne% we need to know what the level WILL be | |
2273 \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}% | |
2274 \advance\@listdepth-\@ne% undo our increment | |
2275 \def\@IEEEiedjustify{2}% right justified labels are default | |
2276 % set other defaults | |
2277 \IEEEnocalcleftmarginfalse% | |
2278 \IEEEnolabelindentfactorfalse% | |
2279 \topsep\IEEEiedtopsep% | |
2280 \IEEElabelindent\IEEEelabelindent% | |
2281 \labelsep\IEEEiednormlabelsep% | |
2282 \partopsep 0ex% | |
2283 \parsep 0ex% | |
2284 \itemsep 0ex% | |
2285 \rightmargin 0em% | |
2286 \listparindent 0em% | |
2287 \itemindent 0em% | |
2288 % calculate the label width | |
2289 % We'll set it to the width suitable for all labels using | |
2290 % normalfont 1) to 9) | |
2291 % The user can override this later | |
2292 \settowidth{\labelwidth}{9)}% | |
2293 \@IEEEsavelistparams% save our list parameters | |
2294 \list{\csname label\@enumctr\endcsname}{\usecounter{\@enumctr}% | |
2295 \@IEEErestorelistparams% override any list{} changes | |
2296 % to our globals | |
2297 \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel | |
2298 \IEEEiedlistdecl% let user alter parameters | |
2299 #1\relax% | |
2300 % If the user has requested not to use the | |
2301 % IEEElabelindent factor, don't revise \IEEElabelindent | |
2302 \ifIEEEnolabelindentfactor\relax% | |
2303 \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent% | |
2304 \fi% | |
2305 % Unless the user has requested otherwise, | |
2306 % calculate our left margin based | |
2307 % on \IEEElabelindent, \labelwidth and | |
2308 % \labelsep | |
2309 \ifIEEEnocalcleftmargin\relax% | |
2310 \else\IEEEcalcleftmargin{\IEEElabelindent}% | |
2311 \fi}\fi\fi}% | |
2312 | |
2313 | |
2314 % DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS | |
2315 % AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS | |
2316 % IEEEtran description list MDS 1/2001 | |
2317 % Note controlled spacing here, shield end of lines with % | |
2318 \def\@@IEEEdescription[#1]{% | |
2319 \ifnum\@listdepth>5\relax\@toodeep\else% | |
2320 % get the IEEElabelindentfactor for this level | |
2321 \advance\@listdepth\@ne% we need to know what the level WILL be | |
2322 \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}% | |
2323 \advance\@listdepth-\@ne% undo our increment | |
2324 \def\@IEEEiedjustify{0}% left justified labels are default | |
2325 % set other defaults | |
2326 \IEEEnocalcleftmarginfalse% | |
2327 \IEEEnolabelindentfactorfalse% | |
2328 \topsep\IEEEiedtopsep% | |
2329 \IEEElabelindent\IEEEdlabelindent% | |
2330 % assume normal labelsep | |
2331 \labelsep\IEEEiednormlabelsep% | |
2332 \partopsep 0ex% | |
2333 \parsep 0ex% | |
2334 \itemsep 0ex% | |
2335 \rightmargin 0em% | |
2336 \listparindent 0em% | |
2337 \itemindent 0em% | |
2338 % Bogus label width in case the user forgets | |
2339 % to set it. | |
2340 % TIP: If you want to see what a variable's width is you | |
2341 % can use the TeX command \showthe\width-variable to | |
2342 % display it on the screen during compilation | |
2343 % (This might be helpful to know when you need to find out | |
2344 % which label is the widest) | |
2345 \settowidth{\labelwidth}{Hello}% | |
2346 \@IEEEsavelistparams% save our list parameters | |
2347 \list{}{\@IEEErestorelistparams% override any list{} changes | |
2348 % to our globals | |
2349 \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel | |
2350 \IEEEiedlistdecl% let user alter parameters | |
2351 #1\relax% | |
2352 % If the user has requested not to use the | |
2353 % labelindent factor, don't revise \IEEElabelindent | |
2354 \ifIEEEnolabelindentfactor\relax% | |
2355 \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent% | |
2356 \fi% | |
2357 % Unless the user has requested otherwise, | |
2358 % calculate our left margin based | |
2359 % on \IEEElabelindent, \labelwidth and | |
2360 % \labelsep | |
2361 \ifIEEEnocalcleftmargin\relax% | |
2362 \else\IEEEcalcleftmargin{\IEEElabelindent}\relax% | |
2363 \fi}\fi} | |
2364 | |
2365 % v1.6b we use one makelabel that does justification as needed. | |
2366 \def\@IEEEiedmakelabel#1{\relax\if\@IEEEiedjustify 0\relax | |
2367 \makebox[\labelwidth][l]{\normalfont #1}\else | |
2368 \if\@IEEEiedjustify 1\relax | |
2369 \makebox[\labelwidth][c]{\normalfont #1}\else | |
2370 \makebox[\labelwidth][r]{\normalfont #1}\fi\fi} | |
2371 | |
2372 | |
2373 % compsoc uses a larger value for the normal labelsep | |
2374 % and also extra spacing above and below each list | |
2375 \ifCLASSOPTIONcompsoc | |
2376 \IEEEiednormlabelsep 1.2em | |
2377 \IEEEiedtopsep 6pt plus 3pt minus 3pt | |
2378 \fi | |
2379 | |
2380 | |
2381 % VERSE and QUOTE | |
2382 % V1.7 define environments with newenvironment | |
2383 \newenvironment{verse}{\let\\=\@centercr | |
2384 \list{}{\itemsep\z@ \itemindent -1.5em \listparindent \itemindent | |
2385 \rightmargin\leftmargin\advance\leftmargin 1.5em}\item\relax} | |
2386 {\endlist} | |
2387 \newenvironment{quotation}{\list{}{\listparindent 1.5em \itemindent\listparindent | |
2388 \rightmargin\leftmargin \parsep 0pt plus 1pt}\item\relax} | |
2389 {\endlist} | |
2390 \newenvironment{quote}{\list{}{\rightmargin\leftmargin}\item\relax} | |
2391 {\endlist} | |
2392 | |
2393 | |
2394 % \titlepage | |
2395 % provided only for backward compatibility. \maketitle is the correct | |
2396 % way to create the title page. | |
2397 \def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn | |
2398 \else \newpage \fi \thispagestyle{empty}\c@page\z@} | |
2399 \def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi} | |
2400 | |
2401 % standard values from article.cls | |
2402 \arraycolsep 5pt | |
2403 \arrayrulewidth .4pt | |
2404 \doublerulesep 2pt | |
2405 | |
2406 \tabcolsep 6pt | |
2407 \tabbingsep 0.5em | |
2408 | |
2409 | |
2410 %% FOOTNOTES | |
2411 % | |
2412 %\skip\footins 10pt plus 4pt minus 2pt | |
2413 % V1.6 respond to changes in font size | |
2414 % space added above the footnotes (if present) | |
2415 \skip\footins 0.9\baselineskip plus 0.4\baselineskip minus 0.2\baselineskip | |
2416 | |
2417 % V1.6, we need to make \footnotesep responsive to changes | |
2418 % in \baselineskip or strange spacings will result when in | |
2419 % draft mode. Here is a little LaTeX secret - \footnotesep | |
2420 % determines the height of an invisible strut that is placed | |
2421 % *above* the baseline of footnotes after the first. Since | |
2422 % LaTeX considers the space for characters to be 0.7\baselineskip | |
2423 % above the baseline and 0.3\baselineskip below it, we need to | |
2424 % use 0.7\baselineskip as a \footnotesep to maintain equal spacing | |
2425 % between all the lines of the footnotes. IEEE often uses a tad | |
2426 % more, so use 0.8\baselineskip. This slightly larger value also helps | |
2427 % the text to clear the footnote marks. Note that \thanks in IEEEtran | |
2428 % uses its own value of \footnotesep which is set in \maketitle. | |
2429 {\footnotesize | |
2430 \global\footnotesep 0.8\baselineskip} | |
2431 | |
2432 | |
2433 \skip\@mpfootins = \skip\footins | |
2434 \fboxsep = 3pt | |
2435 \fboxrule = .4pt | |
2436 % V1.6 use 1em, then use LaTeX2e's \@makefnmark | |
2437 % Note that IEEE normally *left* aligns the footnote marks, so we don't need | |
2438 % box resizing tricks here. | |
2439 \long\def\@makefntext#1{\parindent 1em\indent\hbox{\@makefnmark}#1}% V1.6 use 1em | |
2440 % V1.7 compsoc does not use superscipts for footnote marks | |
2441 \ifCLASSOPTIONcompsoc | |
2442 \def\@IEEEcompsocmakefnmark{\hbox{\normalfont\@thefnmark.\ }} | |
2443 \long\def\@makefntext#1{\parindent 1em\indent\hbox{\@IEEEcompsocmakefnmark}#1} | |
2444 \fi | |
2445 | |
2446 % IEEE does not use footnote rules | |
2447 \def\footnoterule{} | |
2448 | |
2449 % V1.7 for compsoc, IEEE uses a footnote rule only for \thanks. We devise a "one-shot" | |
2450 % system to implement this. | |
2451 \newif\if@IEEEenableoneshotfootnoterule | |
2452 \@IEEEenableoneshotfootnoterulefalse | |
2453 \ifCLASSOPTIONcompsoc | |
2454 \def\footnoterule{\relax\if@IEEEenableoneshotfootnoterule | |
2455 \kern-5pt | |
2456 \hbox to \columnwidth{\hfill\vrule width 0.5\columnwidth height 0.4pt\hfill} | |
2457 \kern4.6pt | |
2458 \global\@IEEEenableoneshotfootnoterulefalse | |
2459 \else | |
2460 \relax | |
2461 \fi} | |
2462 \fi | |
2463 | |
2464 % V1.6 do not allow LaTeX to break a footnote across multiple pages | |
2465 \interfootnotelinepenalty=10000 | |
2466 | |
2467 % V1.6 discourage breaks within equations | |
2468 % Note that amsmath normally sets this to 10000, | |
2469 % but LaTeX2e normally uses 100. | |
2470 \interdisplaylinepenalty=2500 | |
2471 | |
2472 % default allows section depth up to /paragraph | |
2473 \setcounter{secnumdepth}{4} | |
2474 | |
2475 % technotes do not allow /paragraph | |
2476 \ifCLASSOPTIONtechnote | |
2477 \setcounter{secnumdepth}{3} | |
2478 \fi | |
2479 % neither do compsoc conferences | |
2480 \@IEEEcompsocconfonly{\setcounter{secnumdepth}{3}} | |
2481 | |
2482 | |
2483 \newcounter{section} | |
2484 \newcounter{subsection}[section] | |
2485 \newcounter{subsubsection}[subsection] | |
2486 \newcounter{paragraph}[subsubsection] | |
2487 | |
2488 % used only by IEEEtran's IEEEeqnarray as other packages may | |
2489 % have their own, different, implementations | |
2490 \newcounter{IEEEsubequation}[equation] | |
2491 | |
2492 % as shown when called by user from \ref, \label and in table of contents | |
2493 \def\theequation{\arabic{equation}} % 1 | |
2494 \def\theIEEEsubequation{\theequation\alph{IEEEsubequation}} % 1a (used only by IEEEtran's IEEEeqnarray) | |
2495 \ifCLASSOPTIONcompsoc | |
2496 % compsoc is all arabic | |
2497 \def\thesection{\arabic{section}} | |
2498 \def\thesubsection{\thesection.\arabic{subsection}} | |
2499 \def\thesubsubsection{\thesubsection.\arabic{subsubsection}} | |
2500 \def\theparagraph{\thesubsubsection.\arabic{paragraph}} | |
2501 \else | |
2502 \def\thesection{\Roman{section}} % I | |
2503 % V1.7, \mbox prevents breaks around - | |
2504 \def\thesubsection{\mbox{\thesection-\Alph{subsection}}} % I-A | |
2505 % V1.7 use I-A1 format used by IEEE rather than I-A.1 | |
2506 \def\thesubsubsection{\thesubsection\arabic{subsubsection}} % I-A1 | |
2507 \def\theparagraph{\thesubsubsection\alph{paragraph}} % I-A1a | |
2508 \fi | |
2509 | |
2510 % From Heiko Oberdiek. Because of the \mbox in \thesubsection, we need to | |
2511 % tell hyperref to disable the \mbox command when making PDF bookmarks. | |
2512 % This done already with hyperref.sty version 6.74o and later, but | |
2513 % it will not hurt to do it here again for users of older versions. | |
2514 \@ifundefined{pdfstringdefPreHook}{\let\pdfstringdefPreHook\@empty}{}% | |
2515 \g@addto@macro\pdfstringdefPreHook{\let\mbox\relax} | |
2516 | |
2517 | |
2518 % Main text forms (how shown in main text headings) | |
2519 % V1.6, using \thesection in \thesectiondis allows changes | |
2520 % in the former to automatically appear in the latter | |
2521 \ifCLASSOPTIONcompsoc | |
2522 \ifCLASSOPTIONconference% compsoc conference | |
2523 \def\thesectiondis{\thesection.} | |
2524 \def\thesubsectiondis{\thesectiondis\arabic{subsection}.} | |
2525 \def\thesubsubsectiondis{\thesubsectiondis\arabic{subsubsection}.} | |
2526 \def\theparagraphdis{\thesubsubsectiondis\arabic{paragraph}.} | |
2527 \else% compsoc not conferencs | |
2528 \def\thesectiondis{\thesection} | |
2529 \def\thesubsectiondis{\thesectiondis.\arabic{subsection}} | |
2530 \def\thesubsubsectiondis{\thesubsectiondis.\arabic{subsubsection}} | |
2531 \def\theparagraphdis{\thesubsubsectiondis.\arabic{paragraph}} | |
2532 \fi | |
2533 \else% not compsoc | |
2534 \def\thesectiondis{\thesection.} % I. | |
2535 \def\thesubsectiondis{\Alph{subsection}.} % B. | |
2536 \def\thesubsubsectiondis{\arabic{subsubsection})} % 3) | |
2537 \def\theparagraphdis{\alph{paragraph})} % d) | |
2538 \fi | |
2539 | |
2540 % just like LaTeX2e's \@eqnnum | |
2541 \def\theequationdis{{\normalfont \normalcolor (\theequation)}}% (1) | |
2542 % IEEEsubequation used only by IEEEtran's IEEEeqnarray | |
2543 \def\theIEEEsubequationdis{{\normalfont \normalcolor (\theIEEEsubequation)}}% (1a) | |
2544 % redirect LaTeX2e's equation number display and all that depend on | |
2545 % it, through IEEEtran's \theequationdis | |
2546 \def\@eqnnum{\theequationdis} | |
2547 | |
2548 | |
2549 | |
2550 % V1.7 provide string macros as article.cls does | |
2551 \def\contentsname{Contents} | |
2552 \def\listfigurename{List of Figures} | |
2553 \def\listtablename{List of Tables} | |
2554 \def\refname{References} | |
2555 \def\indexname{Index} | |
2556 \def\figurename{Fig.} | |
2557 \def\tablename{TABLE} | |
2558 \@IEEEcompsocconfonly{\def\figurename{Figure}} | |
2559 \def\partname{Part} | |
2560 \def\appendixname{Appendix} | |
2561 \def\abstractname{Abstract} | |
2562 % IEEE specific names | |
2563 \def\IEEEkeywordsname{Index Terms} | |
2564 \def\IEEEproofname{Proof} | |
2565 | |
2566 | |
2567 % LIST OF FIGURES AND TABLES AND TABLE OF CONTENTS | |
2568 % | |
2569 \def\@pnumwidth{1.55em} | |
2570 \def\@tocrmarg{2.55em} | |
2571 \def\@dotsep{4.5} | |
2572 \setcounter{tocdepth}{3} | |
2573 | |
2574 % adjusted some spacings here so that section numbers will not easily | |
2575 % collide with the section titles. | |
2576 % VIII; VIII-A; and VIII-A.1 are usually the worst offenders. | |
2577 % MDS 1/2001 | |
2578 \def\tableofcontents{\section*{\contentsname}\@starttoc{toc}} | |
2579 \def\l@section#1#2{\addpenalty{\@secpenalty}\addvspace{1.0em plus 1pt}% | |
2580 \@tempdima 2.75em \begingroup \parindent \z@ \rightskip \@pnumwidth% | |
2581 \parfillskip-\@pnumwidth {\bfseries\leavevmode #1}\hfil\hbox to\@pnumwidth{\hss #2}\par% | |
2582 \endgroup} | |
2583 % argument format #1:level, #2:labelindent,#3:labelsep | |
2584 \def\l@subsection{\@dottedtocline{2}{2.75em}{3.75em}} | |
2585 \def\l@subsubsection{\@dottedtocline{3}{6.5em}{4.5em}} | |
2586 % must provide \l@ defs for ALL sublevels EVEN if tocdepth | |
2587 % is such as they will not appear in the table of contents | |
2588 % these defs are how TOC knows what level these things are! | |
2589 \def\l@paragraph{\@dottedtocline{4}{6.5em}{5.5em}} | |
2590 \def\l@subparagraph{\@dottedtocline{5}{6.5em}{6.5em}} | |
2591 \def\listoffigures{\section*{\listfigurename}\@starttoc{lof}} | |
2592 \def\l@figure{\@dottedtocline{1}{0em}{2.75em}} | |
2593 \def\listoftables{\section*{\listtablename}\@starttoc{lot}} | |
2594 \let\l@table\l@figure | |
2595 | |
2596 | |
2597 % Definitions for floats | |
2598 % | |
2599 % Normal Floats | |
2600 % V1.8 floatsep et al. revised down by 0.15\baselineskip | |
2601 % to account for the sideeffects of \topskip compensation | |
2602 \floatsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip | |
2603 \textfloatsep 1.55\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip | |
2604 \@fptop 0pt plus 1fil | |
2605 \@fpsep 0.75\baselineskip plus 2fil | |
2606 \@fpbot 0pt plus 1fil | |
2607 \def\topfraction{0.9} | |
2608 \def\bottomfraction{0.4} | |
2609 \def\floatpagefraction{0.8} | |
2610 % V1.7, let top floats approach 90% of page | |
2611 \def\textfraction{0.1} | |
2612 | |
2613 % Double Column Floats | |
2614 \dblfloatsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip | |
2615 | |
2616 \dbltextfloatsep 1.55\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip | |
2617 % Note that it would be nice if the rubber here actually worked in LaTeX2e. | |
2618 % There is a long standing limitation in LaTeX, first discovered (to the best | |
2619 % of my knowledge) by Alan Jeffrey in 1992. LaTeX ignores the stretchable | |
2620 % portion of \dbltextfloatsep, and as a result, double column figures can and | |
2621 % do result in an non-integer number of lines in the main text columns with | |
2622 % underfull vbox errors as a consequence. A post to comp.text.tex | |
2623 % by Donald Arseneau confirms that this had not yet been fixed in 1998. | |
2624 % IEEEtran V1.6 will fix this problem for you in the titles, but it doesn't | |
2625 % protect you from other double floats. Happy vspace'ing. | |
2626 | |
2627 \@dblfptop 0pt plus 1fil | |
2628 \@dblfpsep 0.75\baselineskip plus 2fil | |
2629 \@dblfpbot 0pt plus 1fil | |
2630 \def\dbltopfraction{0.8} | |
2631 \def\dblfloatpagefraction{0.8} | |
2632 \setcounter{dbltopnumber}{4} | |
2633 | |
2634 \intextsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip | |
2635 \setcounter{topnumber}{2} | |
2636 \setcounter{bottomnumber}{2} | |
2637 \setcounter{totalnumber}{4} | |
2638 | |
2639 | |
2640 | |
2641 % article class provides these, we should too. | |
2642 \newlength\abovecaptionskip | |
2643 \newlength\belowcaptionskip | |
2644 % but only \abovecaptionskip is used above figure captions and *below* table | |
2645 % captions | |
2646 \setlength\abovecaptionskip{0.5\baselineskip} | |
2647 % compsoc journals are a little more generous | |
2648 \ifCLASSOPTIONcompsoc\ifCLASSOPTIONjournal | |
2649 \setlength\abovecaptionskip{0.75\baselineskip} | |
2650 \fi\fi | |
2651 \setlength\belowcaptionskip{0pt} | |
2652 % V1.6 create hooks in case the caption spacing ever needs to be | |
2653 % overridden by a user | |
2654 \def\@IEEEfigurecaptionsepspace{\vskip\abovecaptionskip\relax}% | |
2655 \def\@IEEEtablecaptionsepspace{\vskip\abovecaptionskip\relax}% | |
2656 | |
2657 | |
2658 % 1.6b revise caption system so that \@makecaption uses two arguments | |
2659 % as with LaTeX2e. Otherwise, there will be problems when using hyperref. | |
2660 \def\@IEEEtablestring{table} | |
2661 | |
2662 | |
2663 % V1.8 compensate for \topskip so top of top figures align with tops of the first lines of main text | |
2664 % here we calculate a space equal to the amount \topskip exceeds the main text height | |
2665 % we hook in at \@floatboxreset | |
2666 \def\@IEEEfiguretopskipspace{\ifdim\prevdepth=-1000pt\relax | |
2667 \setlength{\@IEEEtrantmpdimenA}{1\topskip}\relax | |
2668 \addtolength{\@IEEEtrantmpdimenA}{-0.7\@IEEEnormalsizeunitybaselineskip}\relax | |
2669 \vspace*{\@IEEEtrantmpdimenA}\fi} | |
2670 % V1.8 compensate for \topskip at the top of top tables so caption text is on main text baseline | |
2671 % use a strut set on the caption baseline within \@makecaption | |
2672 \def\@IEEEtabletopskipstrut{\ifdim\prevdepth=-1000pt\rule{0pt}{\topskip}\fi} | |
2673 % the \ifdim\prevdepth checks are always expected to be true for IEEE style float caption ordering | |
2674 % because top of figure content and top of captions in tables is the first thing on the vertical | |
2675 % list of these floats | |
2676 % thanks to Donald Arseneau for his 2000/11/11 post "Re: caption hacking" with info on this topic. | |
2677 | |
2678 | |
2679 \ifCLASSOPTIONcompsoc | |
2680 % V1.7 compsoc \@makecaption | |
2681 \ifCLASSOPTIONconference% compsoc conference | |
2682 \long\def\@makecaption#1#2{% | |
2683 % test if is a for a figure or table | |
2684 \ifx\@captype\@IEEEtablestring% | |
2685 % if a table, do table caption | |
2686 \footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\footnotesize {#1.}\nobreakspace\scshape #2}\par\addvspace{0.5\baselineskip}\egroup% | |
2687 \@IEEEtablecaptionsepspace | |
2688 % if not a table, format it as a figure | |
2689 \else | |
2690 \@IEEEfigurecaptionsepspace | |
2691 \setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace #2}% | |
2692 \ifdim \wd\@tempboxa >\hsize% | |
2693 % if caption is longer than a line, let it wrap around | |
2694 \setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace}% | |
2695 \parbox[t]{\hsize}{\normalfont\footnotesize \noindent\unhbox\@tempboxa#2}% | |
2696 % if caption is shorter than a line, center | |
2697 \else% | |
2698 \hbox to\hsize{\normalfont\footnotesize\hfil\box\@tempboxa\hfil}% | |
2699 \fi\fi} | |
2700 % | |
2701 \else% nonconference compsoc | |
2702 \long\def\@makecaption#1#2{% | |
2703 % test if is a for a figure or table | |
2704 \ifx\@captype\@IEEEtablestring% | |
2705 % if a table, do table caption | |
2706 \footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\sffamily\footnotesize #1}\\{\normalfont\sffamily\footnotesize #2}\par\addvspace{0.5\baselineskip}\egroup% | |
2707 \@IEEEtablecaptionsepspace | |
2708 % if not a table, format it as a figure | |
2709 \else | |
2710 \@IEEEfigurecaptionsepspace | |
2711 \setbox\@tempboxa\hbox{\normalfont\sffamily\footnotesize {#1.}\nobreakspace #2}% | |
2712 \ifdim \wd\@tempboxa >\hsize% | |
2713 % if caption is longer than a line, let it wrap around | |
2714 \setbox\@tempboxa\hbox{\normalfont\sffamily\footnotesize {#1.}\nobreakspace}% | |
2715 \parbox[t]{\hsize}{\normalfont\sffamily\footnotesize \noindent\unhbox\@tempboxa#2}% | |
2716 % if caption is shorter than a line, left justify | |
2717 \else% | |
2718 \hbox to\hsize{\normalfont\sffamily\footnotesize\box\@tempboxa\hfil}% | |
2719 \fi\fi} | |
2720 \fi | |
2721 % | |
2722 \else% traditional noncompsoc \@makecaption | |
2723 \long\def\@makecaption#1#2{% | |
2724 % test if is a for a figure or table | |
2725 \ifx\@captype\@IEEEtablestring% | |
2726 % if a table, do table caption | |
2727 \footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\footnotesize #1}\\{\normalfont\footnotesize\scshape #2}\par\addvspace{0.5\baselineskip}\egroup% | |
2728 \@IEEEtablecaptionsepspace | |
2729 % if not a table, format it as a figure | |
2730 \else | |
2731 \@IEEEfigurecaptionsepspace | |
2732 % 3/2001 use footnotesize, not small; use two nonbreaking spaces, not one | |
2733 \setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace\nobreakspace #2}% | |
2734 \ifdim \wd\@tempboxa >\hsize% | |
2735 % if caption is longer than a line, let it wrap around | |
2736 \setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace\nobreakspace}% | |
2737 \parbox[t]{\hsize}{\normalfont\footnotesize\noindent\unhbox\@tempboxa#2}% | |
2738 % if caption is shorter than a line, center if conference, left justify otherwise | |
2739 \else% | |
2740 \ifCLASSOPTIONconference \hbox to\hsize{\normalfont\footnotesize\hfil\box\@tempboxa\hfil}% | |
2741 \else \hbox to\hsize{\normalfont\footnotesize\box\@tempboxa\hfil}% | |
2742 \fi\fi\fi} | |
2743 \fi | |
2744 | |
2745 | |
2746 | |
2747 % V1.7 disable captions class option, do so in a way that retains operation of \label | |
2748 % within \caption | |
2749 \ifCLASSOPTIONcaptionsoff | |
2750 \long\def\@makecaption#1#2{\vspace*{2em}\footnotesize\bgroup\par\addvspace{0.5\baselineskip}\centering{\footnotesize #1}\par\addvspace{0.5\baselineskip}\egroup% | |
2751 \let\@IEEEtemporiglabeldefsave\label | |
2752 \let\@IEEEtemplabelargsave\relax | |
2753 \def\label##1{\gdef\@IEEEtemplabelargsave{##1}}% | |
2754 \setbox\@tempboxa\hbox{#2}% | |
2755 \let\label\@IEEEtemporiglabeldefsave | |
2756 \ifx\@IEEEtemplabelargsave\relax\else\label{\@IEEEtemplabelargsave}\fi} | |
2757 \fi | |
2758 | |
2759 | |
2760 % V1.7 define end environments with \def not \let so as to work OK with | |
2761 % preview-latex | |
2762 \newcounter{figure} | |
2763 \def\thefigure{\@arabic\c@figure} | |
2764 \def\fps@figure{tbp} | |
2765 \def\ftype@figure{1} | |
2766 \def\ext@figure{lof} | |
2767 \def\fnum@figure{\figurename\nobreakspace\thefigure} | |
2768 % V1.8 within figures add \@IEEEfiguretopskipspace compensation to LaTeX2e's \@floatboxreset | |
2769 \def\figure{\def\@floatboxreset{\reset@font\normalsize\@setminipage\@IEEEfiguretopskipspace}\@float{figure}} | |
2770 \def\endfigure{\end@float} | |
2771 % V1.8 also add \@IEEEfiguretopskipspace compensation to \figure* | |
2772 \@namedef{figure*}{\def\@floatboxreset{\reset@font\normalsize\@setminipage\@IEEEfiguretopskipspace}\@dblfloat{figure}} | |
2773 \@namedef{endfigure*}{\end@dblfloat} | |
2774 | |
2775 \newcounter{table} | |
2776 \ifCLASSOPTIONcompsoc | |
2777 \def\thetable{\arabic{table}} | |
2778 \else | |
2779 \def\thetable{\@Roman\c@table} | |
2780 \fi | |
2781 \def\fps@table{tbp} | |
2782 \def\ftype@table{2} | |
2783 \def\ext@table{lot} | |
2784 \def\fnum@table{\tablename\nobreakspace\thetable} | |
2785 % V1.6 IEEE uses 8pt text for tables | |
2786 % within tables alter LaTeX2e's \@floatboxreset to use \footnotesize | |
2787 \def\table{\def\@floatboxreset{\reset@font\footnotesize\@setminipage}\@float{table}} | |
2788 \def\endtable{\end@float} | |
2789 % v1.6b double column tables need to default to footnotesize as well. | |
2790 \@namedef{table*}{\def\@floatboxreset{\reset@font\footnotesize\@setminipage}\@dblfloat{table}} | |
2791 \@namedef{endtable*}{\end@dblfloat} | |
2792 | |
2793 | |
2794 | |
2795 | |
2796 %% -- Command Argument Scanning Support Functions -- | |
2797 %% V1.8a | |
2798 | |
2799 % usage: \@IEEEstripouterbraces*{} | |
2800 % \@IEEEstripouterbraces fully expands its argument (which it then stores | |
2801 % in \@IEEEstripouterbracesarg) via \edef, then removes any outer enclosing | |
2802 % braces, and finally stores the result in the macro | |
2803 % \@IEEEstrippedouterbraces. | |
2804 % | |
2805 % For example: | |
2806 % \@IEEEstripouterbraces{{{{ab}c}}} | |
2807 % results in: | |
2808 % | |
2809 % \@IEEEstripouterbracesarg ==> a macro containing {{{ab}c}} | |
2810 % \@IEEEstrippedouterbraces ==> a macro containing {ab}c | |
2811 % | |
2812 % the *-star form,\@IEEEstripouterbraces*, does not expand the argument | |
2813 % contents during processing | |
2814 \def\@IEEEstripouterbraces{\@ifstar{\let\@IEEEstripouterbracesdef=\def\@@IEEEstripouterbraces}{\let\@IEEEstripouterbracesdef=\edef\@@IEEEstripouterbraces}} | |
2815 | |
2816 \def\@@IEEEstripouterbraces#1{\@IEEEstripouterbracesdef\@IEEEstripouterbracesarg{#1}\relax | |
2817 % If the macro is unchanged after being acquired as a single delimited | |
2818 % argument, we know we have one sequence of tokens without any enclosing | |
2819 % braces. Loop until this is true. | |
2820 \loop | |
2821 \expandafter\@@@IEEEstripouterbraces\@IEEEstripouterbracesarg\@IEEEgeneralsequenceDELIMITER | |
2822 \ifx\@IEEEstrippedouterbraces\@IEEEstripouterbracesarg | |
2823 \else | |
2824 \let\@IEEEstripouterbracesarg\@IEEEstrippedouterbraces | |
2825 \repeat} | |
2826 | |
2827 \def\@@@IEEEstripouterbraces#1\@IEEEgeneralsequenceDELIMITER{\def\@IEEEstrippedouterbraces{#1}} | |
2828 | |
2829 | |
2830 | |
2831 % usage: \@IEEEextractgroup*{} | |
2832 % \@IEEEextractgroup fully expands its argument (which it then stores in | |
2833 % \@IEEEextractgrouparg) via \edef and then assigns the first "brace group" | |
2834 % of tokens to the macro \@IEEEextractedgroup. | |
2835 % The remaining groups, if any, are stored in the macro | |
2836 % \@IEEEextractedgroupremain. If the argument does not contain the requisite | |
2837 % groups, the respective macros will be defined to be empty. | |
2838 % There is an asymmetry in that \@IEEEextractedgroup is stripped of its first | |
2839 % outer grouping while \@IEEEextractedgroupremain retains even the outer | |
2840 % grouping (if present) that originally identified it as a group. | |
2841 % | |
2842 % For example: | |
2843 % \@IEEEextractgroup{{{ab}}{c{de}}} | |
2844 % results in: | |
2845 % | |
2846 % \@IEEEextractgrouparg ==> a macro containing {{ab}}{c{de}} | |
2847 % \@IEEEextractedgroup ==> a macro containing {ab} | |
2848 % \@IEEEextractedgroupremain ==> a macro containing {c{de}} | |
2849 % | |
2850 % The *-star form, \@IEEEextractgroup*, does not expand its argument | |
2851 % contents during processing. | |
2852 \def\@IEEEextractgroup{\@ifstar{\let\@IEEEextractgroupdef=\def\@@IEEEextractgroup}{\let\@IEEEextractgroupdef=\edef\@@IEEEextractgroup}} | |
2853 | |
2854 \def\@@IEEEextractgroup#1{\@IEEEextractgroupdef\@IEEEextractgrouparg{#1}\relax | |
2855 % trap the case of an empty extracted group as this would cause problems with | |
2856 % \@IEEEextractgroupremain's argument acquisition | |
2857 \ifx\@IEEEextractgrouparg\@empty | |
2858 \def\@IEEEextractedgroup{}\relax | |
2859 \def\@IEEEextractedgroupremain{}\relax | |
2860 \else | |
2861 % We have to use some dirty tricks here. We want to insert {} around | |
2862 % whatever remains after the first group so that TeX's argument scanner | |
2863 % will preserve any originally enclosing braces as well as provide an | |
2864 % empty argument to acquire even if there isn't a second group. | |
2865 % In this first of two dirty tricks, we put a } at the end of the structure | |
2866 % we are going to extract from. The \ifnum0=`{\fi keeps TeX happy to allow | |
2867 % what would otherwise be an unbalanced macro definition for | |
2868 % \@@IEEEextractgroup to be acceptable to it. | |
2869 \ifnum0=`{\fi\expandafter\@IEEEextractgroupremain\@IEEEextractgrouparg}\relax | |
2870 \fi} | |
2871 | |
2872 % In the second part of the dirty tricks, we insert a leading { right after | |
2873 % the first group is acquired, but before the remainder is. Again, the | |
2874 % \ifnum0=`}\fi keeps TeX happy during definition time, but will disappear | |
2875 % during run time. | |
2876 \def\@IEEEextractgroupremain#1{\def\@IEEEextractedgroup{#1}\expandafter\@@IEEEextractgroupremain\expandafter{\ifnum0=`}\fi} | |
2877 | |
2878 \def\@@IEEEextractgroupremain#1{\def\@IEEEextractedgroupremain{#1}} | |
2879 | |
2880 | |
2881 | |
2882 % \@IEEEextracttoken relocated at top because margin setting commands rely on it | |
2883 | |
2884 | |
2885 | |
2886 % usage: \@IEEEextracttokengroups*{} | |
2887 % \@IEEEextracttokengroups fully expands its argument (which it then stores | |
2888 % in \@IEEEextracttokengroupsarg) and then assigns the first "brace group" of | |
2889 % tokens (with the outermost braces removed) to the macro | |
2890 % \@IEEEextractedfirstgroup. | |
2891 % The meaning of the first nonbrace (but including the empty group) token | |
2892 % within this first group is assigned via \let to \@IEEEextractedfirsttoken | |
2893 % as well as stored in the macro \@IEEEextractedfirsttokenmacro. If a first | |
2894 % nonbrace token does not exist (or is an empty group), these will be \relax | |
2895 % and empty, respectively. Tokens that would otherwise be discarded during | |
2896 % the acquisition of the first token in the first group are stored in | |
2897 % \@IEEEextractedfirsttokensdiscarded, however their original relative brace | |
2898 % nesting depths are not guaranteed to be preserved. | |
2899 % The first group within this first group is stored in the macro | |
2900 % \@IEEEextractedfirstfirstgroup. | |
2901 % Likewise for the next group after the first: \@IEEEextractednextgroup, | |
2902 % \@IEEEextractednextfirstgroup, \@IEEEextractednextgroupfirsttoken, | |
2903 % \@IEEEextractednextgroupfirsttokenmacro, and | |
2904 % \@IEEEextractednextfirsttokensdiscarded. | |
2905 % All tokens/groups after the first group, including any enclosing braces, | |
2906 % are stored in the macro \@IEEEextractedafterfirstgroupremain which will | |
2907 % be empty if none exist. | |
2908 % | |
2909 % For example: | |
2910 % \@IEEEextracttokengroups{{{ab}{cd}}{{ef}g}} | |
2911 % will result in: | |
2912 % | |
2913 % \@IEEEextracttokengroupsarg ==> a macro containing {{ab}{cd}}{{ef}g} | |
2914 % \@IEEEextractedfirstgroup ==> a macro containing {ab}{cd} | |
2915 % \@IEEEextractedafterfirstgroupremain ==> a macro containing {{ef}g} | |
2916 % \@IEEEextractedfirsttoken ==> the letter a | |
2917 % \@IEEEextractedfirsttokenmacro ==> a macro containing a | |
2918 % \@IEEEextractedfirsttokensdiscarded ==> a macro containing bcd | |
2919 % \@IEEEextractedfirstfirstgroup ==> a macro containing ab | |
2920 % \@IEEEextractednextgroup ==> a macro containing {ef}g | |
2921 % \@IEEEextractednextfirsttoken ==> the letter e | |
2922 % \@IEEEextractednextfirsttokenmacro ==> a macro containing e | |
2923 % \@IEEEextractednextfirsttokensdiscarded ==> a macro containing fg | |
2924 % \@IEEEextractednextfirstgroup ==> a macro containing ef | |
2925 % | |
2926 % If given an empty argument, \@IEEEextractedfirsttoken and | |
2927 % \@IEEEextractednextfirsttoken will be set to \relax | |
2928 % and all the macros will be empty. | |
2929 % the *-star form, \@IEEEextracttokengroups*, does not expand its argument | |
2930 % contents during processing. | |
2931 % | |
2932 % Depends on: \@IEEEextractgroup, \@IEEEextracttoken | |
2933 \def\@IEEEextracttokengroups{\@ifstar{\let\@IEEEextracttokengroupsdef=\def\@@IEEEextracttokengroups}{\let\@IEEEextracttokengroupsdef=\edef\@@IEEEextracttokengroups}} | |
2934 \def\@@IEEEextracttokengroups#1{\@IEEEextracttokengroupsdef\@IEEEextracttokengroupsarg{#1}\relax | |
2935 % begin extraction, these functions are safe with empty arguments | |
2936 % first group | |
2937 \expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextracttokengroupsarg}\relax | |
2938 \let\@IEEEextractedfirstgroup\@IEEEextractedgroup | |
2939 \let\@IEEEextractedafterfirstgroupremain\@IEEEextractedgroupremain | |
2940 \expandafter\@IEEEextracttoken\expandafter*\expandafter{\@IEEEextractedfirstgroup}\relax | |
2941 \let\@IEEEextractedfirsttoken\@IEEEextractedtoken | |
2942 \let\@IEEEextractedfirsttokenmacro\@IEEEextractedtokenmacro | |
2943 \let\@IEEEextractedfirsttokensdiscarded\@IEEEextractedtokensdiscarded | |
2944 % first first group | |
2945 \expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractedfirstgroup}\relax | |
2946 \let\@IEEEextractedfirstfirstgroup\@IEEEextractedgroup | |
2947 % next group | |
2948 \expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractedafterfirstgroupremain}\relax | |
2949 \let\@IEEEextractednextgroup\@IEEEextractedgroup | |
2950 \expandafter\@IEEEextracttoken\expandafter*\expandafter{\@IEEEextractednextgroup}\relax | |
2951 \let\@IEEEextractednextfirsttoken\@IEEEextractedtoken | |
2952 \let\@IEEEextractednextfirsttokenmacro\@IEEEextractedtokenmacro | |
2953 \let\@IEEEextractednextfirsttokensdiscarded\@IEEEextractedtokensdiscarded | |
2954 % next first group | |
2955 \expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractednextgroup}\relax | |
2956 \let\@IEEEextractednextfirstgroup\@IEEEextractedgroup} | |
2957 | |
2958 | |
2959 %% -- End of Command Argument Scanning Support Functions -- | |
2960 | |
2961 | |
2962 | |
2963 | |
2964 %% | |
2965 %% START OF IEEEeqnarray DEFINITIONS | |
2966 %% | |
2967 %% Inspired by the concepts, examples, and previous works of LaTeX | |
2968 %% coders and developers such as Donald Arseneau, Fred Bartlett, | |
2969 %% David Carlisle, Tony Liu, Frank Mittelbach, Piet van Oostrum, | |
2970 %% Roland Winkler and Mark Wooding. | |
2971 %% I don't make the claim that my work here is even near their calibre. ;) | |
2972 | |
2973 | |
2974 \newif\if@IEEEeqnarrayboxnojot% flag to indicate if the environment was called as the star form | |
2975 \@IEEEeqnarrayboxnojotfalse | |
2976 | |
2977 \newif\if@advanceIEEEeqncolcnt% tracks if the environment should advance the col counter | |
2978 % allows a way to make an \IEEEeqnarraybox that can be used within an \IEEEeqnarray | |
2979 % used by IEEEeqnarraymulticol so that it can work properly in both | |
2980 \@advanceIEEEeqncolcnttrue | |
2981 | |
2982 \newcount\@IEEEeqnnumcols % tracks how many IEEEeqnarray cols are defined | |
2983 \newcount\@IEEEeqncolcnt % tracks how many IEEEeqnarray cols the user actually used | |
2984 | |
2985 | |
2986 % The default math style used by the columns | |
2987 \def\IEEEeqnarraymathstyle{\displaystyle} | |
2988 % The default text style used by the columns | |
2989 % default to using the current font | |
2990 \def\IEEEeqnarraytextstyle{\relax} | |
2991 | |
2992 % like the iedlistdecl but for \IEEEeqnarray | |
2993 \def\IEEEeqnarraydecl{\relax} | |
2994 \def\IEEEeqnarrayboxdecl{\relax} | |
2995 | |
2996 | |
2997 | |
2998 % V1.8 flags to indicate that equation numbering is to persist | |
2999 \newif\if@IEEEeqnumpersist% | |
3000 \@IEEEeqnumpersistfalse | |
3001 \newif\if@IEEEsubeqnumpersist% | |
3002 \@IEEEsubeqnumpersistfalse | |
3003 % | |
3004 % V1.8 flags to indicate if (sub)equation number of last line was preadvanced | |
3005 \newif\if@IEEEeqnumpreadv% | |
3006 \@IEEEeqnumpreadvfalse | |
3007 \newif\if@IEEEsubeqnumpreadv% | |
3008 \@IEEEsubeqnumpreadvfalse | |
3009 | |
3010 \newcount\@IEEEsubeqnnumrollback% saves previous value of IEEEsubequation number in case we need to restore it | |
3011 | |
3012 % \yesnumber is the opposite of \nonumber | |
3013 % a novel concept with the same def as the equationarray package | |
3014 % However, we give IEEE versions too since some LaTeX packages such as | |
3015 % the MDWtools mathenv.sty redefine \nonumber to something else. | |
3016 % This command is intended for use in non-IEEEeqnarray math environments | |
3017 \providecommand{\yesnumber}{\global\@eqnswtrue} | |
3018 | |
3019 | |
3020 % IEEEyes/nonumber | |
3021 % V1.8 add persistant * forms | |
3022 % These commands can alter the type of equation an IEEEeqnarray line is. | |
3023 \def\IEEEyesnumber{\@ifstar{\global\@IEEEeqnumpersisttrue\global\@IEEEsubeqnumpersistfalse\@IEEEyesnumber}{\@IEEEyesnumber}} | |
3024 | |
3025 \def\@IEEEyesnumber{\global\@eqnswtrue | |
3026 \if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray | |
3027 \ifnum\c@IEEEsubequation>0\relax | |
3028 \stepcounter{equation}\setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax | |
3029 \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label | |
3030 \fi | |
3031 % even if we reached this eqn num via a preadv, it is legit now | |
3032 \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse | |
3033 \fi} | |
3034 | |
3035 \def\IEEEnonumber{\@ifstar{\global\@IEEEeqnumpersistfalse\global\@IEEEsubeqnumpersistfalse\global\@eqnswfalse}{\global\@eqnswfalse}} | |
3036 | |
3037 | |
3038 \def\IEEEyessubnumber{\@ifstar{\global\@IEEEsubeqnumpersisttrue\@IEEEyessubnumber}{\@IEEEyessubnumber}} | |
3039 % | |
3040 \def\@IEEEyessubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray | |
3041 \ifnum\c@IEEEsubequation>0\relax% if it already is a subequation, we are good to go as-is | |
3042 \else% if we are a regular equation we have to watch out for two cases | |
3043 \if@IEEEeqnumpreadv% if this equation is the result of a preadvance, backout and bump the sub eqnnum | |
3044 \global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\addtocounter{IEEEsubequation}{1}\relax | |
3045 \else% non-preadvanced equations just need initialization of their sub eqnnum | |
3046 \setcounter{IEEEsubequation}{1}\relax | |
3047 \fi | |
3048 \fi% fi already is subequation | |
3049 \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax | |
3050 \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label | |
3051 \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore | |
3052 \global\@eqnswtrue | |
3053 \fi} | |
3054 | |
3055 | |
3056 \def\IEEEnosubnumber{\@ifstar{\global\@IEEEsubeqnumpersistfalse\@IEEEnosubnumber}{\@IEEEnosubnumber}} | |
3057 % | |
3058 \def\@IEEEnosubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray | |
3059 \if@eqnsw % we do nothing unless we know we will display because we play with the counters here | |
3060 % if it currently is a subequation, bump up to the next equation number and turn off the subequation | |
3061 \ifnum\c@IEEEsubequation>0\relax\addtocounter{equation}{1}\setcounter{IEEEsubequation}{0}\relax | |
3062 \fi | |
3063 \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore | |
3064 \gdef\@currentlabel{\p@equation\theequation}\relax | |
3065 \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label | |
3066 \fi | |
3067 \fi} | |
3068 | |
3069 | |
3070 | |
3071 % allows users to "push away" equations that get too close to the equation numbers | |
3072 \def\IEEEeqnarraynumspace{\hphantom{\ifnum\c@IEEEsubequation>0\relax\theIEEEsubequationdis\else\theequationdis\fi}} | |
3073 | |
3074 % provides a way to span multiple columns within IEEEeqnarray environments | |
3075 % will consider \if@advanceIEEEeqncolcnt before globally advancing the | |
3076 % column counter - so as to work within \IEEEeqnarraybox | |
3077 % usage: \IEEEeqnarraymulticol{number cols. to span}{col type}{cell text} | |
3078 \long\def\IEEEeqnarraymulticol#1#2#3{\multispan{#1}\relax | |
3079 % check if column is defined for the precolumn definition | |
3080 % We have to be careful here because TeX scans for & even within an \iffalse | |
3081 % where it does not expand macros. So, if we used only one \ifx and a #3 | |
3082 % appeared in the false branch and the user inserted another alignment | |
3083 % structure that uses & in the \IEEEeqnarraymulticol{}, TeX will not see that | |
3084 % there is an inner alignment in the false branch yet still will see any & | |
3085 % there and will think that they apply to the outer alignment resulting in an | |
3086 % incomplete \ifx error. | |
3087 % So, here we use separate checks for the pre and post parts in order to keep | |
3088 % the #3 outside of all conditionals. | |
3089 \relax\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax | |
3090 \csname @IEEEeqnarraycolPRE#2\endcsname | |
3091 \else% if not, error and use default type | |
3092 \@IEEEclspkgerror{Invalid column type "#2" in \string\IEEEeqnarraymulticol.\MessageBreak | |
3093 Using a default centering column instead}% | |
3094 {You must define IEEEeqnarray column types before use.}% | |
3095 \csname @IEEEeqnarraycolPRE@IEEEdefault\endcsname | |
3096 \fi | |
3097 % The ten \relax are to help prevent misleading error messages in case a user | |
3098 % accidently inserted a macro that tries to acquire additional arguments. | |
3099 #3\relax\relax\relax\relax\relax\relax\relax\relax\relax\relax | |
3100 % check if column is defined for the postcolumn definition | |
3101 \expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax | |
3102 \csname @IEEEeqnarraycolPOST#2\endcsname | |
3103 \else% if not, use the default type | |
3104 \csname @IEEEeqnarraycolPOST@IEEEdefault\endcsname | |
3105 \fi | |
3106 % advance column counter only if the IEEEeqnarray environment wants it | |
3107 \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by #1\relax\fi} | |
3108 | |
3109 % like \omit, but maintains track of the column counter for \IEEEeqnarray | |
3110 \def\IEEEeqnarrayomit{\omit\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by 1\relax\fi} | |
3111 | |
3112 | |
3113 % provides a way to define a letter referenced column type | |
3114 % usage: \IEEEeqnarraydefcol{col. type letter/name}{pre insertion text}{post insertion text} | |
3115 \def\IEEEeqnarraydefcol#1#2#3{\expandafter\def\csname @IEEEeqnarraycolPRE#1\endcsname{#2}% | |
3116 \expandafter\def\csname @IEEEeqnarraycolPOST#1\endcsname{#3}% | |
3117 \expandafter\def\csname @IEEEeqnarraycolDEF#1\endcsname{1}} | |
3118 | |
3119 | |
3120 % provides a way to define a numerically referenced inter-column glue types | |
3121 % usage: \IEEEeqnarraydefcolsep{col. glue number}{glue definition} | |
3122 \def\IEEEeqnarraydefcolsep#1#2{\expandafter\def\csname @IEEEeqnarraycolSEP\romannumeral #1\endcsname{#2}% | |
3123 \expandafter\def\csname @IEEEeqnarraycolSEPDEF\romannumeral #1\endcsname{1}} | |
3124 | |
3125 | |
3126 \def\@IEEEeqnarraycolisdefined{1}% just a macro for 1, used for checking undefined column types | |
3127 | |
3128 | |
3129 % expands and appends the given argument to the \@IEEEtrantmptoksA token list | |
3130 % used to build up the \halign preamble | |
3131 \def\@IEEEappendtoksA#1{\edef\@@IEEEappendtoksA{\@IEEEtrantmptoksA={\the\@IEEEtrantmptoksA #1}}% | |
3132 \@@IEEEappendtoksA} | |
3133 | |
3134 % also appends to \@IEEEtrantmptoksA, but does not expand the argument | |
3135 % uses \toks8 as a scratchpad register | |
3136 \def\@IEEEappendNOEXPANDtoksA#1{\toks8={#1}% | |
3137 \edef\@@IEEEappendNOEXPANDtoksA{\@IEEEtrantmptoksA={\the\@IEEEtrantmptoksA\the\toks8}}% | |
3138 \@@IEEEappendNOEXPANDtoksA} | |
3139 | |
3140 % define some common column types for the user | |
3141 % math | |
3142 \IEEEeqnarraydefcol{l}{$\IEEEeqnarraymathstyle}{$\hfil} | |
3143 \IEEEeqnarraydefcol{c}{\hfil$\IEEEeqnarraymathstyle}{$\hfil} | |
3144 \IEEEeqnarraydefcol{r}{\hfil$\IEEEeqnarraymathstyle}{$} | |
3145 \IEEEeqnarraydefcol{L}{$\IEEEeqnarraymathstyle{}}{{}$\hfil} | |
3146 \IEEEeqnarraydefcol{C}{\hfil$\IEEEeqnarraymathstyle{}}{{}$\hfil} | |
3147 \IEEEeqnarraydefcol{R}{\hfil$\IEEEeqnarraymathstyle{}}{{}$} | |
3148 % text | |
3149 \IEEEeqnarraydefcol{s}{\IEEEeqnarraytextstyle}{\hfil} | |
3150 \IEEEeqnarraydefcol{t}{\hfil\IEEEeqnarraytextstyle}{\hfil} | |
3151 \IEEEeqnarraydefcol{u}{\hfil\IEEEeqnarraytextstyle}{} | |
3152 | |
3153 % vertical rules | |
3154 \IEEEeqnarraydefcol{v}{}{\vrule width\arrayrulewidth} | |
3155 \IEEEeqnarraydefcol{vv}{\vrule width\arrayrulewidth\hfil}{\hfil\vrule width\arrayrulewidth} | |
3156 \IEEEeqnarraydefcol{V}{}{\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth} | |
3157 \IEEEeqnarraydefcol{VV}{\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth\hfil}% | |
3158 {\hfil\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth} | |
3159 | |
3160 % horizontal rules | |
3161 \IEEEeqnarraydefcol{h}{}{\leaders\hrule height\arrayrulewidth\hfil} | |
3162 \IEEEeqnarraydefcol{H}{}{\leaders\vbox{\hrule width\arrayrulewidth\vskip\doublerulesep\hrule width\arrayrulewidth}\hfil} | |
3163 | |
3164 % plain | |
3165 \IEEEeqnarraydefcol{x}{}{} | |
3166 \IEEEeqnarraydefcol{X}{$}{$} | |
3167 | |
3168 % the default column type to use in the event a column type is not defined | |
3169 \IEEEeqnarraydefcol{@IEEEdefault}{\hfil$\IEEEeqnarraymathstyle}{$\hfil} | |
3170 | |
3171 | |
3172 % a zero tabskip (used for "-" col types) | |
3173 \def\@IEEEeqnarraycolSEPzero{0pt plus 0pt minus 0pt} | |
3174 % a centering tabskip (used for "+" col types) | |
3175 \def\@IEEEeqnarraycolSEPcenter{1000pt plus 0pt minus 1000pt} | |
3176 | |
3177 % top level default tabskip glues for the start, end, and inter-column | |
3178 % may be reset within environments not always at the top level, e.g., \IEEEeqnarraybox | |
3179 \edef\@IEEEeqnarraycolSEPdefaultstart{\@IEEEeqnarraycolSEPcenter}% default start glue | |
3180 \edef\@IEEEeqnarraycolSEPdefaultend{\@IEEEeqnarraycolSEPcenter}% default end glue | |
3181 \edef\@IEEEeqnarraycolSEPdefaultmid{\@IEEEeqnarraycolSEPzero}% default inter-column glue | |
3182 | |
3183 | |
3184 | |
3185 % creates a vertical rule that extends from the bottom to the top a a cell | |
3186 % Provided in case other packages redefine \vline some other way. | |
3187 % usage: \IEEEeqnarrayvrule[rule thickness] | |
3188 % If no argument is provided, \arrayrulewidth will be used for the rule thickness. | |
3189 \newcommand\IEEEeqnarrayvrule[1][\arrayrulewidth]{\vrule\@width#1\relax} | |
3190 | |
3191 % creates a blank separator row | |
3192 % usage: \IEEEeqnarrayseprow[separation length][font size commands] | |
3193 % default is \IEEEeqnarrayseprow[0.25\normalbaselineskip][\relax] | |
3194 % blank arguments inherit the default values | |
3195 % uses \skip5 as a scratch register - calls \@IEEEeqnarraystrutsize which uses more scratch registers | |
3196 \def\IEEEeqnarrayseprow{\relax\@ifnextchar[{\@IEEEeqnarrayseprow}{\@IEEEeqnarrayseprow[0.25\normalbaselineskip]}} | |
3197 \def\@IEEEeqnarrayseprow[#1]{\relax\@ifnextchar[{\@@IEEEeqnarrayseprow[#1]}{\@@IEEEeqnarrayseprow[#1][\relax]}} | |
3198 \def\@@IEEEeqnarrayseprow[#1][#2]{\def\@IEEEeqnarrayseprowARGONE{#1}% | |
3199 \ifx\@IEEEeqnarrayseprowARGONE\@empty% | |
3200 % get the skip value, based on the font commands | |
3201 % use skip5 because \IEEEeqnarraystrutsize uses \skip0, \skip2, \skip3 | |
3202 % assign within a bogus box to confine the font changes | |
3203 {\setbox0=\hbox{#2\relax\global\skip5=0.25\normalbaselineskip}}% | |
3204 \else% | |
3205 {\setbox0=\hbox{#2\relax\global\skip5=#1}}% | |
3206 \fi% | |
3207 \@IEEEeqnarrayhoptolastcolumn\IEEEeqnarraystrutsize{\skip5}{0pt}[\relax]\relax} | |
3208 | |
3209 % creates a blank separator row, but omits all the column templates | |
3210 % usage: \IEEEeqnarrayseprowcut[separation length][font size commands] | |
3211 % default is \IEEEeqnarrayseprowcut[0.25\normalbaselineskip][\relax] | |
3212 % blank arguments inherit the default values | |
3213 % uses \skip5 as a scratch register - calls \@IEEEeqnarraystrutsize which uses more scratch registers | |
3214 \def\IEEEeqnarrayseprowcut{\multispan{\@IEEEeqnnumcols}\relax% span all the cols | |
3215 % advance column counter only if the IEEEeqnarray environment wants it | |
3216 \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3217 \@ifnextchar[{\@IEEEeqnarrayseprowcut}{\@IEEEeqnarrayseprowcut[0.25\normalbaselineskip]}} | |
3218 \def\@IEEEeqnarrayseprowcut[#1]{\relax\@ifnextchar[{\@@IEEEeqnarrayseprowcut[#1]}{\@@IEEEeqnarrayseprowcut[#1][\relax]}} | |
3219 \def\@@IEEEeqnarrayseprowcut[#1][#2]{\def\@IEEEeqnarrayseprowARGONE{#1}% | |
3220 \ifx\@IEEEeqnarrayseprowARGONE\@empty% | |
3221 % get the skip value, based on the font commands | |
3222 % use skip5 because \IEEEeqnarraystrutsize uses \skip0, \skip2, \skip3 | |
3223 % assign within a bogus box to confine the font changes | |
3224 {\setbox0=\hbox{#2\relax\global\skip5=0.25\normalbaselineskip}}% | |
3225 \else% | |
3226 {\setbox0=\hbox{#2\relax\global\skip5=#1}}% | |
3227 \fi% | |
3228 \IEEEeqnarraystrutsize{\skip5}{0pt}[\relax]\relax} | |
3229 | |
3230 | |
3231 | |
3232 % draws a single rule across all the columns optional | |
3233 % argument determines the rule width, \arrayrulewidth is the default | |
3234 % updates column counter as needed and turns off struts | |
3235 % usage: \IEEEeqnarrayrulerow[rule line thickness] | |
3236 \def\IEEEeqnarrayrulerow{\multispan{\@IEEEeqnnumcols}\relax% span all the cols | |
3237 % advance column counter only if the IEEEeqnarray environment wants it | |
3238 \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3239 \@ifnextchar[{\@IEEEeqnarrayrulerow}{\@IEEEeqnarrayrulerow[\arrayrulewidth]}} | |
3240 \def\@IEEEeqnarrayrulerow[#1]{\leaders\hrule height#1\hfil\relax% put in our rule | |
3241 % turn off any struts | |
3242 \IEEEeqnarraystrutsize{0pt}{0pt}[\relax]\relax} | |
3243 | |
3244 | |
3245 % draws a double rule by using a single rule row, a separator row, and then | |
3246 % another single rule row | |
3247 % first optional argument determines the rule thicknesses, \arrayrulewidth is the default | |
3248 % second optional argument determines the rule spacing, \doublerulesep is the default | |
3249 % usage: \IEEEeqnarraydblrulerow[rule line thickness][rule spacing] | |
3250 \def\IEEEeqnarraydblrulerow{\multispan{\@IEEEeqnnumcols}\relax% span all the cols | |
3251 % advance column counter only if the IEEEeqnarray environment wants it | |
3252 \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3253 \@ifnextchar[{\@IEEEeqnarraydblrulerow}{\@IEEEeqnarraydblrulerow[\arrayrulewidth]}} | |
3254 \def\@IEEEeqnarraydblrulerow[#1]{\relax\@ifnextchar[{\@@IEEEeqnarraydblrulerow[#1]}% | |
3255 {\@@IEEEeqnarraydblrulerow[#1][\doublerulesep]}} | |
3256 \def\@@IEEEeqnarraydblrulerow[#1][#2]{\def\@IEEEeqnarraydblrulerowARG{#1}% | |
3257 % we allow the user to say \IEEEeqnarraydblrulerow[][] | |
3258 \ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3259 \@IEEEeqnarrayrulerow[\arrayrulewidth]% | |
3260 \else% | |
3261 \@IEEEeqnarrayrulerow[#1]\relax% | |
3262 \fi% | |
3263 \def\@IEEEeqnarraydblrulerowARG{#2}% | |
3264 \ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3265 \\\IEEEeqnarrayseprow[\doublerulesep][\relax]% | |
3266 \else% | |
3267 \\\IEEEeqnarrayseprow[#2][\relax]% | |
3268 \fi% | |
3269 \\\multispan{\@IEEEeqnnumcols}% | |
3270 % advance column counter only if the IEEEeqnarray environment wants it | |
3271 \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3272 \def\@IEEEeqnarraydblrulerowARG{#1}% | |
3273 \ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3274 \@IEEEeqnarrayrulerow[\arrayrulewidth]% | |
3275 \else% | |
3276 \@IEEEeqnarrayrulerow[#1]% | |
3277 \fi% | |
3278 } | |
3279 | |
3280 % draws a double rule by using a single rule row, a separator (cutting) row, and then | |
3281 % another single rule row | |
3282 % first optional argument determines the rule thicknesses, \arrayrulewidth is the default | |
3283 % second optional argument determines the rule spacing, \doublerulesep is the default | |
3284 % usage: \IEEEeqnarraydblrulerow[rule line thickness][rule spacing] | |
3285 \def\IEEEeqnarraydblrulerowcut{\multispan{\@IEEEeqnnumcols}\relax% span all the cols | |
3286 % advance column counter only if the IEEEeqnarray environment wants it | |
3287 \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3288 \@ifnextchar[{\@IEEEeqnarraydblrulerowcut}{\@IEEEeqnarraydblrulerowcut[\arrayrulewidth]}} | |
3289 \def\@IEEEeqnarraydblrulerowcut[#1]{\relax\@ifnextchar[{\@@IEEEeqnarraydblrulerowcut[#1]}% | |
3290 {\@@IEEEeqnarraydblrulerowcut[#1][\doublerulesep]}} | |
3291 \def\@@IEEEeqnarraydblrulerowcut[#1][#2]{\def\@IEEEeqnarraydblrulerowARG{#1}% | |
3292 % we allow the user to say \IEEEeqnarraydblrulerow[][] | |
3293 \ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3294 \@IEEEeqnarrayrulerow[\arrayrulewidth]% | |
3295 \else% | |
3296 \@IEEEeqnarrayrulerow[#1]% | |
3297 \fi% | |
3298 \def\@IEEEeqnarraydblrulerowARG{#2}% | |
3299 \ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3300 \\\IEEEeqnarrayseprowcut[\doublerulesep][\relax]% | |
3301 \else% | |
3302 \\\IEEEeqnarrayseprowcut[#2][\relax]% | |
3303 \fi% | |
3304 \\\multispan{\@IEEEeqnnumcols}% | |
3305 % advance column counter only if the IEEEeqnarray environment wants it | |
3306 \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3307 \def\@IEEEeqnarraydblrulerowARG{#1}% | |
3308 \ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3309 \@IEEEeqnarrayrulerow[\arrayrulewidth]% | |
3310 \else% | |
3311 \@IEEEeqnarrayrulerow[#1]% | |
3312 \fi% | |
3313 } | |
3314 | |
3315 | |
3316 | |
3317 % inserts a full row's worth of &'s | |
3318 % relies on \@IEEEeqnnumcols to provide the correct number of columns | |
3319 % uses \@IEEEtrantmptoksA, \count0 as scratch registers | |
3320 \def\@IEEEeqnarrayhoptolastcolumn{\@IEEEtrantmptoksA={}\count0=1\relax% | |
3321 \loop% add cols if the user did not use them all | |
3322 \ifnum\count0<\@IEEEeqnnumcols\relax% | |
3323 \@IEEEappendtoksA{&}% | |
3324 \advance\count0 by 1\relax% update the col count | |
3325 \repeat% | |
3326 \the\@IEEEtrantmptoksA%execute the &'s | |
3327 } | |
3328 | |
3329 | |
3330 | |
3331 \newif\if@IEEEeqnarrayISinner % flag to indicate if we are within the lines | |
3332 \@IEEEeqnarrayISinnerfalse % of an IEEEeqnarray - after the IEEEeqnarraydecl | |
3333 | |
3334 \edef\@IEEEeqnarrayTHEstrutheight{0pt} % height and depth of IEEEeqnarray struts | |
3335 \edef\@IEEEeqnarrayTHEstrutdepth{0pt} | |
3336 | |
3337 \edef\@IEEEeqnarrayTHEmasterstrutheight{0pt} % default height and depth of | |
3338 \edef\@IEEEeqnarrayTHEmasterstrutdepth{0pt} % struts within an IEEEeqnarray | |
3339 | |
3340 \edef\@IEEEeqnarrayTHEmasterstrutHSAVE{0pt} % saved master strut height | |
3341 \edef\@IEEEeqnarrayTHEmasterstrutDSAVE{0pt} % and depth | |
3342 | |
3343 \newif\if@IEEEeqnarrayusemasterstrut % flag to indicate that the master strut value | |
3344 \@IEEEeqnarrayusemasterstruttrue % is to be used | |
3345 | |
3346 | |
3347 | |
3348 % saves the strut height and depth of the master strut | |
3349 \def\@IEEEeqnarraymasterstrutsave{\relax% | |
3350 \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% | |
3351 \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% | |
3352 % remove stretchability | |
3353 \dimen0\skip0\relax% | |
3354 \dimen2\skip2\relax% | |
3355 % save values | |
3356 \edef\@IEEEeqnarrayTHEmasterstrutHSAVE{\the\dimen0}% | |
3357 \edef\@IEEEeqnarrayTHEmasterstrutDSAVE{\the\dimen2}} | |
3358 | |
3359 % restores the strut height and depth of the master strut | |
3360 \def\@IEEEeqnarraymasterstrutrestore{\relax% | |
3361 \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutHSAVE\relax% | |
3362 \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutDSAVE\relax% | |
3363 % remove stretchability | |
3364 \dimen0\skip0\relax% | |
3365 \dimen2\skip2\relax% | |
3366 % restore values | |
3367 \edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}% | |
3368 \edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}} | |
3369 | |
3370 | |
3371 % globally restores the strut height and depth to the | |
3372 % master values and sets the master strut flag to true | |
3373 \def\@IEEEeqnarraystrutreset{\relax% | |
3374 \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% | |
3375 \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% | |
3376 % remove stretchability | |
3377 \dimen0\skip0\relax% | |
3378 \dimen2\skip2\relax% | |
3379 % restore values | |
3380 \xdef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% | |
3381 \xdef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% | |
3382 \global\@IEEEeqnarrayusemasterstruttrue} | |
3383 | |
3384 | |
3385 % if the master strut is not to be used, make the current | |
3386 % values of \@IEEEeqnarrayTHEstrutheight, \@IEEEeqnarrayTHEstrutdepth | |
3387 % and the use master strut flag, global | |
3388 % this allows user strut commands issued in the last column to be carried | |
3389 % into the isolation/strut column | |
3390 \def\@IEEEeqnarrayglobalizestrutstatus{\relax% | |
3391 \if@IEEEeqnarrayusemasterstrut\else% | |
3392 \xdef\@IEEEeqnarrayTHEstrutheight{\@IEEEeqnarrayTHEstrutheight}% | |
3393 \xdef\@IEEEeqnarrayTHEstrutdepth{\@IEEEeqnarrayTHEstrutdepth}% | |
3394 \global\@IEEEeqnarrayusemasterstrutfalse% | |
3395 \fi} | |
3396 | |
3397 | |
3398 | |
3399 % usage: \IEEEeqnarraystrutsize{height}{depth}[font size commands] | |
3400 % If called outside the lines of an IEEEeqnarray, sets the height | |
3401 % and depth of both the master and local struts. If called inside | |
3402 % an IEEEeqnarray line, sets the height and depth of the local strut | |
3403 % only and sets the flag to indicate the use of the local strut | |
3404 % values. If the height or depth is left blank, 0.7\normalbaselineskip | |
3405 % and 0.3\normalbaselineskip will be used, respectively. | |
3406 % The optional argument can be used to evaluate the lengths under | |
3407 % a different font size and styles. If none is specified, the current | |
3408 % font is used. | |
3409 % uses scratch registers \skip0, \skip2, \skip3, \dimen0, \dimen2 | |
3410 \def\IEEEeqnarraystrutsize#1#2{\relax\@ifnextchar[{\@IEEEeqnarraystrutsize{#1}{#2}}{\@IEEEeqnarraystrutsize{#1}{#2}[\relax]}} | |
3411 \def\@IEEEeqnarraystrutsize#1#2[#3]{\def\@IEEEeqnarraystrutsizeARG{#1}% | |
3412 \ifx\@IEEEeqnarraystrutsizeARG\@empty% | |
3413 {\setbox0=\hbox{#3\relax\global\skip3=0.7\normalbaselineskip}}% | |
3414 \skip0=\skip3\relax% | |
3415 \else% arg one present | |
3416 {\setbox0=\hbox{#3\relax\global\skip3=#1\relax}}% | |
3417 \skip0=\skip3\relax% | |
3418 \fi% if null arg | |
3419 \def\@IEEEeqnarraystrutsizeARG{#2}% | |
3420 \ifx\@IEEEeqnarraystrutsizeARG\@empty% | |
3421 {\setbox0=\hbox{#3\relax\global\skip3=0.3\normalbaselineskip}}% | |
3422 \skip2=\skip3\relax% | |
3423 \else% arg two present | |
3424 {\setbox0=\hbox{#3\relax\global\skip3=#2\relax}}% | |
3425 \skip2=\skip3\relax% | |
3426 \fi% if null arg | |
3427 % remove stretchability, just to be safe | |
3428 \dimen0\skip0\relax% | |
3429 \dimen2\skip2\relax% | |
3430 % dimen0 = height, dimen2 = depth | |
3431 \if@IEEEeqnarrayISinner% inner does not touch master strut size | |
3432 \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% | |
3433 \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% | |
3434 \@IEEEeqnarrayusemasterstrutfalse% do not use master | |
3435 \else% outer, have to set master strut too | |
3436 \edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}% | |
3437 \edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}% | |
3438 \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% | |
3439 \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% | |
3440 \@IEEEeqnarrayusemasterstruttrue% use master strut | |
3441 \fi} | |
3442 | |
3443 | |
3444 % usage: \IEEEeqnarraystrutsizeadd{added height}{added depth}[font size commands] | |
3445 % If called outside the lines of an IEEEeqnarray, adds the given height | |
3446 % and depth to both the master and local struts. | |
3447 % If called inside an IEEEeqnarray line, adds the given height and depth | |
3448 % to the local strut only and sets the flag to indicate the use | |
3449 % of the local strut values. | |
3450 % In both cases, if a height or depth is left blank, 0pt is used instead. | |
3451 % The optional argument can be used to evaluate the lengths under | |
3452 % a different font size and styles. If none is specified, the current | |
3453 % font is used. | |
3454 % uses scratch registers \skip0, \skip2, \skip3, \dimen0, \dimen2 | |
3455 \def\IEEEeqnarraystrutsizeadd#1#2{\relax\@ifnextchar[{\@IEEEeqnarraystrutsizeadd{#1}{#2}}{\@IEEEeqnarraystrutsizeadd{#1}{#2}[\relax]}} | |
3456 \def\@IEEEeqnarraystrutsizeadd#1#2[#3]{\def\@IEEEeqnarraystrutsizearg{#1}% | |
3457 \ifx\@IEEEeqnarraystrutsizearg\@empty% | |
3458 \skip0=0pt\relax% | |
3459 \else% arg one present | |
3460 {\setbox0=\hbox{#3\relax\global\skip3=#1}}% | |
3461 \skip0=\skip3\relax% | |
3462 \fi% if null arg | |
3463 \def\@IEEEeqnarraystrutsizearg{#2}% | |
3464 \ifx\@IEEEeqnarraystrutsizearg\@empty% | |
3465 \skip2=0pt\relax% | |
3466 \else% arg two present | |
3467 {\setbox0=\hbox{#3\relax\global\skip3=#2}}% | |
3468 \skip2=\skip3\relax% | |
3469 \fi% if null arg | |
3470 % remove stretchability, just to be safe | |
3471 \dimen0\skip0\relax% | |
3472 \dimen2\skip2\relax% | |
3473 % dimen0 = height, dimen2 = depth | |
3474 \if@IEEEeqnarrayISinner% inner does not touch master strut size | |
3475 % get local strut size | |
3476 \expandafter\skip0=\@IEEEeqnarrayTHEstrutheight\relax% | |
3477 \expandafter\skip2=\@IEEEeqnarrayTHEstrutdepth\relax% | |
3478 % add it to the user supplied values | |
3479 \advance\dimen0 by \skip0\relax% | |
3480 \advance\dimen2 by \skip2\relax% | |
3481 % update the local strut size | |
3482 \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% | |
3483 \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% | |
3484 \@IEEEeqnarrayusemasterstrutfalse% do not use master | |
3485 \else% outer, have to set master strut too | |
3486 % get master strut size | |
3487 \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% | |
3488 \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% | |
3489 % add it to the user supplied values | |
3490 \advance\dimen0 by \skip0\relax% | |
3491 \advance\dimen2 by \skip2\relax% | |
3492 % update the local and master strut sizes | |
3493 \edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}% | |
3494 \edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}% | |
3495 \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% | |
3496 \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% | |
3497 \@IEEEeqnarrayusemasterstruttrue% use master strut | |
3498 \fi} | |
3499 | |
3500 | |
3501 % allow user a way to see the struts | |
3502 \newif\ifIEEEvisiblestruts | |
3503 \IEEEvisiblestrutsfalse | |
3504 | |
3505 % inserts an invisible strut using the master or local strut values | |
3506 % uses scratch registers \skip0, \skip2, \dimen0, \dimen2 | |
3507 \def\@IEEEeqnarrayinsertstrut{\relax% | |
3508 \if@IEEEeqnarrayusemasterstrut | |
3509 % get master strut size | |
3510 \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% | |
3511 \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% | |
3512 \else% | |
3513 % get local strut size | |
3514 \expandafter\skip0=\@IEEEeqnarrayTHEstrutheight\relax% | |
3515 \expandafter\skip2=\@IEEEeqnarrayTHEstrutdepth\relax% | |
3516 \fi% | |
3517 % remove stretchability, probably not needed | |
3518 \dimen0\skip0\relax% | |
3519 \dimen2\skip2\relax% | |
3520 % dimen0 = height, dimen2 = depth | |
3521 % allow user to see struts if desired | |
3522 \ifIEEEvisiblestruts% | |
3523 \vrule width0.2pt height\dimen0 depth\dimen2\relax% | |
3524 \else% | |
3525 \vrule width0pt height\dimen0 depth\dimen2\relax\fi} | |
3526 | |
3527 | |
3528 % creates an invisible strut, useable even outside \IEEEeqnarray | |
3529 % if \IEEEvisiblestrutstrue, the strut will be visible and 0.2pt wide. | |
3530 % usage: \IEEEstrut[height][depth][font size commands] | |
3531 % default is \IEEEstrut[0.7\normalbaselineskip][0.3\normalbaselineskip][\relax] | |
3532 % blank arguments inherit the default values | |
3533 % uses \dimen0, \dimen2, \skip0, \skip2 | |
3534 \def\IEEEstrut{\relax\@ifnextchar[{\@IEEEstrut}{\@IEEEstrut[0.7\normalbaselineskip]}} | |
3535 \def\@IEEEstrut[#1]{\relax\@ifnextchar[{\@@IEEEstrut[#1]}{\@@IEEEstrut[#1][0.3\normalbaselineskip]}} | |
3536 \def\@@IEEEstrut[#1][#2]{\relax\@ifnextchar[{\@@@IEEEstrut[#1][#2]}{\@@@IEEEstrut[#1][#2][\relax]}} | |
3537 \def\@@@IEEEstrut[#1][#2][#3]{\mbox{#3\relax% | |
3538 \def\@IEEEstrutARG{#1}% | |
3539 \ifx\@IEEEstrutARG\@empty% | |
3540 \skip0=0.7\normalbaselineskip\relax% | |
3541 \else% | |
3542 \skip0=#1\relax% | |
3543 \fi% | |
3544 \def\@IEEEstrutARG{#2}% | |
3545 \ifx\@IEEEstrutARG\@empty% | |
3546 \skip2=0.3\normalbaselineskip\relax% | |
3547 \else% | |
3548 \skip2=#2\relax% | |
3549 \fi% | |
3550 % remove stretchability, probably not needed | |
3551 \dimen0\skip0\relax% | |
3552 \dimen2\skip2\relax% | |
3553 \ifIEEEvisiblestruts% | |
3554 \vrule width0.2pt height\dimen0 depth\dimen2\relax% | |
3555 \else% | |
3556 \vrule width0.0pt height\dimen0 depth\dimen2\relax\fi}} | |
3557 | |
3558 | |
3559 % enables strut mode by setting a default strut size and then zeroing the | |
3560 % \baselineskip, \lineskip, \lineskiplimit and \jot | |
3561 \def\IEEEeqnarraystrutmode{\IEEEeqnarraystrutsize{0.7\normalbaselineskip}{0.3\normalbaselineskip}[\relax]% | |
3562 \baselineskip=0pt\lineskip=0pt\lineskiplimit=0pt\jot=0pt} | |
3563 | |
3564 | |
3565 % equation and subequation forms to use to setup hyperref's \@currentHref | |
3566 \def\@IEEEtheHrefequation{equation.\theHequation} | |
3567 \def\@IEEEtheHrefsubequation{equation.\theHequation\alph{IEEEsubequation}} | |
3568 | |
3569 | |
3570 \def\IEEEeqnarray{\@IEEEeqnumpersisttrue\@IEEEsubeqnumpersistfalse\@IEEEeqnarray} | |
3571 \def\endIEEEeqnarray{\end@IEEEeqnarray} | |
3572 | |
3573 \@namedef{IEEEeqnarray*}{\@IEEEeqnumpersistfalse\@IEEEsubeqnumpersistfalse\@IEEEeqnarray} | |
3574 \@namedef{endIEEEeqnarray*}{\end@IEEEeqnarray} | |
3575 | |
3576 | |
3577 % \IEEEeqnarray is an enhanced \eqnarray. | |
3578 % The star form defaults to not putting equation numbers at the end of each row. | |
3579 % usage: \IEEEeqnarray[decl]{cols} | |
3580 \def\@IEEEeqnarray{\relax\@ifnextchar[{\@@IEEEeqnarray}{\@@IEEEeqnarray[\relax]}} | |
3581 \def\@@IEEEeqnarray[#1]#2{% | |
3582 % default to showing the equation number or not based on whether or not | |
3583 % the star form was involked | |
3584 \if@IEEEeqnumpersist\global\@eqnswtrue | |
3585 \else% not the star form | |
3586 \global\@eqnswfalse | |
3587 \fi% if star form | |
3588 % provide a basic hyperref \theHequation if this has not already been setup (hyperref not loaded, or no section counter) | |
3589 \@ifundefined{theHequation}{\def\theHequation{\arabic{equation}}}{}\relax | |
3590 % provide dummy hyperref commands in case hyperref is not loaded | |
3591 \providecommand{\Hy@raisedlink}[1]{}\relax | |
3592 \providecommand{\hyper@anchorstart}[1]{}\relax | |
3593 \providecommand{\hyper@anchorend}{}\relax | |
3594 \providecommand{\@currentHref}{}\relax | |
3595 \@IEEEeqnumpreadvfalse% reset eqnpreadv flag | |
3596 \@IEEEsubeqnumpreadvfalse% reset subeqnpreadv flag | |
3597 \@IEEEeqnarrayISinnerfalse% not yet within the lines of the halign | |
3598 \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default | |
3599 \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise | |
3600 \IEEEvisiblestrutsfalse% diagnostic mode defaults to off | |
3601 % no extra space unless the user specifically requests it | |
3602 \lineskip=0pt\relax | |
3603 \lineskiplimit=0pt\relax | |
3604 \baselineskip=\normalbaselineskip\relax% | |
3605 \jot=\IEEEnormaljot\relax% | |
3606 \mathsurround\z@\relax% no extra spacing around math | |
3607 \@advanceIEEEeqncolcnttrue% advance the col counter for each col the user uses, | |
3608 % used in \IEEEeqnarraymulticol and in the preamble build | |
3609 %V1.8 Here we preadvance to the next equation number. | |
3610 % If the user later wants a continued subequation, we can roll back. | |
3611 \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation% | |
3612 \stepcounter{equation}\@IEEEeqnumpreadvtrue% advance equation counter before first line | |
3613 \setcounter{IEEEsubequation}{0}% no subequation yet | |
3614 \let\@IEEEcurrentlabelsave\@currentlabel% save current label as we later change it globally | |
3615 \let\@IEEEcurrentHrefsave\@currentHref% save current href label as we later change it globally | |
3616 \def\@currentlabel{\p@equation\theequation}% redefine the ref label | |
3617 \def\@currentHref{\@IEEEtheHrefequation}% setup hyperref label | |
3618 \IEEEeqnarraydecl\relax% allow a way for the user to make global overrides | |
3619 #1\relax% allow user to override defaults | |
3620 \let\\\@IEEEeqnarraycr% replace newline with one that can put in eqn. numbers | |
3621 \global\@IEEEeqncolcnt\z@% col. count = 0 for first line | |
3622 \@IEEEbuildpreamble{#2}\relax% build the preamble and put it into \@IEEEtrantmptoksA | |
3623 % put in the column for the equation number | |
3624 \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first | |
3625 \toks0={##}% | |
3626 % advance the \@IEEEeqncolcnt for the isolation col, this helps with error checking | |
3627 \@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}% | |
3628 % add the isolation column | |
3629 \@IEEEappendtoksA{\tabskip\z@skip\bgroup\the\toks0\egroup}% | |
3630 % advance the \@IEEEeqncolcnt for the equation number col, this helps with error checking | |
3631 \@IEEEappendtoksA{&\global\advance\@IEEEeqncolcnt by 1\relax}% | |
3632 % add the equation number col to the preamble | |
3633 \@IEEEappendtoksA{\tabskip\z@skip\hb@xt@\z@\bgroup\hss\the\toks0\egroup}% | |
3634 % note \@IEEEeqnnumcols does not count the equation col or isolation col | |
3635 % set the starting tabskip glue as determined by the preamble build | |
3636 \tabskip=\@IEEEBPstartglue\relax | |
3637 % begin the display alignment | |
3638 \@IEEEeqnarrayISinnertrue% commands are now within the lines | |
3639 $$\everycr{}\halign to\displaywidth\bgroup | |
3640 % "exspand" the preamble | |
3641 \span\the\@IEEEtrantmptoksA\cr} | |
3642 | |
3643 % enter isolation/strut column (or the next column if the user did not use | |
3644 % every column), record the strut status, complete the columns, do the strut if needed, | |
3645 % restore counters (to backout any equation setup for a next line that was never used) | |
3646 % to their correct values and exit | |
3647 \def\end@IEEEeqnarray{\@IEEEeqnarrayglobalizestrutstatus&\@@IEEEeqnarraycr\egroup | |
3648 \if@IEEEsubeqnumpreadv\global\advance\c@IEEEsubequation\m@ne\fi | |
3649 \if@IEEEeqnumpreadv\global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\fi | |
3650 \global\let\@currentlabel\@IEEEcurrentlabelsave% restore current label | |
3651 \global\let\@currentHref\@IEEEcurrentHrefsave% restore current href label | |
3652 $$\@ignoretrue} | |
3653 | |
3654 | |
3655 % IEEEeqnarray uses a modifed \\ instead of the plain \cr to | |
3656 % end rows. This allows for things like \\*[vskip amount] | |
3657 % These "cr" macros are modified versions of those for LaTeX2e's eqnarray | |
3658 % the {\ifnum0=`} braces must be kept away from the last column to avoid | |
3659 % altering spacing of its math, so we use & to advance to the next column | |
3660 % as there is an isolation/strut column after the user's columns | |
3661 \def\@IEEEeqnarraycr{\@IEEEeqnarrayglobalizestrutstatus&% save strut status and advance to next column | |
3662 {\ifnum0=`}\fi | |
3663 \@ifstar{% | |
3664 \global\@eqpen\@M\@IEEEeqnarrayYCR | |
3665 }{% | |
3666 \global\@eqpen\interdisplaylinepenalty \@IEEEeqnarrayYCR | |
3667 }% | |
3668 } | |
3669 | |
3670 \def\@IEEEeqnarrayYCR{\@testopt\@IEEEeqnarrayXCR\z@skip} | |
3671 | |
3672 \def\@IEEEeqnarrayXCR[#1]{% | |
3673 \ifnum0=`{\fi}% | |
3674 \@@IEEEeqnarraycr | |
3675 \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}}% | |
3676 | |
3677 \def\@@IEEEeqnarraycr{\@IEEEtrantmptoksA={}% clear token register | |
3678 \advance\@IEEEeqncolcnt by -1\relax% adjust col count because of the isolation column | |
3679 \ifnum\@IEEEeqncolcnt>\@IEEEeqnnumcols\relax | |
3680 \@IEEEclspkgerror{Too many columns within the IEEEeqnarray\MessageBreak | |
3681 environment}% | |
3682 {Use fewer \string &'s or put more columns in the IEEEeqnarray column\MessageBreak | |
3683 specifications.}\relax% | |
3684 \else | |
3685 \loop% add cols if the user did not use them all | |
3686 \ifnum\@IEEEeqncolcnt<\@IEEEeqnnumcols\relax | |
3687 \@IEEEappendtoksA{&}% | |
3688 \advance\@IEEEeqncolcnt by 1\relax% update the col count | |
3689 \repeat | |
3690 % this number of &'s will take us the the isolation column | |
3691 \fi | |
3692 % execute the &'s | |
3693 \the\@IEEEtrantmptoksA% | |
3694 % handle the strut/isolation column | |
3695 \@IEEEeqnarrayinsertstrut% do the strut if needed | |
3696 \@IEEEeqnarraystrutreset% reset the strut system for next line or IEEEeqnarray | |
3697 &% and enter the equation number column | |
3698 \if@eqnsw% only if we display something | |
3699 \Hy@raisedlink{\hyper@anchorstart{\@currentHref}}% start a hyperref anchor | |
3700 \global\@IEEEeqnumpreadvfalse\relax% displaying an equation number means | |
3701 \global\@IEEEsubeqnumpreadvfalse\relax% the equation counters point to valid equations | |
3702 % V1.8 Here we setup the counters, currentlabel and status for what would be the *next* | |
3703 % equation line as would be the case under the current settings. However, there are two problems. | |
3704 % One problem is that there might not ever be a next line. The second problem is that the user | |
3705 % may later alter the meaning of a line with commands such as \IEEEyessubnumber. So, to handle | |
3706 % these cases we have to record the current values of the (sub)equation counters and revert back | |
3707 % to them if the next line is changed or never comes. The \if@IEEEeqnumpreadv, \if@IEEEsubeqnumpreadv | |
3708 % and \@IEEEsubeqnnumrollback stuff tracks this. | |
3709 % The logic to handle all this is surprisingly complex, but a nice feature of the approach here is | |
3710 % that the equation counters and labels remain valid for what the line would be unless a | |
3711 % \IEEEyessubnumber et al. later changes it. So, any hyperref links are always correct. | |
3712 \ifnum\c@IEEEsubequation>0\relax% handle subequation | |
3713 \theIEEEsubequationdis\relax | |
3714 \if@IEEEsubeqnumpersist% setup for default type of next line | |
3715 \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax | |
3716 \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax | |
3717 \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label | |
3718 \else | |
3719 % if no subeqnum persist, go ahead and setup for a new equation number | |
3720 \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation | |
3721 \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax | |
3722 \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax | |
3723 \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label | |
3724 \fi | |
3725 \else% display a standard equation number | |
3726 \theequationdis\relax | |
3727 \setcounter{IEEEsubequation}{0}\relax% not really needed | |
3728 \if@IEEEsubeqnumpersist% setup for default type of next line | |
3729 % subequations that follow plain equations carry the same equation number e.g, 5, 5a rather than 5, 6a | |
3730 \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax | |
3731 \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax | |
3732 \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label | |
3733 \else | |
3734 % if no subeqnum persist, go ahead and setup for a new equation number | |
3735 \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation | |
3736 \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax | |
3737 \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax | |
3738 \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label | |
3739 \fi | |
3740 \fi% | |
3741 \Hy@raisedlink{\hyper@anchorend}% end hyperref anchor | |
3742 \fi% fi only if we display something | |
3743 % reset the flags to indicate the default preferences of the display of equation numbers | |
3744 \if@IEEEeqnumpersist\global\@eqnswtrue\else\global\@eqnswfalse\fi | |
3745 \if@IEEEsubeqnumpersist\global\@eqnswtrue\fi% ditto for the subequation flag | |
3746 % reset the number of columns the user actually used | |
3747 \global\@IEEEeqncolcnt\z@\relax | |
3748 % the real end of the line | |
3749 \cr} | |
3750 | |
3751 | |
3752 | |
3753 | |
3754 | |
3755 % \IEEEeqnarraybox is like \IEEEeqnarray except the box form puts everything | |
3756 % inside a vtop, vbox, or vcenter box depending on the letter in the second | |
3757 % optional argument (t,b,c). Vbox is the default. Unlike \IEEEeqnarray, | |
3758 % equation numbers are not displayed and \IEEEeqnarraybox can be nested. | |
3759 % \IEEEeqnarrayboxm is for math mode (like \array) and does not put the vbox | |
3760 % within an hbox. | |
3761 % \IEEEeqnarrayboxt is for text mode (like \tabular) and puts the vbox within | |
3762 % a \hbox{$ $} construct. | |
3763 % \IEEEeqnarraybox will auto detect whether to use \IEEEeqnarrayboxm or | |
3764 % \IEEEeqnarrayboxt depending on the math mode. | |
3765 % The third optional argument specifies the width this box is to be set to - | |
3766 % natural width is the default. | |
3767 % The * forms do not add \jot line spacing | |
3768 % usage: \IEEEeqnarraybox[decl][pos][width]{cols} | |
3769 \def\IEEEeqnarrayboxm{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox} | |
3770 \def\endIEEEeqnarrayboxm{\end@IEEEeqnarraybox} | |
3771 \@namedef{IEEEeqnarrayboxm*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox} | |
3772 \@namedef{endIEEEeqnarrayboxm*}{\end@IEEEeqnarraybox} | |
3773 | |
3774 \def\IEEEeqnarrayboxt{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox} | |
3775 \def\endIEEEeqnarrayboxt{\end@IEEEeqnarraybox} | |
3776 \@namedef{IEEEeqnarrayboxt*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox} | |
3777 \@namedef{endIEEEeqnarrayboxt*}{\end@IEEEeqnarraybox} | |
3778 | |
3779 \def\IEEEeqnarraybox{\@IEEEeqnarrayboxnojotfalse\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi% | |
3780 \@IEEEeqnarraybox} | |
3781 \def\endIEEEeqnarraybox{\end@IEEEeqnarraybox} | |
3782 | |
3783 \@namedef{IEEEeqnarraybox*}{\@IEEEeqnarrayboxnojottrue\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi% | |
3784 \@IEEEeqnarraybox} | |
3785 \@namedef{endIEEEeqnarraybox*}{\end@IEEEeqnarraybox} | |
3786 | |
3787 % flag to indicate if the \IEEEeqnarraybox needs to put things into an hbox{$ $} | |
3788 % for \vcenter in non-math mode | |
3789 \newif\if@IEEEeqnarrayboxHBOXSW% | |
3790 \@IEEEeqnarrayboxHBOXSWfalse | |
3791 | |
3792 \def\@IEEEeqnarraybox{\relax\@ifnextchar[{\@@IEEEeqnarraybox}{\@@IEEEeqnarraybox[\relax]}} | |
3793 \def\@@IEEEeqnarraybox[#1]{\relax\@ifnextchar[{\@@@IEEEeqnarraybox[#1]}{\@@@IEEEeqnarraybox[#1][b]}} | |
3794 \def\@@@IEEEeqnarraybox[#1][#2]{\relax\@ifnextchar[{\@@@@IEEEeqnarraybox[#1][#2]}{\@@@@IEEEeqnarraybox[#1][#2][\relax]}} | |
3795 | |
3796 % #1 = decl; #2 = t,b,c; #3 = width, #4 = col specs | |
3797 \def\@@@@IEEEeqnarraybox[#1][#2][#3]#4{\@IEEEeqnarrayISinnerfalse % not yet within the lines of the halign | |
3798 \@IEEEeqnarraymasterstrutsave% save current master strut values | |
3799 \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default | |
3800 \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise | |
3801 \IEEEvisiblestrutsfalse% diagnostic mode defaults to off | |
3802 % no extra space unless the user specifically requests it | |
3803 \lineskip=0pt\relax% | |
3804 \lineskiplimit=0pt\relax% | |
3805 \baselineskip=\normalbaselineskip\relax% | |
3806 \jot=\IEEEnormaljot\relax% | |
3807 \mathsurround\z@\relax% no extra spacing around math | |
3808 % the default end glues are zero for an \IEEEeqnarraybox | |
3809 \edef\@IEEEeqnarraycolSEPdefaultstart{\@IEEEeqnarraycolSEPzero}% default start glue | |
3810 \edef\@IEEEeqnarraycolSEPdefaultend{\@IEEEeqnarraycolSEPzero}% default end glue | |
3811 \edef\@IEEEeqnarraycolSEPdefaultmid{\@IEEEeqnarraycolSEPzero}% default inter-column glue | |
3812 \@advanceIEEEeqncolcntfalse% do not advance the col counter for each col the user uses, | |
3813 % used in \IEEEeqnarraymulticol and in the preamble build | |
3814 \IEEEeqnarrayboxdecl\relax% allow a way for the user to make global overrides | |
3815 #1\relax% allow user to override defaults | |
3816 \let\\\@IEEEeqnarrayboxcr% replace newline with one that allows optional spacing | |
3817 \@IEEEbuildpreamble{#4}\relax% build the preamble and put it into \@IEEEtrantmptoksA | |
3818 % add an isolation column to the preamble to stop \\'s {} from getting into the last col | |
3819 \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first | |
3820 \toks0={##}% | |
3821 % add the isolation column to the preamble | |
3822 \@IEEEappendtoksA{\tabskip\z@skip\bgroup\the\toks0\egroup}% | |
3823 % set the starting tabskip glue as determined by the preamble build | |
3824 \tabskip=\@IEEEBPstartglue\relax | |
3825 % begin the alignment | |
3826 \everycr{}% | |
3827 % use only the very first token to determine the positioning | |
3828 \@IEEEextracttoken{#2}\relax | |
3829 \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
3830 \typeout{** WARNING: IEEEeqnarraybox position specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
3831 \fi | |
3832 % \@IEEEextractedtoken has the first token, the rest are ignored | |
3833 % if we need to put things into and hbox and go into math mode, do so now | |
3834 \if@IEEEeqnarrayboxHBOXSW \leavevmode \hbox \bgroup $\fi% | |
3835 % use the appropriate vbox type | |
3836 \if\@IEEEextractedtoken t\relax\vtop\else\if\@IEEEextractedtoken c\relax% | |
3837 \vcenter\else\vbox\fi\fi\bgroup% | |
3838 \@IEEEeqnarrayISinnertrue% commands are now within the lines | |
3839 \ifx#3\relax\halign\else\halign to #3\relax\fi% | |
3840 \bgroup | |
3841 % "exspand" the preamble | |
3842 \span\the\@IEEEtrantmptoksA\cr} | |
3843 | |
3844 % carry strut status and enter the isolation/strut column, | |
3845 % exit from math mode if needed, and exit | |
3846 \def\end@IEEEeqnarraybox{\@IEEEeqnarrayglobalizestrutstatus% carry strut status | |
3847 &% enter isolation/strut column | |
3848 \@IEEEeqnarrayinsertstrut% do strut if needed | |
3849 \@IEEEeqnarraymasterstrutrestore% restore the previous master strut values | |
3850 % reset the strut system for next IEEEeqnarray | |
3851 % (sets local strut values back to previous master strut values) | |
3852 \@IEEEeqnarraystrutreset% | |
3853 % ensure last line, exit from halign, close vbox | |
3854 \crcr\egroup\egroup% | |
3855 % exit from math mode and close hbox if needed | |
3856 \if@IEEEeqnarrayboxHBOXSW $\egroup\fi} | |
3857 | |
3858 | |
3859 | |
3860 % IEEEeqnarraybox uses a modifed \\ instead of the plain \cr to | |
3861 % end rows. This allows for things like \\[vskip amount] | |
3862 % This "cr" macros are modified versions those for LaTeX2e's eqnarray | |
3863 % For IEEEeqnarraybox, \\* is the same as \\ | |
3864 % the {\ifnum0=`} braces must be kept away from the last column to avoid | |
3865 % altering spacing of its math, so we use & to advance to the isolation/strut column | |
3866 % carry strut status into isolation/strut column | |
3867 \def\@IEEEeqnarrayboxcr{\@IEEEeqnarrayglobalizestrutstatus% carry strut status | |
3868 &% enter isolation/strut column | |
3869 \@IEEEeqnarrayinsertstrut% do strut if needed | |
3870 % reset the strut system for next line or IEEEeqnarray | |
3871 \@IEEEeqnarraystrutreset% | |
3872 {\ifnum0=`}\fi% | |
3873 \@ifstar{\@IEEEeqnarrayboxYCR}{\@IEEEeqnarrayboxYCR}} | |
3874 | |
3875 % test and setup the optional argument to \\[] | |
3876 \def\@IEEEeqnarrayboxYCR{\@testopt\@IEEEeqnarrayboxXCR\z@skip} | |
3877 | |
3878 % IEEEeqnarraybox does not automatically increase line spacing by \jot | |
3879 \def\@IEEEeqnarrayboxXCR[#1]{\ifnum0=`{\fi}% | |
3880 \cr\noalign{\if@IEEEeqnarrayboxnojot\else\vskip\jot\fi\vskip#1\relax}} | |
3881 | |
3882 | |
3883 | |
3884 % usage: \@IEEEbuildpreamble{column specifiers} | |
3885 % starts the halign preamble build | |
3886 % the assembled preamble is put in \@IEEEtrantmptoksA | |
3887 \def\@IEEEbuildpreamble#1{\@IEEEtrantmptoksA={}% clear token register | |
3888 \let\@IEEEBPcurtype=u%current column type is not yet known | |
3889 \let\@IEEEBPprevtype=s%the previous column type was the start | |
3890 \let\@IEEEBPnexttype=u%next column type is not yet known | |
3891 % ensure these are valid | |
3892 \def\@IEEEBPcurglue={0pt plus 0pt minus 0pt}% | |
3893 \def\@IEEEBPcurcolname{@IEEEdefault}% name of current column definition | |
3894 % currently acquired numerically referenced glue | |
3895 % use a name that is easier to remember | |
3896 \let\@IEEEBPcurnum=\@IEEEtrantmpcountA% | |
3897 \@IEEEBPcurnum=0% | |
3898 % tracks number of columns in the preamble | |
3899 \@IEEEeqnnumcols=0% | |
3900 % record the default end glues | |
3901 \edef\@IEEEBPstartglue{\@IEEEeqnarraycolSEPdefaultstart}% | |
3902 \edef\@IEEEBPendglue{\@IEEEeqnarraycolSEPdefaultend}% | |
3903 \edef\@IEEEedefMACRO{#1}\relax% fully expand the preamble to support macro containers | |
3904 % now parse the user's column specifications | |
3905 % \ignorespaces is used as a delimiter, need at least one trailing \relax because | |
3906 % \@@IEEEbuildpreamble looks into the future | |
3907 \expandafter\@@IEEEbuildpreamble\@IEEEedefMACRO\ignorespaces\relax\relax} | |
3908 | |
3909 | |
3910 % usage: \@@IEEEbuildpreamble{current column}{next column} | |
3911 % parses and builds the halign preamble | |
3912 \def\@@IEEEbuildpreamble#1#2{\let\@@nextIEEEbuildpreamble=\@@IEEEbuildpreamble% | |
3913 % use only the very first token to check the end | |
3914 \@IEEEextracttokengroups{#1}\relax | |
3915 \ifx\@IEEEextractedfirsttoken\ignorespaces\let\@@nextIEEEbuildpreamble=\@@IEEEfinishpreamble\else% | |
3916 % identify current and next token type | |
3917 \@IEEEgetcoltype{#1}{\@IEEEBPcurtype}{1}% current, error on invalid | |
3918 \@IEEEgetcoltype{#2}{\@IEEEBPnexttype}{0}% next, no error on invalid next | |
3919 % if curtype is a glue, get the glue def | |
3920 \if\@IEEEBPcurtype g\@IEEEgetcurglue{#1}{\@IEEEBPcurglue}\fi% | |
3921 % if curtype is a column, get the column def and set the current column name | |
3922 \if\@IEEEBPcurtype c\@IEEEgetcurcol{#1}\fi% | |
3923 % if curtype is a numeral, acquire the user defined glue | |
3924 \if\@IEEEBPcurtype n\@IEEEprocessNcol{#1}\fi% | |
3925 % process the acquired glue | |
3926 \if\@IEEEBPcurtype g\@IEEEprocessGcol\fi% | |
3927 % process the acquired col | |
3928 \if\@IEEEBPcurtype c\@IEEEprocessCcol\fi% | |
3929 % ready prevtype for next col spec. | |
3930 \let\@IEEEBPprevtype=\@IEEEBPcurtype% | |
3931 % be sure and put back the future token(s) as a group | |
3932 \fi\@@nextIEEEbuildpreamble{#2}} | |
3933 | |
3934 | |
3935 % usage: \@@IEEEfinishpreamble{discarded} | |
3936 % executed just after preamble build is completed | |
3937 % warn about zero cols, and if prevtype type = u, put in end tabskip glue | |
3938 % argument is not used | |
3939 \def\@@IEEEfinishpreamble#1{\ifnum\@IEEEeqnnumcols<1\relax | |
3940 \@IEEEclspkgerror{No column specifiers declared for IEEEeqnarray}% | |
3941 {At least one column type must be declared for each IEEEeqnarray.}% | |
3942 \fi%num cols less than 1 | |
3943 %if last type undefined, set default end tabskip glue | |
3944 \if\@IEEEBPprevtype u\@IEEEappendtoksA{\tabskip=\@IEEEBPendglue}\fi} | |
3945 | |
3946 | |
3947 % usage: \@IEEEgetcoltype{col specifier}{\output}{error more} | |
3948 % Identify and return the column specifier's type code in the given | |
3949 % \output macro: | |
3950 % n = number | |
3951 % g = glue (any other char in catagory 12) | |
3952 % c = letter | |
3953 % e = \ignorespaces (end of sequence) | |
3954 % u = undefined | |
3955 % error mode: 0 = no error message, 1 = error on invalid char | |
3956 \def\@IEEEgetcoltype#1#2#3{% | |
3957 % use only the very first token to determine the type | |
3958 \@IEEEextracttoken{#1}\relax | |
3959 % \@IEEEextractedtoken has the first token, the rest are discarded | |
3960 \let#2=u\relax% assume invalid until know otherwise | |
3961 \ifx\@IEEEextractedtoken\ignorespaces\let#2=e\else | |
3962 \ifcat\@IEEEextractedtoken\relax\else% screen out control sequences | |
3963 \if0\@IEEEextractedtoken\let#2=n\else | |
3964 \if1\@IEEEextractedtoken\let#2=n\else | |
3965 \if2\@IEEEextractedtoken\let#2=n\else | |
3966 \if3\@IEEEextractedtoken\let#2=n\else | |
3967 \if4\@IEEEextractedtoken\let#2=n\else | |
3968 \if5\@IEEEextractedtoken\let#2=n\else | |
3969 \if6\@IEEEextractedtoken\let#2=n\else | |
3970 \if7\@IEEEextractedtoken\let#2=n\else | |
3971 \if8\@IEEEextractedtoken\let#2=n\else | |
3972 \if9\@IEEEextractedtoken\let#2=n\else | |
3973 \ifcat,\@IEEEextractedtoken\let#2=g\relax | |
3974 \else\ifcat a\@IEEEextractedtoken\let#2=c\relax\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi | |
3975 \if#2u\relax | |
3976 \if0\noexpand#3\relax\else\@IEEEclspkgerror{Invalid character in column specifications}% | |
3977 {Only letters, numerals and certain other symbols are allowed \MessageBreak | |
3978 as IEEEeqnarray column specifiers.}\fi\fi} | |
3979 | |
3980 | |
3981 % usage: \@IEEEgetcurcol{col specifier} | |
3982 % verify the letter referenced column exists | |
3983 % and return its name in \@IEEEBPcurcolname | |
3984 % if column specifier is invalid, use the default column @IEEEdefault | |
3985 \def\@IEEEgetcurcol#1{\expandafter\ifx\csname @IEEEeqnarraycolDEF#1\endcsname\@IEEEeqnarraycolisdefined% | |
3986 \def\@IEEEBPcurcolname{#1}\else% invalid column name | |
3987 \@IEEEclspkgerror{Invalid column type "#1" in column specifications.\MessageBreak | |
3988 Using a default centering column instead}% | |
3989 {You must define IEEEeqnarray column types before use.}% | |
3990 \def\@IEEEBPcurcolname{@IEEEdefault}\fi} | |
3991 | |
3992 | |
3993 % usage: \@IEEEgetcurglue{glue specifier}{\output} | |
3994 % identify the predefined (punctuation) glue value | |
3995 % and return it in the given output macro | |
3996 \def\@IEEEgetcurglue#1#2{% | |
3997 % ! = \! (neg small) -0.16667em (-3/18 em) | |
3998 % , = \, (small) 0.16667em ( 3/18 em) | |
3999 % : = \: (med) 0.22222em ( 4/18 em) | |
4000 % ; = \; (large) 0.27778em ( 5/18 em) | |
4001 % ' = \quad 1em | |
4002 % " = \qquad 2em | |
4003 % . = 0.5\arraycolsep | |
4004 % / = \arraycolsep | |
4005 % ? = 2\arraycolsep | |
4006 % * = 1fil | |
4007 % + = \@IEEEeqnarraycolSEPcenter | |
4008 % - = \@IEEEeqnarraycolSEPzero | |
4009 % Note that all em values are referenced to the math font (textfont2) fontdimen6 | |
4010 % value for 1em. | |
4011 % | |
4012 % use only the very first token to determine the type | |
4013 \@IEEEextracttoken{#1}\relax | |
4014 \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
4015 \typeout{** WARNING: IEEEeqnarray predefined inter-column glue type specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
4016 \fi | |
4017 % get the math font 1em value | |
4018 % LaTeX2e's NFSS2 does not preload the fonts, but \IEEEeqnarray needs | |
4019 % to gain access to the math (\textfont2) font's spacing parameters. | |
4020 % So we create a bogus box here that uses the math font to ensure | |
4021 % that \textfont2 is loaded and ready. If this is not done, | |
4022 % the \textfont2 stuff here may not work. | |
4023 % Thanks to Bernd Raichle for his 1997 post on this topic. | |
4024 {\setbox0=\hbox{$\displaystyle\relax$}}% | |
4025 % fontdimen6 has the width of 1em (a quad). | |
4026 \@IEEEtrantmpdimenA=\fontdimen6\textfont2\relax% | |
4027 % identify the glue value based on the first token | |
4028 % we discard anything after the first | |
4029 \if!\@IEEEextractedtoken\@IEEEtrantmpdimenA=-0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4030 \if,\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4031 \if:\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.22222\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4032 \if;\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.27778\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4033 \if'\@IEEEextractedtoken\@IEEEtrantmpdimenA=1\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4034 \if"\@IEEEextractedtoken\@IEEEtrantmpdimenA=2\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4035 \if.\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.5\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4036 \if/\@IEEEextractedtoken\edef#2{\the\arraycolsep}\else | |
4037 \if?\@IEEEextractedtoken\@IEEEtrantmpdimenA=2\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4038 \if *\@IEEEextractedtoken\edef#2{0pt plus 1fil minus 0pt}\else | |
4039 \if+\@IEEEextractedtoken\edef#2{\@IEEEeqnarraycolSEPcenter}\else | |
4040 \if-\@IEEEextractedtoken\edef#2{\@IEEEeqnarraycolSEPzero}\else | |
4041 \edef#2{\@IEEEeqnarraycolSEPzero}% | |
4042 \@IEEEclspkgerror{Invalid predefined inter-column glue type "#1" in\MessageBreak | |
4043 column specifications. Using a default value of\MessageBreak | |
4044 0pt instead}% | |
4045 {Only !,:;'"./?*+ and - are valid predefined glue types in the\MessageBreak | |
4046 IEEEeqnarray column specifications.}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} | |
4047 | |
4048 | |
4049 % usage: \@IEEEprocessNcol{digit} | |
4050 % process a numerical digit from the column specification | |
4051 % and look up the corresponding user defined glue value | |
4052 % can transform current type from n to g or a as the user defined glue is acquired | |
4053 \def\@IEEEprocessNcol#1{\if\@IEEEBPprevtype g% | |
4054 \@IEEEclspkgerror{Back-to-back inter-column glue specifiers in column\MessageBreak | |
4055 specifications. Ignoring consecutive glue specifiers\MessageBreak | |
4056 after the first}% | |
4057 {You cannot have two or more glue types next to each other\MessageBreak | |
4058 in the IEEEeqnarray column specifications.}% | |
4059 \let\@IEEEBPcurtype=a% abort this glue, future digits will be discarded | |
4060 \@IEEEBPcurnum=0\relax% | |
4061 \else% if we previously aborted a glue | |
4062 \if\@IEEEBPprevtype a\@IEEEBPcurnum=0\let\@IEEEBPcurtype=a%maintain digit abortion | |
4063 \else%acquire this number | |
4064 % save the previous type before the numerical digits started | |
4065 \if\@IEEEBPprevtype n\else\let\@IEEEBPprevsavedtype=\@IEEEBPprevtype\fi% | |
4066 \multiply\@IEEEBPcurnum by 10\relax% | |
4067 \advance\@IEEEBPcurnum by #1\relax% add in number, \relax is needed to stop TeX's number scan | |
4068 \if\@IEEEBPnexttype n\else%close acquisition | |
4069 \expandafter\ifx\csname @IEEEeqnarraycolSEPDEF\expandafter\romannumeral\number\@IEEEBPcurnum\endcsname\@IEEEeqnarraycolisdefined% | |
4070 \edef\@IEEEBPcurglue{\csname @IEEEeqnarraycolSEP\expandafter\romannumeral\number\@IEEEBPcurnum\endcsname}% | |
4071 \else%user glue not defined | |
4072 \@IEEEclspkgerror{Invalid user defined inter-column glue type "\number\@IEEEBPcurnum" in\MessageBreak | |
4073 column specifications. Using a default value of\MessageBreak | |
4074 0pt instead}% | |
4075 {You must define all IEEEeqnarray numerical inter-column glue types via\MessageBreak | |
4076 \string\IEEEeqnarraydefcolsep \space before they are used in column specifications.}% | |
4077 \edef\@IEEEBPcurglue{\@IEEEeqnarraycolSEPzero}% | |
4078 \fi% glue defined or not | |
4079 \let\@IEEEBPcurtype=g% change the type to reflect the acquired glue | |
4080 \let\@IEEEBPprevtype=\@IEEEBPprevsavedtype% restore the prev type before this number glue | |
4081 \@IEEEBPcurnum=0\relax%ready for next acquisition | |
4082 \fi%close acquisition, get glue | |
4083 \fi%discard or acquire number | |
4084 \fi%prevtype glue or not | |
4085 } | |
4086 | |
4087 | |
4088 % process an acquired glue | |
4089 % add any acquired column/glue pair to the preamble | |
4090 \def\@IEEEprocessGcol{\if\@IEEEBPprevtype a\let\@IEEEBPcurtype=a%maintain previous glue abortions | |
4091 \else | |
4092 % if this is the start glue, save it, but do nothing else | |
4093 % as this is not used in the preamble, but before | |
4094 \if\@IEEEBPprevtype s\edef\@IEEEBPstartglue{\@IEEEBPcurglue}% | |
4095 \else%not the start glue | |
4096 \if\@IEEEBPprevtype g%ignore if back to back glues | |
4097 \@IEEEclspkgerror{Back-to-back inter-column glue specifiers in column\MessageBreak | |
4098 specifications. Ignoring consecutive glue specifiers\MessageBreak | |
4099 after the first}% | |
4100 {You cannot have two or more glue types next to each other\MessageBreak | |
4101 in the IEEEeqnarray column specifications.}% | |
4102 \let\@IEEEBPcurtype=a% abort this glue | |
4103 \else% not a back to back glue | |
4104 \if\@IEEEBPprevtype c\relax% if the previoustype was a col, add column/glue pair to preamble | |
4105 \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi | |
4106 \toks0={##}% | |
4107 % make preamble advance col counter if this environment needs this | |
4108 \if@advanceIEEEeqncolcnt\@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}\fi | |
4109 % insert the column defintion into the preamble, being careful not to expand | |
4110 % the column definition | |
4111 \@IEEEappendtoksA{\tabskip=\@IEEEBPcurglue}% | |
4112 \@IEEEappendNOEXPANDtoksA{\begingroup\csname @IEEEeqnarraycolPRE}% | |
4113 \@IEEEappendtoksA{\@IEEEBPcurcolname}% | |
4114 \@IEEEappendNOEXPANDtoksA{\endcsname}% | |
4115 \@IEEEappendtoksA{\the\toks0}% | |
4116 \@IEEEappendNOEXPANDtoksA{\relax\relax\relax\relax\relax% | |
4117 \relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST}% | |
4118 \@IEEEappendtoksA{\@IEEEBPcurcolname}% | |
4119 \@IEEEappendNOEXPANDtoksA{\endcsname\relax\relax\relax\relax\relax% | |
4120 \relax\relax\relax\relax\relax\endgroup}% | |
4121 \advance\@IEEEeqnnumcols by 1\relax%one more column in the preamble | |
4122 \else% error: non-start glue with no pending column | |
4123 \@IEEEclspkgerror{Inter-column glue specifier without a prior column\MessageBreak | |
4124 type in the column specifications. Ignoring this glue\MessageBreak | |
4125 specifier}% | |
4126 {Except for the first and last positions, glue can be placed only\MessageBreak | |
4127 between column types.}% | |
4128 \let\@IEEEBPcurtype=a% abort this glue | |
4129 \fi% previous was a column | |
4130 \fi% back-to-back glues | |
4131 \fi% is start column glue | |
4132 \fi% prev type not a | |
4133 } | |
4134 | |
4135 | |
4136 % process an acquired letter referenced column and, if necessary, add it to the preamble | |
4137 \def\@IEEEprocessCcol{\if\@IEEEBPnexttype g\else | |
4138 \if\@IEEEBPnexttype n\else | |
4139 % we have a column followed by something other than a glue (or numeral glue) | |
4140 % so we must add this column to the preamble now | |
4141 \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi%col separator for those after the first | |
4142 \if\@IEEEBPnexttype e\@IEEEappendtoksA{\tabskip=\@IEEEBPendglue\relax}\else%put in end glue | |
4143 \@IEEEappendtoksA{\tabskip=\@IEEEeqnarraycolSEPdefaultmid\relax}\fi% or default mid glue | |
4144 \toks0={##}% | |
4145 % make preamble advance col counter if this environment needs this | |
4146 \if@advanceIEEEeqncolcnt\@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}\fi | |
4147 % insert the column definition into the preamble, being careful not to expand | |
4148 % the column definition | |
4149 \@IEEEappendNOEXPANDtoksA{\begingroup\csname @IEEEeqnarraycolPRE}% | |
4150 \@IEEEappendtoksA{\@IEEEBPcurcolname}% | |
4151 \@IEEEappendNOEXPANDtoksA{\endcsname}% | |
4152 \@IEEEappendtoksA{\the\toks0}% | |
4153 \@IEEEappendNOEXPANDtoksA{\relax\relax\relax\relax\relax% | |
4154 \relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST}% | |
4155 \@IEEEappendtoksA{\@IEEEBPcurcolname}% | |
4156 \@IEEEappendNOEXPANDtoksA{\endcsname\relax\relax\relax\relax\relax% | |
4157 \relax\relax\relax\relax\relax\endgroup}% | |
4158 \advance\@IEEEeqnnumcols by 1\relax%one more column in the preamble | |
4159 \fi%next type not numeral | |
4160 \fi%next type not glue | |
4161 } | |
4162 | |
4163 | |
4164 %% | |
4165 %% END OF IEEEeqnarray DEFINITIONS | |
4166 %% | |
4167 | |
4168 | |
4169 | |
4170 | |
4171 % set up the running headings, this complex because of all the different | |
4172 % modes IEEEtran supports | |
4173 \if@twoside | |
4174 \ifCLASSOPTIONtechnote | |
4175 \def\ps@headings{% | |
4176 \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage} | |
4177 \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}} | |
4178 \ifCLASSOPTIONdraftcls | |
4179 \ifCLASSOPTIONdraftclsnofoot | |
4180 \def\@oddfoot{}\def\@evenfoot{}% | |
4181 \else | |
4182 \def\@oddfoot{\scriptsize\@date\hfil DRAFT} | |
4183 \def\@evenfoot{\scriptsize DRAFT\hfil\@date} | |
4184 \fi | |
4185 \else | |
4186 \def\@oddfoot{}\def\@evenfoot{} | |
4187 \fi} | |
4188 \else % not a technote | |
4189 \def\ps@headings{% | |
4190 \ifCLASSOPTIONconference | |
4191 \def\@oddhead{} | |
4192 \def\@evenhead{} | |
4193 \else | |
4194 \def\@oddhead{\hbox{}\scriptsize\rightmark \hfil \thepage} | |
4195 \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}} | |
4196 \fi | |
4197 \ifCLASSOPTIONdraftcls | |
4198 \def\@oddhead{\hbox{}\scriptsize\rightmark \hfil \thepage} | |
4199 \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}} | |
4200 \ifCLASSOPTIONdraftclsnofoot | |
4201 \def\@oddfoot{}\def\@evenfoot{}% | |
4202 \else | |
4203 \def\@oddfoot{\scriptsize\@date\hfil DRAFT} | |
4204 \def\@evenfoot{\scriptsize DRAFT\hfil\@date} | |
4205 \fi | |
4206 \else | |
4207 \def\@oddfoot{}\def\@evenfoot{}% | |
4208 \fi} | |
4209 \fi | |
4210 \else % single side | |
4211 \def\ps@headings{% | |
4212 \ifCLASSOPTIONconference | |
4213 \def\@oddhead{} | |
4214 \def\@evenhead{} | |
4215 \else | |
4216 \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage} | |
4217 \def\@evenhead{} | |
4218 \fi | |
4219 \ifCLASSOPTIONdraftcls | |
4220 \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage} | |
4221 \def\@evenhead{} | |
4222 \ifCLASSOPTIONdraftclsnofoot | |
4223 \def\@oddfoot{} | |
4224 \else | |
4225 \def\@oddfoot{\scriptsize \@date \hfil DRAFT} | |
4226 \fi | |
4227 \else | |
4228 \def\@oddfoot{} | |
4229 \fi | |
4230 \def\@evenfoot{}} | |
4231 \fi | |
4232 | |
4233 | |
4234 % title page style | |
4235 \def\ps@IEEEtitlepagestyle{\def\@oddfoot{}\def\@evenfoot{}% | |
4236 \ifCLASSOPTIONconference | |
4237 \def\@oddhead{}% | |
4238 \def\@evenhead{}% | |
4239 \else | |
4240 \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}% | |
4241 \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}% | |
4242 \fi | |
4243 \ifCLASSOPTIONdraftcls | |
4244 \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}% | |
4245 \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}% | |
4246 \ifCLASSOPTIONdraftclsnofoot\else | |
4247 \def\@oddfoot{\scriptsize \@date\hfil DRAFT}% | |
4248 \def\@evenfoot{\scriptsize DRAFT\hfil \@date}% | |
4249 \fi | |
4250 \else | |
4251 % all non-draft mode footers | |
4252 \if@IEEEusingpubid | |
4253 % for title pages that are using a pubid | |
4254 % do not repeat pubid if using peer review option | |
4255 \ifCLASSOPTIONpeerreview | |
4256 \else | |
4257 \ifCLASSOPTIONcompsoc | |
4258 \def\@oddfoot{\hss\normalfont\scriptsize\raisebox{0ex}[0ex][0ex]{\@IEEEpubid}\hss}% | |
4259 \def\@evenfoot{\hss\normalfont\scriptsize\raisebox{0ex}[0ex][0ex]{\@IEEEpubid}\hss}% | |
4260 \else | |
4261 \footskip 0pt% | |
4262 \def\@oddfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@IEEEpubid}\hss}% | |
4263 \def\@evenfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@IEEEpubid}\hss}% | |
4264 \fi | |
4265 \fi | |
4266 \fi | |
4267 \fi} | |
4268 | |
4269 | |
4270 % peer review cover page style | |
4271 \def\ps@IEEEpeerreviewcoverpagestyle{% | |
4272 \def\@oddhead{}\def\@evenhead{}% | |
4273 \def\@oddfoot{}\def\@evenfoot{}% | |
4274 \ifCLASSOPTIONdraftcls | |
4275 \ifCLASSOPTIONdraftclsnofoot\else | |
4276 \def\@oddfoot{\scriptsize \@date\hfil DRAFT}% | |
4277 \def\@evenfoot{\scriptsize DRAFT\hfil \@date}% | |
4278 \fi | |
4279 \else | |
4280 % non-draft mode footers | |
4281 \if@IEEEusingpubid | |
4282 \ifCLASSOPTIONcompsoc | |
4283 \def\@oddfoot{\hss\normalfont\scriptsize\raisebox{0ex}[0ex][0ex]{\@IEEEpubid}\hss}% | |
4284 \def\@evenfoot{\hss\normalfont\scriptsize\raisebox{0ex}[0ex][0ex]{\@IEEEpubid}\hss}% | |
4285 \else | |
4286 \footskip 0pt% | |
4287 \def\@oddfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@IEEEpubid}\hss}% | |
4288 \def\@evenfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@IEEEpubid}\hss}% | |
4289 \fi | |
4290 \fi | |
4291 \fi} | |
4292 | |
4293 | |
4294 % start with empty headings | |
4295 \def\rightmark{}\def\leftmark{} | |
4296 | |
4297 | |
4298 %% Defines the command for putting the header. \footernote{TEXT} is the same | |
4299 %% as \markboth{TEXT}{TEXT}. | |
4300 %% Note that all the text is forced into uppercase, if you have some text | |
4301 %% that needs to be in lower case, for instance et. al., then either manually | |
4302 %% set \leftmark and \rightmark or use \MakeLowercase{et. al.} within the | |
4303 %% arguments to \markboth. | |
4304 %% V1.7b add \protect to work with Babel | |
4305 \def\markboth#1#2{\def\leftmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{\protect#1}}% | |
4306 \def\rightmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{\protect#2}}} | |
4307 \def\footernote#1{\markboth{#1}{#1}} | |
4308 | |
4309 \def\today{\ifcase\month\or | |
4310 January\or February\or March\or April\or May\or June\or | |
4311 July\or August\or September\or October\or November\or December\fi | |
4312 \space\number\day, \number\year} | |
4313 | |
4314 | |
4315 | |
4316 | |
4317 %% CITATION AND BIBLIOGRAPHY COMMANDS | |
4318 %% | |
4319 %% V1.6 no longer supports the older, nonstandard \shortcite and \citename setup stuff | |
4320 % | |
4321 % | |
4322 % Modify Latex2e \@citex to separate citations with "], [" | |
4323 \def\@citex[#1]#2{% | |
4324 \let\@citea\@empty | |
4325 \@cite{\@for\@citeb:=#2\do | |
4326 {\@citea\def\@citea{], [}% | |
4327 \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}% | |
4328 \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi | |
4329 \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}% | |
4330 \G@refundefinedtrue | |
4331 \@latex@warning | |
4332 {Citation `\@citeb' on page \thepage \space undefined}}% | |
4333 {\hbox{\csname b@\@citeb\endcsname}}}}{#1}} | |
4334 | |
4335 % V1.6 we create hooks for the optional use of Donald Arseneau's | |
4336 % cite.sty package. cite.sty is "smart" and will notice that the | |
4337 % following format controls are already defined and will not | |
4338 % redefine them. The result will be the proper sorting of the | |
4339 % citation numbers and auto detection of 3 or more entry "ranges" - | |
4340 % all in IEEE style: [1], [2], [5]--[7], [12] | |
4341 % This also allows for an optional note, i.e., \cite[mynote]{..}. | |
4342 % If the \cite with note has more than one reference, the note will | |
4343 % be applied to the last of the listed references. It is generally | |
4344 % desired that if a note is given, only one reference is listed in | |
4345 % that \cite. | |
4346 % Thanks to Mr. Arseneau for providing the required format arguments | |
4347 % to produce the IEEE style. | |
4348 \def\citepunct{], [} | |
4349 \def\citedash{]--[} | |
4350 | |
4351 % V1.7 default to using same font for urls made by url.sty | |
4352 \AtBeginDocument{\csname url@samestyle\endcsname} | |
4353 | |
4354 % V1.6 class files should always provide these | |
4355 \def\newblock{\hskip .11em\@plus.33em\@minus.07em} | |
4356 \let\@openbib@code\@empty | |
4357 | |
4358 | |
4359 % Provide support for the control entries of IEEEtran.bst V1.00 and later. | |
4360 % V1.7 optional argument allows for a different aux file to be specified in | |
4361 % order to handle multiple bibliographies. For example, with multibib.sty: | |
4362 % \newcites{sec}{Secondary Literature} | |
4363 % \bstctlcite[@auxoutsec]{BSTcontrolhak} | |
4364 \def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}} | |
4365 \def\@bstctlcite[#1]#2{\@bsphack | |
4366 \@for\@citeb:=#2\do{% | |
4367 \edef\@citeb{\expandafter\@firstofone\@citeb}% | |
4368 \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}% | |
4369 \@esphack} | |
4370 | |
4371 % V1.6 provide a way for a user to execute a command just before | |
4372 % a given reference number - used to insert a \newpage to balance | |
4373 % the columns on the last page | |
4374 \edef\@IEEEtriggerrefnum{0} % the default of zero means that | |
4375 % the command is not executed | |
4376 \def\@IEEEtriggercmd{\newpage} | |
4377 | |
4378 % allow the user to alter the triggered command | |
4379 \long\def\IEEEtriggercmd#1{\long\def\@IEEEtriggercmd{#1}} | |
4380 | |
4381 % allow user a way to specify the reference number just before the | |
4382 % command is executed | |
4383 \def\IEEEtriggeratref#1{\@IEEEtrantmpcountA=#1% | |
4384 \edef\@IEEEtriggerrefnum{\the\@IEEEtrantmpcountA}}% | |
4385 | |
4386 % trigger command at the given reference | |
4387 \def\@IEEEbibitemprefix{\@IEEEtrantmpcountA=\@IEEEtriggerrefnum\relax% | |
4388 \advance\@IEEEtrantmpcountA by -1\relax% | |
4389 \ifnum\c@enumiv=\@IEEEtrantmpcountA\relax\@IEEEtriggercmd\relax\fi} | |
4390 | |
4391 | |
4392 \def\@biblabel#1{[#1]} | |
4393 | |
4394 % compsoc journals and conferences left align the reference numbers | |
4395 \@IEEEcompsoconly{\def\@biblabel#1{[#1]\hfill}} | |
4396 | |
4397 % controls bib item spacing | |
4398 \def\IEEEbibitemsep{0pt plus .5pt} | |
4399 | |
4400 \@IEEEcompsocconfonly{\def\IEEEbibitemsep{0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}} | |
4401 | |
4402 | |
4403 \def\thebibliography#1{\section*{\refname}% | |
4404 \addcontentsline{toc}{section}{\refname}% | |
4405 % V1.6 add some rubber space here and provide a command trigger | |
4406 \footnotesize\vskip 0.3\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip% | |
4407 \list{\@biblabel{\@arabic\c@enumiv}}% | |
4408 {\settowidth\labelwidth{\@biblabel{#1}}% | |
4409 \leftmargin\labelwidth | |
4410 \advance\leftmargin\labelsep\relax | |
4411 \itemsep \IEEEbibitemsep\relax | |
4412 \usecounter{enumiv}% | |
4413 \let\p@enumiv\@empty | |
4414 \renewcommand\theenumiv{\@arabic\c@enumiv}}% | |
4415 \let\@IEEElatexbibitem\bibitem% | |
4416 \def\bibitem{\@IEEEbibitemprefix\@IEEElatexbibitem}% | |
4417 \def\newblock{\hskip .11em plus .33em minus .07em}% | |
4418 % originally: | |
4419 % \sloppy\clubpenalty4000\widowpenalty4000% | |
4420 % by adding the \interlinepenalty here, we make it more | |
4421 % difficult, but not impossible, for LaTeX to break within a reference. | |
4422 % IEEE almost never breaks a reference (but they do it more often with | |
4423 % technotes). You may get an underfull vbox warning around the bibliography, | |
4424 % but the final result will be much more like what IEEE will publish. | |
4425 % MDS 11/2000 | |
4426 \ifCLASSOPTIONtechnote\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty100% | |
4427 \else\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty500\fi% | |
4428 \sfcode`\.=1000\relax} | |
4429 \let\endthebibliography=\endlist | |
4430 | |
4431 | |
4432 | |
4433 | |
4434 % TITLE PAGE COMMANDS | |
4435 % | |
4436 % | |
4437 % \IEEEmembership is used to produce the sublargesize italic font used to indicate author | |
4438 % IEEE membership. compsoc uses a large size sans slant font | |
4439 \def\IEEEmembership#1{{\@IEEEnotcompsoconly{\sublargesize}\normalfont\@IEEEcompsoconly{\sffamily}\textit{#1}}} | |
4440 | |
4441 | |
4442 % \IEEEauthorrefmark{} produces a footnote type symbol to indicate author affiliation. | |
4443 % When given an argument of 1 to 9, \IEEEauthorrefmark{} follows the standard LaTeX footnote | |
4444 % symbol sequence convention. However, for arguments 10 and above, \IEEEauthorrefmark{} | |
4445 % reverts to using lower case roman numerals, so it cannot overflow. Do note that you | |
4446 % cannot use \footnotemark[] in place of \IEEEauthorrefmark{} within \author as the footnote | |
4447 % symbols will have been turned off to prevent \thanks from creating footnote marks. | |
4448 % \IEEEauthorrefmark{} produces a symbol that appears to LaTeX as having zero vertical | |
4449 % height - this allows for a more compact line packing, but the user must ensure that | |
4450 % the interline spacing is large enough to prevent \IEEEauthorrefmark{} from colliding | |
4451 % with the text above. | |
4452 % V1.7 make this a robust command | |
4453 % V1.8 transmag uses an arabic author affiliation symbol | |
4454 \ifCLASSOPTIONtransmag | |
4455 \DeclareRobustCommand*{\IEEEauthorrefmark}[1]{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize #1}}} | |
4456 \else | |
4457 \DeclareRobustCommand*{\IEEEauthorrefmark}[1]{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or% | |
4458 \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger% | |
4459 \or \ddagger\ddagger \else\textsuperscript{\expandafter\romannumeral#1}\fi}}}} | |
4460 \fi | |
4461 | |
4462 | |
4463 % FONT CONTROLS AND SPACINGS FOR CONFERENCE MODE AUTHOR NAME AND AFFILIATION BLOCKS | |
4464 % | |
4465 % The default font styles for the author name and affiliation blocks (confmode) | |
4466 \def\@IEEEauthorblockNstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\sublargesize} | |
4467 \def\@IEEEauthorblockAstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\@IEEEcompsocconfonly{\itshape}\normalsize} | |
4468 % The default if the user does not use an author block | |
4469 \def\@IEEEauthordefaulttextstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\sublargesize} | |
4470 | |
4471 % adjustment spacing from title (or special paper notice) to author name blocks (confmode) | |
4472 % can be negative | |
4473 \def\@IEEEauthorblockconfadjspace{-0.25em} | |
4474 % compsoc conferences need more space here | |
4475 \@IEEEcompsocconfonly{\def\@IEEEauthorblockconfadjspace{0.75\@IEEEnormalsizeunitybaselineskip}} | |
4476 | |
4477 % spacing between name and affiliation blocks (confmode) | |
4478 % This can be negative. | |
4479 % IEEE doesn't want any added spacing here, but I will leave these | |
4480 % controls in place in case they ever change their mind. | |
4481 % Personally, I like 0.75ex. | |
4482 %\def\@IEEEauthorblockNtopspace{0.75ex} | |
4483 %\def\@IEEEauthorblockAtopspace{0.75ex} | |
4484 \def\@IEEEauthorblockNtopspace{0.0ex} | |
4485 \def\@IEEEauthorblockAtopspace{0.0ex} | |
4486 \ifCLASSOPTIONtransmag | |
4487 % transmag uses one line of space above first affiliation block | |
4488 \def\@IEEEauthorblockAtopspace{1\@IEEEnormalsizeunitybaselineskip} | |
4489 \fi | |
4490 | |
4491 % baseline spacing within name and affiliation blocks (confmode) | |
4492 % must be positive, spacings below certain values will make | |
4493 % the position of line of text sensitive to the contents of the | |
4494 % line above it i.e., whether or not the prior line has descenders, | |
4495 % subscripts, etc. For this reason it is a good idea to keep | |
4496 % these above 2.6ex | |
4497 \def\@IEEEauthorblockNinterlinespace{2.6ex} | |
4498 \def\@IEEEauthorblockAinterlinespace{2.75ex} | |
4499 | |
4500 % This tracks the required strut size. | |
4501 % See the \@IEEEauthorhalign command for the actual default value used. | |
4502 \def\@IEEEauthorblockXinterlinespace{2.7ex} | |
4503 | |
4504 % variables to retain font size and style across groups | |
4505 % values given here have no effect as they will be overwritten later | |
4506 \gdef\@IEEESAVESTATEfontsize{10} | |
4507 \gdef\@IEEESAVESTATEfontbaselineskip{12} | |
4508 \gdef\@IEEESAVESTATEfontencoding{OT1} | |
4509 \gdef\@IEEESAVESTATEfontfamily{ptm} | |
4510 \gdef\@IEEESAVESTATEfontseries{m} | |
4511 \gdef\@IEEESAVESTATEfontshape{n} | |
4512 | |
4513 % saves the current font attributes | |
4514 \def\@IEEEcurfontSAVE{\global\let\@IEEESAVESTATEfontsize\f@size% | |
4515 \global\let\@IEEESAVESTATEfontbaselineskip\f@baselineskip% | |
4516 \global\let\@IEEESAVESTATEfontencoding\f@encoding% | |
4517 \global\let\@IEEESAVESTATEfontfamily\f@family% | |
4518 \global\let\@IEEESAVESTATEfontseries\f@series% | |
4519 \global\let\@IEEESAVESTATEfontshape\f@shape} | |
4520 | |
4521 % restores the saved font attributes | |
4522 \def\@IEEEcurfontRESTORE{\fontsize{\@IEEESAVESTATEfontsize}{\@IEEESAVESTATEfontbaselineskip}% | |
4523 \fontencoding{\@IEEESAVESTATEfontencoding}% | |
4524 \fontfamily{\@IEEESAVESTATEfontfamily}% | |
4525 \fontseries{\@IEEESAVESTATEfontseries}% | |
4526 \fontshape{\@IEEESAVESTATEfontshape}% | |
4527 \selectfont} | |
4528 | |
4529 | |
4530 % variable to indicate if the current block is the first block in the column | |
4531 \newif\if@IEEEprevauthorblockincol \@IEEEprevauthorblockincolfalse | |
4532 | |
4533 | |
4534 % the command places a strut with height and depth = \@IEEEauthorblockXinterlinespace | |
4535 % we use this technique to have complete manual control over the spacing of the lines | |
4536 % within the halign environment. | |
4537 % We set the below baseline portion at 30%, the above | |
4538 % baseline portion at 70% of the total length. | |
4539 % Responds to changes in the document's \baselinestretch | |
4540 \def\@IEEEauthorstrutrule{\@IEEEtrantmpdimenA\@IEEEauthorblockXinterlinespace% | |
4541 \@IEEEtrantmpdimenA=\baselinestretch\@IEEEtrantmpdimenA% | |
4542 \rule[-0.3\@IEEEtrantmpdimenA]{0pt}{\@IEEEtrantmpdimenA}} | |
4543 | |
4544 | |
4545 % blocks to hold the authors' names and affilations. | |
4546 % Makes formatting easy for conferences | |
4547 % | |
4548 % use real definitions in conference mode | |
4549 % name block | |
4550 \def\IEEEauthorblockN#1{\relax\@IEEEauthorblockNstyle% set the default text style | |
4551 \gdef\@IEEEauthorblockXinterlinespace{0pt}% disable strut for spacer row | |
4552 % the \expandafter hides the \cr in conditional tex, see the array.sty docs | |
4553 % for details, probably not needed here as the \cr is in a macro | |
4554 % do a spacer row if needed | |
4555 \if@IEEEprevauthorblockincol\expandafter\@IEEEauthorblockNtopspaceline\fi | |
4556 \global\@IEEEprevauthorblockincoltrue% we now have a block in this column | |
4557 %restore the correct strut value | |
4558 \gdef\@IEEEauthorblockXinterlinespace{\@IEEEauthorblockNinterlinespace}% | |
4559 % input the author names | |
4560 #1% | |
4561 % end the row if the user did not already | |
4562 \crcr} | |
4563 % spacer row for names | |
4564 \def\@IEEEauthorblockNtopspaceline{\cr\noalign{\vskip\@IEEEauthorblockNtopspace}} | |
4565 % | |
4566 % affiliation block | |
4567 \def\IEEEauthorblockA#1{\relax\@IEEEauthorblockAstyle% set the default text style | |
4568 \gdef\@IEEEauthorblockXinterlinespace{0pt}%disable strut for spacer row | |
4569 % the \expandafter hides the \cr in conditional tex, see the array.sty docs | |
4570 % for details, probably not needed here as the \cr is in a macro | |
4571 % do a spacer row if needed | |
4572 \if@IEEEprevauthorblockincol\expandafter\@IEEEauthorblockAtopspaceline\fi | |
4573 \global\@IEEEprevauthorblockincoltrue% we now have a block in this column | |
4574 %restore the correct strut value | |
4575 \gdef\@IEEEauthorblockXinterlinespace{\@IEEEauthorblockAinterlinespace}% | |
4576 % input the author affiliations | |
4577 #1% | |
4578 % end the row if the user did not already | |
4579 \crcr | |
4580 % V1.8 transmag does not use any additional affiliation spacing after the first author | |
4581 \ifCLASSOPTIONtransmag\gdef\@IEEEauthorblockAtopspace{0pt}\fi} | |
4582 | |
4583 % spacer row for affiliations | |
4584 \def\@IEEEauthorblockAtopspaceline{\cr\noalign{\vskip\@IEEEauthorblockAtopspace}} | |
4585 | |
4586 | |
4587 % allow papers to compile even if author blocks are used in modes other | |
4588 % than conference or peerreviewca. For such cases, we provide dummy blocks. | |
4589 \ifCLASSOPTIONconference | |
4590 \else | |
4591 \ifCLASSOPTIONpeerreviewca\else | |
4592 % not conference, peerreviewca or transmag mode | |
4593 \ifCLASSOPTIONtransmag\else | |
4594 \def\IEEEauthorblockN#1{#1}% | |
4595 \def\IEEEauthorblockA#1{#1}% | |
4596 \fi | |
4597 \fi | |
4598 \fi | |
4599 | |
4600 | |
4601 | |
4602 % we provide our own halign so as not to have to depend on tabular | |
4603 \def\@IEEEauthorhalign{\@IEEEauthordefaulttextstyle% default text style | |
4604 \lineskip=0pt\relax% disable line spacing | |
4605 \lineskiplimit=0pt\relax% | |
4606 \baselineskip=0pt\relax% | |
4607 \@IEEEcurfontSAVE% save the current font | |
4608 \mathsurround\z@\relax% no extra spacing around math | |
4609 \let\\\@IEEEauthorhaligncr% replace newline with halign friendly one | |
4610 \tabskip=0pt\relax% no column spacing | |
4611 \everycr{}% ensure no problems here | |
4612 \@IEEEprevauthorblockincolfalse% no author blocks yet | |
4613 \def\@IEEEauthorblockXinterlinespace{2.7ex}% default interline space | |
4614 \vtop\bgroup%vtop box | |
4615 \halign\bgroup&\relax\hfil\@IEEEcurfontRESTORE\relax ##\relax | |
4616 \hfil\@IEEEcurfontSAVE\@IEEEauthorstrutrule\cr} | |
4617 | |
4618 % ensure last line, exit from halign, close vbox | |
4619 \def\end@IEEEauthorhalign{\crcr\egroup\egroup} | |
4620 | |
4621 % handle bogus star form | |
4622 \def\@IEEEauthorhaligncr{{\ifnum0=`}\fi\@ifstar{\@@IEEEauthorhaligncr}{\@@IEEEauthorhaligncr}} | |
4623 | |
4624 % test and setup the optional argument to \\[] | |
4625 \def\@@IEEEauthorhaligncr{\@testopt\@@@IEEEauthorhaligncr\z@skip} | |
4626 | |
4627 % end the line and do the optional spacer | |
4628 \def\@@@IEEEauthorhaligncr[#1]{\ifnum0=`{\fi}\cr\noalign{\vskip#1\relax}} | |
4629 | |
4630 | |
4631 | |
4632 % flag to prevent multiple \and warning messages | |
4633 \newif\if@IEEEWARNand | |
4634 \@IEEEWARNandtrue | |
4635 | |
4636 % if in conference or peerreviewca modes, we support the use of \and as \author is a | |
4637 % tabular environment, otherwise we warn the user that \and is invalid | |
4638 % outside of conference or peerreviewca modes. | |
4639 \def\and{\relax} % provide a bogus \and that we will then override | |
4640 | |
4641 \renewcommand{\and}[1][\relax]{\if@IEEEWARNand\typeout{** WARNING: \noexpand\and is valid only | |
4642 when in conference or peerreviewca}\typeout{modes (line \the\inputlineno).}\fi\global\@IEEEWARNandfalse} | |
4643 | |
4644 \ifCLASSOPTIONconference% | |
4645 \renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}% | |
4646 \fi | |
4647 \ifCLASSOPTIONpeerreviewca | |
4648 \renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}% | |
4649 \fi | |
4650 % V1.8 transmag uses conference author format | |
4651 \ifCLASSOPTIONtransmag | |
4652 \renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}% | |
4653 \fi | |
4654 | |
4655 % page clearing command | |
4656 % based on LaTeX2e's \cleardoublepage, but allows different page styles | |
4657 % for the inserted blank pages | |
4658 \def\@IEEEcleardoublepage#1{\clearpage\if@twoside\ifodd\c@page\else | |
4659 \hbox{}\thispagestyle{#1}\newpage\if@twocolumn\hbox{}\thispagestyle{#1}\newpage\fi\fi\fi} | |
4660 | |
4661 | |
4662 | |
4663 | |
4664 % user command to invoke the title page | |
4665 \def\maketitle{\par% | |
4666 \begingroup% | |
4667 \normalfont% | |
4668 \def\thefootnote{}% the \thanks{} mark type is empty | |
4669 \def\footnotemark{}% and kill space from \thanks within author | |
4670 \let\@makefnmark\relax% V1.7, must *really* kill footnotemark to remove all \textsuperscript spacing as well. | |
4671 \footnotesize% equal spacing between thanks lines | |
4672 \footnotesep 0.7\baselineskip%see global setting of \footnotesep for more info | |
4673 % V1.7 disable \thanks note indention for compsoc | |
4674 \@IEEEcompsoconly{\long\def\@makefntext##1{\parindent 1em\noindent\hbox{\@makefnmark}##1}}% | |
4675 \normalsize% | |
4676 \ifCLASSOPTIONpeerreview | |
4677 \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext% | |
4678 \thispagestyle{IEEEpeerreviewcoverpagestyle}\@thanks% | |
4679 \else | |
4680 \if@twocolumn% | |
4681 \ifCLASSOPTIONtechnote% | |
4682 \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext% | |
4683 \else | |
4684 \twocolumn[{\IEEEquantizevspace{\@maketitle}[\IEEEquantizedisabletitlecmds]{0pt}[-\topskip]{\baselineskip}{\@IEEENORMtitlevspace}{\@IEEEMINtitlevspace}\@IEEEaftertitletext}]% | |
4685 \fi | |
4686 \else | |
4687 \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext% | |
4688 \fi | |
4689 \thispagestyle{IEEEtitlepagestyle}\@thanks% | |
4690 \fi | |
4691 % pullup page for pubid if used. | |
4692 \if@IEEEusingpubid | |
4693 \enlargethispage{-\@IEEEpubidpullup}% | |
4694 \fi | |
4695 \endgroup | |
4696 \setcounter{footnote}{0}\let\maketitle\relax\let\@maketitle\relax | |
4697 \gdef\@thanks{}% | |
4698 % v1.6b do not clear these as we will need the title again for peer review papers | |
4699 % \gdef\@author{}\gdef\@title{}% | |
4700 \let\thanks\relax} | |
4701 | |
4702 | |
4703 % V1.8 parbox to format \@IEEEtitleabstractindextext | |
4704 \long\def\@IEEEtitleabstractindextextbox#1{\parbox{1\textwidth}{#1}} | |
4705 % V1.8 compsoc is partial width | |
4706 \ifCLASSOPTIONcompsoc | |
4707 % comparison with proofs suggests it's in the range of 92.1-92.3% | |
4708 \long\def\@IEEEtitleabstractindextextbox#1{\parbox{0.922\textwidth}{\@IEEEcompsocnotconfonly{\rightskip\@flushglue\leftskip\z@skip}#1}} | |
4709 \fi | |
4710 | |
4711 % formats the Title, authors names, affiliations and special paper notice | |
4712 % THIS IS A CONTROLLED SPACING COMMAND! Do not allow blank lines or unintentional | |
4713 % spaces to enter the definition - use % at the end of each line | |
4714 \def\@maketitle{\newpage | |
4715 \bgroup\par\addvspace{0.5\baselineskip}\centering% | |
4716 \ifCLASSOPTIONtechnote% technotes, V1.8a abstract and index terms are not treated differently for compsoc technotes | |
4717 {\bfseries\large\@IEEEcompsoconly{\Large\sffamily}\@title\par}\vskip 1.3em{\lineskip .5em\@IEEEcompsoconly{\large\sffamily}\@author | |
4718 \@IEEEspecialpapernotice\par}\relax | |
4719 \else% not a technote | |
4720 \vskip0.2em{\Huge\ifCLASSOPTIONtransmag\bfseries\LARGE\fi\@IEEEcompsoconly{\sffamily}\@IEEEcompsocconfonly{\normalfont\normalsize\vskip 2\@IEEEnormalsizeunitybaselineskip | |
4721 \bfseries\Large}\@IEEEcompsocnotconfonly{\vskip 0.75\@IEEEnormalsizeunitybaselineskip}\@title\par}\relax | |
4722 \@IEEEcompsocnotconfonly{\vskip 0.5\@IEEEnormalsizeunitybaselineskip}\vskip1.0em\par% | |
4723 % V1.6 handle \author differently if in conference mode | |
4724 \ifCLASSOPTIONconference% | |
4725 {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace% | |
4726 \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par}\relax | |
4727 \else% peerreviewca, peerreview or journal | |
4728 \ifCLASSOPTIONpeerreviewca | |
4729 % peerreviewca handles author names just like conference mode | |
4730 {\@IEEEcompsoconly{\sffamily}\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace% | |
4731 \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par | |
4732 {\@IEEEcompsoconly{\vskip 1.5em\relax | |
4733 \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\noindent\hfill | |
4734 \IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax | |
4735 \else% journal, peerreview or transmag | |
4736 \ifCLASSOPTIONtransmag | |
4737 % transmag also handles author names just like conference mode | |
4738 % it also uses \@IEEEtitleabstractindextex, but with one line less | |
4739 % space above, and one more below | |
4740 {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace% | |
4741 \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par | |
4742 {\vspace{0.5\baselineskip}\relax\@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\vspace{-1\baselineskip}\par}}\relax | |
4743 \else% journal or peerreview | |
4744 {\lineskip.5em\@IEEEcompsoconly{\sffamily}\sublargesize\@author\@IEEEspecialpapernotice\par | |
4745 {\@IEEEcompsoconly{\vskip 1.5em\relax | |
4746 \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\noindent\hfill | |
4747 \IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax | |
4748 \fi | |
4749 \fi | |
4750 \fi | |
4751 \fi\par\addvspace{0.5\baselineskip}\egroup} | |
4752 | |
4753 | |
4754 % V1.7 Computer Society "diamond line" which follows index terms for nonconference papers | |
4755 % V1.8a full width diamond line for single column use | |
4756 \def\@IEEEcompsocdiamondlinei{\vrule depth 0pt height 0.5pt width 4cm\nobreak\hspace{7.5pt}\nobreak | |
4757 \raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak | |
4758 \hspace{7.5pt}\nobreak\vrule depth 0pt height 0.5pt width 4cm\relax} | |
4759 % V1.8a narrower width diamond line for double column use | |
4760 \def\@IEEEcompsocdiamondlineii{\vrule depth 0pt height 0.5pt width 2.5cm\nobreak\hspace{7.5pt}\nobreak | |
4761 \raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak | |
4762 \hspace{7.5pt}\nobreak\vrule depth 0pt height 0.5pt width 2.5cm\relax} | |
4763 % V1.8a bare core without rules to base a last resort on for very narrow linewidths | |
4764 \def\@IEEEcompsocdiamondlineiii{\mbox{}\nobreak\hspace{7.5pt}\nobreak | |
4765 \raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak | |
4766 \hspace{7.5pt}\nobreak\mbox{}\relax} | |
4767 | |
4768 % V1.8a allow \IEEEcompsocdiamondline to adjust for different linewidths. | |
4769 % Use \@IEEEcompsocdiamondlinei if its width is less than 0.66\linewidth (0.487 nominal for single column) | |
4770 % if not, fall back to \@IEEEcompsocdiamondlineii if its width is less than 0.75\linewidth (0.659 nominal for double column) | |
4771 % if all else fails, try to make a custom diamondline based on the abnormally narrow linewidth | |
4772 \def\IEEEcompsocdiamondline{\settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlinei}\relax | |
4773 \ifdim\@IEEEtrantmpdimenA<0.66\linewidth\relax\@IEEEcompsocdiamondlinei\relax | |
4774 \else | |
4775 \settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlineii}\relax | |
4776 \ifdim\@IEEEtrantmpdimenA<0.75\linewidth\relax\@IEEEcompsocdiamondlineii\relax | |
4777 \else | |
4778 \settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlineiii}\relax | |
4779 \@IEEEtrantmpdimenB=\linewidth\relax | |
4780 \addtolength{\@IEEEtrantmpdimenB}{-1\@IEEEtrantmpdimenA}\relax | |
4781 \vrule depth 0pt height 0.5pt width 0.33\@IEEEtrantmpdimenB\@IEEEcompsocdiamondlineiii\vrule depth 0pt height 0.5pt width 0.33\@IEEEtrantmpdimenB\relax | |
4782 \fi\fi} | |
4783 | |
4784 | |
4785 % V1.7 standard LateX2e \thanks, but with \itshape under compsoc. Also make it a \long\def | |
4786 % We also need to trigger the one-shot footnote rule | |
4787 \def\@IEEEtriggeroneshotfootnoterule{\global\@IEEEenableoneshotfootnoteruletrue} | |
4788 | |
4789 | |
4790 \long\def\thanks#1{\footnotemark | |
4791 \protected@xdef\@thanks{\@thanks | |
4792 \protect\footnotetext[\the\c@footnote]{\@IEEEcompsoconly{\itshape | |
4793 \protect\@IEEEtriggeroneshotfootnoterule\relax}\ignorespaces#1}}} | |
4794 \let\@thanks\@empty | |
4795 | |
4796 | |
4797 % V1.7 allow \author to contain \par's. This is needed to allow \thanks to contain \par. | |
4798 \long\def\author#1{\gdef\@author{#1}} | |
4799 | |
4800 | |
4801 % in addition to setting up IEEEitemize, we need to remove a baselineskip space above and | |
4802 % below it because \list's \pars introduce blank lines because of the footnote struts. | |
4803 \def\@IEEEsetupcompsocitemizelist{\def\labelitemi{$\bullet$}% | |
4804 \setlength{\IEEElabelindent}{0pt}\setlength{\labelsep}{1.2em}\setlength{\parskip}{0pt}% | |
4805 \setlength{\partopsep}{0pt}\setlength{\topsep}{0.5\baselineskip}\vspace{-1\baselineskip}\relax} | |
4806 | |
4807 | |
4808 % flag for fake non-compsoc \IEEEcompsocthanksitem - prevents line break on very first item | |
4809 \newif\if@IEEEbreakcompsocthanksitem \@IEEEbreakcompsocthanksitemfalse | |
4810 | |
4811 \ifCLASSOPTIONcompsoc | |
4812 % V1.7 compsoc bullet item \thanks | |
4813 % also, we need to redefine this to destroy the argument in \IEEEquantizevspace | |
4814 \long\def\IEEEcompsocitemizethanks#1{\relax\@IEEEbreakcompsocthanksitemfalse\footnotemark | |
4815 \protected@xdef\@thanks{\@thanks | |
4816 \protect\footnotetext[\the\c@footnote]{\itshape\protect\@IEEEtriggeroneshotfootnoterule | |
4817 {\let\IEEEiedlistdecl\relax\protect\begin{IEEEitemize}[\protect\@IEEEsetupcompsocitemizelist]\ignorespaces#1\relax | |
4818 \protect\end{IEEEitemize}}\protect\vspace{-1\baselineskip}}}} | |
4819 \DeclareRobustCommand*{\IEEEcompsocthanksitem}{\item} | |
4820 \else | |
4821 % non-compsoc, allow for dual compilation via rerouting to normal \thanks | |
4822 \long\def\IEEEcompsocitemizethanks#1{\thanks{#1}} | |
4823 % redirect to "pseudo-par" \hfil\break\indent after swallowing [] from \IEEEcompsocthanksitem[] | |
4824 \DeclareRobustCommand{\IEEEcompsocthanksitem}{\@ifnextchar [{\@IEEEthanksswallowoptionalarg}% | |
4825 {\@IEEEthanksswallowoptionalarg[\relax]}} | |
4826 % be sure and break only after first item, be sure and ignore spaces after optional argument | |
4827 \def\@IEEEthanksswallowoptionalarg[#1]{\relax\if@IEEEbreakcompsocthanksitem\hfil\break | |
4828 \indent\fi\@IEEEbreakcompsocthanksitemtrue\ignorespaces} | |
4829 \fi | |
4830 | |
4831 | |
4832 % V1.6b define the \IEEEpeerreviewmaketitle as needed | |
4833 \ifCLASSOPTIONpeerreview | |
4834 \def\IEEEpeerreviewmaketitle{\@IEEEcleardoublepage{empty}% | |
4835 \ifCLASSOPTIONtwocolumn | |
4836 \twocolumn[{\IEEEquantizevspace{\@IEEEpeerreviewmaketitle}[\IEEEquantizedisabletitlecmds]{0pt}[-\topskip]{\baselineskip}{\@IEEENORMtitlevspace}{\@IEEEMINtitlevspace}}] | |
4837 \else | |
4838 \newpage\@IEEEpeerreviewmaketitle\@IEEEstatictitlevskip | |
4839 \fi | |
4840 \thispagestyle{IEEEtitlepagestyle}} | |
4841 \else | |
4842 % \IEEEpeerreviewmaketitle does nothing if peer review option has not been selected | |
4843 \def\IEEEpeerreviewmaketitle{\relax} | |
4844 \fi | |
4845 | |
4846 % peerreview formats the repeated title like the title in journal papers. | |
4847 \def\@IEEEpeerreviewmaketitle{\bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEcompsoconly{\sffamily}% | |
4848 \normalfont\normalsize\vskip0.2em{\Huge\@title\par}\vskip1.0em\par | |
4849 \par\addvspace{0.5\baselineskip}\egroup} | |
4850 | |
4851 | |
4852 | |
4853 % V1.6 | |
4854 % this is a static rubber spacer between the title/authors and the main text | |
4855 % used for single column text, or when the title appears in the first column | |
4856 % of two column text (technotes). | |
4857 \def\@IEEEstatictitlevskip{{\normalfont\normalsize | |
4858 % adjust spacing to next text | |
4859 % v1.6b handle peer review papers | |
4860 \ifCLASSOPTIONpeerreview | |
4861 % for peer review papers, the same value is used for both title pages | |
4862 % regardless of the other paper modes | |
4863 \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip | |
4864 \else | |
4865 \ifCLASSOPTIONconference% conference | |
4866 \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip% | |
4867 \else% | |
4868 \ifCLASSOPTIONtechnote% technote | |
4869 \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip% | |
4870 \else% journal uses more space | |
4871 \vskip 2.5\baselineskip plus 0.75\baselineskip minus 0.375\baselineskip% | |
4872 \fi | |
4873 \fi | |
4874 \fi}} | |
4875 | |
4876 | |
4877 % set the nominal and minimum values for the quantized title spacer | |
4878 % the quantization algorithm will not allow the spacer size to | |
4879 % become less than \@IEEEMINtitlevspace - instead it will be lengthened | |
4880 % default to journal values | |
4881 \def\@IEEENORMtitlevspace{2.5\baselineskip} | |
4882 \def\@IEEEMINtitlevspace{2\baselineskip} | |
4883 % conferences and technotes need tighter spacing | |
4884 \ifCLASSOPTIONconference% conference | |
4885 \def\@IEEENORMtitlevspace{1\baselineskip} | |
4886 \def\@IEEEMINtitlevspace{0.75\baselineskip} | |
4887 \fi | |
4888 \ifCLASSOPTIONtechnote% technote | |
4889 \def\@IEEENORMtitlevspace{1\baselineskip} | |
4890 \def\@IEEEMINtitlevspace{0.75\baselineskip} | |
4891 \fi | |
4892 | |
4893 | |
4894 % V1.8a | |
4895 \def\IEEEquantizevspace{\begingroup\@ifstar{\@IEEEquantizevspacestarformtrue\@IEEEquantizevspace}{\@IEEEquantizevspacestarformfalse\@IEEEquantizevspace}} | |
4896 % \IEEEquantizevspace[output dimen register]{object}[object decl] | |
4897 % {top baselineskip} | |
4898 % [offset][prevdepth][lineskip limit][lineskip] | |
4899 % {unit height}{nominal vspace}{minimum vspace} | |
4900 % | |
4901 % Calculates and creates the vspace needed to make the combined height with | |
4902 % the given object an integer multiple of the given unit height. This command | |
4903 % is more general than the older \@IEEEdynamictitlevspace it replaces. | |
4904 % | |
4905 % The star form has no effect at present, but is reserved for future use. | |
4906 % | |
4907 % If the optional argument [output dimen register] is given, the calculated | |
4908 % vspace height is stored in the given output dimen (or skip) register | |
4909 % and no other action is taken, otherwise the object followed by a vspace* | |
4910 % of the appropriate height is evaluated/output. | |
4911 % | |
4912 % The optional object decl (declarations) is code that is evaluated just | |
4913 % before the object's height is evaluated. Its intented purpose is to allow | |
4914 % for the alteration or disabling of code within the object during internal | |
4915 % height evaluation (e.g., \long\def\thanks#1{\relax} ). | |
4916 % This special code is not invoked if/when the object is rendered at the end. | |
4917 % | |
4918 % The nominal vspace is the target value of the added vspace and the minimum | |
4919 % vspace is the lower allowed limit. The vspacer will be the value that achieves | |
4920 % integral overall height, in terms of the given unit height, that is closest | |
4921 % to the nominal vspace and that is not less than the specified minimum vspace. | |
4922 % | |
4923 % The line spacing algorithm of TeX is somewhat involved and requires special | |
4924 % care with regard to the first line of a vertical list (which is indicated | |
4925 % when \prevdepth is -1000pt or less). top baselineskip specifies the | |
4926 % baselineskip or topskip used prior to the object. If the height of the | |
4927 % first line of the object is greater than the given top baselineskip, then | |
4928 % the top baselineskip is subtracted from the height of the first line and | |
4929 % that difference is considered along with the rest of the object height | |
4930 % (because the object will be shifted down by an amount = | |
4931 % top line height - top baselineskip). Otherwise, the height of the first line | |
4932 % of the object is ignored as far as the calculations are concerned. | |
4933 % This algorithm is adequate for objects that appear at the top of a page | |
4934 % (e.g., titles) where \topskip spacing is used. | |
4935 % | |
4936 % However, as explained on page 78 of the TeXbook, interline spacing is more | |
4937 % complex when \baselineskip is being used (indicated by \prevdepth > | |
4938 % -1000pt). The four optional parameters offset, prevdepth, lineskip limit and | |
4939 % lineskip are assumed to be equal to be 0pt, \prevdepth, \lineskiplimit and | |
4940 % \lineskip, respectively, if they are omitted. | |
4941 % | |
4942 % The prevdepth is the depth of the line before the object, the lineskip limit | |
4943 % specifies how close the top of the object can come to the bottom of the | |
4944 % previous line before \baselineskip is ignored and \lineskip is inserted | |
4945 % between the object and the line above it. Lineskip does not come into | |
4946 % play unless the first line of the object is high enough to "get too close" | |
4947 % (as specified by lineskiplimit) to the line before it. The the prevdepth, | |
4948 % lineskip limit, and lineskip optional parameters are not needed for the | |
4949 % first object/line on a page (i.e., prevdepth <= -1000pt) where the simplier | |
4950 % \topskip spacing rules are in effect. | |
4951 % | |
4952 % Offset is a manual adjustment that is added to the height calculations of | |
4953 % object irrespective of the value of \prevdepth. It is useful when the top | |
4954 % baselineskip will result in a noninteger unit height object placement even | |
4955 % if the object itself has integral height. e.g., a footnotesize baselineskip | |
4956 % is used before the object, thus an offset of, say -3pt, can be given as a | |
4957 % correction. | |
4958 | |
4959 % Common combinations of these parameters include: | |
4960 % | |
4961 % top baselineskip: (and default values for offset, prevdepth, etc.) | |
4962 % \topskip % for objects that appear at the top of a page | |
4963 % \maxdimen % always ignore the height of the top line | |
4964 % 0pt % always consider any positive height of the top line | |
4965 % | |
4966 % for objects to appear inline in normal text: | |
4967 % top baselineskip = \baselineskip | |
4968 % | |
4969 % set prevdepth = -1000pt and top baselineskip = 0pt to consider the | |
4970 % overall height of the object without any other external skip | |
4971 % consideration | |
4972 | |
4973 \newif\if@IEEEquantizevspacestarform % flag to indicate star form | |
4974 \newif\if@IEEEquantizevspaceuseoutdimenreg % flag to indicate output dimen register is to be used | |
4975 % Use our own private registers because the object could contain a | |
4976 % structure that uses the existing tmp scratch pad registers | |
4977 \newdimen\@IEEEquantizeheightA | |
4978 \newdimen\@IEEEquantizeheightB | |
4979 \newdimen\@IEEEquantizeheightC | |
4980 \newdimen\@IEEEquantizeprevdepth % need to save this early as can change | |
4981 \newcount\@IEEEquantizemultiple | |
4982 \newbox\@IEEEquantizeboxA | |
4983 | |
4984 | |
4985 \def\@IEEEquantizevspace{\@ifnextchar [{\@IEEEquantizevspaceuseoutdimenregtrue\@@IEEEquantizevspace}{\@IEEEquantizevspaceuseoutdimenregfalse\@@IEEEquantizevspace[]}} | |
4986 | |
4987 | |
4988 \long\def\@@IEEEquantizevspace[#1]#2{\relax | |
4989 % acquire and store | |
4990 % #1 optional output dimen register | |
4991 % #2 object | |
4992 \edef\@IEEEquantizeoutdimenreg{#1}\relax | |
4993 % allow for object specifications that contain parameters | |
4994 \@IEEEtrantmptoksA={#2}\relax | |
4995 \long\edef\@IEEEquantizeobject{\the\@IEEEtrantmptoksA}\relax | |
4996 \@ifnextchar [{\@@@IEEEquantizevspace}{\@@@IEEEquantizevspace[\relax]}} | |
4997 | |
4998 \long\def\@@@IEEEquantizevspace[#1]#2{\relax | |
4999 % acquire and store | |
5000 % [#1] optional object decl, is \relax if not given by user | |
5001 % #2 top baselineskip | |
5002 % allow for object decl specifications that have parameters | |
5003 \@IEEEtrantmptoksA={#1}\relax | |
5004 \long\edef\@IEEEquantizeobjectdecl{\the\@IEEEtrantmptoksA}\relax | |
5005 \edef\@IEEEquantizetopbaselineskip{#2}\ivIEEEquantizevspace} | |
5006 | |
5007 % acquire optional argument set and store | |
5008 % [offset][prevdepth][lineskip limit][lineskip] | |
5009 \def\ivIEEEquantizevspace{\@ifnextchar [{\@vIEEEquantizevspace}{\@vIEEEquantizevspace[0pt]}} | |
5010 \def\@vIEEEquantizevspace[#1]{\edef\@IEEEquantizeoffset{#1}\@ifnextchar [{\@viIEEEquantizevspace}{\@viIEEEquantizevspace[\prevdepth]}} | |
5011 \def\@viIEEEquantizevspace[#1]{\@IEEEquantizeprevdepth=#1\relax\@ifnextchar [{\@viiIEEEquantizevspace}{\@viiIEEEquantizevspace[\lineskiplimit]}} | |
5012 \def\@viiIEEEquantizevspace[#1]{\edef\@IEEEquantizelineskiplimit{#1}\@ifnextchar [{\@viiiIEEEquantizevspace}{\@viiiIEEEquantizevspace[\lineskip]}} | |
5013 \def\@viiiIEEEquantizevspace[#1]{\edef\@IEEEquantizelineskip{#1}\@ixIEEEquantizevspace} | |
5014 | |
5015 % main routine | |
5016 \def\@ixIEEEquantizevspace#1#2#3{\relax | |
5017 \edef\@IEEEquantizeunitheight{#1}\relax | |
5018 \edef\@IEEEquantizenomvspace{#2}\relax | |
5019 \edef\@IEEEquantizeminvspace{#3}\relax | |
5020 % \@IEEEquantizeoutdimenreg | |
5021 % \@IEEEquantizeobject | |
5022 % \@IEEEquantizeobjectdecl | |
5023 % \@IEEEquantizetopbaselineskip | |
5024 % \@IEEEquantizeoffset | |
5025 % \@IEEEquantizeprevdepth | |
5026 % \@IEEEquantizelineskiplimit | |
5027 % \@IEEEquantizelineskip | |
5028 % \@IEEEquantizeunitheight | |
5029 % \@IEEEquantizenomvspace | |
5030 % \@IEEEquantizeminvspace | |
5031 % get overall height of object | |
5032 \setbox\@IEEEquantizeboxA\vbox{\begingroup\@IEEEquantizeobjectdecl\@IEEEquantizeobject\relax\endgroup}\relax | |
5033 \@IEEEquantizeheightA\ht\@IEEEquantizeboxA\relax | |
5034 % get height of first line of object | |
5035 \setbox\@IEEEquantizeboxA\vtop{\begingroup\@IEEEquantizeobjectdecl\@IEEEquantizeobject\relax\endgroup}\relax | |
5036 \@IEEEquantizeheightB\ht\@IEEEquantizeboxA\relax | |
5037 \ifdim\@IEEEquantizeprevdepth>-1000pt\relax % prevdepth > -1000pf means full baselineskip\lineskip rules in effect | |
5038 % lineskip spacing rule takes effect if height of top line > baselineskip - prevdepth - lineskiplimit, | |
5039 % otherwise the baselineskip rule is in effect and the height of the first line does not matter at all. | |
5040 \@IEEEquantizeheightC=\@IEEEquantizetopbaselineskip\relax | |
5041 \advance\@IEEEquantizeheightC-\@IEEEquantizeprevdepth\relax | |
5042 \advance\@IEEEquantizeheightC-\@IEEEquantizelineskiplimit\relax % this works even though \@IEEEquantizelineskiplimit is a macro because TeX allows --10pt notation | |
5043 \ifdim\@IEEEquantizeheightB>\@IEEEquantizeheightC\relax | |
5044 % lineskip spacing rule is in effect i.e., the object is going to be shifted down relative to the | |
5045 % baselineskip set position by its top line height (already a part of the total height) + prevdepth + lineskip - baselineskip | |
5046 \advance\@IEEEquantizeheightA\@IEEEquantizeprevdepth\relax | |
5047 \advance\@IEEEquantizeheightA\@IEEEquantizelineskip\relax | |
5048 \advance\@IEEEquantizeheightA-\@IEEEquantizetopbaselineskip\relax | |
5049 \else | |
5050 % height of first line <= \@IEEEquantizetopbaselineskip - \@IEEEquantizeprevdepth - \@IEEEquantizelineskiplimit | |
5051 % standard baselineskip rules are in effect, so don't consider height of first line | |
5052 \advance\@IEEEquantizeheightA-\@IEEEquantizeheightB\relax | |
5053 \fi | |
5054 % | |
5055 \else % prevdepth <= -1000pt, simplier \topskip type rules in effect | |
5056 \ifdim\@IEEEquantizeheightB>\@IEEEquantizetopbaselineskip | |
5057 % height of top line (already included in the total height) in excess of | |
5058 % baselineskip is the amount it will be downshifted | |
5059 \advance\@IEEEquantizeheightA-\@IEEEquantizetopbaselineskip\relax | |
5060 \else | |
5061 % height of first line is irrelevant, remove it | |
5062 \advance\@IEEEquantizeheightA-\@IEEEquantizeheightB\relax | |
5063 \fi | |
5064 \fi % prevdepth <= -1000pt | |
5065 % | |
5066 % adjust height for any manual offset | |
5067 \advance\@IEEEquantizeheightA\@IEEEquantizeoffset\relax | |
5068 % add in nominal spacer | |
5069 \advance\@IEEEquantizeheightA\@IEEEquantizenomvspace\relax | |
5070 % check for nonzero unitheight | |
5071 \@IEEEquantizeheightB=\@IEEEquantizeunitheight\relax | |
5072 \ifnum\@IEEEquantizeheightB=0\relax | |
5073 \@IEEEclspkgerror{IEEEquantizevspace unit height cannot be zero. Assuming 10pt.}% | |
5074 {Division by zero is not allowed.} | |
5075 \@IEEEquantizeheightB=10pt\relax | |
5076 \fi | |
5077 % get integer number of lines | |
5078 \@IEEEquantizemultiple=\@IEEEquantizeheightA\relax | |
5079 \divide\@IEEEquantizemultiple\@IEEEquantizeheightB\relax | |
5080 % set A to contain the excess height over the \@IEEEquantizemultiple of lines | |
5081 % A = height - multiple*unitheight | |
5082 \@IEEEquantizeheightC\@IEEEquantizeheightB\relax | |
5083 \multiply\@IEEEquantizeheightC\@IEEEquantizemultiple\relax | |
5084 \advance\@IEEEquantizeheightA-\@IEEEquantizeheightC\relax | |
5085 % set B to contain the height short of \@IEEEquantizemultiple+1 of lines | |
5086 % B = unitheight - A | |
5087 \advance\@IEEEquantizeheightB-\@IEEEquantizeheightA\relax | |
5088 % choose A or B based on which is closer | |
5089 \@IEEEquantizeheightC\@IEEEquantizenomvspace\relax | |
5090 \ifdim\@IEEEquantizeheightA<\@IEEEquantizeheightB\relax | |
5091 % C = nomvspace - A, go with lower | |
5092 \advance\@IEEEquantizeheightC-\@IEEEquantizeheightA\relax | |
5093 \else | |
5094 % C = nomvspace + B, go with upper | |
5095 \advance\@IEEEquantizeheightC\@IEEEquantizeheightB\relax | |
5096 \fi | |
5097 % if violate lower bound, use next integer bound | |
5098 \ifdim\@IEEEquantizeheightC<\@IEEEquantizeminvspace\relax | |
5099 % A + B = unitheight | |
5100 \advance\@IEEEquantizeheightC\@IEEEquantizeheightA\relax | |
5101 \advance\@IEEEquantizeheightC\@IEEEquantizeheightB\relax | |
5102 \fi | |
5103 % export object and spacer outside of group | |
5104 \global\let\@IEEEquantizeobjectout\@IEEEquantizeobject\relax | |
5105 \global\@IEEEquantizeheightC\@IEEEquantizeheightC\relax | |
5106 \endgroup | |
5107 \if@IEEEquantizevspaceuseoutdimenreg | |
5108 \@IEEEquantizeoutdimenreg=\@IEEEquantizeheightC\relax | |
5109 \else | |
5110 \@IEEEquantizeobjectout\relax | |
5111 \vskip\@IEEEquantizeheightC\relax | |
5112 \fi} | |
5113 | |
5114 | |
5115 % user command to disable all global assignments, possible use within object decl | |
5116 \def\IEEEquantizedisableglobal{\let\global\relax | |
5117 \let\gdef\def | |
5118 \let\xdef\edef} | |
5119 % user command to allow for the disabling of \thanks and other commands, possible use within object decl | |
5120 \def\IEEEquantizedisabletitlecmds{\long\def\thanks##1{\relax}\relax | |
5121 \long\def\IEEEcompsocitemizethanks##1{\relax}\def\newpage{\relax}} | |
5122 | |
5123 | |
5124 | |
5125 | |
5126 | |
5127 % V1.6 | |
5128 % we allow the user access to the last part of the title area | |
5129 % useful in emergencies such as when a different spacing is needed | |
5130 % This text is NOT compensated for in the dynamic sizer. | |
5131 \let\@IEEEaftertitletext=\relax | |
5132 \long\def\IEEEaftertitletext#1{\def\@IEEEaftertitletext{#1}} | |
5133 | |
5134 | |
5135 % V1.7 provide a way for users to enter abstract and keywords | |
5136 % into the onecolumn title are. This text is compensated for | |
5137 % in the dynamic sizer. | |
5138 \let\@IEEEtitleabstractindextext=\relax | |
5139 \long\def\IEEEtitleabstractindextext#1{\def\@IEEEtitleabstractindextext{#1}} | |
5140 | |
5141 % V1.7 provide a way for users to get the \@IEEEtitleabstractindextext if | |
5142 % not in compsoc or transmag journal mode - this way abstract and keywords | |
5143 % can still be placed in their conventional position if not in those modes. | |
5144 \def\IEEEdisplaynontitleabstractindextext{% | |
5145 % display for all conference formats | |
5146 \ifCLASSOPTIONconference\@IEEEtitleabstractindextext\relax | |
5147 \else% non-conferences | |
5148 % V1.8a display for all technotes | |
5149 \ifCLASSOPTIONtechnote\@IEEEtitleabstractindextext\relax | |
5150 % V1.8a add diamond line after abstract and index terms for compsoc technotes | |
5151 \@IEEEcompsoconly{\noindent\hfill\IEEEcompsocdiamondline\hfill\hbox{}\par}\relax | |
5152 \else % non-conferences and non-technotes | |
5153 \ifCLASSOPTIONcompsoc% display if not compsoc and not transmag | |
5154 \else | |
5155 \ifCLASSOPTIONtransmag | |
5156 \else% not compsoc journal nor transmag journal | |
5157 \@IEEEtitleabstractindextext\relax | |
5158 \fi | |
5159 \fi | |
5160 \fi | |
5161 \fi} | |
5162 | |
5163 | |
5164 % command to allow alteration of baselinestretch, but only if the current | |
5165 % baselineskip is unity. Used to tweak the compsoc abstract and keywords line spacing. | |
5166 \def\@IEEEtweakunitybaselinestretch#1{{\def\baselinestretch{1}\selectfont | |
5167 \global\@tempskipa\baselineskip}\ifnum\@tempskipa=\baselineskip% | |
5168 \def\baselinestretch{#1}\selectfont\fi\relax} | |
5169 | |
5170 | |
5171 % abstract and keywords are in \small, except | |
5172 % for 9pt docs in which they are in \footnotesize | |
5173 % Because 9pt docs use an 8pt footnotesize, \small | |
5174 % becomes a rather awkward 8.5pt | |
5175 \def\@IEEEabskeysecsize{\small} | |
5176 \ifx\CLASSOPTIONpt\@IEEEptsizenine | |
5177 \def\@IEEEabskeysecsize{\footnotesize} | |
5178 \fi | |
5179 | |
5180 % compsoc journals use \footnotesize, compsoc conferences use normalsize | |
5181 \@IEEEcompsoconly{\def\@IEEEabskeysecsize{\footnotesize}} | |
5182 \@IEEEcompsocconfonly{\def\@IEEEabskeysecsize{\small}} | |
5183 | |
5184 | |
5185 % V1.6 have abstract and keywords strip leading spaces, pars and newlines | |
5186 % so that spacing is more tightly controlled. | |
5187 \def\abstract{\normalfont | |
5188 \if@twocolumn | |
5189 \@IEEEabskeysecsize\bfseries\textit{\abstractname}---\relax | |
5190 \else | |
5191 \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize | |
5192 \fi\@IEEEgobbleleadPARNLSP} | |
5193 % V1.6 IEEE wants only 1 pica from end of abstract to introduction heading when in | |
5194 % conference mode (the heading already has this much above it) | |
5195 \def\endabstract{\relax\ifCLASSOPTIONconference\vspace{0ex}\else\vspace{1.34ex}\fi\par\if@twocolumn\else\endquotation\fi | |
5196 \normalfont\normalsize} | |
5197 | |
5198 \def\IEEEkeywords{\normalfont | |
5199 \if@twocolumn | |
5200 \@IEEEabskeysecsize\bfseries\textit{\IEEEkeywordsname}---\relax | |
5201 \else | |
5202 \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize | |
5203 \fi\@IEEEgobbleleadPARNLSP} | |
5204 \def\endIEEEkeywords{\relax\ifCLASSOPTIONtechnote\vspace{1.34ex}\else\vspace{0.67ex}\fi | |
5205 \par\if@twocolumn\else\endquotation\fi% | |
5206 \normalfont\normalsize} | |
5207 | |
5208 % V1.7 compsoc keywords index terms | |
5209 \ifCLASSOPTIONcompsoc | |
5210 \ifCLASSOPTIONconference% compsoc conference | |
5211 \def\abstract{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\bfseries | |
5212 \if@twocolumn | |
5213 \@IEEEabskeysecsize\noindent\textit{\abstractname}---\relax | |
5214 \else | |
5215 \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize% | |
5216 \fi\@IEEEgobbleleadPARNLSP} | |
5217 \def\IEEEkeywords{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\bfseries | |
5218 \if@twocolumn | |
5219 \@IEEEabskeysecsize\vskip 0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip\noindent | |
5220 \textit{\IEEEkeywordsname}---\relax | |
5221 \else | |
5222 \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize% | |
5223 \fi\@IEEEgobbleleadPARNLSP} | |
5224 \else% compsoc not conference | |
5225 \def\abstract{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\sffamily | |
5226 \if@twocolumn | |
5227 \@IEEEabskeysecsize\noindent\textbf{\abstractname}---\relax | |
5228 \else | |
5229 \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize% | |
5230 \fi\@IEEEgobbleleadPARNLSP} | |
5231 \def\IEEEkeywords{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\sffamily | |
5232 \if@twocolumn | |
5233 \@IEEEabskeysecsize\vskip 0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip\noindent | |
5234 \textbf{\IEEEkeywordsname}---\relax | |
5235 \else | |
5236 \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize% | |
5237 \fi\@IEEEgobbleleadPARNLSP} | |
5238 \fi | |
5239 \fi | |
5240 | |
5241 % V1.8 transmag keywords index terms | |
5242 % no abstract name, use indentation | |
5243 \ifCLASSOPTIONtransmag | |
5244 \def\abstract{\normalfont\parindent 1em\relax | |
5245 \if@twocolumn | |
5246 \@IEEEabskeysecsize\bfseries\indent | |
5247 \else | |
5248 \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize | |
5249 \textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize | |
5250 \fi\@IEEEgobbleleadPARNLSP} | |
5251 | |
5252 \def\IEEEkeywords{\normalfont\parindent 1em\relax | |
5253 \if@twocolumn | |
5254 \@IEEEabskeysecsize\vspace{1\baselineskip}\bfseries\indent\textit{\IEEEkeywordsname}---\relax | |
5255 \else | |
5256 \bgroup\par\vspace{1\baselineskip}\centering\@IEEEabskeysecsize | |
5257 \textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize | |
5258 \fi\@IEEEgobbleleadPARNLSP} | |
5259 \fi | |
5260 | |
5261 | |
5262 | |
5263 % gobbles all leading \, \\ and \par, upon finding first token that | |
5264 % is not a \ , \\ or a \par, it ceases and returns that token | |
5265 % | |
5266 % used to strip leading \, \\ and \par from the input | |
5267 % so that such things in the beginning of an environment will not | |
5268 % affect the formatting of the text | |
5269 \long\def\@IEEEgobbleleadPARNLSP#1{\let\@IEEEswallowthistoken=0% | |
5270 \let\@IEEEgobbleleadPARNLSPtoken#1% | |
5271 \let\@IEEEgobbleleadPARtoken=\par% | |
5272 \let\@IEEEgobbleleadNLtoken=\\% | |
5273 \let\@IEEEgobbleleadSPtoken=\ % | |
5274 \def\@IEEEgobbleleadSPMACRO{\ }% | |
5275 \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadPARtoken% | |
5276 \let\@IEEEswallowthistoken=1% | |
5277 \fi% | |
5278 \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadNLtoken% | |
5279 \let\@IEEEswallowthistoken=1% | |
5280 \fi% | |
5281 \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadSPtoken% | |
5282 \let\@IEEEswallowthistoken=1% | |
5283 \fi% | |
5284 % a control space will come in as a macro | |
5285 % when it is the last one on a line | |
5286 \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadSPMACRO% | |
5287 \let\@IEEEswallowthistoken=1% | |
5288 \fi% | |
5289 % if we have to swallow this token, do so and taste the next one | |
5290 % else spit it out and stop gobbling | |
5291 \ifx\@IEEEswallowthistoken 1\let\@IEEEnextgobbleleadPARNLSP=\@IEEEgobbleleadPARNLSP\else% | |
5292 \let\@IEEEnextgobbleleadPARNLSP=#1\fi% | |
5293 \@IEEEnextgobbleleadPARNLSP}% | |
5294 | |
5295 | |
5296 | |
5297 | |
5298 % TITLING OF SECTIONS | |
5299 \def\@IEEEsectpunct{:\ \,} % Punctuation after run-in section heading (headings which are | |
5300 % part of the paragraphs), need little bit more than a single space | |
5301 % spacing from section number to title | |
5302 % compsoc conferences use regular period/space punctuation | |
5303 \ifCLASSOPTIONcompsoc | |
5304 \ifCLASSOPTIONconference | |
5305 \def\@IEEEsectpunct{.\ } | |
5306 \fi\fi | |
5307 | |
5308 | |
5309 \def\@seccntformat#1{\csname the#1dis\endcsname\hskip 0.5em\relax} | |
5310 | |
5311 \ifCLASSOPTIONcompsoc | |
5312 % compsoc journals need extra spacing | |
5313 \ifCLASSOPTIONconference\else | |
5314 \def\@seccntformat#1{\csname the#1dis\endcsname\hskip 1em\relax} | |
5315 \fi\fi | |
5316 | |
5317 %v1.7 put {} after #6 to allow for some types of user font control | |
5318 %and use \@@par rather than \par | |
5319 \def\@sect#1#2#3#4#5#6[#7]#8{% | |
5320 \ifnum #2>\c@secnumdepth | |
5321 \let\@svsec\@empty | |
5322 \else | |
5323 \refstepcounter{#1}% | |
5324 % load section label and spacer into \@svsec | |
5325 \protected@edef\@svsec{\@seccntformat{#1}\relax}% | |
5326 \fi% | |
5327 \@tempskipa #5\relax | |
5328 \ifdim \@tempskipa>\z@% tempskipa determines whether is treated as a high | |
5329 \begingroup #6{\relax% or low level heading | |
5330 \noindent % subsections are NOT indented | |
5331 % print top level headings. \@svsec is label, #8 is heading title | |
5332 % IEEE does not block indent the section title text, it flows like normal | |
5333 {\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\@@par}}% | |
5334 \endgroup | |
5335 \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth\relax\else | |
5336 \protect\numberline{\csname the#1\endcsname}\fi#7}% | |
5337 \else % printout low level headings | |
5338 % svsechd seems to swallow the trailing space, protect it with \mbox{} | |
5339 % got rid of sectionmark stuff | |
5340 \def\@svsechd{#6{\hskip #3\relax\@svsec #8\@IEEEsectpunct\mbox{}}% | |
5341 \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth\relax\else | |
5342 \protect\numberline{\csname the#1\endcsname}\fi#7}}% | |
5343 \fi%skip down | |
5344 \@xsect{#5}} | |
5345 | |
5346 | |
5347 % section* handler | |
5348 %v1.7 put {} after #4 to allow for some types of user font control | |
5349 %and use \@@par rather than \par | |
5350 \def\@ssect#1#2#3#4#5{\@tempskipa #3\relax | |
5351 \ifdim \@tempskipa>\z@ | |
5352 %\begingroup #4\@hangfrom{\hskip #1}{\interlinepenalty \@M #5\par}\endgroup | |
5353 % IEEE does not block indent the section title text, it flows like normal | |
5354 \begingroup \noindent #4{\relax{\hskip #1}{\interlinepenalty \@M #5\@@par}}\endgroup | |
5355 % svsechd swallows the trailing space, protect it with \mbox{} | |
5356 \else \def\@svsechd{#4{\hskip #1\relax #5\@IEEEsectpunct\mbox{}}}\fi | |
5357 \@xsect{#3}} | |
5358 | |
5359 | |
5360 %% SECTION heading spacing and font | |
5361 %% | |
5362 % arguments are: #1 - sectiontype name | |
5363 % (for \@sect) #2 - section level | |
5364 % #3 - section heading indent | |
5365 % #4 - top separation (absolute value used, neg indicates not to indent main text) | |
5366 % If negative, make stretch parts negative too! | |
5367 % #5 - (absolute value used) positive: bottom separation after heading, | |
5368 % negative: amount to indent main text after heading | |
5369 % Both #4 and #5 negative means to indent main text and use negative top separation | |
5370 % #6 - font control | |
5371 % You've got to have \normalfont\normalsize in the font specs below to prevent | |
5372 % trouble when you do something like: | |
5373 % \section{Note}{\ttfamily TT-TEXT} is known to ... | |
5374 % IEEE sometimes REALLY stretches the area before a section | |
5375 % heading by up to about 0.5in. However, it may not be a good | |
5376 % idea to let LaTeX have quite this much rubber. | |
5377 \ifCLASSOPTIONconference% | |
5378 % IEEE wants section heading spacing to decrease for conference mode | |
5379 \def\section{\@startsection{section}{1}{\z@}{1.5ex plus 1.5ex minus 0.5ex}% | |
5380 {0.7ex plus 1ex minus 0ex}{\normalfont\normalsize\centering\scshape}}% | |
5381 \def\subsection{\@startsection{subsection}{2}{\z@}{1.5ex plus 1.5ex minus 0.5ex}% | |
5382 {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}% | |
5383 \else % for journals | |
5384 \def\section{\@startsection{section}{1}{\z@}{3.0ex plus 1.5ex minus 1.5ex}% V1.6 3.0ex from 3.5ex | |
5385 {0.7ex plus 1ex minus 0ex}{\normalfont\normalsize\centering\scshape}}% | |
5386 \def\subsection{\@startsection{subsection}{2}{\z@}{3.5ex plus 1.5ex minus 1.5ex}% | |
5387 {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}% | |
5388 \fi | |
5389 | |
5390 % for both journals and conferences | |
5391 % decided to put in a little rubber above the section, might help somebody | |
5392 \def\subsubsection{\@startsection{subsubsection}{3}{\parindent}{0ex plus 0.1ex minus 0.1ex}% | |
5393 {0ex}{\normalfont\normalsize\itshape}}% | |
5394 \def\paragraph{\@startsection{paragraph}{4}{2\parindent}{0ex plus 0.1ex minus 0.1ex}% | |
5395 {0ex}{\normalfont\normalsize\itshape}}% | |
5396 | |
5397 | |
5398 % compsoc | |
5399 \ifCLASSOPTIONcompsoc | |
5400 \ifCLASSOPTIONconference | |
5401 % compsoc conference | |
5402 \def\section{\@startsection{section}{1}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}% | |
5403 {1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}{\normalfont\large\bfseries}}% | |
5404 \def\subsection{\@startsection{subsection}{2}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}% | |
5405 {1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}{\normalfont\sublargesize\bfseries}}% | |
5406 \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}% | |
5407 {0ex}{\normalfont\normalsize\bfseries}}% | |
5408 \def\paragraph{\@startsection{paragraph}{4}{2\parindent}{0ex plus 0.1ex minus 0.1ex}% | |
5409 {0ex}{\normalfont\normalsize}}% | |
5410 \else% compsoc journals | |
5411 % use negative top separation as compsoc journals do not indent paragraphs after section titles | |
5412 \def\section{\@startsection{section}{1}{\z@}{-3.5ex plus -2ex minus -1.5ex}% | |
5413 {0.7ex plus 1ex minus 0ex}{\normalfont\sublargesize\sffamily\bfseries\scshape}}% | |
5414 % Note that subsection and smaller may not be correct for the Computer Society, | |
5415 % I have to look up an example. | |
5416 \def\subsection{\@startsection{subsection}{2}{\z@}{-3.5ex plus -1.5ex minus -1.5ex}% | |
5417 {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\sffamily\bfseries}}% | |
5418 \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.5ex plus -1ex minus -1ex}% | |
5419 {0.5ex plus 0.5ex minus 0ex}{\normalfont\normalsize\sffamily\itshape}}% | |
5420 \def\paragraph{\@startsection{paragraph}{4}{2\parindent}{-0ex plus -0.1ex minus -0.1ex}% | |
5421 {0ex}{\normalfont\normalsize}}% | |
5422 \fi\fi | |
5423 | |
5424 % transmag | |
5425 \ifCLASSOPTIONtransmag | |
5426 \def\subsection{\@startsection{subsection}{2}{0.75\parindent}{3.5ex plus 1.5ex minus 1.5ex}% | |
5427 {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}% | |
5428 \def\subsubsection{\@startsection{subsubsection}{3}{1.25\parindent}{0.1ex plus 0.1ex minus 0.1ex}% | |
5429 {0.1ex}{\normalfont\normalsize\itshape}}% | |
5430 \fi | |
5431 | |
5432 | |
5433 % V1.8a provide for a raised line Introduction section for use with Computer | |
5434 % Society papers. We have to remove any spacing glue after the section | |
5435 % heading and then remove the blank line for the new paragraph after it. | |
5436 % LaTeX's section handler alters \everypar and we need to propogate those | |
5437 % changes outside of the \parbox lest there be spacing problems at the top | |
5438 % of the next section. | |
5439 \def\IEEEraisesectionheading#1{\noindent\raisebox{1.5\baselineskip}[0pt][0pt]{\parbox[b]{\columnwidth}{#1\unskip\global\everypar=\everypar}}\vspace{-1\baselineskip}\vspace{-\parskip}\par} | |
5440 | |
5441 | |
5442 | |
5443 %% ENVIRONMENTS | |
5444 % "box" symbols at end of proofs | |
5445 \def\IEEEQEDclosed{\mbox{\rule[0pt]{1.3ex}{1.3ex}}} % for a filled box | |
5446 % V1.6 some journals use an open box instead that will just fit around a closed one | |
5447 \def\IEEEQEDopen{{\setlength{\fboxsep}{0pt}\setlength{\fboxrule}{0.2pt}\fbox{\rule[0pt]{0pt}{1.3ex}\rule[0pt]{1.3ex}{0pt}}}} | |
5448 \ifCLASSOPTIONcompsoc | |
5449 \def\IEEEQED{\IEEEQEDopen} % default to open for compsoc | |
5450 \else | |
5451 \def\IEEEQED{\IEEEQEDclosed} % otherwise default to closed | |
5452 \fi | |
5453 | |
5454 %V1.8 flag to indicate if QED symbol is to be shown | |
5455 \newif\if@IEEEQEDshow \@IEEEQEDshowtrue | |
5456 \def\IEEEproofindentspace{2\parindent}% V1.8 allow user to change indentation amount if desired | |
5457 % v1.7 name change to avoid namespace collision with amsthm. Also add support | |
5458 % for an optional argument. | |
5459 \def\IEEEproof{\@ifnextchar[{\@IEEEproof}{\@IEEEproof[\IEEEproofname]}} | |
5460 \def\@IEEEproof[#1]{\@IEEEQEDshowtrue\par\noindent\hspace{\IEEEproofindentspace}{\itshape #1: }} | |
5461 \def\endIEEEproof{\if@IEEEQEDshow\hspace*{\fill}\nobreakspace\IEEEQED\fi\par} | |
5462 % qedhere for equation environments, similar to AMS \qedhere | |
5463 \def\IEEEQEDhereeqn{\global\@IEEEQEDshowfalse\eqno\let\eqno\relax\let\leqno\relax | |
5464 \let\veqno\relax\hbox{\IEEEQED}} | |
5465 % IEEE style qedhere for IEEEeqnarray and other environments | |
5466 \def\IEEEQEDhere{\global\@IEEEQEDshowfalse\IEEEQED} | |
5467 % command to disable QED at end of IEEEproof | |
5468 \def\IEEEQEDoff{\global\@IEEEQEDshowfalse} | |
5469 | |
5470 | |
5471 %\itemindent is set to \z@ by list, so define new temporary variable | |
5472 \newdimen\@IEEEtmpitemindent | |
5473 | |
5474 \ifCLASSOPTIONcompsoc | |
5475 % V1.8a compsoc uses bold theorem titles, a period instead of a colon, vertical spacing, and hanging indentation | |
5476 % V1.8 allow long theorem names to break across lines. | |
5477 % Thanks to Miquel Payaro for reporting this. | |
5478 \def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\relax | |
5479 \topsep 0.2\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip | |
5480 \rmfamily\trivlist\hangindent\parindent% | |
5481 \item[]\textit{\bfseries\noindent #1\ #2.} \itemindent\@IEEEtmpitemindent\relax} | |
5482 \def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\relax | |
5483 \topsep 0.2\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip | |
5484 \rmfamily\trivlist\hangindent\parindent% | |
5485 % V1.6 IEEE is back to using () around theorem names which are also in italics | |
5486 % Thanks to Christian Peel for reporting this. | |
5487 \item[]\textit{\bfseries\noindent #1\ #2\ (#3).} \itemindent\@IEEEtmpitemindent\relax} | |
5488 % V1.7 remove bogus \unskip that caused equations in theorems to collide with | |
5489 % lines below. | |
5490 \def\@endtheorem{\endtrivlist\vskip 0.25\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip} | |
5491 \else | |
5492 % | |
5493 % noncompsoc | |
5494 % | |
5495 % V1.8 allow long theorem names to break across lines. | |
5496 % Thanks to Miquel Payaro for reporting this. | |
5497 \def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\relax\topsep 0pt\rmfamily\trivlist% | |
5498 \item[]\textit{\indent #1\ #2:} \itemindent\@IEEEtmpitemindent\relax} | |
5499 \def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\relax\topsep 0pt\rmfamily \trivlist% | |
5500 % V1.6 IEEE is back to using () around theorem names which are also in italics | |
5501 % Thanks to Christian Peel for reporting this. | |
5502 \item[]\textit{\indent #1\ #2\ (#3):} \itemindent\@IEEEtmpitemindent\relax} | |
5503 % V1.7 remove bogus \unskip that caused equations in theorems to collide with | |
5504 % lines below. | |
5505 \def\@endtheorem{\endtrivlist} | |
5506 \fi | |
5507 | |
5508 | |
5509 | |
5510 % V1.6 | |
5511 % display command for the section the theorem is in - so that \thesection | |
5512 % is not used as this will be in Roman numerals when we want arabic. | |
5513 % LaTeX2e uses \def\@thmcounter#1{\noexpand\arabic{#1}} for the theorem number | |
5514 % (second part) display and \def\@thmcountersep{.} as a separator. | |
5515 % V1.7 intercept calls to the section counter and reroute to \@IEEEthmcounterinsection | |
5516 % to allow \appendix(ices} to override as needed. | |
5517 % | |
5518 % special handler for sections, allows appendix(ices) to override | |
5519 \gdef\@IEEEthmcounterinsection#1{\arabic{#1}} | |
5520 % string macro | |
5521 \edef\@IEEEstringsection{section} | |
5522 | |
5523 % redefine the #1#2[#3] form of newtheorem to use a hook to \@IEEEthmcounterinsection | |
5524 % if section in_counter is used | |
5525 \def\@xnthm#1#2[#3]{% | |
5526 \expandafter\@ifdefinable\csname #1\endcsname | |
5527 {\@definecounter{#1}\@newctr{#1}[#3]% | |
5528 \edef\@IEEEstringtmp{#3} | |
5529 \ifx\@IEEEstringtmp\@IEEEstringsection | |
5530 \expandafter\xdef\csname the#1\endcsname{% | |
5531 \noexpand\@IEEEthmcounterinsection{#3}\@thmcountersep | |
5532 \@thmcounter{#1}}% | |
5533 \else | |
5534 \expandafter\xdef\csname the#1\endcsname{% | |
5535 \expandafter\noexpand\csname the#3\endcsname \@thmcountersep | |
5536 \@thmcounter{#1}}% | |
5537 \fi | |
5538 \global\@namedef{#1}{\@thm{#1}{#2}}% | |
5539 \global\@namedef{end#1}{\@endtheorem}}} | |
5540 | |
5541 | |
5542 | |
5543 %% SET UP THE DEFAULT PAGESTYLE | |
5544 \ps@headings | |
5545 \pagenumbering{arabic} | |
5546 | |
5547 % normally the page counter starts at 1 | |
5548 \setcounter{page}{1} | |
5549 % however, for peerreview the cover sheet is page 0 or page -1 | |
5550 % (for duplex printing) | |
5551 \ifCLASSOPTIONpeerreview | |
5552 \if@twoside | |
5553 \setcounter{page}{-1} | |
5554 \else | |
5555 \setcounter{page}{0} | |
5556 \fi | |
5557 \fi | |
5558 | |
5559 % standard book class behavior - let bottom line float up and down as | |
5560 % needed when single sided | |
5561 \ifCLASSOPTIONtwoside\else\raggedbottom\fi | |
5562 % if two column - turn on twocolumn, allow word spacings to stretch more and | |
5563 % enforce a rigid position for the last lines | |
5564 \ifCLASSOPTIONtwocolumn | |
5565 % the peer review option delays invoking twocolumn | |
5566 \ifCLASSOPTIONpeerreview\else | |
5567 \twocolumn | |
5568 \fi | |
5569 \sloppy | |
5570 \flushbottom | |
5571 \fi | |
5572 | |
5573 | |
5574 | |
5575 | |
5576 % \APPENDIX and \APPENDICES definitions | |
5577 | |
5578 % This is the \@ifmtarg command from the LaTeX ifmtarg package | |
5579 % by Peter Wilson (CUA) and Donald Arseneau | |
5580 % \@ifmtarg is used to determine if an argument to a command | |
5581 % is present or not. | |
5582 % For instance: | |
5583 % \@ifmtarg{#1}{\typeout{empty}}{\typeout{has something}} | |
5584 % \@ifmtarg is used with our redefined \section command if | |
5585 % \appendices is invoked. | |
5586 % The command \section will behave slightly differently depending | |
5587 % on whether the user specifies a title: | |
5588 % \section{My appendix title} | |
5589 % or not: | |
5590 % \section{} | |
5591 % This way, we can eliminate the blank lines where the title | |
5592 % would be, and the unneeded : after Appendix in the table of | |
5593 % contents | |
5594 \begingroup | |
5595 \catcode`\Q=3 | |
5596 \long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil} | |
5597 \long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4} | |
5598 \endgroup | |
5599 % end of \@ifmtarg defs | |
5600 | |
5601 | |
5602 % V1.7 | |
5603 % command that allows the one time saving of the original definition | |
5604 % of section to \@IEEEappendixsavesection for \appendix or \appendices | |
5605 % we don't save \section here as it may be redefined later by other | |
5606 % packages (hyperref.sty, etc.) | |
5607 \def\@IEEEsaveoriginalsectiononce{\let\@IEEEappendixsavesection\section | |
5608 \let\@IEEEsaveoriginalsectiononce\relax} | |
5609 | |
5610 % neat trick to grab and process the argument from \section{argument} | |
5611 % we process differently if the user invoked \section{} with no | |
5612 % argument (title) | |
5613 % note we reroute the call to the old \section* | |
5614 \def\@IEEEprocessthesectionargument#1{% | |
5615 \@ifmtarg{#1}{% | |
5616 \@IEEEappendixsavesection*{\appendixname\nobreakspace\thesectiondis}% | |
5617 \addcontentsline{toc}{section}{\appendixname\nobreakspace\thesection}}{% | |
5618 \@IEEEappendixsavesection*{\appendixname\nobreakspace\thesectiondis\\* #1}% | |
5619 \addcontentsline{toc}{section}{\appendixname\nobreakspace\thesection: #1}}} | |
5620 | |
5621 % we use this if the user calls \section{} after | |
5622 % \appendix-- which has no meaning. So, we ignore the | |
5623 % command and its argument. Then, warn the user. | |
5624 \def\@IEEEdestroythesectionargument#1{\typeout{** WARNING: Ignoring useless | |
5625 \protect\section\space in Appendix (line \the\inputlineno).}} | |
5626 | |
5627 | |
5628 % remember \thesection forms will be displayed in \ref calls | |
5629 % and in the Table of Contents. | |
5630 % The \sectiondis form is used in the actual heading itself | |
5631 | |
5632 % appendix command for one single appendix | |
5633 % normally has no heading. However, if you want a | |
5634 % heading, you can do so via the optional argument: | |
5635 % \appendix[Optional Heading] | |
5636 \def\appendix{\relax} | |
5637 \renewcommand{\appendix}[1][]{\@IEEEsaveoriginalsectiononce\par | |
5638 % v1.6 keep hyperref's identifiers unique | |
5639 \gdef\theHsection{Appendix.A}% | |
5640 % v1.6 adjust hyperref's string name for the section | |
5641 \xdef\Hy@chapapp{appendix}% | |
5642 \setcounter{section}{0}% | |
5643 \setcounter{subsection}{0}% | |
5644 \setcounter{subsubsection}{0}% | |
5645 \setcounter{paragraph}{0}% | |
5646 \gdef\thesection{A}% | |
5647 \gdef\thesectiondis{}% | |
5648 \gdef\thesubsection{\Alph{subsection}}% | |
5649 \gdef\@IEEEthmcounterinsection##1{A} | |
5650 \refstepcounter{section}% update the \ref counter | |
5651 \@ifmtarg{#1}{\@IEEEappendixsavesection*{\appendixname}% | |
5652 \addcontentsline{toc}{section}{\appendixname}}{% | |
5653 \@IEEEappendixsavesection*{\appendixname\nobreakspace\\* #1}% | |
5654 \addcontentsline{toc}{section}{\appendixname: #1}}% | |
5655 % redefine \section command for appendix | |
5656 % leave \section* as is | |
5657 \def\section{\@ifstar{\@IEEEappendixsavesection*}{% | |
5658 \@IEEEdestroythesectionargument}}% throw out the argument | |
5659 % of the normal form | |
5660 } | |
5661 | |
5662 | |
5663 | |
5664 % appendices command for multiple appendices | |
5665 % user then calls \section with an argument (possibly empty) to | |
5666 % declare the individual appendices | |
5667 \def\appendices{\@IEEEsaveoriginalsectiononce\par | |
5668 % v1.6 keep hyperref's identifiers unique | |
5669 \gdef\theHsection{Appendix.\Alph{section}}% | |
5670 % v1.6 adjust hyperref's string name for the section | |
5671 \xdef\Hy@chapapp{appendix}% | |
5672 \setcounter{section}{-1}% we want \refstepcounter to use section 0 | |
5673 \setcounter{subsection}{0}% | |
5674 \setcounter{subsubsection}{0}% | |
5675 \setcounter{paragraph}{0}% | |
5676 \ifCLASSOPTIONromanappendices% | |
5677 \gdef\thesection{\Roman{section}}% | |
5678 \gdef\thesectiondis{\Roman{section}}% | |
5679 \@IEEEcompsocconfonly{\gdef\thesectiondis{\Roman{section}.}}% | |
5680 \gdef\@IEEEthmcounterinsection##1{A\arabic{##1}} | |
5681 \else% | |
5682 \gdef\thesection{\Alph{section}}% | |
5683 \gdef\thesectiondis{\Alph{section}}% | |
5684 \@IEEEcompsocconfonly{\gdef\thesectiondis{\Alph{section}.}}% | |
5685 \gdef\@IEEEthmcounterinsection##1{\Alph{##1}} | |
5686 \fi% | |
5687 \refstepcounter{section}% update the \ref counter | |
5688 \setcounter{section}{0}% NEXT \section will be the FIRST appendix | |
5689 % redefine \section command for appendices | |
5690 % leave \section* as is | |
5691 \def\section{\@ifstar{\@IEEEappendixsavesection*}{% process the *-form | |
5692 \refstepcounter{section}% or is a new section so, | |
5693 \@IEEEprocessthesectionargument}}% process the argument | |
5694 % of the normal form | |
5695 } | |
5696 | |
5697 | |
5698 | |
5699 % \IEEEPARstart | |
5700 % Definition for the big two line drop cap letter at the beginning of the | |
5701 % first paragraph of journal papers. The first argument is the first letter | |
5702 % of the first word, the second argument is the remaining letters of the | |
5703 % first word which will be rendered in upper case. | |
5704 % In V1.6 this has been completely rewritten to: | |
5705 % | |
5706 % 1. no longer have problems when the user begins an environment | |
5707 % within the paragraph that uses \IEEEPARstart. | |
5708 % 2. auto-detect and use the current font family | |
5709 % 3. revise handling of the space at the end of the first word so that | |
5710 % interword glue will now work as normal. | |
5711 % 4. produce correctly aligned edges for the (two) indented lines. | |
5712 % | |
5713 % We generalize things via control macros - playing with these is fun too. | |
5714 % | |
5715 % V1.7 added more control macros to make it easy for IEEEtrantools.sty users | |
5716 % to change the font style. | |
5717 % | |
5718 % the number of lines that are indented to clear it | |
5719 % may need to increase if using decenders | |
5720 \def\@IEEEPARstartDROPLINES{2} | |
5721 % minimum number of lines left on a page to allow a \@IEEEPARstart | |
5722 % Does not take into consideration rubber shrink, so it tends to | |
5723 % be overly cautious | |
5724 \def\@IEEEPARstartMINPAGELINES{2} | |
5725 % V1.7 the height of the drop cap is adjusted to match the height of this text | |
5726 % in the current font (when \IEEEPARstart is called). | |
5727 \def\@IEEEPARstartHEIGHTTEXT{T} | |
5728 % the depth the letter is lowered below the baseline | |
5729 % the height (and size) of the letter is determined by the sum | |
5730 % of this value and the height of the \@IEEEPARstartHEIGHTTEXT in the current | |
5731 % font. It is a good idea to set this value in terms of the baselineskip | |
5732 % so that it can respond to changes therein. | |
5733 \def\@IEEEPARstartDROPDEPTH{1.1\baselineskip} | |
5734 % V1.7 the font the drop cap will be rendered in, | |
5735 % can take zero or one argument. | |
5736 \def\@IEEEPARstartFONTSTYLE{\bfseries} | |
5737 % V1.7 any additional, non-font related commands needed to modify | |
5738 % the drop cap letter, can take zero or one argument. | |
5739 \def\@IEEEPARstartCAPSTYLE{\MakeUppercase} | |
5740 % V1.7 the font that will be used to render the rest of the word, | |
5741 % can take zero or one argument. | |
5742 \def\@IEEEPARstartWORDFONTSTYLE{\relax} | |
5743 % V1.7 any additional, non-font related commands needed to modify | |
5744 % the rest of the word, can take zero or one argument. | |
5745 \def\@IEEEPARstartWORDCAPSTYLE{\MakeUppercase} | |
5746 % This is the horizontal separation distance from the drop letter to the main text. | |
5747 % Lengths that depend on the font (e.g., ex, em, etc.) will be referenced | |
5748 % to the font that is active when \IEEEPARstart is called. | |
5749 \def\@IEEEPARstartSEP{0.15em} | |
5750 % V1.7 horizontal offset applied to the left of the drop cap. | |
5751 \def\@IEEEPARstartHOFFSET{0em} | |
5752 % V1.7 Italic correction command applied at the end of the drop cap. | |
5753 \def\@IEEEPARstartITLCORRECT{\/} | |
5754 | |
5755 % V1.7 compoc uses nonbold drop cap and small caps word style | |
5756 \ifCLASSOPTIONcompsoc | |
5757 \def\@IEEEPARstartFONTSTYLE{\mdseries} | |
5758 \def\@IEEEPARstartWORDFONTSTYLE{\scshape} | |
5759 \def\@IEEEPARstartWORDCAPSTYLE{\relax} | |
5760 \fi | |
5761 | |
5762 % definition of \IEEEPARstart | |
5763 % THIS IS A CONTROLLED SPACING AREA, DO NOT ALLOW SPACES WITHIN THESE LINES | |
5764 % | |
5765 % The token \@IEEEPARstartfont will be globally defined after the first use | |
5766 % of \IEEEPARstart and will be a font command which creates the big letter | |
5767 % The first argument is the first letter of the first word and the second | |
5768 % argument is the rest of the first word(s). | |
5769 \def\IEEEPARstart#1#2{\par{% | |
5770 % if this page does not have enough space, break it and lets start | |
5771 % on a new one | |
5772 \@IEEEtranneedspace{\@IEEEPARstartMINPAGELINES\baselineskip}{\relax}% | |
5773 % V1.7 move this up here in case user uses \textbf for \@IEEEPARstartFONTSTYLE | |
5774 % which uses command \leavevmode which causes an unwanted \indent to be issued | |
5775 \noindent | |
5776 % calculate the desired height of the big letter | |
5777 % it extends from the top of \@IEEEPARstartHEIGHTTEXT in the current font | |
5778 % down to \@IEEEPARstartDROPDEPTH below the current baseline | |
5779 \settoheight{\@IEEEtrantmpdimenA}{\@IEEEPARstartHEIGHTTEXT}% | |
5780 \addtolength{\@IEEEtrantmpdimenA}{\@IEEEPARstartDROPDEPTH}% | |
5781 % extract the name of the current font in bold | |
5782 % and place it in \@IEEEPARstartFONTNAME | |
5783 \def\@IEEEPARstartGETFIRSTWORD##1 ##2\relax{##1}% | |
5784 {\@IEEEPARstartFONTSTYLE{\selectfont\edef\@IEEEPARstartFONTNAMESPACE{\fontname\font\space}% | |
5785 \xdef\@IEEEPARstartFONTNAME{\expandafter\@IEEEPARstartGETFIRSTWORD\@IEEEPARstartFONTNAMESPACE\relax}}}% | |
5786 % define a font based on this name with a point size equal to the desired | |
5787 % height of the drop letter | |
5788 \font\@IEEEPARstartsubfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenA\relax% | |
5789 % save this value as a counter (integer) value (sp points) | |
5790 \@IEEEtrantmpcountA=\@IEEEtrantmpdimenA% | |
5791 % now get the height of the actual letter produced by this font size | |
5792 \settoheight{\@IEEEtrantmpdimenB}{\@IEEEPARstartsubfont\@IEEEPARstartCAPSTYLE{#1}}% | |
5793 % If something bogus happens like the first argument is empty or the | |
5794 % current font is strange, do not allow a zero height. | |
5795 \ifdim\@IEEEtrantmpdimenB=0pt\relax% | |
5796 \typeout{** WARNING: IEEEPARstart drop letter has zero height! (line \the\inputlineno)}% | |
5797 \typeout{ Forcing the drop letter font size to 10pt.}% | |
5798 \@IEEEtrantmpdimenB=10pt% | |
5799 \fi% | |
5800 % and store it as a counter | |
5801 \@IEEEtrantmpcountB=\@IEEEtrantmpdimenB% | |
5802 % Since a font size doesn't exactly correspond to the height of the capital | |
5803 % letters in that font, the actual height of the letter, \@IEEEtrantmpcountB, | |
5804 % will be less than that desired, \@IEEEtrantmpcountA | |
5805 % we need to raise the font size, \@IEEEtrantmpdimenA | |
5806 % by \@IEEEtrantmpcountA / \@IEEEtrantmpcountB | |
5807 % But, TeX doesn't have floating point division, so we have to use integer | |
5808 % division. Hence the use of the counters. | |
5809 % We need to reduce the denominator so that the loss of the remainder will | |
5810 % have minimal affect on the accuracy of the result | |
5811 \divide\@IEEEtrantmpcountB by 200% | |
5812 \divide\@IEEEtrantmpcountA by \@IEEEtrantmpcountB% | |
5813 % Then reequalize things when we use TeX's ability to multiply by | |
5814 % floating point values | |
5815 \@IEEEtrantmpdimenB=0.005\@IEEEtrantmpdimenA% | |
5816 \multiply\@IEEEtrantmpdimenB by \@IEEEtrantmpcountA% | |
5817 % \@IEEEPARstartfont is globaly set to the calculated font of the big letter | |
5818 % We need to carry this out of the local calculation area to to create the | |
5819 % big letter. | |
5820 \global\font\@IEEEPARstartfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenB% | |
5821 % Now set \@IEEEtrantmpdimenA to the width of the big letter | |
5822 % We need to carry this out of the local calculation area to set the | |
5823 % hanging indent | |
5824 \settowidth{\global\@IEEEtrantmpdimenA}{\@IEEEPARstartfont | |
5825 \@IEEEPARstartCAPSTYLE{#1\@IEEEPARstartITLCORRECT}}}% | |
5826 % end of the isolated calculation environment | |
5827 % add in the extra clearance we want | |
5828 \advance\@IEEEtrantmpdimenA by \@IEEEPARstartSEP\relax% | |
5829 % add in the optional offset | |
5830 \advance\@IEEEtrantmpdimenA by \@IEEEPARstartHOFFSET\relax% | |
5831 % V1.7 don't allow negative offsets to produce negative hanging indents | |
5832 \@IEEEtrantmpdimenB\@IEEEtrantmpdimenA | |
5833 \ifnum\@IEEEtrantmpdimenB < 0 \@IEEEtrantmpdimenB 0pt\fi | |
5834 % \@IEEEtrantmpdimenA has the width of the big letter plus the | |
5835 % separation space and \@IEEEPARstartfont is the font we need to use | |
5836 % Now, we make the letter and issue the hanging indent command | |
5837 % The letter is placed in a box of zero width and height so that other | |
5838 % text won't be displaced by it. | |
5839 \hangindent\@IEEEtrantmpdimenB\hangafter=-\@IEEEPARstartDROPLINES% | |
5840 \makebox[0pt][l]{\hspace{-\@IEEEtrantmpdimenA}% | |
5841 \raisebox{-\@IEEEPARstartDROPDEPTH}[0pt][0pt]{\hspace{\@IEEEPARstartHOFFSET}% | |
5842 \@IEEEPARstartfont\@IEEEPARstartCAPSTYLE{#1\@IEEEPARstartITLCORRECT}% | |
5843 \hspace{\@IEEEPARstartSEP}}}% | |
5844 {\@IEEEPARstartWORDFONTSTYLE{\@IEEEPARstartWORDCAPSTYLE{\selectfont#2}}}} | |
5845 | |
5846 | |
5847 | |
5848 | |
5849 | |
5850 | |
5851 % determines if the space remaining on a given page is equal to or greater | |
5852 % than the specified space of argument one | |
5853 % if not, execute argument two (only if the remaining space is greater than zero) | |
5854 % and issue a \newpage | |
5855 % | |
5856 % example: \@IEEEtranneedspace{2in}{\vfill} | |
5857 % | |
5858 % Does not take into consideration rubber shrinkage, so it tends to | |
5859 % be overly cautious | |
5860 % Based on an example posted by Donald Arseneau | |
5861 % Note this macro uses \@IEEEtrantmpdimenB internally for calculations, | |
5862 % so DO NOT PASS \@IEEEtrantmpdimenB to this routine | |
5863 % if you need a dimen register, import with \@IEEEtrantmpdimenA instead | |
5864 \def\@IEEEtranneedspace#1#2{\penalty-100\begingroup%shield temp variable | |
5865 \@IEEEtrantmpdimenB\pagegoal\advance\@IEEEtrantmpdimenB-\pagetotal% space left | |
5866 \ifdim #1>\@IEEEtrantmpdimenB\relax% not enough space left | |
5867 \ifdim\@IEEEtrantmpdimenB>\z@\relax #2\fi% | |
5868 \newpage% | |
5869 \fi\endgroup} | |
5870 | |
5871 | |
5872 | |
5873 % IEEEbiography ENVIRONMENT | |
5874 % Allows user to enter biography leaving place for picture (adapts to font size) | |
5875 % As of V1.5, a new optional argument allows you to have a real graphic! | |
5876 % V1.5 and later also fixes the "colliding biographies" which could happen when a | |
5877 % biography's text was shorter than the space for the photo. | |
5878 % MDS 7/2001 | |
5879 % V1.6 prevent multiple biographies from making multiple TOC entries | |
5880 \newif\if@IEEEbiographyTOCentrynotmade | |
5881 \global\@IEEEbiographyTOCentrynotmadetrue | |
5882 | |
5883 % biography counter so hyperref can jump directly to the biographies | |
5884 % and not just the previous section | |
5885 \newcounter{IEEEbiography} | |
5886 \setcounter{IEEEbiography}{0} | |
5887 | |
5888 % photo area size | |
5889 \def\@IEEEBIOphotowidth{1.0in} % width of the biography photo area | |
5890 \def\@IEEEBIOphotodepth{1.25in} % depth (height) of the biography photo area | |
5891 % area cleared for photo | |
5892 \def\@IEEEBIOhangwidth{1.14in} % width cleared for the biography photo area | |
5893 \def\@IEEEBIOhangdepth{1.25in} % depth cleared for the biography photo area | |
5894 % actual depth will be a multiple of | |
5895 % \baselineskip, rounded up | |
5896 \def\@IEEEBIOskipN{4\baselineskip}% nominal value of the vskip above the biography | |
5897 | |
5898 \newenvironment{IEEEbiography}[2][]{\normalfont\@IEEEcompsoconly{\sffamily}\footnotesize% | |
5899 \unitlength 1in\parskip=0pt\par\parindent 1em\interlinepenalty500% | |
5900 % we need enough space to support the hanging indent | |
5901 % the nominal value of the spacer | |
5902 % and one extra line for good measure | |
5903 \@IEEEtrantmpdimenA=\@IEEEBIOhangdepth% | |
5904 \advance\@IEEEtrantmpdimenA by \@IEEEBIOskipN% | |
5905 \advance\@IEEEtrantmpdimenA by 1\baselineskip% | |
5906 % if this page does not have enough space, break it and lets start | |
5907 % with a new one | |
5908 \@IEEEtranneedspace{\@IEEEtrantmpdimenA}{\relax}% | |
5909 % nominal spacer can strech, not shrink use 1fil so user can out stretch with \vfill | |
5910 \vskip \@IEEEBIOskipN plus 1fil minus 0\baselineskip% | |
5911 % the default box for where the photo goes | |
5912 \def\@IEEEtempbiographybox{{\setlength{\fboxsep}{0pt}\framebox{% | |
5913 \begin{minipage}[b][\@IEEEBIOphotodepth][c]{\@IEEEBIOphotowidth}\centering PLACE\\ PHOTO\\ HERE \end{minipage}}}}% | |
5914 % | |
5915 % detect if the optional argument was supplied, this requires the | |
5916 % \@ifmtarg command as defined in the appendix section above | |
5917 % and if so, override the default box with what they want | |
5918 \@ifmtarg{#1}{\relax}{\def\@IEEEtempbiographybox{\mbox{\begin{minipage}[b][\@IEEEBIOphotodepth][c]{\@IEEEBIOphotowidth}% | |
5919 \centering% | |
5920 #1% | |
5921 \end{minipage}}}}% end if optional argument supplied | |
5922 % Make an entry into the table of contents only if we have not done so before | |
5923 \if@IEEEbiographyTOCentrynotmade% | |
5924 % link labels to the biography counter so hyperref will jump | |
5925 % to the biography, not the previous section | |
5926 \setcounter{IEEEbiography}{-1}% | |
5927 \refstepcounter{IEEEbiography}% | |
5928 \addcontentsline{toc}{section}{Biographies}% | |
5929 \global\@IEEEbiographyTOCentrynotmadefalse% | |
5930 \fi% | |
5931 % one more biography | |
5932 \refstepcounter{IEEEbiography}% | |
5933 % Make an entry for this name into the table of contents | |
5934 \addcontentsline{toc}{subsection}{#2}% | |
5935 % V1.6 properly handle if a new paragraph should occur while the | |
5936 % hanging indent is still active. Do this by redefining \par so | |
5937 % that it will not start a new paragraph. (But it will appear to the | |
5938 % user as if it did.) Also, strip any leading pars, newlines, or spaces. | |
5939 \let\@IEEEBIOORGparCMD=\par% save the original \par command | |
5940 \edef\par{\hfil\break\indent}% the new \par will not be a "real" \par | |
5941 \settoheight{\@IEEEtrantmpdimenA}{\@IEEEtempbiographybox}% get height of biography box | |
5942 \@IEEEtrantmpdimenB=\@IEEEBIOhangdepth% | |
5943 \@IEEEtrantmpcountA=\@IEEEtrantmpdimenB% countA has the hang depth | |
5944 \divide\@IEEEtrantmpcountA by \baselineskip% calculates lines needed to produce the hang depth | |
5945 \advance\@IEEEtrantmpcountA by 1% ensure we overestimate | |
5946 % set the hanging indent | |
5947 \hangindent\@IEEEBIOhangwidth% | |
5948 \hangafter-\@IEEEtrantmpcountA% | |
5949 % reference the top of the photo area to the top of a capital T | |
5950 \settoheight{\@IEEEtrantmpdimenB}{\mbox{T}}% | |
5951 % set the photo box, give it zero width and height so as not to disturb anything | |
5952 \noindent\makebox[0pt][l]{\hspace{-\@IEEEBIOhangwidth}\raisebox{\@IEEEtrantmpdimenB}[0pt][0pt]{% | |
5953 \raisebox{-\@IEEEBIOphotodepth}[0pt][0pt]{\@IEEEtempbiographybox}}}% | |
5954 % now place the author name and begin the bio text | |
5955 \noindent\textbf{#2\ }\@IEEEgobbleleadPARNLSP}{\relax\let\par=\@IEEEBIOORGparCMD\par% | |
5956 % 7/2001 V1.5 detect when the biography text is shorter than the photo area | |
5957 % and pad the unused area - preventing a collision from the next biography entry | |
5958 % MDS | |
5959 \ifnum \prevgraf <\@IEEEtrantmpcountA\relax% detect when the biography text is shorter than the photo | |
5960 \advance\@IEEEtrantmpcountA by -\prevgraf% calculate how many lines we need to pad | |
5961 \advance\@IEEEtrantmpcountA by -1\relax% we compensate for the fact that we indented an extra line | |
5962 \@IEEEtrantmpdimenA=\baselineskip% calculate the length of the padding | |
5963 \multiply\@IEEEtrantmpdimenA by \@IEEEtrantmpcountA% | |
5964 \noindent\rule{0pt}{\@IEEEtrantmpdimenA}% insert an invisible support strut | |
5965 \fi% | |
5966 \par\normalfont} | |
5967 | |
5968 | |
5969 | |
5970 % V1.6 | |
5971 % added biography without a photo environment | |
5972 \newenvironment{IEEEbiographynophoto}[1]{% | |
5973 % Make an entry into the table of contents only if we have not done so before | |
5974 \if@IEEEbiographyTOCentrynotmade% | |
5975 % link labels to the biography counter so hyperref will jump | |
5976 % to the biography, not the previous section | |
5977 \setcounter{IEEEbiography}{-1}% | |
5978 \refstepcounter{IEEEbiography}% | |
5979 \addcontentsline{toc}{section}{Biographies}% | |
5980 \global\@IEEEbiographyTOCentrynotmadefalse% | |
5981 \fi% | |
5982 % one more biography | |
5983 \refstepcounter{IEEEbiography}% | |
5984 % Make an entry for this name into the table of contents | |
5985 \addcontentsline{toc}{subsection}{#1}% | |
5986 \normalfont\@IEEEcompsoconly{\sffamily}\footnotesize\interlinepenalty500% | |
5987 \vskip 4\baselineskip plus 1fil minus 0\baselineskip% | |
5988 \parskip=0pt\par% | |
5989 \noindent\textbf{#1\ }\@IEEEgobbleleadPARNLSP}{\relax\par\normalfont} | |
5990 | |
5991 | |
5992 % provide the user with some old font commands | |
5993 % got this from article.cls | |
5994 \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} | |
5995 \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} | |
5996 \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} | |
5997 \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} | |
5998 \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} | |
5999 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} | |
6000 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} | |
6001 \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} | |
6002 \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} | |
6003 | |
6004 | |
6005 % SPECIAL PAPER NOTICE COMMANDS | |
6006 % | |
6007 % holds the special notice text | |
6008 \def\@IEEEspecialpapernotice{\relax} | |
6009 | |
6010 % for special papers, like invited papers, the user can do: | |
6011 % \IEEEspecialpapernotice{(Invited Paper)} before \maketitle | |
6012 \def\IEEEspecialpapernotice#1{\ifCLASSOPTIONconference% | |
6013 \def\@IEEEspecialpapernotice{{\sublargesize\textit{#1}\vspace*{1em}}}% | |
6014 \else% | |
6015 \def\@IEEEspecialpapernotice{{\\*[1.5ex]\sublargesize\textit{#1}}\vspace*{-2ex}}% | |
6016 \fi} | |
6017 | |
6018 | |
6019 | |
6020 | |
6021 % PUBLISHER ID COMMANDS | |
6022 % to insert a publisher's ID footer | |
6023 % V1.6 \IEEEpubid has been changed so that the change in page size and style | |
6024 % occurs in \maketitle. \IEEEpubid must now be issued prior to \maketitle | |
6025 % use \IEEEpubidadjcol as before - in the second column of the title page | |
6026 % These changes allow \maketitle to take the reduced page height into | |
6027 % consideration when dynamically setting the space between the author | |
6028 % names and the maintext. | |
6029 % | |
6030 % the amount the main text is pulled up to make room for the | |
6031 % publisher's ID footer | |
6032 % IEEE uses about 1.3\baselineskip for journals, | |
6033 % dynamic title spacing will clean up the fraction | |
6034 \def\@IEEEpubidpullup{1.3\baselineskip} | |
6035 \ifCLASSOPTIONtechnote | |
6036 % for technotes it must be an integer of baselineskip as there can be no | |
6037 % dynamic title spacing for two column mode technotes (the title is in the | |
6038 % in first column) and we should maintain an integer number of lines in the | |
6039 % second column | |
6040 % There are some examples (such as older issues of "Transactions on | |
6041 % Information Theory") in which IEEE really pulls the text off the ID for | |
6042 % technotes - about 0.55in (or 4\baselineskip). We'll use 2\baselineskip | |
6043 % and call it even. | |
6044 \def\@IEEEpubidpullup{2\baselineskip} | |
6045 \fi | |
6046 | |
6047 % V1.7 compsoc does not use a pullup | |
6048 \ifCLASSOPTIONcompsoc | |
6049 \def\@IEEEpubidpullup{0pt} | |
6050 \fi | |
6051 | |
6052 % holds the ID text | |
6053 \def\@IEEEpubid{\relax} | |
6054 | |
6055 % flag so \maketitle can tell if \IEEEpubid was called | |
6056 \newif\if@IEEEusingpubid | |
6057 \global\@IEEEusingpubidfalse | |
6058 % issue this command in the page to have the ID at the bottom | |
6059 % V1.6 use before \maketitle | |
6060 \def\IEEEpubid#1{\def\@IEEEpubid{#1}\global\@IEEEusingpubidtrue} | |
6061 | |
6062 | |
6063 % command which will pull up (shorten) the column it is executed in | |
6064 % to make room for the publisher ID. Place in the second column of | |
6065 % the title page when using \IEEEpubid | |
6066 % Is smart enough not to do anything when in single column text or | |
6067 % if the user hasn't called \IEEEpubid | |
6068 % currently needed in for the second column of a page with the | |
6069 % publisher ID. If not needed in future releases, please provide this | |
6070 % command and define it as \relax for backward compatibility | |
6071 % v1.6b do not allow command to operate if the peer review option has been | |
6072 % selected because \IEEEpubidadjcol will not be on the cover page. | |
6073 % V1.7 do nothing if compsoc | |
6074 \def\IEEEpubidadjcol{\ifCLASSOPTIONcompsoc\else\ifCLASSOPTIONpeerreview\else | |
6075 \if@twocolumn\if@IEEEusingpubid\enlargethispage{-\@IEEEpubidpullup}\fi\fi\fi\fi} | |
6076 | |
6077 % Special thanks to Peter Wilson, Daniel Luecking, and the other | |
6078 % gurus at comp.text.tex, for helping me to understand how best to | |
6079 % implement the IEEEpubid command in LaTeX. | |
6080 | |
6081 | |
6082 | |
6083 %% Lockout some commands under various conditions | |
6084 | |
6085 % general purpose bit bucket | |
6086 \newsavebox{\@IEEEtranrubishbin} | |
6087 | |
6088 % flags to prevent multiple warning messages | |
6089 \newif\if@IEEEWARNthanks | |
6090 \newif\if@IEEEWARNIEEEPARstart | |
6091 \newif\if@IEEEWARNIEEEbiography | |
6092 \newif\if@IEEEWARNIEEEbiographynophoto | |
6093 \newif\if@IEEEWARNIEEEpubid | |
6094 \newif\if@IEEEWARNIEEEpubidadjcol | |
6095 \newif\if@IEEEWARNIEEEmembership | |
6096 \newif\if@IEEEWARNIEEEaftertitletext | |
6097 \@IEEEWARNthankstrue | |
6098 \@IEEEWARNIEEEPARstarttrue | |
6099 \@IEEEWARNIEEEbiographytrue | |
6100 \@IEEEWARNIEEEbiographynophototrue | |
6101 \@IEEEWARNIEEEpubidtrue | |
6102 \@IEEEWARNIEEEpubidadjcoltrue | |
6103 \@IEEEWARNIEEEmembershiptrue | |
6104 \@IEEEWARNIEEEaftertitletexttrue | |
6105 | |
6106 | |
6107 %% Lockout some commands when in various modes, but allow them to be restored if needed | |
6108 %% | |
6109 % save commands which might be locked out | |
6110 % so that the user can later restore them if needed | |
6111 \let\@IEEESAVECMDthanks\thanks | |
6112 \let\@IEEESAVECMDIEEEPARstart\IEEEPARstart | |
6113 \let\@IEEESAVECMDIEEEbiography\IEEEbiography | |
6114 \let\@IEEESAVECMDendIEEEbiography\endIEEEbiography | |
6115 \let\@IEEESAVECMDIEEEbiographynophoto\IEEEbiographynophoto | |
6116 \let\@IEEESAVECMDendIEEEbiographynophoto\endIEEEbiographynophoto | |
6117 \let\@IEEESAVECMDIEEEpubid\IEEEpubid | |
6118 \let\@IEEESAVECMDIEEEpubidadjcol\IEEEpubidadjcol | |
6119 \let\@IEEESAVECMDIEEEmembership\IEEEmembership | |
6120 \let\@IEEESAVECMDIEEEaftertitletext\IEEEaftertitletext | |
6121 | |
6122 | |
6123 % disable \IEEEPARstart when in draft mode | |
6124 % This may have originally been done because the pre-V1.6 drop letter | |
6125 % algorithm had problems with a non-unity baselinestretch | |
6126 % At any rate, it seems too formal to have a drop letter in a draft | |
6127 % paper. | |
6128 \ifCLASSOPTIONdraftcls | |
6129 \def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** ATTENTION: \noexpand\IEEEPARstart | |
6130 is disabled in draft mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse} | |
6131 \fi | |
6132 % and for technotes | |
6133 \ifCLASSOPTIONtechnote | |
6134 \def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** WARNING: \noexpand\IEEEPARstart | |
6135 is locked out for technotes (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse} | |
6136 \fi | |
6137 | |
6138 | |
6139 % lockout unneeded commands when in conference mode | |
6140 \ifCLASSOPTIONconference | |
6141 % when locked out, \thanks, \IEEEbiography, \IEEEbiographynophoto, \IEEEpubid, | |
6142 % \IEEEmembership and \IEEEaftertitletext will all swallow their given text. | |
6143 % \IEEEPARstart will output a normal character instead | |
6144 % warn the user about these commands only once to prevent the console screen | |
6145 % from filling up with redundant messages | |
6146 \def\thanks#1{\if@IEEEWARNthanks\typeout{** WARNING: \noexpand\thanks | |
6147 is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNthanksfalse} | |
6148 \def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** WARNING: \noexpand\IEEEPARstart | |
6149 is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse} | |
6150 | |
6151 | |
6152 % LaTeX treats environments and commands with optional arguments differently. | |
6153 % the actual ("internal") command is stored as \\commandname | |
6154 % (accessed via \csname\string\commandname\endcsname ) | |
6155 % the "external" command \commandname is a macro with code to determine | |
6156 % whether or not the optional argument is presented and to provide the | |
6157 % default if it is absent. So, in order to save and restore such a command | |
6158 % we would have to save and restore \\commandname as well. But, if LaTeX | |
6159 % ever changes the way it names the internal names, the trick would break. | |
6160 % Instead let us just define a new environment so that the internal | |
6161 % name can be left undisturbed. | |
6162 \newenvironment{@IEEEbogusbiography}[2][]{\if@IEEEWARNIEEEbiography\typeout{** WARNING: \noexpand\IEEEbiography | |
6163 is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEbiographyfalse% | |
6164 \setbox\@IEEEtranrubishbin\vbox\bgroup}{\egroup\relax} | |
6165 % and make biography point to our bogus biography | |
6166 \let\IEEEbiography=\@IEEEbogusbiography | |
6167 \let\endIEEEbiography=\end@IEEEbogusbiography | |
6168 | |
6169 \renewenvironment{IEEEbiographynophoto}[1]{\if@IEEEWARNIEEEbiographynophoto\typeout{** WARNING: \noexpand\IEEEbiographynophoto | |
6170 is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEbiographynophotofalse% | |
6171 \setbox\@IEEEtranrubishbin\vbox\bgroup}{\egroup\relax} | |
6172 | |
6173 \def\IEEEpubid#1{\if@IEEEWARNIEEEpubid\typeout{** WARNING: \noexpand\IEEEpubid | |
6174 is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEpubidfalse} | |
6175 \def\IEEEpubidadjcol{\if@IEEEWARNIEEEpubidadjcol\typeout{** WARNING: \noexpand\IEEEpubidadjcol | |
6176 is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEpubidadjcolfalse} | |
6177 \def\IEEEmembership#1{\if@IEEEWARNIEEEmembership\typeout{** WARNING: \noexpand\IEEEmembership | |
6178 is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEmembershipfalse} | |
6179 \def\IEEEaftertitletext#1{\if@IEEEWARNIEEEaftertitletext\typeout{** WARNING: \noexpand\IEEEaftertitletext | |
6180 is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEaftertitletextfalse} | |
6181 \fi | |
6182 | |
6183 | |
6184 % provide a way to restore the commands that are locked out | |
6185 \def\IEEEoverridecommandlockouts{% | |
6186 \typeout{** ATTENTION: Overriding command lockouts (line \the\inputlineno).}% | |
6187 \let\thanks\@IEEESAVECMDthanks% | |
6188 \let\IEEEPARstart\@IEEESAVECMDIEEEPARstart% | |
6189 \let\IEEEbiography\@IEEESAVECMDIEEEbiography% | |
6190 \let\endIEEEbiography\@IEEESAVECMDendIEEEbiography% | |
6191 \let\IEEEbiographynophoto\@IEEESAVECMDIEEEbiographynophoto% | |
6192 \let\endIEEEbiographynophoto\@IEEESAVECMDendIEEEbiographynophoto% | |
6193 \let\IEEEpubid\@IEEESAVECMDIEEEpubid% | |
6194 \let\IEEEpubidadjcol\@IEEESAVECMDIEEEpubidadjcol% | |
6195 \let\IEEEmembership\@IEEESAVECMDIEEEmembership% | |
6196 \let\IEEEaftertitletext\@IEEESAVECMDIEEEaftertitletext} | |
6197 | |
6198 | |
6199 | |
6200 % need a backslash character for typeout output | |
6201 {\catcode`\|=0 \catcode`\\=12 | |
6202 |xdef|@IEEEbackslash{\}} | |
6203 | |
6204 | |
6205 % hook to allow easy disabling of all legacy warnings | |
6206 \def\@IEEElegacywarn#1#2{\typeout{** ATTENTION: \@IEEEbackslash #1 is deprecated (line \the\inputlineno). | |
6207 Use \@IEEEbackslash #2 instead.}} | |
6208 | |
6209 | |
6210 % provide some legacy IEEEtran commands | |
6211 \def\IEEEcompsoctitleabstractindextext{\@IEEElegacywarn{IEEEcompsoctitleabstractindextext}{IEEEtitleabstractindextext}\IEEEtitleabstractindextext} | |
6212 \def\IEEEdisplaynotcompsoctitleabstractindextext{\@IEEElegacywarn{IEEEdisplaynotcompsoctitleabstractindextext}{IEEEdisplaynontitleabstractindextext}\IEEEdisplaynontitleabstractindextext} | |
6213 % provide some legacy IEEEtran environments | |
6214 | |
6215 | |
6216 % V1.8a no more support for these legacy commands | |
6217 %\def\authorblockA{\@IEEElegacywarn{authorblockA}{IEEEauthorblockA}\IEEEauthorblockA} | |
6218 %\def\authorblockN{\@IEEElegacywarn{authorblockN}{IEEEauthorblockN}\IEEEauthorblockN} | |
6219 %\def\authorrefmark{\@IEEElegacywarn{authorrefmark}{IEEEauthorrefmark}\IEEEauthorrefmark} | |
6220 %\def\PARstart{\@IEEElegacywarn{PARstart}{IEEEPARstart}\IEEEPARstart} | |
6221 %\def\pubid{\@IEEElegacywarn{pubid}{IEEEpubid}\IEEEpubid} | |
6222 %\def\pubidadjcol{\@IEEElegacywarn{pubidadjcol}{IEEEpubidadjcol}\IEEEpubidadjcol} | |
6223 %\def\specialpapernotice{\@IEEElegacywarn{specialpapernotice}{IEEEspecialpapernotice}\IEEEspecialpapernotice} | |
6224 % and environments | |
6225 %\def\keywords{\@IEEElegacywarn{keywords}{IEEEkeywords}\IEEEkeywords} | |
6226 %\def\endkeywords{\endIEEEkeywords} | |
6227 % V1.8 no more support for legacy IED list commands | |
6228 %\let\labelindent\IEEElabelindent | |
6229 %\def\calcleftmargin{\@IEEElegacywarn{calcleftmargin}{IEEEcalcleftmargin}\IEEEcalcleftmargin} | |
6230 %\def\setlabelwidth{\@IEEElegacywarn{setlabelwidth}{IEEEsetlabelwidth}\IEEEsetlabelwidth} | |
6231 %\def\usemathlabelsep{\@IEEElegacywarn{usemathlabelsep}{IEEEusemathlabelsep}\IEEEusemathlabelsep} | |
6232 %\def\iedlabeljustifyc{\@IEEElegacywarn{iedlabeljustifyc}{IEEEiedlabeljustifyc}\IEEEiedlabeljustifyc} | |
6233 %\def\iedlabeljustifyl{\@IEEElegacywarn{iedlabeljustifyl}{IEEEiedlabeljustifyl}\IEEEiedlabeljustifyl} | |
6234 %\def\iedlabeljustifyr{\@IEEElegacywarn{iedlabeljustifyr}{IEEEiedlabeljustifyr}\IEEEiedlabeljustifyr} | |
6235 % V1.8 no more support for QED and proof stuff | |
6236 %\def\QED{\@IEEElegacywarn{QED}{IEEEQED}\IEEEQED} | |
6237 %\def\QEDclosed{\@IEEElegacywarn{QEDclosed}{IEEEQEDclosed}\IEEEQEDclosed} | |
6238 %\def\QEDopen{\@IEEElegacywarn{QEDopen}{IEEEQEDopen}\IEEEQEDopen} | |
6239 %\AtBeginDocument{\def\proof{\@IEEElegacywarn{proof}{IEEEproof}\IEEEproof}\def\endproof{\endIEEEproof}} | |
6240 % V1.8 no longer support biography or biographynophoto | |
6241 %\def\biography{\@IEEElegacywarn{biography}{IEEEbiography}\IEEEbiography} | |
6242 %\def\biographynophoto{\@IEEElegacywarn{biographynophoto}{IEEEbiographynophoto}\IEEEbiographynophoto} | |
6243 %\def\endbiography{\endIEEEbiography} | |
6244 %\def\endbiographynophoto{\endIEEEbiographynophoto} | |
6245 % V1.7 and later no longer supports \overrideIEEEmargins | |
6246 %\def\overrideIEEEmargins{% | |
6247 %\typeout{** WARNING: \string\overrideIEEEmargins \space no longer supported (line \the\inputlineno).}% | |
6248 %\typeout{** Use the \string\CLASSINPUTinnersidemargin, \string\CLASSINPUToutersidemargin \space controls instead.}} | |
6249 | |
6250 \endinput | |
6251 | |
6252 %%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of IEEEtran.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6253 % That's all folks! | |
6254 |