/articles/toma

To get this branch, use:
bzr branch http://darksoft.org/webbzr/articles/toma

« back to all changes in this revision

Viewing changes to IEEEtran.cls

  • Committer: Suren A. Chilingaryan
  • Date: 2018-06-01 19:04:28 UTC
  • Revision ID: csa@suren.me-20180601190428-unnmuil13xpdlvf1
Revised 8-page version of short paper

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%
2
 
%% IEEEtran.cls 2007/01/11 version V1.7
3
 
%% 
4
 
%% 
5
 
%% This is the official IEEE LaTeX class for authors of the Institute of 
 
2
%% IEEEtran.cls 2015/08/26 version V1.8b
 
3
%% 
 
4
%% This is the IEEEtran LaTeX class for authors of the Institute of 
6
5
%% Electrical and Electronics Engineers (IEEE) Transactions journals and
7
6
%% conferences.
8
7
%% 
9
8
%% Support sites:
10
9
%% http://www.michaelshell.org/tex/ieeetran/
11
 
%% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/
 
10
%% http://www.ctan.org/pkg/ieeetran
12
11
%% and
13
12
%% http://www.ieee.org/
14
13
%%
19
18
%% Contributors:
20
19
%% Gerry Murray (1993), Silvano Balemi (1993),
21
20
%% Jon Dixon (1996), Peter N"uchter (1996),
22
 
%% Juergen von Hagen (2000), and Michael Shell (2001-2007)
 
21
%% Juergen von Hagen (2000), and Michael Shell (2001-2014)
23
22
%% 
24
23
%% 
25
24
%% Copyright (c) 1993-2000 by Gerry Murray, Silvano Balemi, 
26
25
%%                         Jon Dixon, Peter N"uchter,
27
26
%%                         Juergen von Hagen
28
27
%%                         and
29
 
%% Copyright (c) 2001-2007 by Michael Shell
 
28
%% Copyright (c) 2001-2015 by Michael Shell
30
29
%%
31
 
%% Current maintainer (V1.3 to V1.7): Michael Shell
32
 
%%                                    See:
33
 
%%                                    http://www.michaelshell.org/
34
 
%%                                    for current contact information.
 
30
%% Current maintainer (V1.3 to V1.8b): Michael Shell
 
31
%%                                     See:
 
32
%%                                     http://www.michaelshell.org/
 
33
%%                                     for current contact information.
35
34
%%
36
35
%% Special thanks to Peter Wilson (CUA) and Donald Arseneau
37
36
%% for allowing the inclusion of the \@ifmtarg command 
43
42
%% implied; without even the implied warranty of MERCHANTABILITY or
44
43
%% FITNESS FOR A PARTICULAR PURPOSE! 
45
44
%% User assumes all risk.
46
 
%% In no event shall IEEE or any contributor to this code be liable for
 
45
%% In no event shall the IEEE or any contributor to this code be liable for
47
46
%% any damages or losses, including, but not limited to, incidental,
48
47
%% consequential, or any other damages, resulting from the use or misuse
49
48
%% of any information contained here.
61
60
%% ** renaming them and changing author support contact information. **
62
61
%%
63
62
%% File list of work: IEEEtran.cls, IEEEtran_HOWTO.pdf, bare_adv.tex,
64
 
%%                    bare_conf.tex, bare_jrnl.tex, bare_jrnl_compsoc.tex
 
63
%%                    bare_conf.tex, bare_jrnl.tex, bare_conf_compsoc.tex,
 
64
%%                    bare_jrnl_compsoc.tex
65
65
%% 
66
66
%% Major changes to the user interface should be indicated by an 
67
67
%% increase in the version numbers. If a version is a beta, it will 
110
110
%    also want to select onecolumn.
111
111
%    The default is final.
112
112
%
113
 
% letterpaper, a4paper
114
 
%    determines paper size: 8.5in X 11in or 210mm X 297mm. CHANGING THE PAPER
115
 
%    SIZE WILL NOT ALTER THE TYPESETTING OF THE DOCUMENT - ONLY THE MARGINS
116
 
%    WILL BE AFFECTED. In particular, documents using the a4paper option will
 
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
117
118
%    have reduced side margins (A4 is narrower than US letter) and a longer
118
119
%    bottom margin (A4 is longer than US letter). For both cases, the top
119
 
%    margins will be the same and the text will be horizontally centered. 
120
 
%    For final submission to IEEE, authors should use US letter (8.5 X 11in)
121
 
%    paper. Note that authors should ensure that all post-processing 
122
 
%    (ps, pdf, etc.) uses the same paper specificiation as the .tex document.
123
 
%    Problems here are by far the number one reason for incorrect margins.
124
 
%    IEEEtran will automatically set the default paper size under pdflatex 
125
 
%    (without requiring a change to pdftex.cfg), so this issue is more
126
 
%    important to dvips users. Fix config.ps, config.pdf, or ~/.dvipsrc for
127
 
%    dvips, or use the dvips -t papersize option instead as needed. See the
128
 
%    testflow documentation
 
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
129
140
%    http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/testflow
130
141
%    for more details on dvips paper size configuration.
131
142
%    The default is letterpaper.
141
152
%    column mode is usually used only with draft papers.
142
153
%    The default is twocolumn.
143
154
%
144
 
% compsoc
145
 
%    Use the format of the IEEE Computer Society.
 
155
% comsoc, compsoc, transmag
 
156
%    Use the format of the IEEE Communications Society, IEEE Computer Society
 
157
%    or IEEE Transactions on Magnetics, respectively.
146
158
%
147
159
% romanappendices
148
160
%    Use the "Appendix I" convention when numbering appendices. IEEEtran.cls
191
203
 
192
204
 
193
205
 
194
 
\ProvidesClass{IEEEtran}[2007/01/11 V1.7 by Michael Shell]
 
206
\ProvidesClass{IEEEtran}[2015/08/26 V1.8b by Michael Shell]
195
207
\typeout{-- See the "IEEEtran_HOWTO" manual for usage information.}
196
208
\typeout{-- http://www.michaelshell.org/tex/ieeetran/}
197
209
\NeedsTeXFormat{LaTeX2e}
204
216
% KEEP THESE AS INTEGERS! i.e., NO {4a} or anything like that-
205
217
% (no need to enumerate "a" minor changes here)
206
218
\def\IEEEtransversionmajor{1}
207
 
\def\IEEEtransversionminor{7}
 
219
\def\IEEEtransversionminor{8}
 
220
 
 
221
 
 
222
% hook to allow easy changeover to IEEEtran.cls/tools.sty error reporting
 
223
\def\@IEEEclspkgerror{\ClassError{IEEEtran}}
 
224
 
208
225
 
209
226
% These do nothing, but provide them like in article.cls
210
227
\newif\if@restonecol
234
251
 
235
252
\newif\ifCLASSOPTIONcaptionsoff     \CLASSOPTIONcaptionsofffalse
236
253
 
 
254
\newif\ifCLASSOPTIONcomsoc          \CLASSOPTIONcomsocfalse
237
255
\newif\ifCLASSOPTIONcompsoc         \CLASSOPTIONcompsocfalse
 
256
\newif\ifCLASSOPTIONtransmag        \CLASSOPTIONtransmagfalse
238
257
 
239
258
\newif\ifCLASSOPTIONromanappendices \CLASSOPTIONromanappendicesfalse
240
259
 
247
266
 
248
267
% V1.6b internal flag to show if using a4paper
249
268
\newif\if@IEEEusingAfourpaper       \@IEEEusingAfourpaperfalse
250
 
 
 
269
% V1.6b internal flag to show if using cspaper
 
270
\newif\if@IEEEusingcspaper          \@IEEEusingcspaperfalse
251
271
 
252
272
 
253
273
% IEEEtran class scratch pad registers
254
274
% dimen
255
275
\newdimen\@IEEEtrantmpdimenA
256
276
\newdimen\@IEEEtrantmpdimenB
 
277
\newdimen\@IEEEtrantmpdimenC
257
278
% count
258
279
\newcount\@IEEEtrantmpcountA
259
280
\newcount\@IEEEtrantmpcountB
 
281
\newcount\@IEEEtrantmpcountC
260
282
% token list
261
283
\newtoks\@IEEEtrantmptoksA
262
284
 
272
294
 
273
295
 
274
296
 
275
 
\DeclareOption{letterpaper}{\setlength{\paperheight}{11in}%
276
 
                            \setlength{\paperwidth}{8.5in}%
 
297
\DeclareOption{letterpaper}{\setlength{\paperwidth}{8.5in}%
 
298
                            \setlength{\paperheight}{11in}%
277
299
                            \@IEEEusingAfourpaperfalse
 
300
                            \@IEEEusingcspaperfalse
278
301
                            \def\CLASSOPTIONpaper{letter}%
279
302
                            \def\CLASSINFOpaperwidth{8.5in}%
280
303
                            \def\CLASSINFOpaperheight{11in}}
281
304
 
282
305
 
283
 
\DeclareOption{a4paper}{\setlength{\paperheight}{297mm}%
284
 
                        \setlength{\paperwidth}{210mm}%
 
306
\DeclareOption{a4paper}{\setlength{\paperwidth}{210mm}%
 
307
                        \setlength{\paperheight}{297mm}%
285
308
                        \@IEEEusingAfourpapertrue
 
309
                        \@IEEEusingcspaperfalse
286
310
                        \def\CLASSOPTIONpaper{a4}%
287
311
                        \def\CLASSINFOpaperwidth{210mm}%
288
312
                        \def\CLASSINFOpaperheight{297mm}}
289
313
 
 
314
% special paper option for compsoc journals
 
315
\DeclareOption{cspaper}{\setlength{\paperwidth}{7.875in}%
 
316
                        \setlength{\paperheight}{10.75in}%
 
317
                        \@IEEEusingcspapertrue
 
318
                        \@IEEEusingAfourpaperfalse
 
319
                        \def\CLASSOPTIONpaper{ieeecs}%
 
320
                        \def\CLASSINFOpaperwidth{7.875in}%
 
321
                        \def\CLASSINFOpaperheight{10.75in}}
 
322
 
290
323
\DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse
291
324
                        \CLASSOPTIONonesidetrue\CLASSOPTIONtwosidefalse}
292
325
\DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue
293
326
                        \CLASSOPTIONtwosidetrue\CLASSOPTIONonesidefalse}
294
327
 
295
 
\DeclareOption{onecolumn}{\@twocolumnfalse
296
 
                          \CLASSOPTIONonecolumntrue\CLASSOPTIONtwocolumnfalse}
297
 
\DeclareOption{twocolumn}{\@twocolumntrue
298
 
                          \CLASSOPTIONtwocolumntrue\CLASSOPTIONonecolumnfalse}
 
328
\DeclareOption{onecolumn}{\CLASSOPTIONonecolumntrue\CLASSOPTIONtwocolumnfalse}
 
329
\DeclareOption{twocolumn}{\CLASSOPTIONtwocolumntrue\CLASSOPTIONonecolumnfalse}
299
330
 
300
331
% If the user selects draft, then this class AND any packages
301
332
% will go into draft mode.
330
361
 
331
362
\DeclareOption{captionsoff}{\CLASSOPTIONcaptionsofftrue}
332
363
 
333
 
\DeclareOption{compsoc}{\CLASSOPTIONcompsoctrue}
 
364
\DeclareOption{comsoc}{\CLASSOPTIONcomsoctrue\CLASSOPTIONcompsocfalse\CLASSOPTIONtransmagfalse}
 
365
 
 
366
\DeclareOption{compsoc}{\CLASSOPTIONcomsocfalse\CLASSOPTIONcompsoctrue\CLASSOPTIONtransmagfalse}
 
367
 
 
368
\DeclareOption{transmag}{\CLASSOPTIONtransmagtrue\CLASSOPTIONcomsocfalse\CLASSOPTIONcompsocfalse}
334
369
 
335
370
\DeclareOption{romanappendices}{\CLASSOPTIONromanappendicestrue}
336
371
 
342
377
 
343
378
 
344
379
 
 
380
%% -- Command Argument Scanning Support Functions --
 
381
 
 
382
% Sets the category codes for punctuation to their normal values.
 
383
% For local use with argument scanning.
 
384
\def\IEEEnormalcatcodespunct{\catcode`\!=12 \catcode`\,=12 \catcode`\:=12
 
385
\catcode`\;=12 \catcode`\`=12 \catcode`\'=12 \catcode`\"=12 \catcode`\.=12
 
386
\catcode`\/=12 \catcode`\?=12 \catcode`\*=12 \catcode`\+=12 \catcode`\-=12
 
387
\catcode`\<=12 \catcode`\>=12 \catcode`\(=12 \catcode`\)=12 \catcode`\[=12
 
388
\catcode`\]=12 \catcode`\==12 \catcode`\|=12}
 
389
% Sets the category codes for numbers to their normal values.
 
390
% For local use with argument scanning.
 
391
\def\IEEEnormalcatcodesnum{\catcode`\0=12 \catcode`\1=12 \catcode`\2=12
 
392
\catcode`\3=12 \catcode`\4=12 \catcode`\5=12 \catcode`\6=12 \catcode`\7=12
 
393
\catcode`\8=12 \catcode`\9=12}
 
394
% combined action of \IEEEnormalcatcodespunct and \IEEEnormalcatcodesnum
 
395
\def\IEEEnormalcatcodes{\IEEEnormalcatcodespunct\IEEEnormalcatcodesnum}
 
396
 
 
397
 
 
398
% usage: \@IEEEextracttoken*{}
 
399
% \@IEEEextracttoken fully expands its argument (which it then stores in
 
400
% \@IEEEextracttokenarg) via \edef and then the meaning of the first
 
401
% nonbrace (but including the empty group) token found is assigned via \let
 
402
% to \@IEEEextractedtoken as well as stored in the macro
 
403
% \@IEEEextractedtokenmacro. Tokens that would otherwise be discarded during
 
404
% the acquisition of the first are stored in \@IEEEextractedtokensdiscarded,
 
405
% however their original relative brace nesting depths are not guaranteed to
 
406
% be preserved.
 
407
% If the argument is empty, or if a first nonbrace token does not exist (or
 
408
% is an empty group), \@IEEEextractedtoken will be \relax and
 
409
% \@IEEEextractedtokenmacro and \@IEEEextractedtokensdiscarded will be empty.
 
410
%
 
411
% For example:
 
412
% \@IEEEextracttoken{{{ab}{cd}}{{ef}g}}
 
413
% results in:
 
414
%
 
415
% \@IEEEextracttokenarg          ==> a macro containing {{ab}{cd}}{{ef}g}
 
416
% \@IEEEextractedtoken           ==> the letter a
 
417
% \@IEEEextractedtokenmacro      ==> a macro containing a
 
418
% \@IEEEextractedtokensdiscarded ==> a macro containing bcd{ef}g
 
419
%
 
420
% the *-star form, \@IEEEextracttoken*, does not expand its argument
 
421
% contents during processing.
 
422
\def\@IEEEextracttoken{\@ifstar{\let\@IEEEextracttokendef=\def\@@IEEEextracttoken}{\let\@IEEEextracttokendef=\edef\@@IEEEextracttoken}}
 
423
 
 
424
\def\@@IEEEextracttoken#1{\@IEEEextracttokendef\@IEEEextracttokenarg{#1}\relax
 
425
\def\@IEEEextractedtokensdiscarded{}\relax % initialize to empty
 
426
% if the macro is unchanged after being acquired as a single undelimited argument
 
427
% with anything after it being stripped off as a delimited argument
 
428
% we know we have one token without any enclosing braces. loop until this is true.
 
429
\let\@IEEEextracttokencurgroup\@IEEEextracttokenarg
 
430
\loop
 
431
  % trap case of an empty argument as this would cause a problem with
 
432
  % \@@@IEEEextracttoken's first (nondelimited) argument acquisition
 
433
  \ifx\@IEEEextracttokencurgroup\@empty
 
434
    \def\@IEEEextractedtokenmacro{}\relax
 
435
  \else
 
436
    \expandafter\@@@IEEEextracttoken\@IEEEextracttokencurgroup\@IEEEgeneralsequenceDELIMITER\relax
 
437
  \fi
 
438
  \ifx\@IEEEextractedtokenmacro\@IEEEextracttokencurgroup
 
439
  \else
 
440
    \let\@IEEEextracttokencurgroup=\@IEEEextractedtokenmacro
 
441
\repeat
 
442
% we can safely do a \let= here because there should be at most one token
 
443
% the relax is needed to handle the case of no token found
 
444
\expandafter\let\expandafter\@IEEEextractedtoken\@IEEEextractedtokenmacro\relax}
 
445
 
 
446
\def\@@@IEEEextracttoken#1#2\@IEEEgeneralsequenceDELIMITER{\def\@IEEEextractedtokenmacro{#1}\relax
 
447
\def\@@IEEEextractedtokensdiscarded{#2}\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter
 
448
\@IEEEextractedtokensdiscarded\expandafter\expandafter\expandafter
 
449
{\expandafter\@@IEEEextractedtokensdiscarded\@IEEEextractedtokensdiscarded}}
 
450
%%
 
451
%% -- End of Command Argument Scanning Support Functions --
 
452
 
 
453
 
 
454
 
345
455
% Computer Society conditional execution command
346
456
\long\def\@IEEEcompsoconly#1{\relax\ifCLASSOPTIONcompsoc\relax#1\relax\fi\relax}
347
457
% inverse
352
462
\long\def\@IEEEcompsocnotconfonly#1{\relax\ifCLASSOPTIONcompsoc\ifCLASSOPTIONconference\else\relax#1\relax\fi\fi\relax}
353
463
 
354
464
 
355
 
% IEEE uses Times Roman font, so we'll default to Times.
 
465
% comsoc verify that newtxmath, mtpro2, mt11p or mathtime has been loaded
 
466
\def\@IEEEcomsocverifymathfont{\typeout{-- Verifying Times compatible math font.}\relax
 
467
  \@ifpackageloaded{newtxmath}{\typeout{-- newtxmath loaded, OK.}}{\@@IEEEcomsocverifymathfont}}
 
468
\def\@@IEEEcomsocverifymathfont{\@ifpackageloaded{mtpro2}{\typeout{-- mtpro2 loaded, OK.}}{\@@@IEEEcomsocverifymathfont}}
 
469
\def\@@@IEEEcomsocverifymathfont{\@ifpackageloaded{mt11p}{\typeout{-- mt11p2 loaded, OK.}}{\@@@@IEEEcomsocverifymathfont}}
 
470
\def\@@@@IEEEcomsocverifymathfont{\@ifpackageloaded{mathtime}{\typeout{-- mathtime loaded, OK.}}{\@IEEEcomsocenforcemathfont}}
 
471
 
 
472
% comsoc, if a Times math font was not loaded by user, enforce it
 
473
\def\@IEEEcomsocenforcemathfont{\typeout{** Times compatible math font not found, forcing.}\relax
 
474
\IfFileExists{newtxmath.sty}{\typeout{-- Found newtxmath, loading.}\RequirePackage{newtxmath}}{\@@IEEEcomsocenforcemathfont}}
 
475
\def\@@IEEEcomsocenforcemathfont{\IfFileExists{mtpro2.sty}{\typeout{-- Found mtpro2, loading.}\RequirePackage{mtpro2}}{\@@@IEEEcomsocenforcemathfont}}
 
476
\def\@@@IEEEcomsocenforcemathfont{\IfFileExists{mt11p.sty}{\typeout{-- Found mt11p, loading.}\RequirePackage{mt11p}}{\@@@@IEEEcomsocenforcemathfont}}
 
477
\def\@@@@IEEEcomsocenforcemathfont{\IfFileExists{mathtime.sty}{\typeout{-- Found mathtime, loading.}\RequirePackage{mathtime}}{\@@@@@IEEEcomsocenforcemathfont}}
 
478
% if no acceptable Times math font package found, error with newtxmath requirement
 
479
\def\@@@@@IEEEcomsocenforcemathfont{\typeout{** No Times compatible math font package found. newtxmath is required.}\RequirePackage{newtxmath}}
 
480
 
 
481
 
 
482
\ifCLASSOPTIONcomsoc
 
483
  % ensure that if newtxmath is used, the cmintegrals option is also invoked
 
484
  \PassOptionsToPackage{cmintegrals}{newtxmath}
 
485
  % comsoc requires a Times like math font
 
486
  % ensure this requirement is satisfied at document start
 
487
  \AtBeginDocument{\@IEEEcomsocverifymathfont}
 
488
\fi
 
489
 
 
490
 
 
491
 
 
492
% The IEEE uses Times Roman font, so we'll default to Times.
356
493
% These three commands make up the entire times.sty package.
357
494
\renewcommand{\sfdefault}{phv}
358
495
\renewcommand{\rmdefault}{ptm}
359
496
\renewcommand{\ttdefault}{pcr}
360
497
 
361
 
\@IEEEcompsoconly{\typeout{-- Using IEEE Computer Society mode.}}
362
 
 
363
498
% V1.7 compsoc nonconference papers, use Palatino/Palladio as the main text font,
364
499
% not Times Roman.
365
500
\@IEEEcompsocnotconfonly{\renewcommand{\rmdefault}{ppl}}
366
501
 
367
 
% enable Times/Palatino main text font
 
502
% enable the selected main text font
368
503
\normalfont\selectfont
369
504
 
370
505
 
 
506
\ifCLASSOPTIONcomsoc
 
507
  \typeout{-- Using IEEE Communications Society mode.}
 
508
\fi
371
509
 
 
510
\ifCLASSOPTIONcompsoc
 
511
  \typeout{-- Using IEEE Computer Society mode.}
 
512
\fi
372
513
 
373
514
 
374
515
% V1.7 conference notice message hook
390
531
 
391
532
 
392
533
% warn about the use of single column other than for draft mode
393
 
\if@twocolumn\else%
 
534
\ifCLASSOPTIONtwocolumn\else%
394
535
  \ifCLASSOPTIONdraftcls\else%
395
536
   \typeout{** ATTENTION: Single column mode is not typically used with IEEE publications.}%
396
537
  \fi%
465
606
\newdimen\@IEEEnormalsizeunitybaselineskip
466
607
\@IEEEnormalsizeunitybaselineskip\baselineskip
467
608
 
 
609
 
 
610
 
 
611
%% ******* WARNING! *******
 
612
%%
 
613
%% Authors should not alter font sizes, baselineskip ("leading"),
 
614
%% margins or other spacing values in an attempt to squeeze more
 
615
%% material on each page.
 
616
%%
 
617
%% The IEEE's own typesetting software will restore the correct
 
618
%% values when re-typesetting/proofing the submitted document,
 
619
%% possibly resulting in unexpected article over length charges.
 
620
%%
 
621
%% ******* WARNING! *******
 
622
 
 
623
 
 
624
% 9pt option defaults
468
625
\ifx\CLASSOPTIONpt\@IEEEptsizenine
469
626
\typeout{-- This is a 9 point document.}
470
 
\def\normalsize{\@setfontsize{\normalsize}{9}{11.0476pt}}%
471
 
\setlength{\@IEEEnormalsizeunitybaselineskip}{11.0476pt}%
 
627
\def\normalsize{\@setfontsize{\normalsize}{9}{11.0476pt}}
 
628
\setlength{\@IEEEnormalsizeunitybaselineskip}{11.0476pt}
472
629
\normalsize
473
 
\abovedisplayskip 1.5ex plus3pt minus1pt%
474
 
\belowdisplayskip \abovedisplayskip%
475
 
\abovedisplayshortskip 0pt plus3pt%
476
 
\belowdisplayshortskip 1.5ex plus3pt minus1pt
 
630
\abovedisplayskip 1.5ex plus 3pt minus 1pt
 
631
\belowdisplayskip \abovedisplayskip
 
632
\abovedisplayshortskip 0pt plus 3pt
 
633
\belowdisplayshortskip 1.5ex plus 3pt minus 1pt
477
634
\def\small{\@setfontsize{\small}{8.5}{10pt}}
478
635
\def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}}
479
636
\def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}}
486
643
\def\huge{\@setfontsize{\huge}{17}{20pt}}
487
644
\def\Huge{\@setfontsize{\Huge}{20}{24pt}}
488
645
\fi
489
 
 
490
 
 
491
 
% Check if we have selected 10 points
 
646
%
 
647
% 10pt option defaults
492
648
\ifx\CLASSOPTIONpt\@IEEEptsizeten
493
649
\typeout{-- This is a 10 point document.}
494
 
\def\normalsize{\@setfontsize{\normalsize}{10}{12.00pt}}%
495
 
\setlength{\@IEEEnormalsizeunitybaselineskip}{12pt}%
 
650
\def\normalsize{\@setfontsize{\normalsize}{10}{12.00pt}}
 
651
\setlength{\@IEEEnormalsizeunitybaselineskip}{12pt}
496
652
\normalsize
497
 
\abovedisplayskip 1.5ex plus4pt minus2pt%
498
 
\belowdisplayskip \abovedisplayskip%
499
 
\abovedisplayshortskip 0pt plus4pt%
500
 
\belowdisplayshortskip 1.5ex plus4pt minus2pt
 
653
\abovedisplayskip 1.5ex plus 4pt minus 2pt
 
654
\belowdisplayskip \abovedisplayskip
 
655
\abovedisplayshortskip 0pt plus 4pt
 
656
\belowdisplayshortskip 1.5ex plus 4pt minus 2pt
501
657
\def\small{\@setfontsize{\small}{9}{10pt}}
502
658
\def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}}
503
659
\def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}}
510
666
\def\huge{\@setfontsize{\huge}{20}{24pt}}
511
667
\def\Huge{\@setfontsize{\Huge}{24}{28pt}}
512
668
\fi
513
 
 
514
 
 
515
 
% Check if we have selected 11 points
 
669
%
 
670
% 11pt option defaults
516
671
\ifx\CLASSOPTIONpt\@IEEEptsizeeleven
517
672
\typeout{-- This is an 11 point document.}
518
 
\def\normalsize{\@setfontsize{\normalsize}{11}{13.3846pt}}%
519
 
\setlength{\@IEEEnormalsizeunitybaselineskip}{13.3846pt}%
 
673
\def\normalsize{\@setfontsize{\normalsize}{11}{13.3846pt}}
 
674
\setlength{\@IEEEnormalsizeunitybaselineskip}{13.3846pt}
520
675
\normalsize
521
 
\abovedisplayskip 1.5ex plus5pt minus3pt%
522
 
\belowdisplayskip \abovedisplayskip%
523
 
\abovedisplayshortskip 0pt plus5pt%
524
 
\belowdisplayshortskip 1.5ex plus5pt minus3pt
 
676
\abovedisplayskip 1.5ex plus 5pt minus 3pt
 
677
\belowdisplayskip \abovedisplayskip
 
678
\abovedisplayshortskip 0pt plus 5pt
 
679
\belowdisplayshortskip 1.5ex plus 5pt minus 3pt
525
680
\def\small{\@setfontsize{\small}{10}{12pt}}
526
681
\def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}}
527
682
\def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}}
534
689
\def\huge{\@setfontsize{\huge}{20}{24pt}}
535
690
\def\Huge{\@setfontsize{\Huge}{24}{28pt}}
536
691
\fi
537
 
 
538
 
 
539
 
% Check if we have selected 12 points
 
692
%
 
693
% 12pt option defaults
540
694
\ifx\CLASSOPTIONpt\@IEEEptsizetwelve
541
695
\typeout{-- This is a 12 point document.}
542
 
\def\normalsize{\@setfontsize{\normalsize}{12}{13.92pt}}%
543
 
\setlength{\@IEEEnormalsizeunitybaselineskip}{13.92pt}%
 
696
\def\normalsize{\@setfontsize{\normalsize}{12}{13.92pt}}
 
697
\setlength{\@IEEEnormalsizeunitybaselineskip}{13.92pt}
544
698
\normalsize
545
 
\abovedisplayskip 1.5ex plus6pt minus4pt%
546
 
\belowdisplayskip \abovedisplayskip%
547
 
\abovedisplayshortskip 0pt plus6pt%
548
 
\belowdisplayshortskip 1.5ex plus6pt minus4pt
 
699
\abovedisplayskip 1.5ex plus 6pt minus 4pt
 
700
\belowdisplayskip \abovedisplayskip
 
701
\abovedisplayshortskip 0pt plus 6pt
 
702
\belowdisplayshortskip 1.5ex plus 6pt minus 4pt
549
703
\def\small{\@setfontsize{\small}{10}{12pt}}
550
704
\def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}}
551
705
\def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}}
560
714
\fi
561
715
 
562
716
 
 
717
 
 
718
% V1.8a compsoc font sizes
 
719
% compsoc font sizes use bp "Postscript" point units (1/72in) 
 
720
% rather than the traditional pt (1/72.27)
 
721
\ifCLASSOPTIONcompsoc
 
722
% -- compsoc defaults --
 
723
% ** will override some of these values later **
 
724
% 9pt
 
725
\ifx\CLASSOPTIONpt\@IEEEptsizenine
 
726
\def\normalsize{\@setfontsize{\normalsize}{9bp}{11bp}}
 
727
\setlength{\@IEEEnormalsizeunitybaselineskip}{11bp}
 
728
\normalsize
 
729
\abovedisplayskip 1.5ex plus 3bp minus 1bp
 
730
\belowdisplayskip \abovedisplayskip
 
731
\abovedisplayshortskip 0bp plus 3bp
 
732
\belowdisplayshortskip 1.5ex plus 3bp minus 1bp
 
733
\def\small{\@setfontsize{\small}{8.5bp}{10bp}}
 
734
\def\footnotesize{\@setfontsize{\footnotesize}{8bp}{9bp}}
 
735
\def\scriptsize{\@setfontsize{\scriptsize}{7bp}{8bp}}
 
736
\def\tiny{\@setfontsize{\tiny}{5bp}{6bp}}
 
737
% sublargesize is the same as large - 10bp
 
738
\def\sublargesize{\@setfontsize{\sublargesize}{10bp}{12bp}}
 
739
\def\large{\@setfontsize{\large}{10bp}{12bp}}
 
740
\def\Large{\@setfontsize{\Large}{12bp}{14bp}}
 
741
\def\LARGE{\@setfontsize{\LARGE}{14bp}{17bp}}
 
742
\def\huge{\@setfontsize{\huge}{17bp}{20bp}}
 
743
\def\Huge{\@setfontsize{\Huge}{20bp}{24bp}}
 
744
\fi
 
745
%
 
746
% 10pt
 
747
\ifx\CLASSOPTIONpt\@IEEEptsizeten
 
748
\def\normalsize{\@setfontsize{\normalsize}{10bp}{12bp}}
 
749
\setlength{\@IEEEnormalsizeunitybaselineskip}{12bp}
 
750
\normalsize
 
751
\abovedisplayskip 1.5ex plus 4bp minus 2bp
 
752
\belowdisplayskip \abovedisplayskip
 
753
\abovedisplayshortskip 0pt plus 4bp
 
754
\belowdisplayshortskip 1.5ex plus 4bp minus 2bp
 
755
\def\small{\@setfontsize{\small}{9bp}{10bp}}
 
756
\def\footnotesize{\@setfontsize{\footnotesize}{8bp}{9bp}}
 
757
\def\scriptsize{\@setfontsize{\scriptsize}{7bp}{8bp}}
 
758
\def\tiny{\@setfontsize{\tiny}{5bp}{6bp}}
 
759
% sublargesize is a tad smaller than large - 11bp
 
760
\def\sublargesize{\@setfontsize{\sublargesize}{11bp}{13.5bp}}
 
761
\def\large{\@setfontsize{\large}{12bp}{14bp}}
 
762
\def\Large{\@setfontsize{\Large}{14bp}{17bp}}
 
763
\def\LARGE{\@setfontsize{\LARGE}{17bp}{20bp}}
 
764
\def\huge{\@setfontsize{\huge}{20bp}{24bp}}
 
765
\def\Huge{\@setfontsize{\Huge}{24bp}{28bp}}
 
766
\fi
 
767
%
 
768
% 11pt
 
769
\ifx\CLASSOPTIONpt\@IEEEptsizeeleven
 
770
\def\normalsize{\@setfontsize{\normalsize}{11bp}{13.5bp}}
 
771
\setlength{\@IEEEnormalsizeunitybaselineskip}{13.5bp}
 
772
\normalsize
 
773
\abovedisplayskip 1.5ex plus 5bp minus 3bp
 
774
\belowdisplayskip \abovedisplayskip
 
775
\abovedisplayshortskip 0pt plus 5bp
 
776
\belowdisplayshortskip 1.5ex plus 5bp minus 3bp
 
777
\def\small{\@setfontsize{\small}{10bp}{12bp}}
 
778
\def\footnotesize{\@setfontsize{\footnotesize}{9bp}{10.5bp}}
 
779
\def\scriptsize{\@setfontsize{\scriptsize}{8bp}{9bp}}
 
780
\def\tiny{\@setfontsize{\tiny}{6bp}{7bp}}
 
781
% sublargesize is the same as large - 12bp
 
782
\def\sublargesize{\@setfontsize{\sublargesize}{12bp}{14bp}}
 
783
\def\large{\@setfontsize{\large}{12bp}{14bp}}
 
784
\def\Large{\@setfontsize{\Large}{14bp}{17bp}}
 
785
\def\LARGE{\@setfontsize{\LARGE}{17bp}{20bp}}
 
786
\def\huge{\@setfontsize{\huge}{20bp}{24bp}}
 
787
\def\Huge{\@setfontsize{\Huge}{24bp}{28bp}}
 
788
\fi
 
789
%
 
790
% 12pt
 
791
\ifx\CLASSOPTIONpt\@IEEEptsizetwelve
 
792
\def\normalsize{\@setfontsize{\normalsize}{12bp}{14bp}}%
 
793
\setlength{\@IEEEnormalsizeunitybaselineskip}{14bp}%
 
794
\normalsize
 
795
\abovedisplayskip 1.5ex plus 6bp minus 4bp
 
796
\belowdisplayskip \abovedisplayskip
 
797
\abovedisplayshortskip 0pt plus 6bp
 
798
\belowdisplayshortskip 1.5ex plus 6bp minus 4bp
 
799
\def\small{\@setfontsize{\small}{10bp}{12bp}}
 
800
\def\footnotesize{\@setfontsize{\footnotesize}{9bp}{10.5bp}}
 
801
\def\scriptsize{\@setfontsize{\scriptsize}{8bp}{9bp}}
 
802
\def\tiny{\@setfontsize{\tiny}{6bp}{7bp}}
 
803
% sublargesize is the same as large - 14bp
 
804
\def\sublargesize{\@setfontsize{\sublargesize}{14bp}{17bp}}
 
805
\def\large{\@setfontsize{\large}{14bp}{17bp}}
 
806
\def\Large{\@setfontsize{\Large}{17bp}{20bp}}
 
807
\def\LARGE{\@setfontsize{\LARGE}{20bp}{24bp}}
 
808
\def\huge{\@setfontsize{\huge}{22bp}{26bp}}
 
809
\def\Huge{\@setfontsize{\Huge}{24bp}{28bp}}
 
810
\fi
 
811
%
 
812
% -- override defaults: compsoc journals use special normalsizes --
 
813
\ifCLASSOPTIONconference
 
814
 
815
% compsoc conferences
 
816
% 9pt
 
817
\ifx\CLASSOPTIONpt\@IEEEptsizenine
 
818
\def\normalsize{\@setfontsize{\normalsize}{9bp}{10.8bp}}
 
819
\setlength{\@IEEEnormalsizeunitybaselineskip}{10.8bp}
 
820
\normalsize
 
821
\abovedisplayskip 1.5ex plus 3bp minus 1bp
 
822
\belowdisplayskip \abovedisplayskip
 
823
\abovedisplayshortskip 0bp plus 3bp
 
824
\belowdisplayshortskip 1.5ex plus 3bp minus 1bp
 
825
\fi
 
826
% 10pt
 
827
\ifx\CLASSOPTIONpt\@IEEEptsizeten
 
828
\def\normalsize{\@setfontsize{\normalsize}{10bp}{11.2bp}}
 
829
\setlength{\@IEEEnormalsizeunitybaselineskip}{11.2bp}
 
830
\normalsize
 
831
\abovedisplayskip 1.5ex plus 4bp minus 2bp
 
832
\belowdisplayskip \abovedisplayskip
 
833
\abovedisplayshortskip 0pt plus 4bp
 
834
\belowdisplayshortskip 1.5ex plus 4bp minus 2bp
 
835
\fi
 
836
% 11pt
 
837
\ifx\CLASSOPTIONpt\@IEEEptsizeeleven
 
838
\def\normalsize{\@setfontsize{\normalsize}{11bp}{13.2bp}}
 
839
\setlength{\@IEEEnormalsizeunitybaselineskip}{13.2bp}
 
840
\normalsize
 
841
\abovedisplayskip 1.5ex plus 5bp minus 3bp
 
842
\belowdisplayskip \abovedisplayskip
 
843
\abovedisplayshortskip 0pt plus 5bp
 
844
\belowdisplayshortskip 1.5ex plus 5bp minus 3bp
 
845
\fi
 
846
% 12pt
 
847
\ifx\CLASSOPTIONpt\@IEEEptsizetwelve
 
848
\def\normalsize{\@setfontsize{\normalsize}{12bp}{14.4bp}}
 
849
\setlength{\@IEEEnormalsizeunitybaselineskip}{14.4bp}
 
850
\normalsize
 
851
\abovedisplayskip 1.5ex plus 6bp minus 4bp
 
852
\belowdisplayskip \abovedisplayskip
 
853
\abovedisplayshortskip 0pt plus 6bp
 
854
\belowdisplayshortskip 1.5ex plus 6bp minus 4bp
 
855
\fi
 
856
 
857
% compsoc nonconferences
 
858
\else
 
859
% 9pt
 
860
\ifx\CLASSOPTIONpt\@IEEEptsizenine
 
861
\def\normalsize{\@setfontsize{\normalsize}{9bp}{10.8bp}}
 
862
\setlength{\@IEEEnormalsizeunitybaselineskip}{10.8bp}
 
863
\normalsize
 
864
\abovedisplayskip 1.5ex plus 3bp minus 1bp
 
865
\belowdisplayskip \abovedisplayskip
 
866
\abovedisplayshortskip 0bp plus 3bp
 
867
\belowdisplayshortskip 1.5ex plus 3bp minus 1bp
 
868
\fi
 
869
% 10pt
 
870
\ifx\CLASSOPTIONpt\@IEEEptsizeten
 
871
% the official spec is 9.5bp with 11.4bp leading for 10pt,
 
872
% but measurements of proofs suggest upto 11.723bp leading
 
873
% here we'll use 11.54bp which gives 61 lines per column
 
874
% with the standard compsoc margins
 
875
\def\normalsize{\@setfontsize{\normalsize}{9.5bp}{11.54bp}}
 
876
\setlength{\@IEEEnormalsizeunitybaselineskip}{11.54bp}
 
877
\normalsize
 
878
\abovedisplayskip 1.5ex plus 4bp minus 2bp
 
879
\belowdisplayskip \abovedisplayskip
 
880
\abovedisplayshortskip 0pt plus 4bp
 
881
\belowdisplayshortskip 1.5ex plus 4bp minus 2bp
 
882
\fi
 
883
% 11pt
 
884
\ifx\CLASSOPTIONpt\@IEEEptsizeeleven
 
885
\def\normalsize{\@setfontsize{\normalsize}{11bp}{13.2bp}}
 
886
\setlength{\@IEEEnormalsizeunitybaselineskip}{13.2bp}
 
887
\normalsize
 
888
\abovedisplayskip 1.5ex plus 5bp minus 3bp
 
889
\belowdisplayskip \abovedisplayskip
 
890
\abovedisplayshortskip 0pt plus 5bp
 
891
\belowdisplayshortskip 1.5ex plus 5bp minus 3bp
 
892
\fi
 
893
% 12pt
 
894
\ifx\CLASSOPTIONpt\@IEEEptsizetwelve
 
895
\def\normalsize{\@setfontsize{\normalsize}{12bp}{14.4bp}}
 
896
\setlength{\@IEEEnormalsizeunitybaselineskip}{14.4bp}
 
897
\normalsize
 
898
\abovedisplayskip 1.5ex plus 6bp minus 4bp
 
899
\belowdisplayskip \abovedisplayskip
 
900
\abovedisplayshortskip 0pt plus 6bp
 
901
\belowdisplayshortskip 1.5ex plus 6bp minus 4bp
 
902
\fi
 
903
\fi\fi
 
904
 
 
905
 
 
906
 
 
907
 
563
908
% V1.6 The Computer Modern Fonts will issue a substitution warning for
564
 
% 24pt titles (24.88pt is used instead) increase the substitution
565
 
% tolerance to turn off this warning
566
 
\def\fontsubfuzz{.9pt}
567
 
% However, the default (and correct) Times font will scale exactly as needed.
 
909
% 24pt titles (24.88pt is used instead, but the default and correct
 
910
% Times font will scale exactly as needed) increase the substitution
 
911
% tolerance to turn off this warning.
 
912
 
913
% V1.8a, the compsoc bp font sizes can also cause bogus font substitution
 
914
% warnings with footnote or scriptsize math and the $\bullet$ itemized
 
915
% list of \IEEEcompsocitemizethanks. So, increase this to 1.5pt or more.
 
916
\def\fontsubfuzz{1.7bp}
568
917
 
569
918
 
570
919
% warn the user in case they forget to use the 9pt option with
611
960
           \baselinestretch\space via \string\CLASSINPUT.}
612
961
\fi
613
962
 
614
 
\normalsize % make \baselinestretch take affect
 
963
\small\normalsize % make \baselinestretch take affect
615
964
 
616
965
 
617
966
 
643
992
644
993
% 2.5pt plus 1.49998pt minus 0.59998pt
645
994
646
 
% However, IEEE allows for a more generous range which reduces the need
647
 
% for hyphenation, especially for two column text. Furthermore, IEEE
 
995
% However, the IEEE allows for a more generous range which reduces the need
 
996
% for hyphenation, especially for two column text. Furthermore, the IEEE
648
997
% tends to use a little bit more nominal space between the words.
649
 
% IEEE's interword spacing percentages appear to be:
 
998
% The IEEE's interword spacing percentages appear to be:
650
999
% 35% nominal
651
1000
% 23% minimum
652
1001
% 50% maximum
653
1002
% (They may even be using a tad more for the largest fonts such as 24pt.)
654
1003
655
 
% for bold text, IEEE increases the spacing a little more:
 
1004
% for bold text, the IEEE increases the spacing a little more:
656
1005
% 37.5% nominal
657
1006
% 23% minimum
658
1007
% 55% maximum
669
1018
\def\@IEEEinterspaceMAXratioB{0.55}
670
1019
 
671
1020
 
 
1021
% compsoc nonconference papers use Palatino,
 
1022
% tweak settings to better match the proofs
 
1023
\ifCLASSOPTIONcompsoc
 
1024
\ifCLASSOPTIONconference\else
 
1025
% for medium (normal weight)
 
1026
\def\@IEEEinterspaceratioM{0.28}
 
1027
\def\@IEEEinterspaceMINratioM{0.21}
 
1028
\def\@IEEEinterspaceMAXratioM{0.47}
 
1029
% for bold
 
1030
\def\@IEEEinterspaceratioB{0.305}
 
1031
\def\@IEEEinterspaceMINratioB{0.21}
 
1032
\def\@IEEEinterspaceMAXratioB{0.52}
 
1033
\fi\fi
 
1034
 
 
1035
 
672
1036
% command to revise the interword spacing for the current font under TeX:
673
1037
% \fontdimen2 = nominal interword space
674
1038
% \fontdimen3 = interword stretch
695
1059
 
696
1060
% revise the interword spacing for each font shape
697
1061
% \slshape is not often used for IEEE work and is not altered here. The \scshape caps are
698
 
% already a tad too large in the free LaTeX fonts (as compared to what IEEE uses) so we
 
1062
% already a tad too large in the free LaTeX fonts (as compared to what the IEEE uses) so we
699
1063
% won't alter these either.
700
1064
\def\@IEEEsetfontdimens{{%
701
1065
\normalfont
731
1095
 
732
1096
 
733
1097
 
734
 
% V1.6 
 
1098
 
 
1099
 
 
1100
% -- V1.8a page setup commands --
 
1101
 
 
1102
% The default sample text for calculating margins
 
1103
% Note that IEEE publications use \scriptsize for headers and footers.
 
1104
\def\IEEEdefaultsampletext{\normalfont\normalsize gT}
 
1105
\def\IEEEdefaultheadersampletext{\normalfont\scriptsize T}% IEEE headers default to uppercase
 
1106
\def\IEEEdefaultfootersampletext{\normalfont\scriptsize gT}
 
1107
 
 
1108
 
 
1109
 
 
1110
% usage: \IEEEsettextwidth{inner margin}{outer margin}
 
1111
% Sets \textwidth to allow the specified inner and outer margins
 
1112
% for the current \paperwidth.
 
1113
\def\IEEEsettextwidth#1#2{\@IEEEtrantmpdimenA\paperwidth
 
1114
\@IEEEtrantmpdimenB#1\relax
 
1115
\advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB
 
1116
\@IEEEtrantmpdimenB#2\relax
 
1117
\advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB
 
1118
\textwidth\@IEEEtrantmpdimenA}
 
1119
 
 
1120
 
 
1121
 
 
1122
% usage: \IEEEsetsidemargin{mode: i, o, c, a}{margin/offset}
 
1123
% Sets \oddsidemargin and \evensidemargin to yield the specified margin
 
1124
% of the given mode.
 
1125
% The available modes are:
 
1126
% i = inner margin
 
1127
% o = outer margin
 
1128
% c = centered, with the given offset
 
1129
% a = adjust the margins using the given offset
 
1130
% For the offsets, positive values increase the inner margin.
 
1131
% \textwidth should be set properly for the given margins before calling this
 
1132
% function.
 
1133
\def\IEEEsetsidemargin#1#2{\@IEEEtrantmpdimenA #2\relax
 
1134
\@IEEEextracttoken{#1}\relax
 
1135
% check for mode errors
 
1136
\ifx\@IEEEextractedtokenmacro\@empty
 
1137
  \@IEEEclspkgerror{Empty mode type in \string\IEEEsetsidemargin\space (line \the\inputlineno).\MessageBreak
 
1138
  Defaulting to `i'}{Valid modes for \string\IEEEsetsidemargin\space are: i, o, c and a.}\relax
 
1139
  \let\@IEEEextractedtoken=i\relax
 
1140
  \def\@IEEEextractedtokenmacro{i}\relax
 
1141
\else
 
1142
  \ifx\@IEEEextractedtokensdiscarded\@empty\else
 
1143
    \typeout{** WARNING: \string\IEEEsetsidemargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
 
1144
  \fi
 
1145
\fi
 
1146
% handle each mode
 
1147
\if\@IEEEextractedtoken a\relax
 
1148
  \advance\oddsidemargin by \@IEEEtrantmpdimenA\relax
 
1149
\else
 
1150
\if\@IEEEextractedtoken c\relax
 
1151
  \oddsidemargin\paperwidth
 
1152
  \advance\oddsidemargin by -\textwidth
 
1153
  \divide\oddsidemargin by 2\relax
 
1154
  \advance\oddsidemargin by -1in\relax
 
1155
  \advance\oddsidemargin by \@IEEEtrantmpdimenA\relax
 
1156
\else
 
1157
\if\@IEEEextractedtoken o\relax
 
1158
  \oddsidemargin\paperwidth
 
1159
  \advance\oddsidemargin by -\textwidth
 
1160
  \advance\oddsidemargin by -\@IEEEtrantmpdimenA
 
1161
  \advance\oddsidemargin by -1in\relax
 
1162
\else
 
1163
  \if\@IEEEextractedtoken i\relax
 
1164
  \else
 
1165
    \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetsidemargin\space (line \the\inputlineno).\MessageBreak
 
1166
    Defaulting to `i'}%
 
1167
    {Valid modes for \string\IEEEsetsidemargin\space are: i, o, c  and a.}%
 
1168
  \fi
 
1169
  \oddsidemargin\@IEEEtrantmpdimenA
 
1170
  \advance\oddsidemargin by -1in\relax
 
1171
\fi\fi\fi
 
1172
% odd and even side margins both mean "inner" for single sided pages
 
1173
\evensidemargin\oddsidemargin
 
1174
% but are mirrors of each other when twosided is in effect
 
1175
\if@twoside
 
1176
  \evensidemargin\paperwidth
 
1177
  \advance\evensidemargin by -\textwidth
 
1178
  \advance\evensidemargin by -\oddsidemargin
 
1179
  % have to compensate for both the builtin 1in LaTex offset
 
1180
  % and the fact we already subtracted this offset from \oddsidemargin
 
1181
  \advance\evensidemargin -2in\relax
 
1182
\fi}
 
1183
 
 
1184
 
 
1185
 
 
1186
% usage: \IEEEsettextheight[sample text]{top text margin}{bottom text margin}
 
1187
% Sets \textheight based on the specified top margin and bottom margin.
 
1188
% Takes into consideration \paperheight, \topskip, and (by default) the
 
1189
% the actual height and depth of the \IEEEdefaultsampletext text. 
 
1190
\def\IEEEsettextheight{\@ifnextchar [{\@IEEEsettextheight}{\@IEEEsettextheight[\IEEEdefaultsampletext]}}
 
1191
\def\@IEEEsettextheight[#1]#2#3{\textheight\paperheight\relax
 
1192
  \@IEEEtrantmpdimenA #2\relax
 
1193
  \advance \textheight by -\@IEEEtrantmpdimenA% subtract top margin
 
1194
  \@IEEEtrantmpdimenA #3\relax
 
1195
  \advance \textheight by -\@IEEEtrantmpdimenA% subtract bottom margin
 
1196
  \advance \textheight by \topskip% add \topskip
 
1197
  % subtract off everything above the top, and below the bottom, baselines
 
1198
  \settoheight{\@IEEEtrantmpdimenA}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1199
  \advance \textheight by -\@IEEEtrantmpdimenA
 
1200
  \settodepth{\@IEEEtrantmpdimenA}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1201
  \advance \textheight by -\@IEEEtrantmpdimenA}
 
1202
 
 
1203
 
 
1204
 
 
1205
\newdimen\IEEEquantizedlength
 
1206
\IEEEquantizedlength 0sp\relax
 
1207
\newdimen\IEEEquantizedlengthdiff
 
1208
\IEEEquantizedlengthdiff 0sp\relax
 
1209
\def\IEEEquantizedlengthint{0}
 
1210
 
 
1211
% usage: \IEEEquantizelength{mode: d, c, i}{base unit}{length}
 
1212
% Sets the length \IEEEquantizedlength to be an integer multiple of the given
 
1213
% (nonzero) base unit such that \IEEEquantizedlength approximates the given
 
1214
% length.
 
1215
% \IEEEquantizedlengthdiff is a length equal to the difference between the
 
1216
% \IEEEquantizedlength and the given length.
 
1217
% \IEEEquantizedlengthint is a macro containing the integer number of base units
 
1218
% in \IEEEquantizedlength.
 
1219
% i.e., \IEEEquantizedlength =  \IEEEquantizedlengthint * base unit
 
1220
% The mode determines how \IEEEquantizedlength is quantized:
 
1221
% d = always decrease (always round down \IEEEquantizeint)
 
1222
% c = use the closest match
 
1223
% i = always increase (always round up \IEEEquantizeint)
 
1224
% In anycase, if the given length is already quantized,
 
1225
% \IEEEquantizedlengthdiff will be set to zero.
 
1226
\def\IEEEquantizelength#1#2#3{\begingroup
 
1227
% work in isolation so as not to externally disturb the \@IEEEtrantmp
 
1228
% variables
 
1229
% load the argument values indirectly via \IEEEquantizedlengthdiff
 
1230
% in case the user refers to our \@IEEEtrantmpdimenX, \IEEEquantizedlength,
 
1231
% etc. in the arguments. we also will work with these as counters,
 
1232
% i.e., in sp units
 
1233
% A has the base unit
 
1234
\IEEEquantizedlengthdiff #2\relax\relax\relax\relax
 
1235
\@IEEEtrantmpcountA\IEEEquantizedlengthdiff
 
1236
% B has the input length
 
1237
\IEEEquantizedlengthdiff #3\relax\relax\relax\relax
 
1238
\@IEEEtrantmpcountB\IEEEquantizedlengthdiff
 
1239
\@IEEEtrantmpdimenA\the\@IEEEtrantmpcountA sp\relax
 
1240
\@IEEEtrantmpdimenB\the\@IEEEtrantmpcountB sp\relax
 
1241
% \@IEEEtrantmpcountC will have the quantized int
 
1242
% \IEEEquantizedlength will have the quantized length
 
1243
% \@IEEEtrantmpdimenC will have the quantized diff
 
1244
% initialize them to zero as this is what will be
 
1245
% exported if an error occurs
 
1246
\@IEEEtrantmpcountC 0\relax
 
1247
\IEEEquantizedlength 0sp\relax
 
1248
\@IEEEtrantmpdimenC 0sp\relax
 
1249
% extract mode
 
1250
\@IEEEextracttoken{#1}\relax
 
1251
% check for mode errors
 
1252
\ifx\@IEEEextractedtokenmacro\@empty
 
1253
  \@IEEEclspkgerror{Empty mode type in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak
 
1254
  Defaulting to `d'}{Valid modes for \string\IEEEquantizelength\space are: d, c and i.}\relax
 
1255
  \let\@IEEEextractedtoken=d\relax
 
1256
  \def\@IEEEextractedtokenmacro{d}\relax
 
1257
\else
 
1258
  \ifx\@IEEEextractedtokensdiscarded\@empty\else
 
1259
    \typeout{** WARNING: \string\IEEEquantizelength\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
 
1260
  \fi
 
1261
\fi
 
1262
% check for base unit is zero error
 
1263
\ifnum\@IEEEtrantmpcountA=0\relax
 
1264
\@IEEEclspkgerror{Base unit is zero in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak
 
1265
  \string\IEEEquantizedlength\space and \string\IEEEquantizedlengthdiff\space are set to zero}{Division by zero is not allowed.}\relax
 
1266
\else% base unit is nonzero
 
1267
  % \@IEEEtrantmpcountC carries the number of integer units
 
1268
  % in the quantized length (integer length \ base)
 
1269
  \@IEEEtrantmpcountC\@IEEEtrantmpcountB\relax
 
1270
  \divide\@IEEEtrantmpcountC by \@IEEEtrantmpcountA\relax
 
1271
  % \IEEEquantizedlength has the (rounded down) quantized length
 
1272
  % = base * int
 
1273
  \IEEEquantizedlength\@IEEEtrantmpdimenA\relax
 
1274
  \multiply\IEEEquantizedlength by \@IEEEtrantmpcountC\relax
 
1275
  % \@IEEEtrantmpdimenC has the difference
 
1276
  % = quantized length - length
 
1277
  \@IEEEtrantmpdimenC\IEEEquantizedlength\relax
 
1278
  \advance\@IEEEtrantmpdimenC by -\@IEEEtrantmpdimenB\relax
 
1279
  % trap special case of length being already quantized
 
1280
  % to avoid a roundup under i option
 
1281
  \ifdim\@IEEEtrantmpdimenC=0sp\relax
 
1282
  \else % length not is already quantized
 
1283
    % set dimenA to carry the upper quantized (absolute value) difference:
 
1284
    % quantizedlength + base - length
 
1285
    \advance\@IEEEtrantmpdimenA by \IEEEquantizedlength\relax
 
1286
    \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB\relax
 
1287
    % set dimenB to carry the lower quantized (absolute value) difference:
 
1288
    % length - quantizedlength
 
1289
    \advance\@IEEEtrantmpdimenB by -\IEEEquantizedlength\relax
 
1290
    % handle each mode
 
1291
    \if\@IEEEextractedtoken c\relax
 
1292
      % compare upper and lower amounts, select upper if lower > upper
 
1293
      \ifdim\@IEEEtrantmpdimenB>\@IEEEtrantmpdimenA\relax
 
1294
        % use upper
 
1295
        \advance\IEEEquantizedlength by \the\@IEEEtrantmpcountA sp\relax
 
1296
        \advance\@IEEEtrantmpcountC by 1\relax
 
1297
        \@IEEEtrantmpdimenC\@IEEEtrantmpdimenA
 
1298
      \else% <=. uselower
 
1299
        % no need to do anything for lower, use output values already setup
 
1300
      \fi
 
1301
    \else% not mode c
 
1302
    \if\@IEEEextractedtoken i\relax
 
1303
      % always round up under i mode
 
1304
      \advance\IEEEquantizedlength by \the\@IEEEtrantmpcountA sp\relax
 
1305
      \advance\@IEEEtrantmpcountC by 1\relax
 
1306
      \@IEEEtrantmpdimenC\@IEEEtrantmpdimenA
 
1307
    \else
 
1308
      \if\@IEEEextractedtoken d\relax
 
1309
      \else
 
1310
        \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak
 
1311
        Defaulting to `d'}%
 
1312
        {Valid modes for \string\IEEEquantizelength\space are: d, c, and i.}\relax
 
1313
      \fi % if d
 
1314
      % no need to do anything for d, use output values already setup
 
1315
    \fi\fi % if i, c
 
1316
  \fi % if length is already quantized
 
1317
\fi% if base unit is zero
 
1318
% globally assign the results to macros we use here to escape the enclosing
 
1319
% group without needing to call \global on any of the \@IEEEtrantmp variables.
 
1320
% \@IEEEtrantmpcountC has the quantized int
 
1321
% \IEEEquantizedlength has the quantized length
 
1322
% \@IEEEtrantmpdimenC has the quantized diff
 
1323
\xdef\@IEEEquantizedlengthintmacro{\the\@IEEEtrantmpcountC}\relax
 
1324
\@IEEEtrantmpcountC\IEEEquantizedlength\relax
 
1325
\xdef\@IEEEquantizedlengthmacro{\the\@IEEEtrantmpcountC}\relax
 
1326
\@IEEEtrantmpcountC\@IEEEtrantmpdimenC\relax
 
1327
\xdef\@IEEEquantizedlengthdiffmacro{\the\@IEEEtrantmpcountC}\relax
 
1328
\endgroup
 
1329
% locally assign the outputs here from the macros
 
1330
\expandafter\IEEEquantizedlength\@IEEEquantizedlengthmacro sp\relax
 
1331
\expandafter\IEEEquantizedlengthdiff\@IEEEquantizedlengthdiffmacro sp\relax
 
1332
\edef\IEEEquantizedlengthint{\@IEEEquantizedlengthintmacro}\relax}
 
1333
 
 
1334
 
 
1335
 
 
1336
\newdimen\IEEEquantizedtextheightdiff
 
1337
\IEEEquantizedtextheightdiff 0sp\relax
 
1338
 
 
1339
% usage: \IEEEquantizetextheight[base unit]{mode: d, c, i}
 
1340
% Sets \textheight to be an integer multiple of the current \baselineskip
 
1341
% (or the optionally specified base unit) plus the first (\topskip) line.
 
1342
% \IEEEquantizedtextheightdiff is a length equal to the difference between
 
1343
% the new quantized and original \textheight.
 
1344
% \IEEEquantizedtextheightlpc is a macro containing the integer number of
 
1345
% lines per column under the quantized \textheight. i.e.,
 
1346
% \textheight = \IEEEquantizedtextheightlpc * \baselineskip + \topskip
 
1347
% The mode determines how \textheight is quantized:
 
1348
% d = always decrease (always round down the number of lines per column)
 
1349
% c = use the closest match
 
1350
% i = always increase (always round up the number of lines per column)
 
1351
% In anycase, if \textheight is already quantized, it will remain unchanged,
 
1352
% and \IEEEquantizedtextheightdiff will be set to zero.
 
1353
% Depends on: \IEEEquantizelength
 
1354
\def\IEEEquantizetextheight{\@ifnextchar [{\@IEEEquantizetextheight}{\@IEEEquantizetextheight[\baselineskip]}}
 
1355
\def\@IEEEquantizetextheight[#1]#2{\begingroup
 
1356
% use our \IEEEquantizedtextheightdiff as a scratch pad
 
1357
% we need to subtract off \topskip before quantization
 
1358
\IEEEquantizedtextheightdiff\textheight
 
1359
\advance\IEEEquantizedtextheightdiff by -\topskip\relax
 
1360
\IEEEquantizelength{#2}{#1}{\IEEEquantizedtextheightdiff}
 
1361
% add back \topskip line
 
1362
\advance\IEEEquantizedlength by \topskip
 
1363
\@IEEEtrantmpcountC\IEEEquantizedlengthint\relax
 
1364
\advance\@IEEEtrantmpcountC by 1\relax
 
1365
% globally assign the results to macros we use here to escape the enclosing
 
1366
% group without needing to call \global on any of the \@IEEEtrantmp variables.
 
1367
\xdef\@IEEEquantizedtextheightlpcmacro{\the\@IEEEtrantmpcountC}\relax
 
1368
\@IEEEtrantmpcountC\IEEEquantizedlength\relax
 
1369
\xdef\@IEEEquantizedtextheightmacro{\the\@IEEEtrantmpcountC}\relax
 
1370
\@IEEEtrantmpcountC\IEEEquantizedlengthdiff\relax
 
1371
\xdef\@IEEEquantizedtextheightdiffmacro{\the\@IEEEtrantmpcountC}\relax
 
1372
\endgroup
 
1373
% locally assign the outputs here from the macros
 
1374
\textheight\@IEEEquantizedtextheightmacro sp\relax
 
1375
\IEEEquantizedtextheightdiff\@IEEEquantizedtextheightdiffmacro sp\relax
 
1376
\edef\IEEEquantizedtextheightlpc{\@IEEEquantizedtextheightlpcmacro}}
 
1377
 
 
1378
 
 
1379
 
 
1380
% usage: \IEEEsettopmargin[sample text]{mode: t, b, c, a, q}{margin/offset}
 
1381
% Sets \topmargin based on the specified vertical margin.
 
1382
% Takes into consideration the base 1in offset, \headheight, \headsep,
 
1383
% \topskip, and (by default) the the actual height (or, for the bottom, depth)
 
1384
% of the \IEEEdefaultsampletext text.
 
1385
% The available modes are:
 
1386
% t = top margin
 
1387
% b = bottom margin
 
1388
% c = vertically centered, with the given offset
 
1389
% a = adjust the vertical margins using the given offset
 
1390
% q = adjust the margins using \IEEEquantizedtextheightdiff and the given offset
 
1391
% For the offsets, positive values increase the top margin.
 
1392
% \headheight, \headsep, \topskip and \textheight should be set properly for the
 
1393
% given margins before calling this function.
 
1394
\def\IEEEsettopmargin{\@ifnextchar [{\@IEEEsettopmargin}{\@IEEEsettopmargin[\IEEEdefaultsampletext]}}
 
1395
\def\@IEEEsettopmargin[#1]#2#3{\@IEEEtrantmpdimenA #3\relax
 
1396
\@IEEEextracttoken{#2}\relax
 
1397
% check for mode errors
 
1398
\ifx\@IEEEextractedtokenmacro\@empty
 
1399
  \@IEEEclspkgerror{Empty mode type in \string\IEEEsettopmargin\space (line \the\inputlineno).\MessageBreak
 
1400
  Defaulting to `t'}{Valid modes for \string\IEEEsettopmargin\space are: t, b, c, a and q.}\relax
 
1401
  \let\@IEEEextractedtoken=t\relax
 
1402
  \def\@IEEEextractedtokenmacro{t}\relax
 
1403
\else
 
1404
  \ifx\@IEEEextractedtokensdiscarded\@empty\else
 
1405
    \typeout{** WARNING: \string\IEEEsettopmargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
 
1406
  \fi
 
1407
\fi
 
1408
% handle each mode
 
1409
\if\@IEEEextractedtoken a\relax
 
1410
  \advance\topmargin by \@IEEEtrantmpdimenA\relax
 
1411
\else
 
1412
\if\@IEEEextractedtoken q\relax
 
1413
  % we need to adjust by half the \IEEEquantizedtextheightdiff value
 
1414
  \@IEEEtrantmpdimenB\IEEEquantizedtextheightdiff\relax
 
1415
  \divide\@IEEEtrantmpdimenB by 2\relax
 
1416
  % a positive \IEEEquantizedtextheightdiff means we need to reduce \topmargin
 
1417
  % because \textheight has been lenghtened
 
1418
  \advance\topmargin by -\@IEEEtrantmpdimenB\relax
 
1419
  \advance\topmargin by \@IEEEtrantmpdimenA\relax
 
1420
\else
 
1421
\if\@IEEEextractedtoken c\relax
 
1422
  \topmargin\paperheight
 
1423
  \advance\topmargin by -\textheight
 
1424
  % \textheight includes \topskip, but we should not count topskip whitespace here, backout
 
1425
  \advance \topmargin by \topskip
 
1426
  \settoheight{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1427
  \advance\topmargin by -\@IEEEtrantmpdimenB\relax
 
1428
  \settodepth{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1429
  \advance\topmargin by -\@IEEEtrantmpdimenB\relax
 
1430
  \divide\topmargin by 2\relax
 
1431
  \advance\topmargin by \@IEEEtrantmpdimenA\relax
 
1432
\else
 
1433
\if\@IEEEextractedtoken b\relax
 
1434
  \topmargin\paperheight
 
1435
  \advance\topmargin by -\textheight
 
1436
  % \textheight includes \topskip, but we should not count topskip whitespace here, backout
 
1437
  \advance \topmargin by \topskip
 
1438
  \settodepth{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1439
  \advance\topmargin by -\@IEEEtrantmpdimenB\relax
 
1440
  \advance\topmargin by -\@IEEEtrantmpdimenA\relax
 
1441
\else
 
1442
  \if\@IEEEextractedtoken t\relax
 
1443
  \else
 
1444
    \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsettopmargin\space (line \the\inputlineno).\MessageBreak
 
1445
    Defaulting to `t'}%
 
1446
    {Valid modes for \string\IEEEsettopmargin\space are: t, b, c, a and q.}\relax
 
1447
  \fi
 
1448
  \topmargin\@IEEEtrantmpdimenA\relax
 
1449
  \settoheight{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1450
  \advance\topmargin by \@IEEEtrantmpdimenB\relax
 
1451
\fi\fi % if t, b, c
 
1452
% convert desired top margin into actual \topmargin
 
1453
% this is not done for the q or a modes because they are only adjustments
 
1454
\advance \topmargin by -\topskip
 
1455
\advance \topmargin by -1in
 
1456
\advance \topmargin by -\headheight
 
1457
\advance \topmargin by -\headsep
 
1458
\fi\fi % if q, a
 
1459
}
 
1460
 
 
1461
 
 
1462
 
 
1463
% usage: \IEEEsetheadermargin[header sample][text sample]{mode: t, b, c, a}{margin/offset}
 
1464
% Differentially adjusts \topmargin and \headsep (such that their sum is unchanged)
 
1465
% based on the specified header margin.
 
1466
% Takes into consideration the base 1in offset, \headheight, \topskip, and (by default)
 
1467
% the actual height (or depth) of the \IEEEdefaultheadersampletext and
 
1468
% \IEEEdefaultsampletext text.
 
1469
% The available modes are:
 
1470
% t = top margin (top of the header text to the top of the page)
 
1471
% b = bottom margin (bottom of the header text to the top of the main text)
 
1472
% c = vertically centered between the main text and the top of the page,
 
1473
%     with the given offset
 
1474
% a = adjust the vertical position using the given offset
 
1475
% For the offsets, positive values move the header downward.
 
1476
% \headheight, \headsep, \topskip and \topmargin should be set properly before
 
1477
% calling this function.
 
1478
\def\IEEEsetheadermargin{\@ifnextchar [{\@IEEEsetheadermargin}{\@IEEEsetheadermargin[\IEEEdefaultheadersampletext]}}
 
1479
\def\@IEEEsetheadermargin[#1]{\@ifnextchar [{\@@IEEEsetheadermargin[#1]}{\@@IEEEsetheadermargin[#1][\IEEEdefaultsampletext]}}
 
1480
\def\@@IEEEsetheadermargin[#1][#2]#3#4{\@IEEEtrantmpdimenA #4\relax
 
1481
\@IEEEextracttoken{#3}\relax
 
1482
% check for mode errors
 
1483
\ifx\@IEEEextractedtokenmacro\@empty
 
1484
  \@IEEEclspkgerror{Empty mode type in \string\IEEEsetheadermargin\space (line \the\inputlineno).\MessageBreak
 
1485
  Defaulting to `t'}{Valid modes for \string\IEEEsetheadermargin\space are: t, b, c, and a.}\relax
 
1486
  \let\@IEEEextractedtoken=t\relax
 
1487
  \def\@IEEEextractedtokenmacro{t}\relax
 
1488
\else
 
1489
  \ifx\@IEEEextractedtokensdiscarded\@empty\else
 
1490
    \typeout{** WARNING: \string\IEEEsetheadermargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
 
1491
  \fi
 
1492
\fi
 
1493
% handle each mode
 
1494
\if\@IEEEextractedtoken a\relax
 
1495
  % No need to do anything here and can pass through the adjustment
 
1496
  % value as is. The end adjustment of \topmargin and \headsep will
 
1497
  % do all that is needed
 
1498
\else
 
1499
\if\@IEEEextractedtoken c\relax
 
1500
  % get the bottom margin
 
1501
  \@IEEEtrantmpdimenB\headsep\relax
 
1502
  \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1503
  \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
 
1504
  \advance\@IEEEtrantmpdimenB by \topskip
 
1505
  \settoheight{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax
 
1506
  \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
 
1507
  % at this point \@IEEEtrantmpdimenB has the actual header bottom margin
 
1508
  % subtract from it the top header margin
 
1509
  \advance\@IEEEtrantmpdimenB -1in\relax % take into consideration the system 1in offset of the top margin
 
1510
  \advance\@IEEEtrantmpdimenB by -\topmargin
 
1511
  \advance\@IEEEtrantmpdimenB by -\headheight
 
1512
  \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1513
  \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC
 
1514
  % at this point \@IEEEtrantmpdimenB has the difference between the bottom and top margins
 
1515
  % we need to adjust by half this amount to center the header
 
1516
  \divide\@IEEEtrantmpdimenB by 2\relax
 
1517
  % and add to offset
 
1518
  \advance\@IEEEtrantmpdimenA by \@IEEEtrantmpdimenB
 
1519
\else
 
1520
\if\@IEEEextractedtoken b\relax
 
1521
  \@IEEEtrantmpdimenB\headsep\relax
 
1522
  \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1523
  \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
 
1524
  \advance\@IEEEtrantmpdimenB by \topskip
 
1525
  \settoheight{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax
 
1526
  \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
 
1527
  % at this point \@IEEEtrantmpdimenB has the actual header bottom margin
 
1528
  % get the difference between the actual and the desired
 
1529
  \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenA
 
1530
  \@IEEEtrantmpdimenA\@IEEEtrantmpdimenB
 
1531
\else
 
1532
  \if\@IEEEextractedtoken t\relax
 
1533
  \else
 
1534
    \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetheadermargin\space (line \the\inputlineno).\MessageBreak
 
1535
    Defaulting to `t'}%
 
1536
    {Valid modes for \string\IEEEsetheadermargin\space are: t, b, c and a.}\relax
 
1537
  \fi
 
1538
  \@IEEEtrantmpdimenB 1in\relax % take into consideration the system 1in offset of the top margin
 
1539
  \advance\@IEEEtrantmpdimenB by \topmargin
 
1540
  \advance\@IEEEtrantmpdimenB by \headheight
 
1541
  \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1542
  \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
 
1543
  % at this point \@IEEEtrantmpdimenB has the actual header top margin
 
1544
  % get the difference between the desired and the actual
 
1545
  \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB
 
1546
\fi\fi % if t, b, c
 
1547
\fi % if a
 
1548
% advance \topmargin by the needed amount and reduce \headsep by the same
 
1549
% so as not to disturb the location of the main text
 
1550
\advance\topmargin by \@IEEEtrantmpdimenA\relax
 
1551
\advance\headsep by -\@IEEEtrantmpdimenA\relax
 
1552
}
 
1553
 
 
1554
 
 
1555
 
 
1556
% usage: \IEEEsetfootermargin[footer sample][text sample]{mode: t, b, c, a}{margin/offset}
 
1557
% Adjusts \footskip based on the specified footer margin.
 
1558
% Takes into consideration the base 1in offset, \paperheight, \headheight,
 
1559
% \headsep, \textheight and (by default) the actual height (or depth) of the
 
1560
% \IEEEdefaultfootersampletext and \IEEEdefaultsampletext text.
 
1561
% The available modes are:
 
1562
% t = top margin (top of the footer text to the bottom of the main text)
 
1563
% b = bottom margin (bottom of the footer text to the bottom of page)
 
1564
% c = vertically centered between the main text and the bottom of the page,
 
1565
%     with the given offset
 
1566
% a = adjust the vertical position using the given offset
 
1567
% For the offsets, positive values move the footer downward.
 
1568
% \headheight, \headsep, \topskip, \topmargin, and \textheight should be set
 
1569
% properly before calling this function.
 
1570
\def\IEEEsetfootermargin{\@ifnextchar [{\@IEEEsetfootermargin}{\@IEEEsetfootermargin[\IEEEdefaultfootersampletext]}}
 
1571
\def\@IEEEsetfootermargin[#1]{\@ifnextchar [{\@@IEEEsetfootermargin[#1]}{\@@IEEEsetfootermargin[#1][\IEEEdefaultsampletext]}}
 
1572
\def\@@IEEEsetfootermargin[#1][#2]#3#4{\@IEEEtrantmpdimenA #4\relax
 
1573
\@IEEEextracttoken{#3}\relax
 
1574
% check for mode errors
 
1575
\ifx\@IEEEextractedtokenmacro\@empty
 
1576
  \@IEEEclspkgerror{Empty mode type in \string\IEEEsetfootermargin\space (line \the\inputlineno).\MessageBreak
 
1577
  Defaulting to `t'}{Valid modes for \string\IEEEsetfootermargin\space are: t, b, c, and a.}\relax
 
1578
  \let\@IEEEextractedtoken=t\relax
 
1579
  \def\@IEEEextractedtokenmacro{t}\relax
 
1580
\else
 
1581
  \ifx\@IEEEextractedtokensdiscarded\@empty\else
 
1582
    \typeout{** WARNING: \string\IEEEsetfootermargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
 
1583
  \fi
 
1584
\fi
 
1585
% handle each mode
 
1586
\if\@IEEEextractedtoken a\relax
 
1587
  % No need to do anything here and can pass through the adjustment
 
1588
  % value as is. The end adjustment of \footskip will do all that
 
1589
  % is needed
 
1590
\else
 
1591
\if\@IEEEextractedtoken c\relax
 
1592
  % calculate the bottom margin
 
1593
  \@IEEEtrantmpdimenB 1in\relax % system 1in offset
 
1594
  \advance\@IEEEtrantmpdimenB\topmargin\relax
 
1595
  \advance\@IEEEtrantmpdimenB\headheight\relax
 
1596
  \advance\@IEEEtrantmpdimenB\headsep\relax
 
1597
  \advance\@IEEEtrantmpdimenB\textheight\relax
 
1598
  \advance\@IEEEtrantmpdimenB\footskip\relax
 
1599
  \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1600
  \advance\@IEEEtrantmpdimenC by \@IEEEtrantmpdimenB
 
1601
  \@IEEEtrantmpdimenB\paperheight
 
1602
  \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
 
1603
  % at this point \@IEEEtrantmpdimenB has the actual footer bottom margin
 
1604
  % now subtract off the footer top margin
 
1605
  \advance\@IEEEtrantmpdimenB -\footskip\relax
 
1606
  \settodepth{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax
 
1607
  \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC
 
1608
  \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1609
  \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC
 
1610
  % at this point \@IEEEtrantmpdimenB has the difference between the bottom
 
1611
  % and top footer margins
 
1612
  % our adjustment must be half this value to center the footer
 
1613
  \divide\@IEEEtrantmpdimenB by 2\relax
 
1614
  % add to the offset
 
1615
  \advance\@IEEEtrantmpdimenA by \@IEEEtrantmpdimenB
 
1616
\else
 
1617
\if\@IEEEextractedtoken b\relax
 
1618
  % calculate the bottom margin
 
1619
  \@IEEEtrantmpdimenB 1in\relax % system 1in offset
 
1620
  \advance\@IEEEtrantmpdimenB\topmargin\relax
 
1621
  \advance\@IEEEtrantmpdimenB\headheight\relax
 
1622
  \advance\@IEEEtrantmpdimenB\headsep\relax
 
1623
  \advance\@IEEEtrantmpdimenB\textheight\relax
 
1624
  \advance\@IEEEtrantmpdimenB\footskip\relax
 
1625
  \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1626
  \advance\@IEEEtrantmpdimenC by \@IEEEtrantmpdimenB
 
1627
  \@IEEEtrantmpdimenB\paperheight
 
1628
  \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
 
1629
  % at this point \@IEEEtrantmpdimenB has the actual footer bottom margin
 
1630
  % get the difference between the actual and the desired
 
1631
  \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenA
 
1632
  \@IEEEtrantmpdimenA\@IEEEtrantmpdimenB
 
1633
\else
 
1634
  \if\@IEEEextractedtoken t\relax
 
1635
  \else
 
1636
    \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetfootermargin\space (line \the\inputlineno).\MessageBreak
 
1637
    Defaulting to `t'}%
 
1638
    {Valid modes for \string\IEEEsetfootermargin\space are: t, b, c and a.}\relax
 
1639
  \fi
 
1640
  \@IEEEtrantmpdimenB\footskip\relax
 
1641
  \settodepth{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax
 
1642
  \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
 
1643
  \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax
 
1644
  \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC
 
1645
  % at this point \@IEEEtrantmpdimenB has the actual footer top margin
 
1646
  % get the difference between the desired and the actual
 
1647
  \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB
 
1648
\fi\fi % if t, b, c
 
1649
\fi % if a
 
1650
% advance \footskip by the needed amount
 
1651
\advance\footskip by \@IEEEtrantmpdimenA\relax
 
1652
}
 
1653
 
 
1654
% -- End V1.8a page setup commands --
 
1655
 
 
1656
 
 
1657
 
 
1658
 
 
1659
 
 
1660
% V1.6
735
1661
% LaTeX is a little to quick to use hyphenations
736
1662
% So, we increase the penalty for their use and raise
737
1663
% the badness level that triggers an underfull hbox
740
1666
% of the box" than that under V1.5 and prior.
741
1667
% TeX default is 50
742
1668
\hyphenpenalty=750
 
1669
\ifCLASSOPTIONcompsoc
 
1670
\hyphenpenalty 500
 
1671
\fi
743
1672
% If we didn't adjust the interword spacing, 2200 might be better.
744
1673
% The TeX default is 1000
745
1674
\hbadness=1350
746
 
% IEEE does not use extra spacing after punctuation
 
1675
% The IEEE does not use extra spacing after punctuation
747
1676
\frenchspacing
748
1677
 
749
1678
% V1.7 increase this a tad to discourage equation breaks
750
1679
\binoppenalty=1000 % default 700
751
1680
\relpenalty=800     % default 500
752
1681
 
 
1682
% v1.8a increase these to discourage widows and orphans
 
1683
\clubpenalty=1000          % default 150
 
1684
\widowpenalty=1000         % default 150
 
1685
\displaywidowpenalty=1000 % default  50
 
1686
 
753
1687
 
754
1688
% margin note stuff
755
1689
\marginparsep      10pt
772
1706
\parskip 0ex plus 0.2ex minus 0.1ex
773
1707
 
774
1708
\parindent    1.0em
 
1709
\ifCLASSOPTIONcompsoc
 
1710
  \parindent    1.5em
 
1711
\fi
775
1712
 
776
 
\topmargin    -49.0pt
777
1713
\headheight   12pt
778
 
\headsep      0.25in
779
 
 
 
1714
\headsep      18pt
780
1715
% use the normal font baselineskip
781
1716
% so that \topskip is unaffected by changes in \baselinestretch
782
1717
\topskip=\@IEEEnormalsizeunitybaselineskip
 
1718
 
 
1719
 
 
1720
% V1.8 \maxdepth defaults to 4pt, but should be font size dependent
 
1721
\maxdepth=0.5\@IEEEnormalsizeunitybaselineskip
783
1722
\textheight       58pc  % 9.63in, 696pt
784
 
% Tweak textheight to a perfect integer number of lines/page.
785
 
% The normal baselineskip for each document point size is used 
786
 
% to determine these values.
787
 
\ifx\CLASSOPTIONpt\@IEEEptsizenine\textheight=63\@IEEEnormalsizeunitybaselineskip\fi      % 63 lines/page
788
 
\ifx\CLASSOPTIONpt\@IEEEptsizeten\textheight=58\@IEEEnormalsizeunitybaselineskip\fi       % 58 lines/page
789
 
\ifx\CLASSOPTIONpt\@IEEEptsizeeleven\textheight=52\@IEEEnormalsizeunitybaselineskip\fi    % 52 lines/page
790
 
\ifx\CLASSOPTIONpt\@IEEEptsizetwelve\textheight=50\@IEEEnormalsizeunitybaselineskip\fi    % 50 lines/page
 
1723
 
 
1724
% set the default top margin to 58pt
 
1725
% which results in a \topmargin of -49.59pt for 10pt documents
 
1726
\IEEEsettopmargin{t}{58pt}
 
1727
% tweak textheight to a perfect integer number of lines/column.
 
1728
% standard is: 9pt/63 lpc; 10pt/58 lpc; 11pt/52 lpc; 12pt/50 lpc
 
1729
\IEEEquantizetextheight{c}
 
1730
% tweak top margin so that the error is shared equally at the top and bottom
 
1731
\IEEEsettopmargin{q}{0sp}
791
1732
 
792
1733
 
793
1734
\columnsep         1pc
794
1735
\textwidth        43pc   % 2 x 21pc + 1pc = 43pc
795
 
 
796
 
 
797
 
% the default side margins are equal
798
 
\if@IEEEusingAfourpaper 
799
 
\oddsidemargin        14.32mm
800
 
\evensidemargin       14.32mm
801
 
\else
802
 
\oddsidemargin        0.680in
803
 
\evensidemargin       0.680in
804
 
\fi
805
 
% compensate for LaTeX's 1in offset
806
 
\addtolength{\oddsidemargin}{-1in}
807
 
\addtolength{\evensidemargin}{-1in}
808
 
 
809
 
 
810
 
 
811
 
% adjust margins for conference mode
 
1736
 
 
1737
% set the default side margins to center the text
 
1738
\IEEEsetsidemargin{c}{0pt}
 
1739
 
 
1740
 
 
1741
% adjust margins for default conference mode
812
1742
\ifCLASSOPTIONconference
813
 
 \topmargin        -0.25in
814
 
 % we retain the reserved, but unused space for headers
815
 
 \addtolength{\topmargin}{-\headheight}
816
 
 \addtolength{\topmargin}{-\headsep}
817
1743
 \textheight        9.25in % The standard for conferences (668.4975pt)
818
 
 % Tweak textheight to a perfect integer number of lines/page.
819
 
 \ifx\CLASSOPTIONpt\@IEEEptsizenine\textheight=61\@IEEEnormalsizeunitybaselineskip\fi      % 61 lines/page
820
 
 \ifx\CLASSOPTIONpt\@IEEEptsizeten\textheight=56\@IEEEnormalsizeunitybaselineskip\fi       % 56 lines/page
821
 
 \ifx\CLASSOPTIONpt\@IEEEptsizeeleven\textheight=50\@IEEEnormalsizeunitybaselineskip\fi    % 50 lines/page
822
 
 \ifx\CLASSOPTIONpt\@IEEEptsizetwelve\textheight=48\@IEEEnormalsizeunitybaselineskip\fi    % 48 lines/page
 
1744
 \IEEEsettopmargin{t}{0.75in}
 
1745
 % tweak textheight to a perfect integer number of lines/page.
 
1746
 % standard is: 9pt/61 lpc; 10pt/56 lpc; 11pt/50 lpc; 12pt/48 lpc
 
1747
 \IEEEquantizetextheight{c}
 
1748
 % tweak top margin so that the error is shared equally at the top and bottom
 
1749
 \IEEEsettopmargin{q}{0sp}
823
1750
\fi
824
1751
 
825
1752
 
 
1753
% compsoc text sizes, margins and spacings
 
1754
\ifCLASSOPTIONcompsoc
 
1755
 \columnsep         12bp
 
1756
 % CS specs for \textwdith are 6.875in
 
1757
 % \textwidth         6.875in
 
1758
 % however, measurements from proofs show they are using 3.5in columns
 
1759
 \textwidth         7in
 
1760
 \advance\textwidth by \columnsep
 
1761
 % set the side margins to center the text
 
1762
 \IEEEsetsidemargin{c}{0pt}
 
1763
 % top/bottom margins to center
 
1764
 % could just set \textheight to 9.75in for all the different paper sizes
 
1765
 % and then quantize, but we'll do it the long way here to allow for easy
 
1766
 % future per-paper size adjustments
 
1767
 \IEEEsettextheight{0.625in}{0.625in}% 11in - 2 * 0.625in = 9.75in is the standard text height for compsoc journals
 
1768
 \IEEEsettopmargin{t}{0.625in}
 
1769
 \if@IEEEusingcspaper
 
1770
   \IEEEsettextheight{0.5in}{0.5in}% 10.75in - 2 * 0.5in = 9.75in
 
1771
   \IEEEsettopmargin{t}{0.5in}
 
1772
 \fi
 
1773
 \if@IEEEusingAfourpaper
 
1774
   \IEEEsettextheight{24.675mm}{24.675mm}% 297mm - 2 * 24.675mm = 247.650mm (9.75in)
 
1775
   \IEEEsettopmargin{t}{24.675mm}
 
1776
 \fi
 
1777
 % tweak textheight to a perfect integer number of lines/page.
 
1778
 % standard is: 9pt/65 lpc; 10pt/61 lpc; 11pt/53 lpc; 12pt/49 lpc
 
1779
 \IEEEquantizetextheight{c}
 
1780
 % tweak top margin so that the error is shared equally at the top and bottom
 
1781
 \IEEEsettopmargin{q}{0sp}
 
1782
 
826
1783
% compsoc conference
827
 
\ifCLASSOPTIONcompsoc
828
 
\ifCLASSOPTIONconference
829
 
 % compsoc conference use a larger value for columnsep
830
 
 \columnsep 0.375in
831
 
 % compsoc conferences want 1in top margin, 1.125in bottom margin
832
 
 \topmargin        0in
833
 
 \addtolength{\topmargin}{-6pt}% we tweak this a tad to better comply with top of line stuff
834
 
 % we retain the reserved, but unused space for headers
835
 
 \addtolength{\topmargin}{-\headheight}
836
 
 \addtolength{\topmargin}{-\headsep}
837
 
 \textheight        8.875in % (641.39625pt)
838
 
 % Tweak textheight to a perfect integer number of lines/page.
839
 
 \ifx\CLASSOPTIONpt\@IEEEptsizenine\textheight=58\@IEEEnormalsizeunitybaselineskip\fi      % 58 lines/page
840
 
 \ifx\CLASSOPTIONpt\@IEEEptsizeten\textheight=53\@IEEEnormalsizeunitybaselineskip\fi       % 53 lines/page
841
 
 \ifx\CLASSOPTIONpt\@IEEEptsizeeleven\textheight=48\@IEEEnormalsizeunitybaselineskip\fi    % 48 lines/page
842
 
 \ifx\CLASSOPTIONpt\@IEEEptsizetwelve\textheight=46\@IEEEnormalsizeunitybaselineskip\fi    % 46 lines/page 
843
 
 \textwidth 6.5in
844
 
 % the default side margins are equal
845
 
 \if@IEEEusingAfourpaper 
846
 
  \oddsidemargin        22.45mm
847
 
  \evensidemargin       22.45mm
848
 
 \else
849
 
  \oddsidemargin        1in
850
 
  \evensidemargin       1in
 
1784
 \ifCLASSOPTIONconference
 
1785
  % compsoc conference use a larger value for columnsep
 
1786
  \columnsep 0.25in
 
1787
  \IEEEsettextwidth{0.75in}{0.75in}
 
1788
  % set the side margins to center the text (0.75in for letterpaper)
 
1789
  \IEEEsetsidemargin{c}{0pt}
 
1790
  % compsoc conferences want 1in top and bottom margin
 
1791
  \IEEEsettextheight{1in}{1in}
 
1792
  \IEEEsettopmargin{t}{1in}
 
1793
  % tweak textheight to a perfect integer number of lines/page.
 
1794
  % standard is: 9pt/58 lpc; 10pt/53 lpc; 11pt/48 lpc; 12pt/46 lpc
 
1795
  \IEEEquantizetextheight{c}
 
1796
  % tweak top margin so that the error is shared equally at the top and bottom
 
1797
  \IEEEsettopmargin{q}{0sp}
851
1798
 \fi
852
 
 % compensate for LaTeX's 1in offset
853
 
 \addtolength{\oddsidemargin}{-1in}
854
 
 \addtolength{\evensidemargin}{-1in}
855
 
\fi\fi
 
1799
\fi
856
1800
 
857
1801
 
858
1802
 
859
1803
% draft mode settings override that of all other modes
860
1804
% provides a nice 1in margin all around the paper and extra
861
1805
% space between the lines for editor's comments
862
 
\ifCLASSOPTIONdraftcls 
863
 
  % want 1in from top of paper to text
864
 
  \setlength{\topmargin}{-\headsep}%
865
 
  \addtolength{\topmargin}{-\headheight}%
 
1806
\ifCLASSOPTIONdraftcls
866
1807
  % we want 1in side margins regardless of paper type
867
 
  \oddsidemargin      0in
868
 
  \evensidemargin     0in
869
 
  % set the text width
870
 
  \setlength{\textwidth}{\paperwidth}%
871
 
  \addtolength{\textwidth}{-2.0in}%
872
 
  \setlength{\textheight}{\paperheight}%
873
 
  \addtolength{\textheight}{-2.0in}%
 
1808
  \IEEEsettextwidth{1in}{1in}
 
1809
  \IEEEsetsidemargin{c}{0pt}
 
1810
  % want 1in top and bottom margins
 
1811
  \IEEEsettextheight{1in}{1in}
 
1812
  \IEEEsettopmargin{t}{1in}
874
1813
  % digitize textheight to be an integer number of lines.
875
 
  % this may cause the bottom margin to be off a tad
876
 
  \addtolength{\textheight}{-1\topskip}%
877
 
  \divide\textheight  by \baselineskip%
878
 
  \multiply\textheight  by \baselineskip%
879
 
  \addtolength{\textheight}{\topskip}%
 
1814
  % this may cause the top and bottom margins to be off a tad
 
1815
  \IEEEquantizetextheight{c}
 
1816
  % tweak top margin so that the error is shared equally at the top and bottom
 
1817
  \IEEEsettopmargin{q}{0sp}
880
1818
\fi
881
1819
 
882
1820
 
896
1834
  \ifx\CLASSINPUTinnersidemargin\@IEEEundefined
897
1835
    \edef\CLASSINPUTinnersidemargin{\CLASSINPUToutersidemargin}
898
1836
  \fi
899
 
  \setlength{\oddsidemargin}{\CLASSINPUTinnersidemargin}
900
 
  \ifCLASSOPTIONtwoside
901
 
    \setlength{\evensidemargin}{\CLASSINPUToutersidemargin}
902
 
  \else
903
 
    \setlength{\evensidemargin}{\CLASSINPUTinnersidemargin}
904
 
  \fi
905
 
  \addtolength{\oddsidemargin}{-1in}
906
 
  \addtolength{\evensidemargin}{-1in}
907
 
  \setlength{\textwidth}{\paperwidth}
908
 
  \addtolength{\textwidth}{-\CLASSINPUTinnersidemargin}
909
 
  \addtolength{\textwidth}{-\CLASSINPUToutersidemargin}
 
1837
  \IEEEsettextwidth{\CLASSINPUTinnersidemargin}{\CLASSINPUToutersidemargin}
 
1838
  \IEEEsetsidemargin{i}{\CLASSINPUTinnersidemargin}
910
1839
  \typeout{** ATTENTION: Overriding inner side margin to \CLASSINPUTinnersidemargin\space and 
911
1840
           outer side margin to \CLASSINPUToutersidemargin\space via \string\CLASSINPUT.}
912
1841
\fi
928
1857
  \ifx\CLASSINPUTtoptextmargin\@IEEEundefined
929
1858
    \edef\CLASSINPUTtoptextmargin{\CLASSINPUTbottomtextmargin}
930
1859
  \fi
931
 
  \setlength{\topmargin}{\CLASSINPUTtoptextmargin}
932
 
  \addtolength{\topmargin}{-1in}
933
 
  \addtolength{\topmargin}{-\headheight}
934
 
  \addtolength{\topmargin}{-\headsep}
935
 
  \setlength{\textheight}{\paperheight}
936
 
  \addtolength{\textheight}{-\CLASSINPUTtoptextmargin}
937
 
  \addtolength{\textheight}{-\CLASSINPUTbottomtextmargin}
938
 
  % in the default format we use the normal baselineskip as topskip
939
 
  % we only need 0.7 of this to clear typical top text and we need
940
 
  % an extra 0.3 spacing at the bottom for descenders. This will
941
 
  % correct for both.
942
 
  \addtolength{\topmargin}{-0.3\@IEEEnormalsizeunitybaselineskip}
 
1860
  \IEEEsettextheight{\CLASSINPUTtoptextmargin}{\CLASSINPUTbottomtextmargin}
 
1861
  \IEEEsettopmargin{t}{\CLASSINPUTtoptextmargin}
943
1862
  \typeout{** ATTENTION: Overriding top text margin to \CLASSINPUTtoptextmargin\space and 
944
1863
           bottom text margin to \CLASSINPUTbottomtextmargin\space via \string\CLASSINPUT.}
945
1864
\fi
946
1865
 
947
1866
 
948
1867
 
949
 
 
 
1868
% default to center header and footer text in the margins
 
1869
\IEEEsetheadermargin{c}{0pt}
 
1870
\IEEEsetfootermargin{c}{0pt}
 
1871
 
 
1872
% adjust header and footer positions for compsoc journals
 
1873
\ifCLASSOPTIONcompsoc
 
1874
  \ifCLASSOPTIONjournal
 
1875
    \IEEEsetheadermargin{b}{\@IEEEnormalsizeunitybaselineskip}
 
1876
    \IEEEsetfootermargin{t}{\@IEEEnormalsizeunitybaselineskip}
 
1877
  \fi
 
1878
\fi
 
1879
 
 
1880
 
 
1881
% V1.8a display lines per column info message on user's console
 
1882
\def\IEEEdisplayinfolinespercolumn{\@IEEEtrantmpdimenA=\textheight
 
1883
% topskip represents only one line even if > baselineskip
 
1884
\advance\@IEEEtrantmpdimenA by -1\topskip
 
1885
\@IEEEtrantmpcountA=\@IEEEtrantmpdimenA
 
1886
\@IEEEtrantmpcountB=\@IEEEtrantmpdimenA
 
1887
\divide\@IEEEtrantmpcountB by \baselineskip
 
1888
% need to add one line to include topskip (first) line
 
1889
\advance\@IEEEtrantmpcountB by 1
 
1890
% save lines per column value as text
 
1891
\edef\@IEEEnumlinespercolumninfotxt{\the\@IEEEtrantmpcountB}
 
1892
% backout topskip advance to allow direct \@IEEEtrantmpcountA comparison
 
1893
\advance\@IEEEtrantmpcountB by -1
 
1894
% restore value as text height (without topskip) rather than just as number of lines
 
1895
\multiply\@IEEEtrantmpcountB by \baselineskip
 
1896
% is the column height an integer number of lines per column?
 
1897
\ifnum\@IEEEtrantmpcountA=\@IEEEtrantmpcountB
 
1898
\edef\@IEEEnumlinespercolumnexactinfotxt{exact}
 
1899
\else
 
1900
\@IEEEtrantmpdimenA\@IEEEtrantmpcountA sp\relax
 
1901
\advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpcountB sp\relax
 
1902
\edef\@IEEEnumlinespercolumnexactinfotxt{approximate, difference = \the\@IEEEtrantmpdimenA}
 
1903
\fi
 
1904
\typeout{-- Lines per column: \@IEEEnumlinespercolumninfotxt\space (\@IEEEnumlinespercolumnexactinfotxt).}}
 
1905
% delay execution till start of document to allow for user changes
 
1906
\AtBeginDocument{\IEEEdisplayinfolinespercolumn}
950
1907
 
951
1908
 
952
1909
 
961
1918
\topsep           0.5\baselineskip
962
1919
 
963
1920
% Controls the additional spacing around lists preceded
964
 
% or followed by blank lines. IEEE does not increase
 
1921
% or followed by blank lines. the IEEE does not increase
965
1922
% spacing before or after paragraphs so it is set to zero.
966
1923
% \z@ is the same as zero, but faster.
967
1924
\partopsep          \z@
968
1925
 
969
1926
% Controls the spacing between paragraphs in lists. 
970
 
% IEEE does not increase spacing before or after paragraphs
 
1927
% The IEEE does not increase spacing before or after paragraphs
971
1928
% so this is also zero. 
972
1929
% With IEEEtran.cls, global changes to
973
1930
% this value DO affect lists (but not IED lists).
974
1931
\parsep             \z@
975
1932
 
976
1933
% Controls the extra spacing between list items. 
977
 
% IEEE does not put extra spacing between items.
 
1934
% The IEEE does not put extra spacing between items.
978
1935
% With IEEEtran.cls, global changes to this value DO affect
979
1936
% lists (but not IED lists).
980
1937
\itemsep            \z@
982
1939
% \itemindent is the amount to indent the FIRST line of a list
983
1940
% item. It is auto set to zero within the \list environment. To alter
984
1941
% it, you have to do so when you call the \list.
985
 
% However, IEEE uses this for the theorem environment
 
1942
% However, the IEEE uses this for the theorem environment
986
1943
% There is an alternative value for this near \leftmargini below
987
1944
\itemindent         -1em
988
1945
 
1012
1969
% However, the new V1.3 IED list environments override all the
1013
1970
% @list stuff (\@listX is called within \list for the
1014
1971
% appropriate level just before the user's list_decl is called). 
1015
 
% \topsep is now 2pt as IEEE puts a little extra space around
 
1972
% \topsep is now 2pt as the IEEE puts a little extra space around
1016
1973
% lists - used by those non-IED macros that depend on \list.
1017
1974
% Note that \parsep and \itemsep are not redefined as in 
1018
1975
% the sizexx.clo \@listX (which article.cls uses) so global changes
1032
1989
    \advance\labelwidth-\labelsep \topsep 2pt}
1033
1990
 
1034
1991
 
1035
 
% IEEE uses 5) not 5.
 
1992
% The IEEE uses 5) not 5.
1036
1993
\def\labelenumi{\theenumi)}     \def\theenumi{\arabic{enumi}}
1037
1994
 
1038
 
% IEEE uses a) not (a)
 
1995
% The IEEE uses a) not (a)
1039
1996
\def\labelenumii{\theenumii)}  \def\theenumii{\alph{enumii}}
1040
1997
 
1041
 
% IEEE uses iii) not iii.
 
1998
% The IEEE uses iii) not iii.
1042
1999
\def\labelenumiii{\theenumiii)} \def\theenumiii{\roman{enumiii}}
1043
2000
 
1044
 
% IEEE uses A) not A.
 
2001
% The IEEE uses A) not A.
1045
2002
\def\labelenumiv{\theenumiv)}   \def\theenumiv{\Alph{enumiv}}
1046
2003
 
1047
2004
% exactly the same as in article.cls
1062
2019
% ***************************
1063
2020
1064
2021
1065
 
% IEEE seems to use at least two different values by
 
2022
% The IEEE seems to use at least two different values by
1066
2023
% which ITEMIZED list labels are indented to the right
1067
2024
% For The Journal of Lightwave Technology (JLT) and The Journal
1068
2025
% on Selected Areas in Communications (JSAC), they tend to use
1108
2065
% alter the effective \IEEElabelindent for deeper
1109
2066
% levels
1110
2067
% There may not be such a thing as correct "standard IEEE"
1111
 
% values. What IEEE actually does may depend on the specific
 
2068
% values. What the IEEE actually does may depend on the specific
1112
2069
% circumstances.
1113
2070
% The first list level almost always has full indention.
1114
2071
% The second levels I've seen have only 75% of the normal indentation
1129
2086
% This controls the default spacing between the end of the IED
1130
2087
% list labels and the list text, when normal text is used for
1131
2088
% the labels.
 
2089
% compsoc uses a larger value here, but we'll set that later
 
2090
% in the class so that this code block area can be extracted
 
2091
% as-is for IEEEtrantools.sty
1132
2092
\newdimen\IEEEiednormlabelsep
1133
2093
\IEEEiednormlabelsep 0.6em
1134
2094
 
1135
2095
% This controls the default spacing between the end of the IED
1136
2096
% list labels and the list text, when math symbols are used for
1137
 
% the labels (nomenclature lists). IEEE usually increases the 
 
2097
% the labels (nomenclature lists). The IEEE usually increases the 
1138
2098
% spacing in these cases
1139
2099
\newdimen\IEEEiedmathlabelsep
1140
2100
\IEEEiedmathlabelsep 1.2em
1141
2101
 
1142
2102
% This controls the extra vertical separation put above and
1143
 
% below each IED list. IEEE usually puts a little extra spacing
 
2103
% below each IED list. the IEEE usually puts a little extra spacing
1144
2104
% around each list. However, this spacing is barely noticeable.
 
2105
% compsoc uses a larger value here, but we'll set that later
 
2106
% in the class so that this code block area can be extracted
 
2107
% as-is for IEEEtrantools.sty
1145
2108
\newskip\IEEEiedtopsep
1146
2109
\IEEEiedtopsep 2pt plus 1pt minus 1pt
1147
2110
 
1207
2170
% label justifications. Use these commands within
1208
2171
% the IED environment option or in the \IEEEiedlistdecl
1209
2172
% Note that changing the normal list justifications
1210
 
% is nonstandard and IEEE may not like it if you do so!
 
2173
% is nonstandard and the IEEE may not like it if you do so!
1211
2174
% I include these commands as they may be helpful to
1212
2175
% those who are using these enhanced list controls for
1213
2176
% other non-IEEE related LaTeX work.
1305
2268
                \ifnum\@listdepth>5\relax\@toodeep\else%
1306
2269
                \advance\@itemdepth\@ne%
1307
2270
                \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
1308
 
                % get the labelindentfactor for this level
 
2271
                % get the IEEElabelindentfactor for this level
1309
2272
                \advance\@listdepth\@ne% we need to know what the level WILL be
1310
2273
                \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
1311
2274
                \advance\@listdepth-\@ne% undo our increment
1334
2297
                \IEEEiedlistdecl% let user alter parameters
1335
2298
                #1\relax%
1336
2299
                % If the user has requested not to use the
1337
 
                % labelindent factor, don't revise \labelindent
 
2300
                % IEEElabelindent factor, don't revise \IEEElabelindent
1338
2301
                \ifIEEEnolabelindentfactor\relax%
1339
 
                \else\IEEElabelindent=\IEEElabelindentfactor\labelindent%
 
2302
                \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent%
1340
2303
                \fi%
1341
2304
                % Unless the user has requested otherwise,
1342
2305
                % calculate our left margin based
1356
2319
                \ifnum\@listdepth>5\relax\@toodeep\else%
1357
2320
                \advance\@enumdepth\@ne%
1358
2321
                \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
1359
 
                % get the labelindentfactor for this level
 
2322
                % get the IEEElabelindentfactor for this level
1360
2323
                \advance\@listdepth\@ne% we need to know what the level WILL be
1361
2324
                \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
1362
2325
                \advance\@listdepth-\@ne% undo our increment
1405
2368
% Note controlled spacing here, shield end of lines with %
1406
2369
\def\@@IEEEdescription[#1]{%
1407
2370
                \ifnum\@listdepth>5\relax\@toodeep\else%
1408
 
                % get the labelindentfactor for this level
 
2371
                % get the IEEElabelindentfactor for this level
1409
2372
                \advance\@listdepth\@ne% we need to know what the level WILL be
1410
2373
                \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
1411
2374
                \advance\@listdepth-\@ne% undo our increment
1458
2421
\makebox[\labelwidth][r]{\normalfont #1}\fi\fi}
1459
2422
 
1460
2423
 
 
2424
% compsoc uses a larger value for the normal labelsep
 
2425
% and also extra spacing above and below each list
 
2426
\ifCLASSOPTIONcompsoc
 
2427
  \IEEEiednormlabelsep 1.2em
 
2428
  \IEEEiedtopsep 6pt plus 3pt minus 3pt
 
2429
\fi
 
2430
 
 
2431
 
1461
2432
% VERSE and QUOTE
1462
2433
% V1.7 define environments with newenvironment
1463
2434
\newenvironment{verse}{\let\\=\@centercr
1474
2445
% \titlepage
1475
2446
% provided only for backward compatibility. \maketitle is the correct
1476
2447
% way to create the title page. 
1477
 
\newif\if@restonecol
1478
2448
\def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
1479
2449
    \else \newpage \fi \thispagestyle{empty}\c@page\z@}
1480
2450
\def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi}
1500
2470
% draft mode. Here is a little LaTeX secret - \footnotesep
1501
2471
% determines the height of an invisible strut that is placed
1502
2472
% *above* the baseline of footnotes after the first. Since
1503
 
% LaTeX considers the space for characters to be 0.7/baselineskip
1504
 
% above the baseline and 0.3/baselineskip below it, we need to
1505
 
% use 0.7/baselineskip as a \footnotesep to maintain equal spacing
1506
 
% between all the lines of the footnotes. IEEE often uses a tad
 
2473
% LaTeX considers the space for characters to be 0.7\baselineskip
 
2474
% above the baseline and 0.3\baselineskip below it, we need to
 
2475
% use 0.7\baselineskip as a \footnotesep to maintain equal spacing
 
2476
% between all the lines of the footnotes. The IEEE often uses a tad
1507
2477
% more, so use 0.8\baselineskip. This slightly larger value also helps
1508
2478
% the text to clear the footnote marks. Note that \thanks in IEEEtran
1509
2479
% uses its own value of \footnotesep which is set in \maketitle.
1515
2485
\fboxsep = 3pt
1516
2486
\fboxrule = .4pt
1517
2487
% V1.6 use 1em, then use LaTeX2e's \@makefnmark
1518
 
% Note that IEEE normally *left* aligns the footnote marks, so we don't need
 
2488
% Note that the IEEE normally *left* aligns the footnote marks, so we don't need
1519
2489
% box resizing tricks here.
1520
2490
\long\def\@makefntext#1{\parindent 1em\indent\hbox{\@makefnmark}#1}% V1.6 use 1em
1521
2491
% V1.7 compsoc does not use superscipts for footnote marks
1524
2494
\long\def\@makefntext#1{\parindent 1em\indent\hbox{\@IEEEcompsocmakefnmark}#1}
1525
2495
\fi
1526
2496
 
1527
 
% IEEE does not use footnote rules
 
2497
% The IEEE does not use footnote rules
1528
2498
\def\footnoterule{}
1529
2499
 
1530
 
% V1.7 for compsoc, IEEE uses a footnote rule only for \thanks. We devise a "one-shot"
 
2500
% V1.7 for compsoc, the IEEE uses a footnote rule only for \thanks. We devise a "one-shot"
1531
2501
% system to implement this.
1532
2502
\newif\if@IEEEenableoneshotfootnoterule
1533
2503
\@IEEEenableoneshotfootnoterulefalse
1583
2553
\def\thesection{\Roman{section}}                             % I
1584
2554
% V1.7, \mbox prevents breaks around - 
1585
2555
\def\thesubsection{\mbox{\thesection-\Alph{subsection}}}     % I-A
1586
 
% V1.7 use I-A1 format used by IEEE rather than I-A.1
 
2556
% V1.7 use I-A1 format used by the IEEE rather than I-A.1
1587
2557
\def\thesubsubsection{\thesubsection\arabic{subsubsection}}  % I-A1
1588
2558
\def\theparagraph{\thesubsubsection\alph{paragraph}}         % I-A1a
1589
2559
\fi
1636
2606
\def\indexname{Index}
1637
2607
\def\figurename{Fig.}
1638
2608
\def\tablename{TABLE}
1639
 
\@IEEEcompsocconfonly{\def\figurename{Figure}\def\tablename{Table}}
 
2609
\@IEEEcompsocconfonly{\def\figurename{Figure}}
1640
2610
\def\partname{Part}
1641
2611
\def\appendixname{Appendix}
1642
2612
\def\abstractname{Abstract}
1675
2645
\let\l@table\l@figure
1676
2646
 
1677
2647
 
1678
 
%% Definitions for floats
1679
 
%%
1680
 
%% Normal Floats
1681
 
\floatsep 1\baselineskip plus  0.2\baselineskip minus  0.2\baselineskip
1682
 
\textfloatsep 1.7\baselineskip plus  0.2\baselineskip minus  0.4\baselineskip
 
2648
% Definitions for floats
 
2649
%
 
2650
% Normal Floats
 
2651
% V1.8 floatsep et al. revised down by 0.15\baselineskip
 
2652
% to account for the sideeffects of \topskip compensation
 
2653
\floatsep 0.85\baselineskip plus  0.2\baselineskip minus  0.2\baselineskip
 
2654
\textfloatsep 1.55\baselineskip plus  0.2\baselineskip minus  0.4\baselineskip
1683
2655
\@fptop 0pt plus 1fil
1684
 
\@fpsep 0.75\baselineskip plus 2fil 
 
2656
\@fpsep 0.75\baselineskip plus 2fil
1685
2657
\@fpbot 0pt plus 1fil
1686
2658
\def\topfraction{0.9}
1687
2659
\def\bottomfraction{0.4}
1689
2661
% V1.7, let top floats approach 90% of page
1690
2662
\def\textfraction{0.1}
1691
2663
 
1692
 
%% Double Column Floats
1693
 
\dblfloatsep 1\baselineskip plus  0.2\baselineskip minus  0.2\baselineskip
 
2664
% Double Column Floats
 
2665
\dblfloatsep 0.85\baselineskip plus  0.2\baselineskip minus  0.2\baselineskip
1694
2666
 
1695
 
\dbltextfloatsep 1.7\baselineskip plus  0.2\baselineskip minus  0.4\baselineskip
 
2667
\dbltextfloatsep 1.55\baselineskip plus  0.2\baselineskip minus  0.4\baselineskip
1696
2668
% Note that it would be nice if the rubber here actually worked in LaTeX2e.
1697
2669
% There is a long standing limitation in LaTeX, first discovered (to the best
1698
2670
% of my knowledge) by Alan Jeffrey in 1992. LaTeX ignores the stretchable
1710
2682
\def\dblfloatpagefraction{0.8}
1711
2683
\setcounter{dbltopnumber}{4}
1712
2684
 
1713
 
\intextsep 1\baselineskip plus 0.2\baselineskip minus  0.2\baselineskip
 
2685
\intextsep 0.85\baselineskip plus 0.2\baselineskip minus  0.2\baselineskip
1714
2686
\setcounter{topnumber}{2}
1715
2687
\setcounter{bottomnumber}{2}
1716
2688
\setcounter{totalnumber}{4}
1723
2695
% but only \abovecaptionskip is used above figure captions and *below* table
1724
2696
% captions
1725
2697
\setlength\abovecaptionskip{0.5\baselineskip}
 
2698
% compsoc journals are a little more generous
 
2699
\ifCLASSOPTIONcompsoc\ifCLASSOPTIONjournal
 
2700
  \setlength\abovecaptionskip{0.75\baselineskip}
 
2701
\fi\fi
1726
2702
\setlength\belowcaptionskip{0pt}
1727
2703
% V1.6 create hooks in case the caption spacing ever needs to be
1728
2704
% overridden by a user
1734
2710
% as with LaTeX2e. Otherwise, there will be problems when using hyperref.
1735
2711
\def\@IEEEtablestring{table}
1736
2712
 
 
2713
 
 
2714
% V1.8 compensate for \topskip so top of top figures align with tops of the first lines of main text
 
2715
% here we calculate a space equal to the amount \topskip exceeds the main text height
 
2716
% we hook in at \@floatboxreset
 
2717
\def\@IEEEfiguretopskipspace{\ifdim\prevdepth=-1000pt\relax
 
2718
\setlength{\@IEEEtrantmpdimenA}{1\topskip}\relax
 
2719
\addtolength{\@IEEEtrantmpdimenA}{-0.7\@IEEEnormalsizeunitybaselineskip}\relax
 
2720
\vspace*{\@IEEEtrantmpdimenA}\fi}
 
2721
% V1.8 compensate for \topskip at the top of top tables so caption text is on main text baseline
 
2722
% use a strut set on the caption baseline within \@makecaption
 
2723
\def\@IEEEtabletopskipstrut{\ifdim\prevdepth=-1000pt\rule{0pt}{\topskip}\fi}
 
2724
% the \ifdim\prevdepth checks are always expected to be true for IEEE style float caption ordering
 
2725
% because top of figure content and top of captions in tables is the first thing on the vertical
 
2726
% list of these floats
 
2727
% thanks to Donald Arseneau for his 2000/11/11 post "Re: caption hacking" with info on this topic.
 
2728
 
 
2729
 
1737
2730
\ifCLASSOPTIONcompsoc
1738
2731
% V1.7 compsoc \@makecaption
1739
2732
\ifCLASSOPTIONconference% compsoc conference
1741
2734
% test if is a for a figure or table
1742
2735
\ifx\@captype\@IEEEtablestring%
1743
2736
% if a table, do table caption
1744
 
\normalsize\begin{center}{\normalfont\sffamily\normalsize {#1.}~ #2}\end{center}%
 
2737
\footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\footnotesize {#1.}\nobreakspace\scshape #2}\par\addvspace{0.5\baselineskip}\egroup%
1745
2738
\@IEEEtablecaptionsepspace
1746
2739
% if not a table, format it as a figure
1747
2740
\else
1748
2741
\@IEEEfigurecaptionsepspace
1749
 
\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}~ #2}%
 
2742
\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace #2}%
1750
2743
\ifdim \wd\@tempboxa >\hsize%
1751
2744
% if caption is longer than a line, let it wrap around
1752
 
\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}~ }%
1753
 
\parbox[t]{\hsize}{\normalfont\sffamily\normalsize \noindent\unhbox\@tempboxa#2}%
 
2745
\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace}%
 
2746
\parbox[t]{\hsize}{\normalfont\footnotesize \noindent\unhbox\@tempboxa#2}%
1754
2747
% if caption is shorter than a line, center
1755
2748
\else%
1756
 
\hbox to\hsize{\normalfont\sffamily\normalsize\hfil\box\@tempboxa\hfil}%
 
2749
\hbox to\hsize{\normalfont\footnotesize\hfil\box\@tempboxa\hfil}%
1757
2750
\fi\fi}
 
2751
%
1758
2752
\else% nonconference compsoc
1759
2753
\long\def\@makecaption#1#2{%
1760
2754
% test if is a for a figure or table
1761
2755
\ifx\@captype\@IEEEtablestring%
1762
2756
% if a table, do table caption
1763
 
\normalsize\begin{center}{\normalfont\sffamily\normalsize #1}\\{\normalfont\sffamily\normalsize #2}\end{center}%
 
2757
\footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\sffamily\footnotesize #1}\\{\normalfont\sffamily\footnotesize #2}\par\addvspace{0.5\baselineskip}\egroup%
1764
2758
\@IEEEtablecaptionsepspace
1765
2759
% if not a table, format it as a figure
1766
2760
\else
1767
2761
\@IEEEfigurecaptionsepspace
1768
 
\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}~ #2}%
 
2762
\setbox\@tempboxa\hbox{\normalfont\sffamily\footnotesize {#1.}\nobreakspace #2}%
1769
2763
\ifdim \wd\@tempboxa >\hsize%
1770
2764
% if caption is longer than a line, let it wrap around
1771
 
\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}~ }%
1772
 
\parbox[t]{\hsize}{\normalfont\sffamily\normalsize \noindent\unhbox\@tempboxa#2}%
 
2765
\setbox\@tempboxa\hbox{\normalfont\sffamily\footnotesize {#1.}\nobreakspace}%
 
2766
\parbox[t]{\hsize}{\normalfont\sffamily\footnotesize \noindent\unhbox\@tempboxa#2}%
1773
2767
% if caption is shorter than a line, left justify
1774
2768
\else%
1775
 
\hbox to\hsize{\normalfont\sffamily\normalsize\box\@tempboxa\hfil}%
 
2769
\hbox to\hsize{\normalfont\sffamily\footnotesize\box\@tempboxa\hfil}%
1776
2770
\fi\fi}
1777
2771
\fi
1778
 
 
 
2772
%
1779
2773
\else% traditional noncompsoc \@makecaption
1780
2774
\long\def\@makecaption#1#2{%
1781
2775
% test if is a for a figure or table
1782
2776
\ifx\@captype\@IEEEtablestring%
1783
2777
% if a table, do table caption
1784
 
\footnotesize\begin{center}{\normalfont\footnotesize #1}\\{\normalfont\footnotesize\scshape #2}\end{center}%
 
2778
\footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\footnotesize #1}\\{\normalfont\footnotesize\scshape #2}\par\addvspace{0.5\baselineskip}\egroup%
1785
2779
\@IEEEtablecaptionsepspace
1786
2780
% if not a table, format it as a figure
1787
2781
\else
1788
2782
\@IEEEfigurecaptionsepspace
1789
2783
% 3/2001 use footnotesize, not small; use two nonbreaking spaces, not one
1790
 
\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}~~ #2}%
 
2784
\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace\nobreakspace #2}%
1791
2785
\ifdim \wd\@tempboxa >\hsize%
1792
2786
% if caption is longer than a line, let it wrap around
1793
 
\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}~~ }%
 
2787
\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace\nobreakspace}%
1794
2788
\parbox[t]{\hsize}{\normalfont\footnotesize\noindent\unhbox\@tempboxa#2}%
1795
2789
% if caption is shorter than a line, center if conference, left justify otherwise
1796
2790
\else%
1804
2798
% V1.7 disable captions class option, do so in a way that retains operation of \label
1805
2799
% within \caption
1806
2800
\ifCLASSOPTIONcaptionsoff
1807
 
\long\def\@makecaption#1#2{\vspace*{2em}\footnotesize\begin{center}{\footnotesize #1}\end{center}%
 
2801
\long\def\@makecaption#1#2{\vspace*{2em}\footnotesize\bgroup\par\addvspace{0.5\baselineskip}\centering{\footnotesize #1}\par\addvspace{0.5\baselineskip}\egroup%
1808
2802
\let\@IEEEtemporiglabeldefsave\label
1809
2803
\let\@IEEEtemplabelargsave\relax
1810
2804
\def\label##1{\gdef\@IEEEtemplabelargsave{##1}}%
1821
2815
\def\fps@figure{tbp}
1822
2816
\def\ftype@figure{1}
1823
2817
\def\ext@figure{lof}
1824
 
\def\fnum@figure{\figurename~\thefigure}
1825
 
\def\figure{\@float{figure}}
 
2818
\def\fnum@figure{\figurename\nobreakspace\thefigure}
 
2819
% V1.8 within figures add \@IEEEfiguretopskipspace compensation to LaTeX2e's \@floatboxreset
 
2820
\def\figure{\def\@floatboxreset{\reset@font\normalsize\@setminipage\@IEEEfiguretopskipspace}\@float{figure}}
1826
2821
\def\endfigure{\end@float}
1827
 
\@namedef{figure*}{\@dblfloat{figure}}
 
2822
% V1.8 also add \@IEEEfiguretopskipspace compensation to \figure*
 
2823
\@namedef{figure*}{\def\@floatboxreset{\reset@font\normalsize\@setminipage\@IEEEfiguretopskipspace}\@dblfloat{figure}}
1828
2824
\@namedef{endfigure*}{\end@dblfloat}
 
2825
 
1829
2826
\newcounter{table}
1830
2827
\ifCLASSOPTIONcompsoc
1831
2828
\def\thetable{\arabic{table}}
1835
2832
\def\fps@table{tbp}
1836
2833
\def\ftype@table{2}
1837
2834
\def\ext@table{lot}
1838
 
\def\fnum@table{\tablename~\thetable}
1839
 
% V1.6 IEEE uses 8pt text for tables
1840
 
% to default to footnotesize, we hack into LaTeX2e's \@floatboxreset and pray
 
2835
\def\fnum@table{\tablename\nobreakspace\thetable}
 
2836
% V1.6 The IEEE uses 8pt text for tables
 
2837
% within tables alter LaTeX2e's \@floatboxreset to use \footnotesize
1841
2838
\def\table{\def\@floatboxreset{\reset@font\footnotesize\@setminipage}\@float{table}}
1842
2839
\def\endtable{\end@float}
1843
2840
% v1.6b double column tables need to default to footnotesize as well.
1847
2844
 
1848
2845
 
1849
2846
 
 
2847
%% -- Command Argument Scanning Support Functions --
 
2848
%% V1.8a 
 
2849
 
 
2850
% usage: \@IEEEstripouterbraces*{}
 
2851
% \@IEEEstripouterbraces fully expands its argument (which it then stores
 
2852
% in \@IEEEstripouterbracesarg) via \edef, then removes any outer enclosing
 
2853
% braces, and finally stores the result in the macro
 
2854
% \@IEEEstrippedouterbraces.
 
2855
%
 
2856
% For example:
 
2857
% \@IEEEstripouterbraces{{{{ab}c}}}
 
2858
% results in:
 
2859
%
 
2860
% \@IEEEstripouterbracesarg ==> a macro containing {{{ab}c}}
 
2861
% \@IEEEstrippedouterbraces ==> a macro containing {ab}c
 
2862
%
 
2863
% the *-star form,\@IEEEstripouterbraces*, does not expand the argument
 
2864
% contents during processing
 
2865
\def\@IEEEstripouterbraces{\@ifstar{\let\@IEEEstripouterbracesdef=\def\@@IEEEstripouterbraces}{\let\@IEEEstripouterbracesdef=\edef\@@IEEEstripouterbraces}}
 
2866
 
 
2867
\def\@@IEEEstripouterbraces#1{\@IEEEstripouterbracesdef\@IEEEstripouterbracesarg{#1}\relax
 
2868
% If the macro is unchanged after being acquired as a single delimited
 
2869
% argument, we know we have one sequence of tokens without any enclosing
 
2870
% braces. Loop until this is true.
 
2871
\loop
 
2872
  \expandafter\@@@IEEEstripouterbraces\@IEEEstripouterbracesarg\@IEEEgeneralsequenceDELIMITER
 
2873
\ifx\@IEEEstrippedouterbraces\@IEEEstripouterbracesarg
 
2874
\else
 
2875
  \let\@IEEEstripouterbracesarg\@IEEEstrippedouterbraces
 
2876
\repeat}
 
2877
 
 
2878
\def\@@@IEEEstripouterbraces#1\@IEEEgeneralsequenceDELIMITER{\def\@IEEEstrippedouterbraces{#1}}
 
2879
 
 
2880
 
 
2881
 
 
2882
% usage: \@IEEEextractgroup*{}
 
2883
% \@IEEEextractgroup fully expands its argument (which it then stores in
 
2884
% \@IEEEextractgrouparg) via \edef and then assigns the first "brace group"
 
2885
% of tokens to the macro \@IEEEextractedgroup.
 
2886
% The remaining groups, if any, are stored in the macro
 
2887
% \@IEEEextractedgroupremain. If the argument does not contain the requisite
 
2888
% groups, the respective macros will be defined to be empty.
 
2889
% There is an asymmetry in that \@IEEEextractedgroup is stripped of its first
 
2890
% outer grouping while \@IEEEextractedgroupremain retains even the outer
 
2891
% grouping (if present) that originally identified it as a group.
 
2892
%
 
2893
% For example:
 
2894
% \@IEEEextractgroup{{{ab}}{c{de}}}
 
2895
% results in:
 
2896
%
 
2897
% \@IEEEextractgrouparg       ==> a macro containing {{ab}}{c{de}}
 
2898
% \@IEEEextractedgroup        ==> a macro containing {ab}
 
2899
% \@IEEEextractedgroupremain  ==> a macro containing {c{de}}
 
2900
%
 
2901
% The *-star form, \@IEEEextractgroup*, does not expand its argument
 
2902
% contents during processing.
 
2903
\def\@IEEEextractgroup{\@ifstar{\let\@IEEEextractgroupdef=\def\@@IEEEextractgroup}{\let\@IEEEextractgroupdef=\edef\@@IEEEextractgroup}}
 
2904
 
 
2905
\def\@@IEEEextractgroup#1{\@IEEEextractgroupdef\@IEEEextractgrouparg{#1}\relax
 
2906
% trap the case of an empty extracted group as this would cause problems with
 
2907
% \@IEEEextractgroupremain's argument acquisition
 
2908
\ifx\@IEEEextractgrouparg\@empty
 
2909
  \def\@IEEEextractedgroup{}\relax
 
2910
  \def\@IEEEextractedgroupremain{}\relax
 
2911
\else
 
2912
  % We have to use some dirty tricks here. We want to insert {} around
 
2913
  % whatever remains after the first group so that TeX's argument scanner
 
2914
  % will preserve any originally enclosing braces as well as provide an
 
2915
  % empty argument to acquire even if there isn't a second group.
 
2916
  % In this first of two dirty tricks, we put a } at the end of the structure
 
2917
  % we are going to extract from. The \ifnum0=`{\fi keeps TeX happy to allow
 
2918
  % what would otherwise be an unbalanced macro definition for
 
2919
  % \@@IEEEextractgroup to be acceptable to it.
 
2920
  \ifnum0=`{\fi\expandafter\@IEEEextractgroupremain\@IEEEextractgrouparg}\relax
 
2921
\fi}
 
2922
 
 
2923
% In the second part of the dirty tricks, we insert a leading { right after
 
2924
% the first group is acquired, but before the remainder is. Again, the
 
2925
% \ifnum0=`}\fi keeps TeX happy during definition time, but will disappear
 
2926
% during run time.
 
2927
\def\@IEEEextractgroupremain#1{\def\@IEEEextractedgroup{#1}\expandafter\@@IEEEextractgroupremain\expandafter{\ifnum0=`}\fi}
 
2928
 
 
2929
\def\@@IEEEextractgroupremain#1{\def\@IEEEextractedgroupremain{#1}}
 
2930
 
 
2931
 
 
2932
 
 
2933
% \@IEEEextracttoken relocated at top because margin setting commands rely on it
 
2934
 
 
2935
 
 
2936
 
 
2937
% usage: \@IEEEextracttokengroups*{}
 
2938
% \@IEEEextracttokengroups fully expands its argument (which it then stores
 
2939
% in \@IEEEextracttokengroupsarg) and then assigns the first "brace group" of
 
2940
% tokens (with the outermost braces removed) to the macro
 
2941
% \@IEEEextractedfirstgroup.
 
2942
% The meaning of the first nonbrace (but including the empty group) token
 
2943
% within this first group is assigned via \let to \@IEEEextractedfirsttoken
 
2944
% as well as stored in the macro \@IEEEextractedfirsttokenmacro. If a first
 
2945
% nonbrace token does not exist (or is an empty group), these will be \relax
 
2946
% and empty, respectively.  Tokens that would otherwise be discarded during
 
2947
% the acquisition of the first token in the first group are stored in
 
2948
% \@IEEEextractedfirsttokensdiscarded, however their original relative brace
 
2949
% nesting depths are not guaranteed to be preserved.
 
2950
% The first group within this first group is stored in the macro
 
2951
% \@IEEEextractedfirstfirstgroup.
 
2952
% Likewise for the next group after the first: \@IEEEextractednextgroup,
 
2953
% \@IEEEextractednextfirstgroup, \@IEEEextractednextgroupfirsttoken,
 
2954
% \@IEEEextractednextgroupfirsttokenmacro, and 
 
2955
% \@IEEEextractednextfirsttokensdiscarded.
 
2956
% All tokens/groups after the first group, including any enclosing braces,
 
2957
% are stored in the macro \@IEEEextractedafterfirstgroupremain which will
 
2958
% be empty if none exist.
 
2959
%
 
2960
% For example:
 
2961
% \@IEEEextracttokengroups{{{ab}{cd}}{{ef}g}}
 
2962
% will result in:
 
2963
%
 
2964
% \@IEEEextracttokengroupsarg             ==> a macro containing {{ab}{cd}}{{ef}g}
 
2965
% \@IEEEextractedfirstgroup               ==> a macro containing {ab}{cd}
 
2966
% \@IEEEextractedafterfirstgroupremain    ==> a macro containing {{ef}g}
 
2967
% \@IEEEextractedfirsttoken               ==> the letter a
 
2968
% \@IEEEextractedfirsttokenmacro          ==> a macro containing a
 
2969
% \@IEEEextractedfirsttokensdiscarded     ==> a macro containing bcd
 
2970
% \@IEEEextractedfirstfirstgroup          ==> a macro containing ab
 
2971
% \@IEEEextractednextgroup                ==> a macro containing {ef}g
 
2972
% \@IEEEextractednextfirsttoken           ==> the letter e
 
2973
% \@IEEEextractednextfirsttokenmacro      ==> a macro containing e
 
2974
% \@IEEEextractednextfirsttokensdiscarded ==> a macro containing fg
 
2975
% \@IEEEextractednextfirstgroup           ==> a macro containing ef
 
2976
%
 
2977
% If given an empty argument, \@IEEEextractedfirsttoken and
 
2978
% \@IEEEextractednextfirsttoken will be set to \relax
 
2979
% and all the macros will be empty.
 
2980
% the *-star form, \@IEEEextracttokengroups*, does not expand its argument
 
2981
% contents during processing.
 
2982
%
 
2983
% Depends on: \@IEEEextractgroup, \@IEEEextracttoken
 
2984
\def\@IEEEextracttokengroups{\@ifstar{\let\@IEEEextracttokengroupsdef=\def\@@IEEEextracttokengroups}{\let\@IEEEextracttokengroupsdef=\edef\@@IEEEextracttokengroups}}
 
2985
\def\@@IEEEextracttokengroups#1{\@IEEEextracttokengroupsdef\@IEEEextracttokengroupsarg{#1}\relax
 
2986
% begin extraction, these functions are safe with empty arguments
 
2987
% first group
 
2988
\expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextracttokengroupsarg}\relax
 
2989
\let\@IEEEextractedfirstgroup\@IEEEextractedgroup
 
2990
\let\@IEEEextractedafterfirstgroupremain\@IEEEextractedgroupremain
 
2991
\expandafter\@IEEEextracttoken\expandafter*\expandafter{\@IEEEextractedfirstgroup}\relax
 
2992
\let\@IEEEextractedfirsttoken\@IEEEextractedtoken
 
2993
\let\@IEEEextractedfirsttokenmacro\@IEEEextractedtokenmacro
 
2994
\let\@IEEEextractedfirsttokensdiscarded\@IEEEextractedtokensdiscarded
 
2995
% first first group
 
2996
\expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractedfirstgroup}\relax
 
2997
\let\@IEEEextractedfirstfirstgroup\@IEEEextractedgroup
 
2998
% next group
 
2999
\expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractedafterfirstgroupremain}\relax
 
3000
\let\@IEEEextractednextgroup\@IEEEextractedgroup
 
3001
\expandafter\@IEEEextracttoken\expandafter*\expandafter{\@IEEEextractednextgroup}\relax
 
3002
\let\@IEEEextractednextfirsttoken\@IEEEextractedtoken
 
3003
\let\@IEEEextractednextfirsttokenmacro\@IEEEextractedtokenmacro
 
3004
\let\@IEEEextractednextfirsttokensdiscarded\@IEEEextractedtokensdiscarded
 
3005
% next first group
 
3006
\expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractednextgroup}\relax
 
3007
\let\@IEEEextractednextfirstgroup\@IEEEextractedgroup}
 
3008
 
 
3009
 
 
3010
%% -- End of Command Argument Scanning Support Functions --
 
3011
 
 
3012
 
 
3013
 
 
3014
 
1850
3015
%%
1851
 
%% START OF IEEEeqnarry DEFINITIONS
 
3016
%% START OF IEEEeqnarray DEFINITIONS
1852
3017
%%
1853
3018
%% Inspired by the concepts, examples, and previous works of LaTeX 
1854
3019
%% coders and developers such as Donald Arseneau, Fred Bartlett, 
1857
3022
%% I don't make the claim that my work here is even near their calibre. ;)
1858
3023
 
1859
3024
 
1860
 
% hook to allow easy changeover to IEEEtran.cls/tools.sty error reporting
1861
 
\def\@IEEEclspkgerror{\ClassError{IEEEtran}}
1862
 
 
1863
 
\newif\if@IEEEeqnarraystarform% flag to indicate if the environment was called as the star form
1864
 
\@IEEEeqnarraystarformfalse
 
3025
\newif\if@IEEEeqnarrayboxnojot% flag to indicate if the environment was called as the star form
 
3026
\@IEEEeqnarrayboxnojotfalse
1865
3027
 
1866
3028
\newif\if@advanceIEEEeqncolcnt% tracks if the environment should advance the col counter
1867
3029
% allows a way to make an \IEEEeqnarraybox that can be used within an \IEEEeqnarray
1882
3044
\def\IEEEeqnarraydecl{\relax}
1883
3045
\def\IEEEeqnarrayboxdecl{\relax}
1884
3046
 
 
3047
 
 
3048
 
 
3049
% V1.8 flags to indicate that equation numbering is to persist
 
3050
\newif\if@IEEEeqnumpersist%
 
3051
\@IEEEeqnumpersistfalse
 
3052
\newif\if@IEEEsubeqnumpersist%
 
3053
\@IEEEsubeqnumpersistfalse
 
3054
%
 
3055
% V1.8 flags to indicate if (sub)equation number of last line was preadvanced
 
3056
\newif\if@IEEEeqnumpreadv%
 
3057
\@IEEEeqnumpreadvfalse
 
3058
\newif\if@IEEEsubeqnumpreadv%
 
3059
\@IEEEsubeqnumpreadvfalse
 
3060
 
 
3061
\newcount\@IEEEsubeqnnumrollback% saves previous value of IEEEsubequation number in case we need to restore it
 
3062
 
1885
3063
% \yesnumber is the opposite of \nonumber
1886
3064
% a novel concept with the same def as the equationarray package
1887
3065
% However, we give IEEE versions too since some LaTeX packages such as 
1888
3066
% the MDWtools mathenv.sty redefine \nonumber to something else.
 
3067
% This command is intended for use in non-IEEEeqnarray math environments
1889
3068
\providecommand{\yesnumber}{\global\@eqnswtrue}
1890
 
\def\IEEEyesnumber{\global\@eqnswtrue}
1891
 
\def\IEEEnonumber{\global\@eqnswfalse}
1892
 
 
1893
 
 
1894
 
\def\IEEEyessubnumber{\global\@IEEEissubequationtrue\global\@eqnswtrue%
1895
 
\if@IEEEeqnarrayISinner% only do something inside an IEEEeqnarray
1896
 
\if@IEEElastlinewassubequation\addtocounter{equation}{-1}\else\setcounter{IEEEsubequation}{1}\fi%
1897
 
\def\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\fi}
1898
 
 
1899
 
% flag to indicate that an equation is a sub equation
1900
 
\newif\if@IEEEissubequation%
1901
 
\@IEEEissubequationfalse
 
3069
 
 
3070
 
 
3071
% IEEEyes/nonumber 
 
3072
% V1.8 add persistant * forms
 
3073
% These commands can alter the type of equation an IEEEeqnarray line is.
 
3074
\def\IEEEyesnumber{\@ifstar{\global\@IEEEeqnumpersisttrue\global\@IEEEsubeqnumpersistfalse\@IEEEyesnumber}{\@IEEEyesnumber}}
 
3075
 
 
3076
\def\@IEEEyesnumber{\global\@eqnswtrue
 
3077
\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
 
3078
\ifnum\c@IEEEsubequation>0\relax
 
3079
   \stepcounter{equation}\setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
 
3080
   \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
 
3081
\fi
 
3082
% even if we reached this eqn num via a preadv, it is legit now
 
3083
\global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse
 
3084
\fi}
 
3085
 
 
3086
\def\IEEEnonumber{\@ifstar{\global\@IEEEeqnumpersistfalse\global\@IEEEsubeqnumpersistfalse\global\@eqnswfalse}{\global\@eqnswfalse}}
 
3087
 
 
3088
 
 
3089
\def\IEEEyessubnumber{\@ifstar{\global\@IEEEsubeqnumpersisttrue\@IEEEyessubnumber}{\@IEEEyessubnumber}}
 
3090
%
 
3091
\def\@IEEEyessubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
 
3092
  \ifnum\c@IEEEsubequation>0\relax% if it already is a subequation, we are good to go as-is
 
3093
  \else% if we are a regular equation we have to watch out for two cases
 
3094
    \if@IEEEeqnumpreadv% if this equation is the result of a preadvance, backout and bump the sub eqnnum
 
3095
       \global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\addtocounter{IEEEsubequation}{1}\relax
 
3096
    \else% non-preadvanced equations just need initialization of their sub eqnnum
 
3097
       \setcounter{IEEEsubequation}{1}\relax
 
3098
    \fi
 
3099
  \fi% fi already is subequation
 
3100
  \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
 
3101
  \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
 
3102
  \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore
 
3103
  \global\@eqnswtrue
 
3104
\fi}
 
3105
 
 
3106
 
 
3107
\def\IEEEnosubnumber{\@ifstar{\global\@IEEEsubeqnumpersistfalse\@IEEEnosubnumber}{\@IEEEnosubnumber}}
 
3108
%
 
3109
\def\@IEEEnosubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
 
3110
  \if@eqnsw % we do nothing unless we know we will display because we play with the counters here
 
3111
    % if it currently is a subequation, bump up to the next equation number and turn off the subequation
 
3112
    \ifnum\c@IEEEsubequation>0\relax\addtocounter{equation}{1}\setcounter{IEEEsubequation}{0}\relax
 
3113
    \fi
 
3114
    \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore
 
3115
    \gdef\@currentlabel{\p@equation\theequation}\relax
 
3116
    \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
 
3117
  \fi
 
3118
\fi}
 
3119
 
 
3120
 
1902
3121
 
1903
3122
% allows users to "push away" equations that get too close to the equation numbers
1904
 
\def\IEEEeqnarraynumspace{\hphantom{\if@IEEEissubequation\theIEEEsubequationdis\else\theequationdis\fi}}
 
3123
\def\IEEEeqnarraynumspace{\hphantom{\ifnum\c@IEEEsubequation>0\relax\theIEEEsubequationdis\else\theequationdis\fi}}
1905
3124
 
1906
3125
% provides a way to span multiple columns within IEEEeqnarray environments
1907
3126
% will consider \if@advanceIEEEeqncolcnt before globally advancing the
1908
3127
% column counter - so as to work within \IEEEeqnarraybox
1909
3128
% usage: \IEEEeqnarraymulticol{number cols. to span}{col type}{cell text}
1910
 
\long\def\IEEEeqnarraymulticol#1#2#3{\multispan{#1}%
1911
 
% check if column is defined
1912
 
\relax\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined%
1913
 
\csname @IEEEeqnarraycolPRE#2\endcsname#3\relax\relax\relax\relax\relax%
1914
 
\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST#2\endcsname%
 
3129
\long\def\IEEEeqnarraymulticol#1#2#3{\multispan{#1}\relax
 
3130
% check if column is defined for the precolumn definition
 
3131
% We have to be careful here because TeX scans for & even within an \iffalse
 
3132
% where it does not expand macros. So, if we used only one \ifx and a #3
 
3133
% appeared in the false branch and the user inserted another alignment
 
3134
% structure that uses & in the \IEEEeqnarraymulticol{}, TeX will not see that
 
3135
% there is an inner alignment in the false branch yet still will see any &
 
3136
% there and will think that they apply to the outer alignment resulting in an
 
3137
% incomplete \ifx error.
 
3138
% So, here we use separate checks for the pre and post parts in order to keep
 
3139
% the #3 outside of all conditionals.
 
3140
\relax\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax
 
3141
\csname @IEEEeqnarraycolPRE#2\endcsname
1915
3142
\else% if not, error and use default type
1916
3143
\@IEEEclspkgerror{Invalid column type "#2" in \string\IEEEeqnarraymulticol.\MessageBreak
1917
3144
Using a default centering column instead}%
1918
3145
{You must define IEEEeqnarray column types before use.}%
1919
 
\csname @IEEEeqnarraycolPRE@IEEEdefault\endcsname#3\relax\relax\relax\relax\relax%
1920
 
\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST@IEEEdefault\endcsname%
1921
 
\fi%
 
3146
\csname @IEEEeqnarraycolPRE@IEEEdefault\endcsname
 
3147
\fi
 
3148
% The ten \relax are to help prevent misleading error messages in case a user
 
3149
% accidently inserted a macro that tries to acquire additional arguments.
 
3150
#3\relax\relax\relax\relax\relax\relax\relax\relax\relax\relax
 
3151
% check if column is defined for the postcolumn definition
 
3152
\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax
 
3153
\csname @IEEEeqnarraycolPOST#2\endcsname
 
3154
\else% if not, use the default type
 
3155
\csname @IEEEeqnarraycolPOST@IEEEdefault\endcsname
 
3156
\fi
1922
3157
% advance column counter only if the IEEEeqnarray environment wants it
1923
3158
\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by #1\relax\fi}
1924
3159
 
2378
3613
\baselineskip=0pt\lineskip=0pt\lineskiplimit=0pt\jot=0pt}
2379
3614
 
2380
3615
 
2381
 
 
2382
 
\def\IEEEeqnarray{\@IEEEeqnarraystarformfalse\@IEEEeqnarray}
 
3616
% equation and subequation forms to use to setup hyperref's \@currentHref
 
3617
\def\@IEEEtheHrefequation{equation.\theHequation}
 
3618
\def\@IEEEtheHrefsubequation{equation.\theHequation\alph{IEEEsubequation}}
 
3619
 
 
3620
 
 
3621
\def\IEEEeqnarray{\@IEEEeqnumpersisttrue\@IEEEsubeqnumpersistfalse\@IEEEeqnarray}
2383
3622
\def\endIEEEeqnarray{\end@IEEEeqnarray}
2384
3623
 
2385
 
\@namedef{IEEEeqnarray*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarray}
 
3624
\@namedef{IEEEeqnarray*}{\@IEEEeqnumpersistfalse\@IEEEsubeqnumpersistfalse\@IEEEeqnarray}
2386
3625
\@namedef{endIEEEeqnarray*}{\end@IEEEeqnarray}
2387
3626
 
2388
3627
 
2390
3629
% The star form defaults to not putting equation numbers at the end of each row.
2391
3630
% usage: \IEEEeqnarray[decl]{cols}
2392
3631
\def\@IEEEeqnarray{\relax\@ifnextchar[{\@@IEEEeqnarray}{\@@IEEEeqnarray[\relax]}}
2393
 
\def\@@IEEEeqnarray[#1]#2{%
 
3632
% We have to be careful here to normalize catcodes just before acquiring the
 
3633
% cols as that specification may contain punctuation which could be subject
 
3634
% to document catcode changes.
 
3635
\def\@@IEEEeqnarray[#1]{\begingroup\IEEEnormalcatcodes\@@@IEEEeqnarray[#1]}
 
3636
\def\@@@IEEEeqnarray[#1]#2{\endgroup
2394
3637
   % default to showing the equation number or not based on whether or not
2395
3638
   % the star form was involked
2396
 
   \if@IEEEeqnarraystarform\global\@eqnswfalse
 
3639
   \if@IEEEeqnumpersist\global\@eqnswtrue
2397
3640
   \else% not the star form
2398
 
   \global\@eqnswtrue
 
3641
   \global\@eqnswfalse
2399
3642
   \fi% if star form
2400
 
   \@IEEEissubequationfalse% default to no subequations
2401
 
   \@IEEElastlinewassubequationfalse% assume last line is not a sub equation
 
3643
   % provide a basic hyperref \theHequation if this has not already been setup (hyperref not loaded, or no section counter)
 
3644
   \@ifundefined{theHequation}{\def\theHequation{\arabic{equation}}}{}\relax
 
3645
   % provide dummy hyperref commands in case hyperref is not loaded
 
3646
   \providecommand{\Hy@raisedlink}[1]{}\relax
 
3647
   \providecommand{\hyper@anchorstart}[1]{}\relax
 
3648
   \providecommand{\hyper@anchorend}{}\relax
 
3649
   \providecommand{\@currentHref}{}\relax
 
3650
   \@IEEEeqnumpreadvfalse% reset eqnpreadv flag
 
3651
   \@IEEEsubeqnumpreadvfalse% reset subeqnpreadv flag
2402
3652
   \@IEEEeqnarrayISinnerfalse% not yet within the lines of the halign
2403
3653
   \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default
2404
3654
   \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise
2411
3661
   \mathsurround\z@\relax% no extra spacing around math
2412
3662
   \@advanceIEEEeqncolcnttrue% advance the col counter for each col the user uses, 
2413
3663
                             % used in \IEEEeqnarraymulticol and in the preamble build
2414
 
   \stepcounter{equation}% advance equation counter before first line
2415
 
   \setcounter{IEEEsubequation}{0}% no subequation yet 
 
3664
   %V1.8 Here we preadvance to the next equation number.
 
3665
   % If the user later wants a continued subequation, we can roll back.
 
3666
   \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation%
 
3667
   \stepcounter{equation}\@IEEEeqnumpreadvtrue% advance equation counter before first line
 
3668
   \setcounter{IEEEsubequation}{0}% no subequation yet
 
3669
   \let\@IEEEcurrentlabelsave\@currentlabel% save current label as we later change it globally
 
3670
   \let\@IEEEcurrentHrefsave\@currentHref% save current href label as we later change it globally
2416
3671
   \def\@currentlabel{\p@equation\theequation}% redefine the ref label
 
3672
   \def\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
2417
3673
   \IEEEeqnarraydecl\relax% allow a way for the user to make global overrides
2418
3674
   #1\relax% allow user to override defaults
2419
3675
   \let\\\@IEEEeqnarraycr% replace newline with one that can put in eqn. numbers
2420
3676
   \global\@IEEEeqncolcnt\z@% col. count = 0 for first line
2421
 
   \@IEEEbuildpreamble #2\end\relax% build the preamble and put it into \@IEEEtrantmptoksA 
 
3677
   \@IEEEbuildpreamble{#2}\relax% build the preamble and put it into \@IEEEtrantmptoksA 
2422
3678
   % put in the column for the equation number
2423
3679
   \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first
2424
3680
   \toks0={##}%
2441
3697
 
2442
3698
% enter isolation/strut column (or the next column if the user did not use
2443
3699
% every column), record the strut status, complete the columns, do the strut if needed,
2444
 
% restore counters to correct values and exit
2445
 
\def\end@IEEEeqnarray{\@IEEEeqnarrayglobalizestrutstatus&\@@IEEEeqnarraycr\egroup%
2446
 
\if@IEEElastlinewassubequation\global\advance\c@IEEEsubequation\m@ne\fi%
2447
 
\global\advance\c@equation\m@ne%
 
3700
% restore counters (to backout any equation setup for a next line that was never used)
 
3701
% to their correct values and exit
 
3702
\def\end@IEEEeqnarray{\@IEEEeqnarrayglobalizestrutstatus&\@@IEEEeqnarraycr\egroup
 
3703
\if@IEEEsubeqnumpreadv\global\advance\c@IEEEsubequation\m@ne\fi
 
3704
\if@IEEEeqnumpreadv\global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\fi
 
3705
\global\let\@currentlabel\@IEEEcurrentlabelsave% restore current label
 
3706
\global\let\@currentHref\@IEEEcurrentHrefsave% restore current href label
2448
3707
$$\@ignoretrue}
2449
3708
 
2450
 
% need a way to remember if last line is a subequation
2451
 
\newif\if@IEEElastlinewassubequation%
2452
 
\@IEEElastlinewassubequationfalse
2453
3709
 
2454
3710
% IEEEeqnarray uses a modifed \\ instead of the plain \cr to
2455
3711
% end rows. This allows for things like \\*[vskip amount]
2456
 
% This "cr" macros are modified versions those for LaTeX2e's eqnarray
 
3712
% These "cr" macros are modified versions of those for LaTeX2e's eqnarray
2457
3713
% the {\ifnum0=`} braces must be kept away from the last column to avoid
2458
3714
% altering spacing of its math, so we use & to advance to the next column
2459
3715
% as there is an isolation/strut column after the user's columns
2478
3734
    \ifnum\@IEEEeqncolcnt>\@IEEEeqnnumcols\relax
2479
3735
    \@IEEEclspkgerror{Too many columns within the IEEEeqnarray\MessageBreak
2480
3736
                          environment}%
2481
 
    {Use fewer \string &'s or put more columns in the IEEEeqnarry column\MessageBreak 
 
3737
    {Use fewer \string &'s or put more columns in the IEEEeqnarray column\MessageBreak 
2482
3738
     specifications.}\relax%
2483
3739
    \else
2484
3740
    \loop% add cols if the user did not use them all
2494
3750
    \@IEEEeqnarrayinsertstrut% do the strut if needed
2495
3751
    \@IEEEeqnarraystrutreset% reset the strut system for next line or IEEEeqnarray
2496
3752
    &% and enter the equation number column
2497
 
    % is this line needs an equation number, display it and advance the
2498
 
    % (sub)equation counters, record what type this line was
2499
 
    \if@eqnsw%
2500
 
     \if@IEEEissubequation\theIEEEsubequationdis\addtocounter{equation}{1}\stepcounter{IEEEsubequation}%
2501
 
     \global\@IEEElastlinewassubequationtrue%
2502
 
     \else% display a standard equation number, initialize the IEEEsubequation counter
2503
 
     \theequationdis\stepcounter{equation}\setcounter{IEEEsubequation}{0}%
2504
 
     \global\@IEEElastlinewassubequationfalse\fi%
2505
 
    \fi%
2506
 
    % reset the eqnsw flag to indicate default preference of the display of equation numbers
2507
 
    \if@IEEEeqnarraystarform\global\@eqnswfalse\else\global\@eqnswtrue\fi
2508
 
    \global\@IEEEissubequationfalse% reset the subequation flag
 
3753
    \if@eqnsw% only if we display something
 
3754
      \Hy@raisedlink{\hyper@anchorstart{\@currentHref}}% start a hyperref anchor
 
3755
      \global\@IEEEeqnumpreadvfalse\relax% displaying an equation number means
 
3756
      \global\@IEEEsubeqnumpreadvfalse\relax% the equation counters point to valid equations
 
3757
      % V1.8 Here we setup the counters, currentlabel and status for what would be the *next*
 
3758
      % equation line as would be the case under the current settings. However, there are two problems.
 
3759
      % One problem is that there might not ever be a next line. The second problem is that the user
 
3760
      % may later alter the meaning of a line with commands such as \IEEEyessubnumber. So, to handle
 
3761
      % these cases we have to record the current values of the (sub)equation counters and revert back
 
3762
      % to them if the next line is changed or never comes. The \if@IEEEeqnumpreadv, \if@IEEEsubeqnumpreadv
 
3763
      % and \@IEEEsubeqnnumrollback stuff tracks this.
 
3764
      % The logic to handle all this is surprisingly complex, but a nice feature of the approach here is
 
3765
      % that the equation counters and labels remain valid for what the line would be unless a
 
3766
      % \IEEEyessubnumber et al. later changes it. So, any hyperref links are always correct.
 
3767
      \ifnum\c@IEEEsubequation>0\relax% handle subequation
 
3768
         \theIEEEsubequationdis\relax
 
3769
         \if@IEEEsubeqnumpersist% setup for default type of next line
 
3770
            \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax
 
3771
            \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
 
3772
            \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
 
3773
         \else
 
3774
             % if no subeqnum persist, go ahead and setup for a new equation number
 
3775
             \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation
 
3776
             \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax
 
3777
             \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
 
3778
             \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
 
3779
         \fi
 
3780
      \else% display a standard equation number
 
3781
        \theequationdis\relax
 
3782
        \setcounter{IEEEsubequation}{0}\relax% not really needed
 
3783
        \if@IEEEsubeqnumpersist% setup for default type of next line
 
3784
           % subequations that follow plain equations carry the same equation number e.g, 5, 5a rather than 5, 6a
 
3785
           \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax
 
3786
           \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
 
3787
           \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
 
3788
         \else
 
3789
             % if no subeqnum persist, go ahead and setup for a new equation number
 
3790
             \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation
 
3791
             \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax
 
3792
             \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
 
3793
             \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
 
3794
         \fi
 
3795
      \fi%
 
3796
      \Hy@raisedlink{\hyper@anchorend}% end hyperref anchor
 
3797
    \fi% fi only if we display something
 
3798
    % reset the flags to indicate the default preferences of the display of equation numbers
 
3799
    \if@IEEEeqnumpersist\global\@eqnswtrue\else\global\@eqnswfalse\fi
 
3800
    \if@IEEEsubeqnumpersist\global\@eqnswtrue\fi% ditto for the subequation flag
2509
3801
    % reset the number of columns the user actually used
2510
3802
    \global\@IEEEeqncolcnt\z@\relax
2511
3803
    % the real end of the line
2529
3821
% natural width is the default.
2530
3822
% The * forms do not add \jot line spacing
2531
3823
% usage: \IEEEeqnarraybox[decl][pos][width]{cols}
2532
 
\def\IEEEeqnarrayboxm{\@IEEEeqnarraystarformfalse\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
 
3824
\def\IEEEeqnarrayboxm{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
2533
3825
\def\endIEEEeqnarrayboxm{\end@IEEEeqnarraybox}
2534
 
\@namedef{IEEEeqnarrayboxm*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
 
3826
\@namedef{IEEEeqnarrayboxm*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
2535
3827
\@namedef{endIEEEeqnarrayboxm*}{\end@IEEEeqnarraybox}
2536
3828
 
2537
 
\def\IEEEeqnarrayboxt{\@IEEEeqnarraystarformfalse\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
 
3829
\def\IEEEeqnarrayboxt{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
2538
3830
\def\endIEEEeqnarrayboxt{\end@IEEEeqnarraybox}
2539
 
\@namedef{IEEEeqnarrayboxt*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
 
3831
\@namedef{IEEEeqnarrayboxt*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
2540
3832
\@namedef{endIEEEeqnarrayboxt*}{\end@IEEEeqnarraybox}
2541
3833
 
2542
 
\def\IEEEeqnarraybox{\@IEEEeqnarraystarformfalse\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
 
3834
\def\IEEEeqnarraybox{\@IEEEeqnarrayboxnojotfalse\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
2543
3835
\@IEEEeqnarraybox}
2544
3836
\def\endIEEEeqnarraybox{\end@IEEEeqnarraybox}
2545
3837
 
2546
 
\@namedef{IEEEeqnarraybox*}{\@IEEEeqnarraystarformtrue\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
 
3838
\@namedef{IEEEeqnarraybox*}{\@IEEEeqnarrayboxnojottrue\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
2547
3839
\@IEEEeqnarraybox}
2548
3840
\@namedef{endIEEEeqnarraybox*}{\end@IEEEeqnarraybox}
2549
3841
 
2553
3845
\@IEEEeqnarrayboxHBOXSWfalse
2554
3846
 
2555
3847
\def\@IEEEeqnarraybox{\relax\@ifnextchar[{\@@IEEEeqnarraybox}{\@@IEEEeqnarraybox[\relax]}}
2556
 
\def\@@IEEEeqnarraybox[#1]{\relax\@ifnextchar[{\@@@IEEEeqnarraybox[#1]}{\@@@IEEEeqnarraybox[#1][b]}}
 
3848
% We have to be careful here to normalize catcodes just before acquiring the
 
3849
% cols as that specification may contain punctuation which could be subject
 
3850
% to document catcode changes.
 
3851
\def\@@IEEEeqnarraybox[#1]{\relax\begingroup\IEEEnormalcatcodes\@ifnextchar[{\@@@IEEEeqnarraybox[#1]}{\@@@IEEEeqnarraybox[#1][b]}}
2557
3852
\def\@@@IEEEeqnarraybox[#1][#2]{\relax\@ifnextchar[{\@@@@IEEEeqnarraybox[#1][#2]}{\@@@@IEEEeqnarraybox[#1][#2][\relax]}}
2558
3853
 
2559
3854
% #1 = decl; #2 = t,b,c; #3 = width, #4 = col specs
2560
 
\def\@@@@IEEEeqnarraybox[#1][#2][#3]#4{\@IEEEeqnarrayISinnerfalse % not yet within the lines of the halign
 
3855
\def\@@@@IEEEeqnarraybox[#1][#2][#3]#4{\endgroup\@IEEEeqnarrayISinnerfalse % not yet within the lines of the halign
2561
3856
   \@IEEEeqnarraymasterstrutsave% save current master strut values
2562
3857
   \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default
2563
3858
   \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise
2577
3872
   \IEEEeqnarrayboxdecl\relax% allow a way for the user to make global overrides
2578
3873
   #1\relax% allow user to override defaults
2579
3874
   \let\\\@IEEEeqnarrayboxcr% replace newline with one that allows optional spacing
2580
 
   \@IEEEbuildpreamble #4\end\relax% build the preamble and put it into \@IEEEtrantmptoksA
 
3875
   \@IEEEbuildpreamble{#4}\relax% build the preamble and put it into \@IEEEtrantmptoksA
2581
3876
   % add an isolation column to the preamble to stop \\'s {} from getting into the last col
2582
3877
   \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first
2583
3878
   \toks0={##}%
2588
3883
   % begin the alignment
2589
3884
   \everycr{}%
2590
3885
   % use only the very first token to determine the positioning
2591
 
   % this stops some problems when the user uses more than one letter,
2592
 
   % but is probably not worth the effort
2593
 
   % \noindent is used as a delimiter
2594
 
   \def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}%
2595
 
   \@IEEEgrabfirstoken#2\relax\relax\noindent
2596
 
   % \@IEEEgrabbedfirstoken has the first token, the rest are discarded
 
3886
   \@IEEEextracttoken{#2}\relax
 
3887
   \ifx\@IEEEextractedtokensdiscarded\@empty\else
 
3888
     \typeout{** WARNING: IEEEeqnarraybox position specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
 
3889
   \fi
 
3890
   % \@IEEEextractedtoken has the first token, the rest are ignored
2597
3891
   % if we need to put things into and hbox and go into math mode, do so now
2598
3892
   \if@IEEEeqnarrayboxHBOXSW \leavevmode \hbox \bgroup $\fi%
2599
3893
   % use the appropriate vbox type
2600
 
   \if\@IEEEgrabbedfirstoken t\relax\vtop\else\if\@IEEEgrabbedfirstoken c\relax%
 
3894
   \if\@IEEEextractedtoken t\relax\vtop\else\if\@IEEEextractedtoken c\relax%
2601
3895
   \vcenter\else\vbox\fi\fi\bgroup%
2602
3896
   \@IEEEeqnarrayISinnertrue% commands are now within the lines
2603
3897
   \ifx#3\relax\halign\else\halign to #3\relax\fi%
2641
3935
 
2642
3936
% IEEEeqnarraybox does not automatically increase line spacing by \jot
2643
3937
\def\@IEEEeqnarrayboxXCR[#1]{\ifnum0=`{\fi}%
2644
 
\cr\noalign{\if@IEEEeqnarraystarform\else\vskip\jot\fi\vskip#1\relax}}
2645
 
 
2646
 
 
2647
 
 
2648
 
% starts the halign preamble build
2649
 
\def\@IEEEbuildpreamble{\@IEEEtrantmptoksA={}% clear token register
 
3938
\cr\noalign{\if@IEEEeqnarrayboxnojot\else\vskip\jot\fi\vskip#1\relax}}
 
3939
 
 
3940
 
 
3941
 
 
3942
% usage: \@IEEEbuildpreamble{column specifiers}
 
3943
% starts the halign preamble build 
 
3944
% the assembled preamble is put in \@IEEEtrantmptoksA
 
3945
\def\@IEEEbuildpreamble#1{\@IEEEtrantmptoksA={}% clear token register
2650
3946
\let\@IEEEBPcurtype=u%current column type is not yet known
2651
3947
\let\@IEEEBPprevtype=s%the previous column type was the start
2652
3948
\let\@IEEEBPnexttype=u%next column type is not yet known
2662
3958
% record the default end glues
2663
3959
\edef\@IEEEBPstartglue{\@IEEEeqnarraycolSEPdefaultstart}%
2664
3960
\edef\@IEEEBPendglue{\@IEEEeqnarraycolSEPdefaultend}%
 
3961
\edef\@IEEEedefMACRO{#1}\relax% fully expand the preamble to support macro containers
2665
3962
% now parse the user's column specifications
2666
 
\@@IEEEbuildpreamble}
2667
 
 
2668
 
 
 
3963
% \ignorespaces is used as a delimiter, need at least one trailing \relax because
 
3964
% \@@IEEEbuildpreamble looks into the future 
 
3965
\expandafter\@@IEEEbuildpreamble\@IEEEedefMACRO\ignorespaces\relax\relax}
 
3966
 
 
3967
 
 
3968
% usage: \@@IEEEbuildpreamble{current column}{next column}
2669
3969
% parses and builds the halign preamble
2670
3970
\def\@@IEEEbuildpreamble#1#2{\let\@@nextIEEEbuildpreamble=\@@IEEEbuildpreamble%
2671
3971
% use only the very first token to check the end
2672
 
% \noindent is used as a delimiter as \end can be present here
2673
 
\def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}%
2674
 
\@IEEEgrabfirstoken#1\relax\relax\noindent
2675
 
\ifx\@IEEEgrabbedfirstoken\end\let\@@nextIEEEbuildpreamble=\@@IEEEfinishpreamble\else%
 
3972
\@IEEEextracttokengroups{#1}\relax
 
3973
\ifx\@IEEEextractedfirsttoken\ignorespaces\let\@@nextIEEEbuildpreamble=\@@IEEEfinishpreamble\else%
2676
3974
% identify current and next token type
2677
3975
\@IEEEgetcoltype{#1}{\@IEEEBPcurtype}{1}% current, error on invalid
2678
3976
\@IEEEgetcoltype{#2}{\@IEEEBPnexttype}{0}% next, no error on invalid next
2692
3990
\fi\@@nextIEEEbuildpreamble{#2}}
2693
3991
 
2694
3992
 
 
3993
% usage: \@@IEEEfinishpreamble{discarded}
2695
3994
% executed just after preamble build is completed
2696
3995
% warn about zero cols, and if prevtype type = u, put in end tabskip glue
 
3996
% argument is not used
2697
3997
\def\@@IEEEfinishpreamble#1{\ifnum\@IEEEeqnnumcols<1\relax
2698
3998
\@IEEEclspkgerror{No column specifiers declared for IEEEeqnarray}%
2699
3999
{At least one column type must be declared for each IEEEeqnarray.}%
2702
4002
\if\@IEEEBPprevtype u\@IEEEappendtoksA{\tabskip=\@IEEEBPendglue}\fi}
2703
4003
 
2704
4004
 
2705
 
% Identify and return the column specifier's type code
2706
 
\def\@IEEEgetcoltype#1#2#3{%
2707
 
% use only the very first token to determine the type
2708
 
% \noindent is used as a delimiter as \end can be present here
2709
 
\def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}%
2710
 
\@IEEEgrabfirstoken#1\relax\relax\noindent
2711
 
% \@IEEEgrabfirstoken has the first token, the rest are discarded
 
4005
% usage: \@IEEEgetcoltype{col specifier}{\output}{error more}
 
4006
% Identify and return the column specifier's type code in the given
 
4007
% \output macro:
2712
4008
% n = number
2713
4009
% g = glue (any other char in catagory 12)
2714
4010
% c = letter
2715
 
% e = \end
 
4011
% e = \ignorespaces (end of sequence)
2716
4012
% u = undefined
2717
 
% third argument: 0 = no error message, 1 = error on invalid char
 
4013
% error mode: 0 = no error message, 1 = error on invalid char
 
4014
\def\@IEEEgetcoltype#1#2#3{%
 
4015
% use only the very first token to determine the type
 
4016
\@IEEEextracttoken{#1}\relax
 
4017
% \@IEEEextractedtoken has the first token, the rest are discarded
2718
4018
\let#2=u\relax% assume invalid until know otherwise
2719
 
\ifx\@IEEEgrabbedfirstoken\end\let#2=e\else
2720
 
\ifcat\@IEEEgrabbedfirstoken\relax\else% screen out control sequences
2721
 
\if0\@IEEEgrabbedfirstoken\let#2=n\else
2722
 
\if1\@IEEEgrabbedfirstoken\let#2=n\else
2723
 
\if2\@IEEEgrabbedfirstoken\let#2=n\else
2724
 
\if3\@IEEEgrabbedfirstoken\let#2=n\else
2725
 
\if4\@IEEEgrabbedfirstoken\let#2=n\else
2726
 
\if5\@IEEEgrabbedfirstoken\let#2=n\else
2727
 
\if6\@IEEEgrabbedfirstoken\let#2=n\else
2728
 
\if7\@IEEEgrabbedfirstoken\let#2=n\else
2729
 
\if8\@IEEEgrabbedfirstoken\let#2=n\else
2730
 
\if9\@IEEEgrabbedfirstoken\let#2=n\else
2731
 
\ifcat,\@IEEEgrabbedfirstoken\let#2=g\relax
2732
 
\else\ifcat a\@IEEEgrabbedfirstoken\let#2=c\relax\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
 
4019
\ifx\@IEEEextractedtoken\ignorespaces\let#2=e\else
 
4020
\ifcat\@IEEEextractedtoken\relax\else% screen out control sequences
 
4021
\if0\@IEEEextractedtoken\let#2=n\else
 
4022
\if1\@IEEEextractedtoken\let#2=n\else
 
4023
\if2\@IEEEextractedtoken\let#2=n\else
 
4024
\if3\@IEEEextractedtoken\let#2=n\else
 
4025
\if4\@IEEEextractedtoken\let#2=n\else
 
4026
\if5\@IEEEextractedtoken\let#2=n\else
 
4027
\if6\@IEEEextractedtoken\let#2=n\else
 
4028
\if7\@IEEEextractedtoken\let#2=n\else
 
4029
\if8\@IEEEextractedtoken\let#2=n\else
 
4030
\if9\@IEEEextractedtoken\let#2=n\else
 
4031
\ifcat,\@IEEEextractedtoken\let#2=g\relax
 
4032
\else\ifcat a\@IEEEextractedtoken\let#2=c\relax\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
2733
4033
\if#2u\relax
2734
4034
\if0\noexpand#3\relax\else\@IEEEclspkgerror{Invalid character in column specifications}%
2735
4035
{Only letters, numerals and certain other symbols are allowed \MessageBreak
2736
4036
as IEEEeqnarray column specifiers.}\fi\fi}
2737
4037
 
2738
4038
 
2739
 
% identify the current letter referenced column
2740
 
% if invalid, use a default column
 
4039
% usage: \@IEEEgetcurcol{col specifier}
 
4040
% verify the letter referenced column exists
 
4041
% and return its name in \@IEEEBPcurcolname
 
4042
% if column specifier is invalid, use the default column @IEEEdefault
2741
4043
\def\@IEEEgetcurcol#1{\expandafter\ifx\csname @IEEEeqnarraycolDEF#1\endcsname\@IEEEeqnarraycolisdefined%
2742
4044
\def\@IEEEBPcurcolname{#1}\else% invalid column name
2743
4045
\@IEEEclspkgerror{Invalid column type "#1" in column specifications.\MessageBreak
2746
4048
\def\@IEEEBPcurcolname{@IEEEdefault}\fi}
2747
4049
 
2748
4050
 
2749
 
% identify and return the predefined (punctuation) glue value
 
4051
% usage: \@IEEEgetcurglue{glue specifier}{\output}
 
4052
% identify the predefined (punctuation) glue value
 
4053
% and return it in the given output macro
2750
4054
\def\@IEEEgetcurglue#1#2{%
2751
4055
% ! = \! (neg small)  -0.16667em (-3/18 em)
2752
4056
% , = \, (small)       0.16667em ( 3/18 em)
2764
4068
% value for 1em.
2765
4069
2766
4070
% use only the very first token to determine the type
2767
 
% this prevents errant tokens from getting in the main text
2768
 
% \noindent is used as a delimiter here
2769
 
\def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}%
2770
 
\@IEEEgrabfirstoken#1\relax\relax\noindent
 
4071
\@IEEEextracttoken{#1}\relax
 
4072
\ifx\@IEEEextractedtokensdiscarded\@empty\else
 
4073
  \typeout{** WARNING: IEEEeqnarray predefined inter-column glue type specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax
 
4074
\fi
2771
4075
% get the math font 1em value
2772
4076
% LaTeX2e's NFSS2 does not preload the fonts, but \IEEEeqnarray needs
2773
4077
% to gain access to the math (\textfont2) font's spacing parameters.
2780
4084
\@IEEEtrantmpdimenA=\fontdimen6\textfont2\relax%
2781
4085
% identify the glue value based on the first token
2782
4086
% we discard anything after the first
2783
 
\if!\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=-0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
2784
 
\if,\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
2785
 
\if:\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.22222\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
2786
 
\if;\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.27778\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
2787
 
\if'\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=1\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
2788
 
\if"\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=2\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
2789
 
\if.\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.5\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else
2790
 
\if/\@IEEEgrabbedfirstoken\edef#2{\the\arraycolsep}\else
2791
 
\if?\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=2\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else
2792
 
\if *\@IEEEgrabbedfirstoken\edef#2{0pt plus 1fil minus 0pt}\else
2793
 
\if+\@IEEEgrabbedfirstoken\edef#2{\@IEEEeqnarraycolSEPcenter}\else
2794
 
\if-\@IEEEgrabbedfirstoken\edef#2{\@IEEEeqnarraycolSEPzero}\else
 
4087
\if!\@IEEEextractedtoken\@IEEEtrantmpdimenA=-0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
 
4088
\if,\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
 
4089
\if:\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.22222\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
 
4090
\if;\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.27778\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
 
4091
\if'\@IEEEextractedtoken\@IEEEtrantmpdimenA=1\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
 
4092
\if"\@IEEEextractedtoken\@IEEEtrantmpdimenA=2\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
 
4093
\if.\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.5\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else
 
4094
\if/\@IEEEextractedtoken\edef#2{\the\arraycolsep}\else
 
4095
\if?\@IEEEextractedtoken\@IEEEtrantmpdimenA=2\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else
 
4096
\if *\@IEEEextractedtoken\edef#2{0pt plus 1fil minus 0pt}\else
 
4097
\if+\@IEEEextractedtoken\edef#2{\@IEEEeqnarraycolSEPcenter}\else
 
4098
\if-\@IEEEextractedtoken\edef#2{\@IEEEeqnarraycolSEPzero}\else
2795
4099
\edef#2{\@IEEEeqnarraycolSEPzero}%
2796
4100
\@IEEEclspkgerror{Invalid predefined inter-column glue type "#1" in\MessageBreak
2797
4101
column specifications. Using a default value of\MessageBreak
2800
4104
IEEEeqnarray column specifications.}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
2801
4105
 
2802
4106
 
2803
 
 
 
4107
% usage: \@IEEEprocessNcol{digit}
2804
4108
% process a numerical digit from the column specification
2805
4109
% and look up the corresponding user defined glue value
2806
4110
% can transform current type from n to g or a as the user defined glue is acquired
2916
4220
 
2917
4221
 
2918
4222
%%
2919
 
%% END OF IEEEeqnarry DEFINITIONS
 
4223
%% END OF IEEEeqnarray DEFINITIONS
2920
4224
%%
2921
4225
 
2922
4226
 
2923
4227
 
2924
4228
 
2925
 
% set up the running headings, this complex because of all the different
2926
 
% modes IEEEtran supports
2927
 
\if@twoside
2928
 
 \ifCLASSOPTIONtechnote
2929
 
   \def\ps@headings{%
2930
 
       \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}
2931
 
       \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}
2932
 
       \ifCLASSOPTIONdraftcls
2933
 
            \ifCLASSOPTIONdraftclsnofoot
2934
 
               \def\@oddfoot{}\def\@evenfoot{}%
2935
 
            \else
2936
 
               \def\@oddfoot{\scriptsize\@date\hfil DRAFT}
2937
 
               \def\@evenfoot{\scriptsize DRAFT\hfil\@date}
2938
 
            \fi
2939
 
       \else
2940
 
            \def\@oddfoot{}\def\@evenfoot{}
2941
 
       \fi}
2942
 
 \else % not a technote
2943
 
   \def\ps@headings{%
2944
 
       \ifCLASSOPTIONconference
2945
 
        \def\@oddhead{}
2946
 
        \def\@evenhead{}
2947
 
       \else
2948
 
        \def\@oddhead{\hbox{}\scriptsize\rightmark \hfil \thepage}
2949
 
        \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}
2950
 
       \fi
2951
 
       \ifCLASSOPTIONdraftcls
2952
 
            \def\@oddhead{\hbox{}\scriptsize\rightmark \hfil \thepage}
2953
 
            \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}
2954
 
            \ifCLASSOPTIONdraftclsnofoot
2955
 
               \def\@oddfoot{}\def\@evenfoot{}%
2956
 
            \else
2957
 
               \def\@oddfoot{\scriptsize\@date\hfil DRAFT}
2958
 
               \def\@evenfoot{\scriptsize DRAFT\hfil\@date}
2959
 
            \fi
2960
 
       \else
2961
 
            \def\@oddfoot{}\def\@evenfoot{}%
2962
 
       \fi}
2963
 
 \fi
2964
 
\else % single side
2965
 
\def\ps@headings{%
2966
 
    \ifCLASSOPTIONconference
2967
 
     \def\@oddhead{}
2968
 
     \def\@evenhead{}
2969
 
    \else
2970
 
     \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}
2971
 
     \def\@evenhead{}
2972
 
    \fi
2973
 
    \ifCLASSOPTIONdraftcls
2974
 
          \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}
2975
 
          \def\@evenhead{}
2976
 
          \ifCLASSOPTIONdraftclsnofoot
2977
 
             \def\@oddfoot{}
2978
 
          \else
2979
 
             \def\@oddfoot{\scriptsize \@date \hfil DRAFT}
2980
 
          \fi
2981
 
    \else
2982
 
         \def\@oddfoot{}
2983
 
    \fi
2984
 
    \def\@evenfoot{}}
2985
 
\fi
2986
 
 
2987
 
 
2988
 
% title page style
2989
 
\def\ps@IEEEtitlepagestyle{\def\@oddfoot{}\def\@evenfoot{}%
 
4229
 
 
4230
% set up the running headers and footers
 
4231
%
 
4232
% header and footer font and size specifications
 
4233
\def\@IEEEheaderstyle{\normalfont\scriptsize}
 
4234
\def\@IEEEfooterstyle{\normalfont\scriptsize}
 
4235
%
 
4236
% compsoc uses sans-serif headers and footers
 
4237
\ifCLASSOPTIONcompsoc
 
4238
  \def\@IEEEheaderstyle{\normalfont\sffamily\scriptsize}
 
4239
  \def\@IEEEfooterstyle{\normalfont\sffamily\scriptsize}
 
4240
\fi
 
4241
 
 
4242
 
 
4243
% standard page style, ps@headings
 
4244
\def\ps@headings{% default to standard twoside headers, no footers
 
4245
% will change later if the mode requires otherwise
 
4246
\def\@oddhead{\hbox{}\@IEEEheaderstyle\rightmark\hfil\thepage}\relax
 
4247
\def\@evenhead{\@IEEEheaderstyle\thepage\hfil\leftmark\hbox{}}\relax
 
4248
\let\@oddfoot\@empty
 
4249
\let\@evenfoot\@empty
 
4250
\ifCLASSOPTIONtechnote
 
4251
  % technote twoside
 
4252
  \def\@oddhead{\hbox{}\@IEEEheaderstyle\leftmark\hfil\thepage}\relax
 
4253
  \def\@evenhead{\@IEEEheaderstyle\thepage\hfil\leftmark\hbox{}}\relax
 
4254
\fi
 
4255
\ifCLASSOPTIONdraftcls
 
4256
  % draft footers
 
4257
  \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax
 
4258
  \def\@evenfoot{\@IEEEfooterstyle DRAFT\hfil\@date}\relax
 
4259
\fi
 
4260
% oneside
 
4261
\if@twoside\else
 
4262
  % standard one side headers
 
4263
  \def\@oddhead{\hbox{}\@IEEEheaderstyle\leftmark\hfil\thepage}\relax
 
4264
  \let\@evenhead\@empty
 
4265
  \ifCLASSOPTIONdraftcls
 
4266
    % oneside draft footers
 
4267
    \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax
 
4268
    \let\@evenfoot\@empty
 
4269
  \fi
 
4270
\fi
 
4271
% turn off headers for conferences
2990
4272
\ifCLASSOPTIONconference
2991
 
   \def\@oddhead{}%
2992
 
   \def\@evenhead{}%
2993
 
\else
2994
 
   \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}%
2995
 
   \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}%
 
4273
  \let\@oddhead\@empty
 
4274
  \let\@evenhead\@empty
2996
4275
\fi
2997
 
\ifCLASSOPTIONdraftcls
2998
 
   \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}%
2999
 
   \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}%
3000
 
   \ifCLASSOPTIONdraftclsnofoot\else
3001
 
      \def\@oddfoot{\scriptsize \@date\hfil DRAFT}%
3002
 
      \def\@evenfoot{\scriptsize DRAFT\hfil \@date}%
3003
 
   \fi
3004
 
\else
3005
 
   % all non-draft mode footers
3006
 
   \if@IEEEusingpubid
3007
 
      % for title pages that are using a pubid
3008
 
      % do not repeat pubid if using peer review option
3009
 
      \ifCLASSOPTIONpeerreview
3010
 
      \else
3011
 
         \footskip 0pt%
3012
 
         \ifCLASSOPTIONcompsoc
3013
 
           \def\@oddfoot{\hss\normalfont\scriptsize\raisebox{-1.5\@IEEEnormalsizeunitybaselineskip}[0ex][0ex]{\@IEEEpubid}\hss}%
3014
 
           \def\@evenfoot{\hss\normalfont\scriptsize\raisebox{-1.5\@IEEEnormalsizeunitybaselineskip}[0ex][0ex]{\@IEEEpubid}\hss}%
3015
 
         \else
3016
 
           \def\@oddfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@IEEEpubid}\hss}%
3017
 
           \def\@evenfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@IEEEpubid}\hss}%
3018
 
         \fi
3019
 
      \fi
3020
 
   \fi
 
4276
% turn off footers for draftclsnofoot
 
4277
\ifCLASSOPTIONdraftclsnofoot
 
4278
  \let\@oddfoot\@empty
 
4279
  \let\@evenfoot\@empty
3021
4280
\fi}
3022
4281
 
3023
4282
 
3024
 
% peer review cover page style
3025
 
\def\ps@IEEEpeerreviewcoverpagestyle{%
3026
 
\def\@oddhead{}\def\@evenhead{}%
3027
 
\def\@oddfoot{}\def\@evenfoot{}%
 
4283
% title page style, ps@IEEEtitlepagestyle
 
4284
\def\ps@IEEEtitlepagestyle{% default title page headers, no footers
 
4285
\def\@oddhead{\hbox{}\@IEEEheaderstyle\leftmark\hfil\thepage}\relax
 
4286
\def\@evenhead{\@IEEEheaderstyle\thepage\hfil\leftmark\hbox{}}\relax
 
4287
\let\@oddfoot\@empty
 
4288
\let\@evenfoot\@empty
 
4289
% will change later if the mode requires otherwise
3028
4290
\ifCLASSOPTIONdraftcls
3029
 
   \ifCLASSOPTIONdraftclsnofoot\else
3030
 
      \def\@oddfoot{\scriptsize \@date\hfil DRAFT}%
3031
 
      \def\@evenfoot{\scriptsize DRAFT\hfil \@date}%
3032
 
   \fi
 
4291
  % draft footers
 
4292
  \ifCLASSOPTIONdraftclsnofoot\else
 
4293
    % but only if not draftclsnofoot
 
4294
    \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax
 
4295
    \def\@evenfoot{\@IEEEfooterstyle DRAFT\hfil\@date}\relax
 
4296
  \fi
3033
4297
\else
3034
 
   % non-draft mode footers
3035
 
   \if@IEEEusingpubid
3036
 
      \footskip 0pt%
 
4298
  % all nondraft mode footers
 
4299
  \if@IEEEusingpubid
 
4300
    % for title pages that are using a pubid
 
4301
    % do not repeat pubid on the title page if using a peer review cover page
 
4302
    \ifCLASSOPTIONpeerreview\else
 
4303
      % for noncompsoc papers, the pubid uses footnotesize and
 
4304
      % is at the same vertical position as where the last baseline would normally be
 
4305
      \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
 
4306
      \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
3037
4307
      \ifCLASSOPTIONcompsoc
3038
 
        \def\@oddfoot{\hss\normalfont\scriptsize\raisebox{-1.5\@IEEEnormalsizeunitybaselineskip}[0ex][0ex]{\@IEEEpubid}\hss}%
3039
 
        \def\@evenfoot{\hss\normalfont\scriptsize\raisebox{-1.5\@IEEEnormalsizeunitybaselineskip}[0ex][0ex]{\@IEEEpubid}\hss}%
3040
 
      \else
3041
 
        \def\@oddfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@IEEEpubid}\hss}%
3042
 
        \def\@evenfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@IEEEpubid}\hss}%
 
4308
        % for compsoc papers, the pubid is at the same vertical position as the normal footer
 
4309
        \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
 
4310
        \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
3043
4311
      \fi
3044
 
   \fi
3045
 
\fi}
3046
 
 
3047
 
 
3048
 
% start with empty headings
3049
 
\def\rightmark{}\def\leftmark{}
3050
 
 
3051
 
 
3052
 
%% Defines the command for putting the header. \footernote{TEXT} is the same
3053
 
%% as \markboth{TEXT}{TEXT}. 
 
4312
    \fi
 
4313
  \fi
 
4314
\fi
 
4315
% turn off headers for conferences
 
4316
\ifCLASSOPTIONconference
 
4317
  \let\@oddhead\@empty
 
4318
  \let\@evenhead\@empty
 
4319
\fi}
 
4320
 
 
4321
 
 
4322
% peer review cover page style, ps@IEEEpeerreviewcoverpagestyle
 
4323
\def\ps@IEEEpeerreviewcoverpagestyle{% default peer review cover no headers, no footers
 
4324
\let\@oddhead\@empty
 
4325
\let\@evenhead\@empty
 
4326
\let\@oddfoot\@empty
 
4327
\let\@evenfoot\@empty
 
4328
% will change later if the mode requires otherwise
 
4329
\ifCLASSOPTIONdraftcls
 
4330
  % draft footers
 
4331
  \ifCLASSOPTIONdraftclsnofoot\else
 
4332
    % but only if not draftclsnofoot
 
4333
    \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax
 
4334
    \def\@evenfoot{\@IEEEfooterstyle DRAFT\hfil\@date}\relax
 
4335
  \fi
 
4336
\else
 
4337
  % all nondraft mode footers
 
4338
  \if@IEEEusingpubid
 
4339
    % for peer review cover pages that are using a pubid
 
4340
    % for noncompsoc papers, the pubid uses footnotesize and
 
4341
    % is at the same vertical position as where the last baseline would normally be
 
4342
    \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
 
4343
    \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
 
4344
    \ifCLASSOPTIONcompsoc
 
4345
      % for compsoc papers, the pubid is at the same vertical position as the normal footer
 
4346
      \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
 
4347
      \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax
 
4348
    \fi
 
4349
  \fi
 
4350
\fi}
 
4351
 
 
4352
 
 
4353
 
 
4354
%% Defines the command for putting the header.
3054
4355
%% Note that all the text is forced into uppercase, if you have some text
3055
4356
%% that needs to be in lower case, for instance et. al., then either manually
3056
4357
%% set \leftmark and \rightmark or use \MakeLowercase{et. al.} within the
3057
4358
%% arguments to \markboth.
3058
 
\def\markboth#1#2{\def\leftmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{#1}}%
3059
 
\def\rightmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{#2}}}
3060
 
\def\footernote#1{\markboth{#1}{#1}}
 
4359
%% V1.7b add \protect to work with Babel
 
4360
\def\markboth#1#2{\def\leftmark{\MakeUppercase{\protect#1}}%
 
4361
\def\rightmark{\MakeUppercase{\protect#2}}}
3061
4362
 
3062
4363
\def\today{\ifcase\month\or
3063
4364
    January\or February\or March\or April\or May\or June\or
3107
4408
% V1.6 class files should always provide these
3108
4409
\def\newblock{\hskip .11em\@plus.33em\@minus.07em}
3109
4410
\let\@openbib@code\@empty
 
4411
% V1.8b article.cls is now providing these too
 
4412
% we do not use \@mkboth, nor alter the page style
 
4413
\newenvironment{theindex}
 
4414
               {\if@twocolumn
 
4415
                  \@restonecolfalse
 
4416
                \else
 
4417
                  \@restonecoltrue
 
4418
                \fi
 
4419
                \twocolumn[\section*{\indexname}]%
 
4420
                \parindent\z@
 
4421
                \parskip\z@ \@plus .3\p@\relax
 
4422
                \columnseprule \z@
 
4423
                \columnsep 35\p@
 
4424
                \let\item\@idxitem}
 
4425
               {\if@restonecol\onecolumn\else\clearpage\fi}
 
4426
\newcommand\@idxitem{\par\hangindent 40\p@}
 
4427
\newcommand\subitem{\@idxitem \hspace*{20\p@}}
 
4428
\newcommand\subsubitem{\@idxitem \hspace*{30\p@}}
 
4429
\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
 
4430
 
3110
4431
 
3111
4432
 
3112
4433
% Provide support for the control entries of IEEEtran.bst V1.00 and later.
3121
4442
    \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}%
3122
4443
  \@esphack}
3123
4444
 
 
4445
% \IEEEnoauxwrite{} allows for citations that do not add to or affect
 
4446
% the order of the existing citation list. Can be useful for \cite
 
4447
% within \thanks{}.
 
4448
\DeclareRobustCommand{\IEEEnoauxwrite}[1]{\relax
 
4449
\if@filesw
 
4450
\@fileswfalse
 
4451
#1\relax\relax\relax\relax\relax
 
4452
\@fileswtrue
 
4453
\else
 
4454
#1\relax\relax\relax\relax\relax
 
4455
\fi}
 
4456
 
3124
4457
% V1.6 provide a way for a user to execute a command just before 
3125
4458
% a given reference number - used to insert a \newpage to balance
3126
4459
% the columns on the last page
3144
4477
 
3145
4478
\def\@biblabel#1{[#1]}
3146
4479
 
3147
 
% compsoc journals left align the reference numbers
3148
 
\@IEEEcompsocnotconfonly{\def\@biblabel#1{[#1]\hfill}}
 
4480
% compsoc journals and conferences left align the reference numbers
 
4481
\@IEEEcompsoconly{\def\@biblabel#1{[#1]\hfill}}
3149
4482
 
3150
4483
% controls bib item spacing
3151
4484
\def\IEEEbibitemsep{0pt plus .5pt}
3152
4485
 
3153
 
\@IEEEcompsocconfonly{\def\IEEEbibitemsep{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}}
 
4486
\@IEEEcompsocconfonly{\def\IEEEbibitemsep{0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}}
3154
4487
 
3155
4488
 
3156
4489
\def\thebibliography#1{\section*{\refname}%
3157
4490
    \addcontentsline{toc}{section}{\refname}%
3158
4491
    % V1.6 add some rubber space here and provide a command trigger
3159
 
    \footnotesize\@IEEEcompsocconfonly{\small}\vskip 0.3\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip%
 
4492
    \footnotesize\vskip 0.3\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip%
3160
4493
    \list{\@biblabel{\@arabic\c@enumiv}}%
3161
4494
    {\settowidth\labelwidth{\@biblabel{#1}}%
3162
4495
    \leftmargin\labelwidth
3172
4505
%   \sloppy\clubpenalty4000\widowpenalty4000%
3173
4506
% by adding the \interlinepenalty here, we make it more
3174
4507
% difficult, but not impossible, for LaTeX to break within a reference.
3175
 
% IEEE almost never breaks a reference (but they do it more often with
 
4508
% The IEEE almost never breaks a reference (but they do it more often with
3176
4509
% technotes). You may get an underfull vbox warning around the bibliography, 
3177
 
% but the final result will be much more like what IEEE will publish. 
 
4510
% but the final result will be much more like what the IEEE will publish. 
3178
4511
% MDS 11/2000
3179
4512
\ifCLASSOPTIONtechnote\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty100%
3180
4513
\else\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty500\fi%
3203
4536
% the interline spacing is large enough to prevent \IEEEauthorrefmark{} from colliding
3204
4537
% with the text above.
3205
4538
% V1.7 make this a robust command
 
4539
% V1.8 transmag uses an arabic author affiliation symbol
 
4540
\ifCLASSOPTIONtransmag
 
4541
\DeclareRobustCommand*{\IEEEauthorrefmark}[1]{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize #1}}}
 
4542
\else
3206
4543
\DeclareRobustCommand*{\IEEEauthorrefmark}[1]{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or%
3207
4544
    \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger%
3208
4545
    \or \ddagger\ddagger \else\textsuperscript{\expandafter\romannumeral#1}\fi}}}}
 
4546
\fi
3209
4547
 
3210
4548
 
3211
4549
% FONT CONTROLS AND SPACINGS FOR CONFERENCE MODE AUTHOR NAME AND AFFILIATION BLOCKS
3212
4550
3213
4551
% The default font styles for the author name and affiliation blocks (confmode)
3214
 
\def\@IEEEauthorblockNstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\sublargesize\@IEEEcompsocconfonly{\large}}
3215
 
\def\@IEEEauthorblockAstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\@IEEEcompsocconfonly{\itshape}\normalsize\@IEEEcompsocconfonly{\large}}
 
4552
\def\@IEEEauthorblockNstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\sublargesize}
 
4553
\def\@IEEEauthorblockAstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\@IEEEcompsocconfonly{\itshape}\normalsize}
3216
4554
% The default if the user does not use an author block
3217
4555
\def\@IEEEauthordefaulttextstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\sublargesize}
3218
4556
 
3219
 
% spacing from title (or special paper notice) to author name blocks (confmode)
 
4557
% adjustment spacing from title (or special paper notice) to author name blocks (confmode)
3220
4558
% can be negative
3221
4559
\def\@IEEEauthorblockconfadjspace{-0.25em}
3222
4560
% compsoc conferences need more space here
3224
4562
 
3225
4563
% spacing between name and affiliation blocks (confmode)
3226
4564
% This can be negative.
3227
 
% IEEE doesn't want any added spacing here, but I will leave these
 
4565
% The IEEE doesn't want any added spacing here, but I will leave these
3228
4566
% controls in place in case they ever change their mind.
3229
4567
% Personally, I like 0.75ex.
3230
4568
%\def\@IEEEauthorblockNtopspace{0.75ex}
3231
4569
%\def\@IEEEauthorblockAtopspace{0.75ex}
3232
4570
\def\@IEEEauthorblockNtopspace{0.0ex}
3233
4571
\def\@IEEEauthorblockAtopspace{0.0ex}
 
4572
\ifCLASSOPTIONtransmag
 
4573
% transmag uses one line of space above first affiliation block
 
4574
\def\@IEEEauthorblockAtopspace{1\@IEEEnormalsizeunitybaselineskip}
 
4575
\fi
 
4576
 
3234
4577
% baseline spacing within name and affiliation blocks (confmode)
3235
4578
% must be positive, spacings below certain values will make 
3236
4579
% the position of line of text sensitive to the contents of the
3319
4662
% input the author affiliations
3320
4663
#1%
3321
4664
% end the row if the user did not already
3322
 
\crcr}
 
4665
\crcr
 
4666
% V1.8 transmag does not use any additional affiliation spacing after the first author
 
4667
\ifCLASSOPTIONtransmag\gdef\@IEEEauthorblockAtopspace{0pt}\fi}
 
4668
 
3323
4669
% spacer row for affiliations
3324
4670
\def\@IEEEauthorblockAtopspaceline{\cr\noalign{\vskip\@IEEEauthorblockAtopspace}}
3325
4671
 
3329
4675
\ifCLASSOPTIONconference
3330
4676
\else
3331
4677
   \ifCLASSOPTIONpeerreviewca\else
3332
 
      % not conference or peerreviewca mode
3333
 
      \def\IEEEauthorblockN#1{#1}%
3334
 
      \def\IEEEauthorblockA#1{#1}%
 
4678
      % not conference, peerreviewca or transmag mode
 
4679
      \ifCLASSOPTIONtransmag\else
 
4680
         \def\IEEEauthorblockN#1{#1}%
 
4681
         \def\IEEEauthorblockA#1{#1}%
 
4682
      \fi
3335
4683
   \fi
3336
4684
\fi
3337
4685
 
3385
4733
\ifCLASSOPTIONpeerreviewca
3386
4734
\renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}%
3387
4735
\fi
3388
 
 
 
4736
% V1.8 transmag uses conference author format
 
4737
\ifCLASSOPTIONtransmag
 
4738
\renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}%
 
4739
\fi
3389
4740
 
3390
4741
% page clearing command
3391
4742
% based on LaTeX2e's \cleardoublepage, but allows different page styles
3393
4744
\def\@IEEEcleardoublepage#1{\clearpage\if@twoside\ifodd\c@page\else
3394
4745
\hbox{}\thispagestyle{#1}\newpage\if@twocolumn\hbox{}\thispagestyle{#1}\newpage\fi\fi\fi}
3395
4746
 
 
4747
% V1.8b hooks to allow adjustment of space above title
 
4748
\def\IEEEtitletopspace{0.5\baselineskip}
 
4749
% an added extra amount to allow for adjustment/offset
 
4750
\def\IEEEtitletopspaceextra{0pt}
3396
4751
 
3397
4752
% user command to invoke the title page
3398
4753
\def\maketitle{\par%
3414
4769
        \ifCLASSOPTIONtechnote%
3415
4770
           \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext%
3416
4771
        \else
3417
 
           \twocolumn[\@maketitle\@IEEEdynamictitlevspace\@IEEEaftertitletext]%
 
4772
           \twocolumn[{\IEEEquantizevspace{\@maketitle}[\IEEEquantizedisabletitlecmds]{0pt}[-\topskip]{\baselineskip}{\@IEEENORMtitlevspace}{\@IEEEMINtitlevspace}\@IEEEaftertitletext}]%
3418
4773
        \fi
3419
4774
     \else
3420
4775
        \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext%
3433
4788
  \let\thanks\relax}
3434
4789
 
3435
4790
 
3436
 
 
3437
 
% V1.7 parbox to format \@IEEEcompsoctitleabstractindextext
3438
 
\long\def\@IEEEcompsoctitleabstractindextextbox#1{\parbox{0.915\textwidth}{#1}}
 
4791
% V1.8 parbox to format \@IEEEtitleabstractindextext
 
4792
\long\def\@IEEEtitleabstractindextextbox#1{\parbox{1\textwidth}{#1}}
 
4793
% V1.8 compsoc is partial width
 
4794
\ifCLASSOPTIONcompsoc
 
4795
% comparison with proofs suggests it's in the range of 92.1-92.3%
 
4796
\long\def\@IEEEtitleabstractindextextbox#1{\parbox{0.922\textwidth}{\@IEEEcompsocnotconfonly{\rightskip\@flushglue\leftskip\z@skip}#1}}
 
4797
\fi
3439
4798
 
3440
4799
% formats the Title, authors names, affiliations and special paper notice
3441
4800
% THIS IS A CONTROLLED SPACING COMMAND! Do not allow blank lines or unintentional
3442
4801
% spaces to enter the definition - use % at the end of each line
3443
4802
\def\@maketitle{\newpage
3444
 
\begin{center}%
3445
 
\ifCLASSOPTIONtechnote% technotes
3446
 
   {\bfseries\large\@IEEEcompsoconly{\sffamily}\@title\par}\vskip 1.3em{\lineskip .5em\@IEEEcompsoconly{\sffamily}\@author
3447
 
   \@IEEEspecialpapernotice\par{\@IEEEcompsoconly{\vskip 1.5em\relax
3448
 
   \@IEEEcompsoctitleabstractindextextbox{\@IEEEcompsoctitleabstractindextext}\par
3449
 
   \hfill\@IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
 
4803
\bgroup\par\vskip\IEEEtitletopspace\vskip\IEEEtitletopspaceextra\centering%
 
4804
\ifCLASSOPTIONtechnote% technotes, V1.8a abstract and index terms are not treated differently for compsoc technotes
 
4805
   {\bfseries\large\@IEEEcompsoconly{\Large\sffamily}\@title\par}\vskip 1.3em{\lineskip .5em\@IEEEcompsoconly{\large\sffamily}\@author
 
4806
   \@IEEEspecialpapernotice\par}\relax
3450
4807
\else% not a technote
3451
 
   \vskip0.2em{\Huge\@IEEEcompsoconly{\sffamily}\@IEEEcompsocconfonly{\normalfont\normalsize\vskip 2\@IEEEnormalsizeunitybaselineskip
3452
 
   \bfseries\Large}\@title\par}\vskip1.0em\par%
 
4808
   \vskip0.2em{\Huge\ifCLASSOPTIONtransmag\bfseries\LARGE\fi\@IEEEcompsoconly{\sffamily}\@IEEEcompsocconfonly{\normalfont\normalsize\vskip 2\@IEEEnormalsizeunitybaselineskip
 
4809
   \bfseries\Large}\@IEEEcompsocnotconfonly{\vskip 0.75\@IEEEnormalsizeunitybaselineskip}\@title\par}\relax
 
4810
   \@IEEEcompsocnotconfonly{\vskip 0.5\@IEEEnormalsizeunitybaselineskip}\vskip1.0em\par%
3453
4811
   % V1.6 handle \author differently if in conference mode
3454
4812
   \ifCLASSOPTIONconference%
3455
4813
      {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
3460
4818
         {\@IEEEcompsoconly{\sffamily}\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
3461
4819
          \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par
3462
4820
          {\@IEEEcompsoconly{\vskip 1.5em\relax
3463
 
           \@IEEEcompsoctitleabstractindextextbox{\@IEEEcompsoctitleabstractindextext}\par\hfill
3464
 
           \@IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
3465
 
      \else% journal or peerreview
3466
 
         {\lineskip.5em\@IEEEcompsoconly{\sffamily}\sublargesize\@author\@IEEEspecialpapernotice\par
3467
 
          {\@IEEEcompsoconly{\vskip 1.5em\relax
3468
 
           \@IEEEcompsoctitleabstractindextextbox{\@IEEEcompsoctitleabstractindextext}\par\hfill
3469
 
           \@IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
 
4821
           \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\noindent\hfill
 
4822
           \IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
 
4823
      \else% journal, peerreview or transmag
 
4824
         \ifCLASSOPTIONtransmag
 
4825
            % transmag also handles author names just like conference mode
 
4826
            % it also uses \@IEEEtitleabstractindextex, but with one line less
 
4827
            % space above, and one more below
 
4828
           {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
 
4829
            \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par
 
4830
           {\vspace{0.5\baselineskip}\relax\@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\vspace{-1\baselineskip}\par}}\relax
 
4831
         \else% journal or peerreview
 
4832
           {\lineskip.5em\@IEEEcompsoconly{\sffamily}\sublargesize\@author\@IEEEspecialpapernotice\par
 
4833
           {\@IEEEcompsoconly{\vskip 1.5em\relax
 
4834
            \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\noindent\hfill
 
4835
            \IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
 
4836
         \fi
3470
4837
      \fi
3471
4838
   \fi
3472
 
\fi\end{center}}
3473
 
 
 
4839
\fi\par\addvspace{0.5\baselineskip}\egroup}
3474
4840
 
3475
4841
 
3476
4842
% V1.7 Computer Society "diamond line" which follows index terms for nonconference papers
3477
 
\def\@IEEEcompsocdiamondline{\vrule depth 0pt height 0.5pt width 4cm\hspace{7.5pt}%
3478
 
\raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}%
3479
 
\hspace{7.5pt}\vrule depth 0pt height 0.5pt width 4cm\relax}
 
4843
% V1.8a full width diamond line for single column use
 
4844
\def\@IEEEcompsocdiamondlinei{\vrule depth 0pt height 0.5pt width 4cm\nobreak\hspace{7.5pt}\nobreak
 
4845
\raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak
 
4846
\hspace{7.5pt}\nobreak\vrule depth 0pt height 0.5pt width 4cm\relax}
 
4847
% V1.8a narrower width diamond line for double column use
 
4848
\def\@IEEEcompsocdiamondlineii{\vrule depth 0pt height 0.5pt width 2.5cm\nobreak\hspace{7.5pt}\nobreak
 
4849
\raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak
 
4850
\hspace{7.5pt}\nobreak\vrule depth 0pt height 0.5pt width 2.5cm\relax}
 
4851
% V1.8a bare core without rules to base a last resort on for very narrow linewidths
 
4852
\def\@IEEEcompsocdiamondlineiii{\mbox{}\nobreak\hspace{7.5pt}\nobreak
 
4853
\raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak
 
4854
\hspace{7.5pt}\nobreak\mbox{}\relax}
 
4855
 
 
4856
% V1.8a allow \IEEEcompsocdiamondline to adjust for different linewidths.
 
4857
% Use \@IEEEcompsocdiamondlinei if its width is less than 0.66\linewidth (0.487 nominal for single column)
 
4858
% if not, fall back to \@IEEEcompsocdiamondlineii if its width is less than 0.75\linewidth (0.659 nominal for double column)
 
4859
% if all else fails, try to make a custom diamondline based on the abnormally narrow linewidth
 
4860
\def\IEEEcompsocdiamondline{\settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlinei}\relax
 
4861
\ifdim\@IEEEtrantmpdimenA<0.66\linewidth\relax\@IEEEcompsocdiamondlinei\relax
 
4862
\else
 
4863
\settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlineii}\relax
 
4864
\ifdim\@IEEEtrantmpdimenA<0.75\linewidth\relax\@IEEEcompsocdiamondlineii\relax
 
4865
\else
 
4866
\settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlineiii}\relax
 
4867
\@IEEEtrantmpdimenB=\linewidth\relax
 
4868
\addtolength{\@IEEEtrantmpdimenB}{-1\@IEEEtrantmpdimenA}\relax
 
4869
\vrule depth 0pt height 0.5pt width 0.33\@IEEEtrantmpdimenB\@IEEEcompsocdiamondlineiii\vrule depth 0pt height 0.5pt width 0.33\@IEEEtrantmpdimenB\relax
 
4870
\fi\fi}
 
4871
 
3480
4872
 
3481
4873
% V1.7 standard LateX2e \thanks, but with \itshape under compsoc. Also make it a \long\def
3482
4874
% We also need to trigger the one-shot footnote rule
3489
4881
        \protect\@IEEEtriggeroneshotfootnoterule\relax}\ignorespaces#1}}}
3490
4882
\let\@thanks\@empty
3491
4883
 
 
4884
 
3492
4885
% V1.7 allow \author to contain \par's. This is needed to allow \thanks to contain \par.
3493
4886
\long\def\author#1{\gdef\@author{#1}}
3494
4887
 
3496
4889
% in addition to setting up IEEEitemize, we need to remove a baselineskip space above and
3497
4890
% below it because \list's \pars introduce blank lines because of the footnote struts.
3498
4891
\def\@IEEEsetupcompsocitemizelist{\def\labelitemi{$\bullet$}%
3499
 
\setlength{\IEEElabelindent}{0pt}\setlength{\parskip}{0pt}%
 
4892
\setlength{\IEEElabelindent}{0pt}\setlength{\labelsep}{1.2em}\setlength{\parskip}{0pt}%
3500
4893
\setlength{\partopsep}{0pt}\setlength{\topsep}{0.5\baselineskip}\vspace{-1\baselineskip}\relax}
3501
4894
 
3502
4895
 
3505
4898
 
3506
4899
\ifCLASSOPTIONcompsoc
3507
4900
% V1.7 compsoc bullet item \thanks
3508
 
% also, we need to redefine this to destroy the argument in \@IEEEdynamictitlevspace
 
4901
% also, we need to redefine this to destroy the argument in \IEEEquantizevspace
3509
4902
\long\def\IEEEcompsocitemizethanks#1{\relax\@IEEEbreakcompsocthanksitemfalse\footnotemark
3510
4903
    \protected@xdef\@thanks{\@thanks
3511
4904
        \protect\footnotetext[\the\c@footnote]{\itshape\protect\@IEEEtriggeroneshotfootnoterule
3527
4920
% V1.6b define the \IEEEpeerreviewmaketitle as needed
3528
4921
\ifCLASSOPTIONpeerreview
3529
4922
\def\IEEEpeerreviewmaketitle{\@IEEEcleardoublepage{empty}%
3530
 
\if@twocolumn
3531
 
\twocolumn[\@IEEEpeerreviewmaketitle\@IEEEdynamictitlevspace]
 
4923
\ifCLASSOPTIONtwocolumn
 
4924
\twocolumn[{\IEEEquantizevspace{\@IEEEpeerreviewmaketitle}[\IEEEquantizedisabletitlecmds]{0pt}[-\topskip]{\baselineskip}{\@IEEENORMtitlevspace}{\@IEEEMINtitlevspace}}]
3532
4925
\else
3533
4926
\newpage\@IEEEpeerreviewmaketitle\@IEEEstatictitlevskip
3534
4927
\fi
3539
4932
\fi
3540
4933
 
3541
4934
% peerreview formats the repeated title like the title in journal papers.
3542
 
\def\@IEEEpeerreviewmaketitle{\begin{center}\@IEEEcompsoconly{\sffamily}%
 
4935
\def\@IEEEpeerreviewmaketitle{\bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEcompsoconly{\sffamily}%
3543
4936
\normalfont\normalsize\vskip0.2em{\Huge\@title\par}\vskip1.0em\par
3544
 
\end{center}}
 
4937
\par\addvspace{0.5\baselineskip}\egroup}
3545
4938
 
3546
4939
 
3547
4940
 
3569
4962
\fi}}
3570
4963
 
3571
4964
 
3572
 
% V1.6
3573
 
% This is a dynamically determined rigid spacer between the title/authors 
3574
 
% and the main text. This is used only for single column titles over two 
3575
 
% column text (most common)
3576
 
% This is bit tricky because we have to ensure that the textheight of the
3577
 
% main text is an integer multiple of \baselineskip
3578
 
% otherwise underfull vbox problems may develop in the second column of the
3579
 
% text on the titlepage
3580
 
% The possible use of \IEEEpubid must also be taken into account.
3581
 
\def\@IEEEdynamictitlevspace{{%
3582
 
    % we run within a group so that all the macros can be forgotten when we are done
3583
 
    \long\def\thanks##1{\relax}%don't allow \thanks to run when we evaluate the vbox height
3584
 
    \long\def\IEEEcompsocitemizethanks##1{\relax}%don't allow \IEEEcompsocitemizethanks to run when we evaluate the vbox height
3585
 
    \normalfont\normalsize% we declare more descriptive variable names
3586
 
    \let\@IEEEmaintextheight=\@IEEEtrantmpdimenA%height of the main text columns
3587
 
    \let\@IEEEINTmaintextheight=\@IEEEtrantmpdimenB%height of the main text columns with integer # lines
3588
 
    % set the nominal and minimum values for the title spacer
3589
 
    % the dynamic algorithm will not allow the spacer size to
3590
 
    % become less than \@IEEEMINtitlevspace - instead it will be
3591
 
    % lengthened
3592
 
    % default to journal values
3593
 
    \def\@IEEENORMtitlevspace{2.5\baselineskip}%
3594
 
    \def\@IEEEMINtitlevspace{2\baselineskip}%
3595
 
    % conferences and technotes need tighter spacing
3596
 
    \ifCLASSOPTIONconference%conference
3597
 
     \def\@IEEENORMtitlevspace{1\baselineskip}%
3598
 
     \def\@IEEEMINtitlevspace{0.75\baselineskip}%
3599
 
    \fi
3600
 
    \ifCLASSOPTIONtechnote%technote
3601
 
      \def\@IEEENORMtitlevspace{1\baselineskip}%
3602
 
      \def\@IEEEMINtitlevspace{0.75\baselineskip}%
3603
 
    \fi%
3604
 
    % get the height that the title will take up
3605
 
    \ifCLASSOPTIONpeerreview
3606
 
       \settoheight{\@IEEEmaintextheight}{\vbox{\hsize\textwidth \@IEEEpeerreviewmaketitle}}%
3607
 
    \else
3608
 
       \settoheight{\@IEEEmaintextheight}{\vbox{\hsize\textwidth \@maketitle}}%
3609
 
    \fi
3610
 
    \@IEEEmaintextheight=-\@IEEEmaintextheight% title takes away from maintext, so reverse sign
3611
 
    % add the height of the page textheight
3612
 
    \advance\@IEEEmaintextheight by \textheight%
3613
 
    % correct for title pages using pubid
3614
 
    \ifCLASSOPTIONpeerreview\else
3615
 
       % peerreview papers use the pubid on the cover page only.
3616
 
       % And the cover page uses a static spacer.
3617
 
       \if@IEEEusingpubid\advance\@IEEEmaintextheight by -\@IEEEpubidpullup\fi
3618
 
    \fi%
3619
 
    % subtract off the nominal value of the title bottom spacer
3620
 
    \advance\@IEEEmaintextheight by -\@IEEENORMtitlevspace%
3621
 
    % \topskip takes away some too
3622
 
    \advance\@IEEEmaintextheight by -\topskip%
3623
 
    % calculate the column height of the main text for lines
3624
 
    % now we calculate the main text height as if holding
3625
 
    % an integer number of \normalsize lines after the first
3626
 
    % and discard any excess fractional remainder
3627
 
    % we subtracted the first line, because the first line
3628
 
    % is placed \topskip into the maintext, not \baselineskip like the
3629
 
    % rest of the lines.
3630
 
    \@IEEEINTmaintextheight=\@IEEEmaintextheight%
3631
 
    \divide\@IEEEINTmaintextheight  by \baselineskip%
3632
 
    \multiply\@IEEEINTmaintextheight  by \baselineskip%
3633
 
    % now we calculate how much the title spacer height will
3634
 
    % have to be reduced from nominal (\@IEEEREDUCEmaintextheight is always
3635
 
    % a positive value) so that the maintext area will contain an integer
3636
 
    % number of normal size lines
3637
 
    % we change variable names here (to avoid confusion) as we no longer
3638
 
    % need \@IEEEINTmaintextheight and can reuse its dimen register
3639
 
    \let\@IEEEREDUCEmaintextheight=\@IEEEINTmaintextheight%
3640
 
    \advance\@IEEEREDUCEmaintextheight by -\@IEEEmaintextheight%
3641
 
    \advance\@IEEEREDUCEmaintextheight by \baselineskip%
3642
 
    % this is the calculated height of the spacer
3643
 
    % we change variable names here (to avoid confusion) as we no longer
3644
 
    % need \@IEEEmaintextheight and can reuse its dimen register
3645
 
    \let\@IEEECOMPENSATElen=\@IEEEmaintextheight%
3646
 
    \@IEEECOMPENSATElen=\@IEEENORMtitlevspace% set the nominal value
3647
 
    % we go with the reduced length if it is smaller than an increase
3648
 
    \ifdim\@IEEEREDUCEmaintextheight < 0.5\baselineskip\relax%
3649
 
     \advance\@IEEECOMPENSATElen by -\@IEEEREDUCEmaintextheight%
3650
 
     % if the resulting spacer is too small back out and go with an increase instead
3651
 
     \ifdim\@IEEECOMPENSATElen<\@IEEEMINtitlevspace\relax%
3652
 
      \advance\@IEEECOMPENSATElen by \baselineskip%
3653
 
     \fi%
3654
 
    \else%
3655
 
     % go with an increase because it is closer to the nominal than a decrease
3656
 
     \advance\@IEEECOMPENSATElen by -\@IEEEREDUCEmaintextheight%
3657
 
     \advance\@IEEECOMPENSATElen by \baselineskip%
3658
 
    \fi%
3659
 
    % set the calculated rigid spacer
3660
 
    \vspace{\@IEEECOMPENSATElen}}}
 
4965
% set the nominal and minimum values for the quantized title spacer
 
4966
% the quantization algorithm will not allow the spacer size to
 
4967
% become less than \@IEEEMINtitlevspace - instead it will be lengthened
 
4968
% default to journal values
 
4969
\def\@IEEENORMtitlevspace{2.5\baselineskip}
 
4970
\def\@IEEEMINtitlevspace{2\baselineskip}
 
4971
% conferences and technotes need tighter spacing
 
4972
\ifCLASSOPTIONconference% conference
 
4973
  \def\@IEEENORMtitlevspace{1\baselineskip}
 
4974
  \def\@IEEEMINtitlevspace{0.75\baselineskip}
 
4975
\fi
 
4976
\ifCLASSOPTIONtechnote% technote
 
4977
  \def\@IEEENORMtitlevspace{1\baselineskip}
 
4978
  \def\@IEEEMINtitlevspace{0.75\baselineskip}
 
4979
\fi
 
4980
 
 
4981
 
 
4982
% V1.8a
 
4983
\def\IEEEquantizevspace{\begingroup\@ifstar{\@IEEEquantizevspacestarformtrue\@IEEEquantizevspace}{\@IEEEquantizevspacestarformfalse\@IEEEquantizevspace}}
 
4984
% \IEEEquantizevspace[output dimen register]{object}[object decl]
 
4985
%                    {top baselineskip}
 
4986
%                    [offset][prevdepth][lineskip limit][lineskip]
 
4987
%                    {unit height}{nominal vspace}{minimum vspace}
 
4988
%
 
4989
% Calculates and creates the vspace needed to make the combined height with
 
4990
% the given object an integer multiple of the given unit height. This command
 
4991
% is more general than the older \@IEEEdynamictitlevspace it replaces.
 
4992
%
 
4993
% The star form has no effect at present, but is reserved for future use.
 
4994
%
 
4995
% If the optional argument [output dimen register] is given, the calculated
 
4996
% vspace height is stored in the given output dimen (or skip) register
 
4997
% and no other action is taken, otherwise the object followed by a vspace*
 
4998
% of the appropriate height is evaluated/output.
 
4999
%
 
5000
% The optional object decl (declarations) is code that is evaluated just
 
5001
% before the object's height is evaluated. Its intented purpose is to allow
 
5002
% for the alteration or disabling of code within the object during internal
 
5003
% height evaluation (e.g., \long\def\thanks#1{\relax} ).
 
5004
% This special code is not invoked if/when the object is rendered at the end.
 
5005
%
 
5006
% The nominal vspace is the target value of the added vspace and the minimum
 
5007
% vspace is the lower allowed limit. The vspacer will be the value that achieves
 
5008
% integral overall height, in terms of the given unit height, that is closest
 
5009
% to the nominal vspace and that is not less than the specified minimum vspace.
 
5010
%
 
5011
% The line spacing algorithm of TeX is somewhat involved and requires special
 
5012
% care with regard to the first line of a vertical list (which is indicated
 
5013
% when \prevdepth is -1000pt or less). top baselineskip specifies the
 
5014
% baselineskip or topskip used prior to the object. If the height of the
 
5015
% first line of the object is greater than the given top baselineskip, then
 
5016
% the top baselineskip is subtracted from the height of the first line and
 
5017
% that difference is considered along with the rest of the object height
 
5018
% (because the object will be shifted down by an amount = 
 
5019
% top line height - top baselineskip). Otherwise, the height of the first line
 
5020
% of the object is ignored as far as the calculations are concerned.
 
5021
% This algorithm is adequate for objects that appear at the top of a page
 
5022
% (e.g., titles) where \topskip spacing is used.
 
5023
%
 
5024
% However, as explained on page 78 of the TeXbook, interline spacing is more
 
5025
% complex when \baselineskip is being used (indicated by \prevdepth > 
 
5026
% -1000pt). The four optional parameters offset, prevdepth, lineskip limit and
 
5027
% lineskip are assumed to be equal to be 0pt, \prevdepth, \lineskiplimit and
 
5028
% \lineskip, respectively, if they are omitted.
 
5029
%
 
5030
% The prevdepth is the depth of the line before the object, the lineskip limit
 
5031
% specifies how close the top of the object can come to the bottom of the
 
5032
% previous line before \baselineskip is ignored and \lineskip is inserted
 
5033
% between the object and the line above it. Lineskip does not come into
 
5034
% play unless the first line of the object is high enough to "get too close"
 
5035
% (as specified by lineskiplimit) to the line before it. The the prevdepth,
 
5036
% lineskip limit, and lineskip optional parameters are not needed for the
 
5037
% first object/line on a page (i.e., prevdepth <= -1000pt) where the simplier
 
5038
% \topskip spacing rules are in effect.
 
5039
%
 
5040
% Offset is a manual adjustment that is added to the height calculations of
 
5041
% object irrespective of the value of \prevdepth. It is useful when the top
 
5042
% baselineskip will result in a noninteger unit height object placement even
 
5043
% if the object itself has integral height. e.g., a footnotesize baselineskip
 
5044
% is used before the object, thus an offset of, say -3pt, can be given as a
 
5045
% correction.
 
5046
 
 
5047
% Common combinations of these parameters include:
 
5048
%
 
5049
% top baselineskip:   (and default values for offset, prevdepth, etc.)
 
5050
% \topskip            % for objects that appear at the top of a page
 
5051
% \maxdimen           % always ignore the height of the top line
 
5052
% 0pt                 % always consider any positive height of the top line
 
5053
%
 
5054
% for objects to appear inline in normal text:
 
5055
% top baselineskip = \baselineskip
 
5056
%
 
5057
% set prevdepth = -1000pt and top baselineskip = 0pt to consider the
 
5058
% overall height of the object without any other external skip
 
5059
% consideration
 
5060
 
 
5061
\newif\if@IEEEquantizevspacestarform       % flag to indicate star form
 
5062
\newif\if@IEEEquantizevspaceuseoutdimenreg % flag to indicate output dimen register is to be used
 
5063
% Use our own private registers because the object could contain a
 
5064
% structure that uses the existing tmp scratch pad registers
 
5065
\newdimen\@IEEEquantizeheightA
 
5066
\newdimen\@IEEEquantizeheightB
 
5067
\newdimen\@IEEEquantizeheightC
 
5068
\newdimen\@IEEEquantizeprevdepth % need to save this early as can change
 
5069
\newcount\@IEEEquantizemultiple
 
5070
\newbox\@IEEEquantizeboxA
 
5071
 
 
5072
 
 
5073
\def\@IEEEquantizevspace{\@ifnextchar [{\@IEEEquantizevspaceuseoutdimenregtrue\@@IEEEquantizevspace}{\@IEEEquantizevspaceuseoutdimenregfalse\@@IEEEquantizevspace[]}}
 
5074
 
 
5075
 
 
5076
\long\def\@@IEEEquantizevspace[#1]#2{\relax
 
5077
% acquire and store
 
5078
% #1 optional output dimen register
 
5079
% #2 object
 
5080
\edef\@IEEEquantizeoutdimenreg{#1}\relax
 
5081
% allow for object specifications that contain parameters
 
5082
\@IEEEtrantmptoksA={#2}\relax
 
5083
\long\edef\@IEEEquantizeobject{\the\@IEEEtrantmptoksA}\relax
 
5084
\@ifnextchar [{\@@@IEEEquantizevspace}{\@@@IEEEquantizevspace[\relax]}}
 
5085
 
 
5086
\long\def\@@@IEEEquantizevspace[#1]#2{\relax
 
5087
% acquire and store
 
5088
% [#1] optional object decl, is \relax if not given by user
 
5089
% #2 top baselineskip
 
5090
% allow for object decl specifications that have parameters
 
5091
\@IEEEtrantmptoksA={#1}\relax
 
5092
\long\edef\@IEEEquantizeobjectdecl{\the\@IEEEtrantmptoksA}\relax
 
5093
\edef\@IEEEquantizetopbaselineskip{#2}\ivIEEEquantizevspace}
 
5094
 
 
5095
% acquire optional argument set and store
 
5096
% [offset][prevdepth][lineskip limit][lineskip]
 
5097
\def\ivIEEEquantizevspace{\@ifnextchar [{\@vIEEEquantizevspace}{\@vIEEEquantizevspace[0pt]}}
 
5098
\def\@vIEEEquantizevspace[#1]{\edef\@IEEEquantizeoffset{#1}\@ifnextchar [{\@viIEEEquantizevspace}{\@viIEEEquantizevspace[\prevdepth]}}
 
5099
\def\@viIEEEquantizevspace[#1]{\@IEEEquantizeprevdepth=#1\relax\@ifnextchar [{\@viiIEEEquantizevspace}{\@viiIEEEquantizevspace[\lineskiplimit]}}
 
5100
\def\@viiIEEEquantizevspace[#1]{\edef\@IEEEquantizelineskiplimit{#1}\@ifnextchar [{\@viiiIEEEquantizevspace}{\@viiiIEEEquantizevspace[\lineskip]}}
 
5101
\def\@viiiIEEEquantizevspace[#1]{\edef\@IEEEquantizelineskip{#1}\@ixIEEEquantizevspace}
 
5102
 
 
5103
% main routine
 
5104
\def\@ixIEEEquantizevspace#1#2#3{\relax
 
5105
\edef\@IEEEquantizeunitheight{#1}\relax
 
5106
\edef\@IEEEquantizenomvspace{#2}\relax
 
5107
\edef\@IEEEquantizeminvspace{#3}\relax
 
5108
% \@IEEEquantizeoutdimenreg
 
5109
% \@IEEEquantizeobject
 
5110
% \@IEEEquantizeobjectdecl
 
5111
% \@IEEEquantizetopbaselineskip
 
5112
% \@IEEEquantizeoffset
 
5113
% \@IEEEquantizeprevdepth
 
5114
% \@IEEEquantizelineskiplimit
 
5115
% \@IEEEquantizelineskip
 
5116
% \@IEEEquantizeunitheight
 
5117
% \@IEEEquantizenomvspace
 
5118
% \@IEEEquantizeminvspace
 
5119
% get overall height of object
 
5120
\setbox\@IEEEquantizeboxA\vbox{\begingroup\@IEEEquantizeobjectdecl\@IEEEquantizeobject\relax\endgroup}\relax
 
5121
\@IEEEquantizeheightA\ht\@IEEEquantizeboxA\relax
 
5122
% get height of first line of object
 
5123
\setbox\@IEEEquantizeboxA\vtop{\begingroup\@IEEEquantizeobjectdecl\@IEEEquantizeobject\relax\endgroup}\relax
 
5124
\@IEEEquantizeheightB\ht\@IEEEquantizeboxA\relax
 
5125
\ifdim\@IEEEquantizeprevdepth>-1000pt\relax % prevdepth > -1000pf means full baselineskip\lineskip rules in effect
 
5126
% lineskip spacing rule takes effect if height of top line > baselineskip - prevdepth - lineskiplimit, 
 
5127
% otherwise the baselineskip rule is in effect and the height of the first line does not matter at all.
 
5128
\@IEEEquantizeheightC=\@IEEEquantizetopbaselineskip\relax
 
5129
\advance\@IEEEquantizeheightC-\@IEEEquantizeprevdepth\relax
 
5130
\advance\@IEEEquantizeheightC-\@IEEEquantizelineskiplimit\relax % this works even though \@IEEEquantizelineskiplimit is a macro because TeX allows --10pt notation
 
5131
\ifdim\@IEEEquantizeheightB>\@IEEEquantizeheightC\relax
 
5132
% lineskip spacing rule is in effect i.e., the object is going to be shifted down relative to the
 
5133
% baselineskip set position by its top line height (already a part of the total height) + prevdepth + lineskip - baselineskip
 
5134
\advance\@IEEEquantizeheightA\@IEEEquantizeprevdepth\relax
 
5135
\advance\@IEEEquantizeheightA\@IEEEquantizelineskip\relax
 
5136
\advance\@IEEEquantizeheightA-\@IEEEquantizetopbaselineskip\relax
 
5137
\else
 
5138
% height of first line <= \@IEEEquantizetopbaselineskip - \@IEEEquantizeprevdepth - \@IEEEquantizelineskiplimit
 
5139
% standard baselineskip rules are in effect, so don't consider height of first line
 
5140
\advance\@IEEEquantizeheightA-\@IEEEquantizeheightB\relax
 
5141
\fi
 
5142
%
 
5143
\else % prevdepth <= -1000pt, simplier \topskip type rules in effect
 
5144
\ifdim\@IEEEquantizeheightB>\@IEEEquantizetopbaselineskip
 
5145
% height of top line (already included in the total height) in excess of
 
5146
% baselineskip is the amount it will be downshifted
 
5147
\advance\@IEEEquantizeheightA-\@IEEEquantizetopbaselineskip\relax
 
5148
\else
 
5149
% height of first line is irrelevant, remove it
 
5150
\advance\@IEEEquantizeheightA-\@IEEEquantizeheightB\relax
 
5151
\fi
 
5152
\fi % prevdepth <= -1000pt
 
5153
%
 
5154
% adjust height for any manual offset
 
5155
\advance\@IEEEquantizeheightA\@IEEEquantizeoffset\relax
 
5156
% add in nominal spacer
 
5157
\advance\@IEEEquantizeheightA\@IEEEquantizenomvspace\relax
 
5158
% check for nonzero unitheight
 
5159
\@IEEEquantizeheightB=\@IEEEquantizeunitheight\relax
 
5160
\ifnum\@IEEEquantizeheightB=0\relax
 
5161
\@IEEEclspkgerror{IEEEquantizevspace unit height cannot be zero. Assuming 10pt.}%
 
5162
{Division by zero is not allowed.}
 
5163
\@IEEEquantizeheightB=10pt\relax
 
5164
\fi
 
5165
% get integer number of lines
 
5166
\@IEEEquantizemultiple=\@IEEEquantizeheightA\relax
 
5167
\divide\@IEEEquantizemultiple\@IEEEquantizeheightB\relax
 
5168
% set A to contain the excess height over the \@IEEEquantizemultiple of lines
 
5169
% A = height - multiple*unitheight
 
5170
\@IEEEquantizeheightC\@IEEEquantizeheightB\relax
 
5171
\multiply\@IEEEquantizeheightC\@IEEEquantizemultiple\relax
 
5172
\advance\@IEEEquantizeheightA-\@IEEEquantizeheightC\relax
 
5173
% set B to contain the height short of \@IEEEquantizemultiple+1 of lines
 
5174
% B = unitheight - A
 
5175
\advance\@IEEEquantizeheightB-\@IEEEquantizeheightA\relax
 
5176
% choose A or B based on which is closer
 
5177
\@IEEEquantizeheightC\@IEEEquantizenomvspace\relax
 
5178
\ifdim\@IEEEquantizeheightA<\@IEEEquantizeheightB\relax
 
5179
% C = nomvspace - A, go with lower
 
5180
\advance\@IEEEquantizeheightC-\@IEEEquantizeheightA\relax
 
5181
\else
 
5182
% C = nomvspace + B, go with upper
 
5183
\advance\@IEEEquantizeheightC\@IEEEquantizeheightB\relax
 
5184
\fi
 
5185
% if violate lower bound, use next integer bound
 
5186
\ifdim\@IEEEquantizeheightC<\@IEEEquantizeminvspace\relax
 
5187
% A + B = unitheight
 
5188
\advance\@IEEEquantizeheightC\@IEEEquantizeheightA\relax
 
5189
\advance\@IEEEquantizeheightC\@IEEEquantizeheightB\relax
 
5190
\fi
 
5191
% export object and spacer outside of group
 
5192
\global\let\@IEEEquantizeobjectout\@IEEEquantizeobject\relax
 
5193
\global\@IEEEquantizeheightC\@IEEEquantizeheightC\relax
 
5194
\endgroup
 
5195
\if@IEEEquantizevspaceuseoutdimenreg
 
5196
\@IEEEquantizeoutdimenreg=\@IEEEquantizeheightC\relax
 
5197
\else
 
5198
\@IEEEquantizeobjectout\relax
 
5199
\vskip\@IEEEquantizeheightC\relax
 
5200
\fi}
 
5201
 
 
5202
 
 
5203
% user command to disable all global assignments, possible use within object decl
 
5204
\def\IEEEquantizedisableglobal{\let\global\relax
 
5205
\let\gdef\def
 
5206
\let\xdef\edef}
 
5207
% user command to allow for the disabling of \thanks and other commands, possible use within object decl
 
5208
\def\IEEEquantizedisabletitlecmds{\long\def\thanks##1{\relax}\relax
 
5209
\long\def\IEEEcompsocitemizethanks##1{\relax}\def\newpage{\relax}}
 
5210
 
 
5211
 
3661
5212
 
3662
5213
 
3663
5214
 
3668
5219
\let\@IEEEaftertitletext=\relax
3669
5220
\long\def\IEEEaftertitletext#1{\def\@IEEEaftertitletext{#1}}
3670
5221
 
 
5222
 
3671
5223
% V1.7 provide a way for users to enter abstract and keywords
3672
5224
% into the onecolumn title are. This text is compensated for
3673
5225
% in the dynamic sizer.
3674
 
\let\@IEEEcompsoctitleabstractindextext=\relax
3675
 
\long\def\IEEEcompsoctitleabstractindextext#1{\def\@IEEEcompsoctitleabstractindextext{#1}}
3676
 
% V1.7 provide a way for users to get the \@IEEEcompsoctitleabstractindextext if
3677
 
% not in compsoc journal mode - this way abstract and keywords can be placed
3678
 
% in their conventional position if not in compsoc mode.
3679
 
\def\IEEEdisplaynotcompsoctitleabstractindextext{%
3680
 
\ifCLASSOPTIONcompsoc% display if compsoc conf
3681
 
\ifCLASSOPTIONconference\@IEEEcompsoctitleabstractindextext\fi
3682
 
\else% or if not compsoc
3683
 
\@IEEEcompsoctitleabstractindextext\fi}
 
5226
\let\@IEEEtitleabstractindextext=\relax
 
5227
\long\def\IEEEtitleabstractindextext#1{\def\@IEEEtitleabstractindextext{#1}}
 
5228
 
 
5229
% V1.7 provide a way for users to get the \@IEEEtitleabstractindextext if
 
5230
% not in compsoc or transmag journal mode - this way abstract and keywords
 
5231
% can still be placed in their conventional position if not in those modes.
 
5232
\def\IEEEdisplaynontitleabstractindextext{%
 
5233
% display for all conference formats
 
5234
\ifCLASSOPTIONconference\@IEEEtitleabstractindextext\relax
 
5235
\else% non-conferences
 
5236
  % V1.8a display for all technotes
 
5237
  \ifCLASSOPTIONtechnote\@IEEEtitleabstractindextext\relax
 
5238
  % V1.8a add diamond line after abstract and index terms for compsoc technotes
 
5239
  \@IEEEcompsoconly{\noindent\hfill\IEEEcompsocdiamondline\hfill\hbox{}\par}\relax
 
5240
  \else % non-conferences and non-technotes
 
5241
    \ifCLASSOPTIONcompsoc% display if not compsoc and not transmag
 
5242
    \else
 
5243
      \ifCLASSOPTIONtransmag
 
5244
      \else% not compsoc journal nor transmag journal
 
5245
         \@IEEEtitleabstractindextext\relax
 
5246
      \fi
 
5247
    \fi
 
5248
  \fi
 
5249
\fi}
3684
5250
 
3685
5251
 
3686
5252
% command to allow alteration of baselinestretch, but only if the current
3701
5267
 
3702
5268
% compsoc journals use \footnotesize, compsoc conferences use normalsize
3703
5269
\@IEEEcompsoconly{\def\@IEEEabskeysecsize{\footnotesize}}
3704
 
\@IEEEcompsocconfonly{\def\@IEEEabskeysecsize{\normalsize}}
3705
 
 
3706
 
 
 
5270
\@IEEEcompsocconfonly{\def\@IEEEabskeysecsize{\small}}
3707
5271
 
3708
5272
 
3709
5273
% V1.6 have abstract and keywords strip leading spaces, pars and newlines
3712
5276
    \if@twocolumn
3713
5277
      \@IEEEabskeysecsize\bfseries\textit{\abstractname}---\relax
3714
5278
    \else
3715
 
      \begin{center}\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\end{center}\quotation\@IEEEabskeysecsize
 
5279
      \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
3716
5280
    \fi\@IEEEgobbleleadPARNLSP}
3717
 
% V1.6 IEEE wants only 1 pica from end of abstract to introduction heading when in 
 
5281
% V1.6 The IEEE wants only 1 pica from end of abstract to introduction heading when in 
3718
5282
% conference mode (the heading already has this much above it)
3719
5283
\def\endabstract{\relax\ifCLASSOPTIONconference\vspace{0ex}\else\vspace{1.34ex}\fi\par\if@twocolumn\else\endquotation\fi
3720
5284
    \normalfont\normalsize}
3723
5287
    \if@twocolumn
3724
5288
      \@IEEEabskeysecsize\bfseries\textit{\IEEEkeywordsname}---\relax
3725
5289
    \else
3726
 
      \begin{center}\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\end{center}\quotation\@IEEEabskeysecsize
 
5290
      \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
3727
5291
    \fi\@IEEEgobbleleadPARNLSP}
3728
5292
\def\endIEEEkeywords{\relax\ifCLASSOPTIONtechnote\vspace{1.34ex}\else\vspace{0.67ex}\fi
3729
5293
    \par\if@twocolumn\else\endquotation\fi%
3732
5296
% V1.7 compsoc keywords index terms
3733
5297
\ifCLASSOPTIONcompsoc
3734
5298
  \ifCLASSOPTIONconference% compsoc conference
3735
 
\def\abstract{\normalfont
3736
 
      \begin{center}\@IEEEabskeysecsize\textbf{\large\abstractname}\end{center}\vskip 0.5\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip
3737
 
      \if@twocolumn\else\quotation\fi\itshape\@IEEEabskeysecsize%
3738
 
      \par\@IEEEgobbleleadPARNLSP}
3739
 
\def\IEEEkeywords{\normalfont\vskip 1.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip
3740
 
      \begin{center}\@IEEEabskeysecsize\textbf{\large\IEEEkeywordsname}\end{center}\vskip 0.5\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip
3741
 
      \if@twocolumn\else\quotation\fi\itshape\@IEEEabskeysecsize%
3742
 
      \par\@IEEEgobbleleadPARNLSP}
 
5299
\def\abstract{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\bfseries
 
5300
    \if@twocolumn
 
5301
      \@IEEEabskeysecsize\noindent\textit{\abstractname}---\relax
 
5302
    \else
 
5303
      \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize%
 
5304
    \fi\@IEEEgobbleleadPARNLSP}
 
5305
\def\IEEEkeywords{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\bfseries
 
5306
    \if@twocolumn
 
5307
      \@IEEEabskeysecsize\vskip 0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip\noindent
 
5308
      \textit{\IEEEkeywordsname}---\relax
 
5309
    \else
 
5310
      \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize%
 
5311
    \fi\@IEEEgobbleleadPARNLSP}
3743
5312
  \else% compsoc not conference
3744
5313
\def\abstract{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\sffamily
3745
5314
    \if@twocolumn
3746
5315
      \@IEEEabskeysecsize\noindent\textbf{\abstractname}---\relax
3747
5316
    \else
3748
 
      \begin{center}\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\end{center}\quotation\@IEEEabskeysecsize%
 
5317
      \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize%
3749
5318
    \fi\@IEEEgobbleleadPARNLSP}
3750
5319
\def\IEEEkeywords{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\sffamily
3751
5320
    \if@twocolumn
3752
5321
      \@IEEEabskeysecsize\vskip 0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip\noindent
3753
5322
      \textbf{\IEEEkeywordsname}---\relax
3754
5323
    \else
3755
 
      \begin{center}\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\end{center}\quotation\@IEEEabskeysecsize%
 
5324
      \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize%
3756
5325
    \fi\@IEEEgobbleleadPARNLSP}
3757
5326
  \fi
3758
5327
\fi
3759
5328
 
 
5329
% V1.8 transmag keywords index terms
 
5330
% no abstract name, use indentation
 
5331
\ifCLASSOPTIONtransmag
 
5332
\def\abstract{\normalfont\parindent 1em\relax
 
5333
    \if@twocolumn
 
5334
      \@IEEEabskeysecsize\bfseries\indent
 
5335
    \else
 
5336
      \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize
 
5337
      \textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
 
5338
    \fi\@IEEEgobbleleadPARNLSP}
 
5339
 
 
5340
\def\IEEEkeywords{\normalfont\parindent 1em\relax
 
5341
    \if@twocolumn
 
5342
      \@IEEEabskeysecsize\vspace{1\baselineskip}\bfseries\indent\textit{\IEEEkeywordsname}---\relax
 
5343
    \else
 
5344
      \bgroup\par\vspace{1\baselineskip}\centering\@IEEEabskeysecsize
 
5345
      \textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
 
5346
    \fi\@IEEEgobbleleadPARNLSP}
 
5347
\fi
 
5348
 
3760
5349
 
3761
5350
 
3762
5351
% gobbles all leading \, \\ and \par, upon finding first token that
3828
5417
     \begingroup #6{\relax% or low level heading
3829
5418
      \noindent % subsections are NOT indented
3830
5419
       % print top level headings. \@svsec is label, #8 is heading title
3831
 
       % IEEE does not block indent the section title text, it flows like normal
 
5420
       % The IEEE does not block indent the section title text, it flows like normal
3832
5421
       {\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\@@par}}%
3833
5422
     \endgroup
3834
5423
     \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth\relax\else
3849
5438
\def\@ssect#1#2#3#4#5{\@tempskipa #3\relax
3850
5439
  \ifdim \@tempskipa>\z@
3851
5440
     %\begingroup #4\@hangfrom{\hskip #1}{\interlinepenalty \@M #5\par}\endgroup
3852
 
     % IEEE does not block indent the section title text, it flows like normal
 
5441
     % The IEEE does not block indent the section title text, it flows like normal
3853
5442
     \begingroup \noindent #4{\relax{\hskip #1}{\interlinepenalty \@M #5\@@par}}\endgroup
3854
5443
  % svsechd swallows the trailing space, protect it with \mbox{}
3855
5444
  \else \def\@svsechd{#4{\hskip #1\relax #5\@IEEEsectpunct\mbox{}}}\fi
3870
5459
% You've got to have \normalfont\normalsize in the font specs below to prevent
3871
5460
% trouble when you do something like:
3872
5461
% \section{Note}{\ttfamily TT-TEXT} is known to ... 
3873
 
% IEEE sometimes REALLY stretches the area before a section
 
5462
% The IEEE sometimes REALLY stretches the area before a section
3874
5463
% heading by up to about 0.5in. However, it may not be a good
3875
5464
% idea to let LaTeX have quite this much rubber.
3876
5465
\ifCLASSOPTIONconference%
3877
 
% IEEE wants section heading spacing to decrease for conference mode
 
5466
% The IEEE wants section heading spacing to decrease for conference mode
3878
5467
\def\section{\@startsection{section}{1}{\z@}{1.5ex plus 1.5ex minus 0.5ex}%
3879
5468
{0.7ex plus 1ex minus 0ex}{\normalfont\normalsize\centering\scshape}}%
3880
5469
\def\subsection{\@startsection{subsection}{2}{\z@}{1.5ex plus 1.5ex minus 0.5ex}%
3908
5497
{0ex}{\normalfont\normalsize}}%
3909
5498
\else% compsoc journals
3910
5499
% use negative top separation as compsoc journals do not indent paragraphs after section titles
3911
 
\def\section{\@startsection{section}{1}{\z@}{-3ex plus -2ex minus -1.5ex}%
3912
 
{0.7ex plus 1ex minus 0ex}{\normalfont\large\sffamily\bfseries\scshape}}%
 
5500
\def\section{\@startsection{section}{1}{\z@}{-3.5ex plus -2ex minus -1.5ex}%
 
5501
{0.7ex plus 1ex minus 0ex}{\normalfont\sublargesize\sffamily\bfseries\scshape}}%
3913
5502
% Note that subsection and smaller may not be correct for the Computer Society,
3914
5503
% I have to look up an example.
3915
5504
\def\subsection{\@startsection{subsection}{2}{\z@}{-3.5ex plus -1.5ex minus -1.5ex}%
3920
5509
{0ex}{\normalfont\normalsize}}%
3921
5510
\fi\fi
3922
5511
 
 
5512
% transmag
 
5513
\ifCLASSOPTIONtransmag
 
5514
\def\subsection{\@startsection{subsection}{2}{0.75\parindent}{3.5ex plus 1.5ex minus 1.5ex}%
 
5515
{0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}%
 
5516
\def\subsubsection{\@startsection{subsubsection}{3}{1.25\parindent}{0.1ex plus 0.1ex minus 0.1ex}%
 
5517
{0.1ex}{\normalfont\normalsize\itshape}}%
 
5518
\fi
 
5519
 
 
5520
 
 
5521
% V1.8a provide for a raised line Introduction section for use with Computer
 
5522
% Society papers. We have to remove any spacing glue after the section
 
5523
% heading and then remove the blank line for the new paragraph after it.
 
5524
% LaTeX's section handler alters \everypar and we need to propogate those
 
5525
% changes outside of the \parbox lest there be spacing problems at the top
 
5526
% of the next section.
 
5527
\def\IEEEraisesectionheading#1{\noindent\raisebox{1.5\baselineskip}[0pt][0pt]{\parbox[b]{\columnwidth}{#1\unskip\global\everypar=\everypar}}\vspace{-1\baselineskip}\vspace{-\parskip}\par}
3923
5528
 
3924
5529
 
3925
5530
 
3934
5539
\def\IEEEQED{\IEEEQEDclosed} % otherwise default to closed
3935
5540
\fi
3936
5541
 
 
5542
%V1.8 flag to indicate if QED symbol is to be shown
 
5543
\newif\if@IEEEQEDshow  \@IEEEQEDshowtrue
 
5544
\def\IEEEproofindentspace{2\parindent}% V1.8 allow user to change indentation amount if desired
3937
5545
% v1.7 name change to avoid namespace collision with amsthm. Also add support
3938
5546
% for an optional argument.
3939
5547
\def\IEEEproof{\@ifnextchar[{\@IEEEproof}{\@IEEEproof[\IEEEproofname]}}
3940
 
\def\@IEEEproof[#1]{\par\noindent\hspace{2em}{\itshape #1: }}
3941
 
\def\endIEEEproof{\hspace*{\fill}~\IEEEQED\par}
 
5548
\def\@IEEEproof[#1]{\@IEEEQEDshowtrue\par\noindent\hspace{\IEEEproofindentspace}{\itshape #1: }}
 
5549
\def\endIEEEproof{\if@IEEEQEDshow\hspace*{\fill}\nobreakspace\IEEEQED\fi\par}
 
5550
% qedhere for equation environments, similar to AMS \qedhere
 
5551
\def\IEEEQEDhereeqn{\global\@IEEEQEDshowfalse\eqno\let\eqno\relax\let\leqno\relax
 
5552
                    \let\veqno\relax\hbox{\IEEEQED}}
 
5553
% IEEE style qedhere for IEEEeqnarray and other environments
 
5554
\def\IEEEQEDhere{\global\@IEEEQEDshowfalse\IEEEQED}
 
5555
% command to disable QED at end of IEEEproof
 
5556
\def\IEEEQEDoff{\global\@IEEEQEDshowfalse}
3942
5557
 
3943
5558
 
3944
5559
%\itemindent is set to \z@ by list, so define new temporary variable
3945
5560
\newdimen\@IEEEtmpitemindent
3946
 
\def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\topsep 0pt\rmfamily\trivlist%
3947
 
    \item[\hskip \labelsep{\indent\itshape #1\ #2:}]\itemindent\@IEEEtmpitemindent}
3948
 
\def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\topsep 0pt\rmfamily \trivlist%
3949
 
% V1.6 IEEE is back to using () around theorem names which are also in italics
3950
 
% Thanks to Christian Peel for reporting this.
3951
 
    \item[\hskip\labelsep{\indent\itshape #1\ #2\ (#3):}]\itemindent\@IEEEtmpitemindent}
 
5561
 
 
5562
\ifCLASSOPTIONcompsoc
 
5563
% V1.8a compsoc uses bold theorem titles, a period instead of a colon, vertical spacing, and hanging indentation
 
5564
% V1.8 allow long theorem names to break across lines.
 
5565
% Thanks to Miquel Payaro for reporting this.
 
5566
\def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\relax
 
5567
    \topsep 0.2\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip
 
5568
    \rmfamily\trivlist\hangindent\parindent%
 
5569
    \item[]\textit{\bfseries\noindent #1\ #2.} \itemindent\@IEEEtmpitemindent\relax}
 
5570
\def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\relax
 
5571
\topsep 0.2\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip
 
5572
\rmfamily\trivlist\hangindent\parindent%
 
5573
% V1.6 The IEEE is back to using () around theorem names which are also in italics
 
5574
% Thanks to Christian Peel for reporting this.
 
5575
    \item[]\textit{\bfseries\noindent #1\ #2\ (#3).} \itemindent\@IEEEtmpitemindent\relax}
 
5576
% V1.7 remove bogus \unskip that caused equations in theorems to collide with
 
5577
% lines below.
 
5578
\def\@endtheorem{\endtrivlist\vskip 0.25\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip}
 
5579
\else
 
5580
%
 
5581
% noncompsoc
 
5582
 
5583
% V1.8 allow long theorem names to break across lines.
 
5584
% Thanks to Miquel Payaro for reporting this.
 
5585
\def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\relax\topsep 0pt\rmfamily\trivlist%
 
5586
    \item[]\textit{\indent #1\ #2:} \itemindent\@IEEEtmpitemindent\relax}
 
5587
\def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\relax\topsep 0pt\rmfamily \trivlist%
 
5588
% V1.6 The IEEE is back to using () around theorem names which are also in italics
 
5589
% Thanks to Christian Peel for reporting this.
 
5590
    \item[]\textit{\indent #1\ #2\ (#3):} \itemindent\@IEEEtmpitemindent\relax}
3952
5591
% V1.7 remove bogus \unskip that caused equations in theorems to collide with
3953
5592
% lines below.
3954
5593
\def\@endtheorem{\endtrivlist}
 
5594
\fi
 
5595
 
 
5596
 
3955
5597
 
3956
5598
% V1.6
3957
5599
% display command for the section the theorem is in - so that \thesection
3987
5629
 
3988
5630
 
3989
5631
%% SET UP THE DEFAULT PAGESTYLE
3990
 
\ps@headings
 
5632
\pagestyle{headings}
3991
5633
\pagenumbering{arabic}
3992
5634
 
3993
5635
% normally the page counter starts at 1
4004
5646
 
4005
5647
% standard book class behavior - let bottom line float up and down as
4006
5648
% needed when single sided
4007
 
\if@twoside\else\raggedbottom\fi
 
5649
\ifCLASSOPTIONtwoside\else\raggedbottom\fi
4008
5650
% if two column - turn on twocolumn, allow word spacings to stretch more and
4009
5651
% enforce a rigid position for the last lines
4010
 
\if@twocolumn
 
5652
\ifCLASSOPTIONtwocolumn
4011
5653
% the peer review option delays invoking twocolumn
4012
5654
   \ifCLASSOPTIONpeerreview\else
4013
5655
      \twocolumn
4059
5701
% note we reroute the call to the old \section*
4060
5702
\def\@IEEEprocessthesectionargument#1{%
4061
5703
\@ifmtarg{#1}{%
4062
 
\@IEEEappendixsavesection*{\appendixname~\thesectiondis}%
4063
 
\addcontentsline{toc}{section}{\appendixname~\thesection}}{%
4064
 
\@IEEEappendixsavesection*{\appendixname~\thesectiondis \\* #1}%
4065
 
\addcontentsline{toc}{section}{\appendixname~\thesection: #1}}}
 
5704
\@IEEEappendixsavesection*{\appendixname\nobreakspace\thesectiondis}%
 
5705
\addcontentsline{toc}{section}{\appendixname\nobreakspace\thesection}}{%
 
5706
\@IEEEappendixsavesection*{\appendixname\nobreakspace\thesectiondis\\* #1}%
 
5707
\addcontentsline{toc}{section}{\appendixname\nobreakspace\thesection: #1}}}
4066
5708
 
4067
5709
% we use this if the user calls \section{} after
4068
5710
% \appendix-- which has no meaning. So, we ignore the
4096
5738
    \refstepcounter{section}% update the \ref counter
4097
5739
    \@ifmtarg{#1}{\@IEEEappendixsavesection*{\appendixname}%
4098
5740
                  \addcontentsline{toc}{section}{\appendixname}}{%
4099
 
             \@IEEEappendixsavesection*{\appendixname~\\* #1}%
 
5741
             \@IEEEappendixsavesection*{\appendixname\nobreakspace\\* #1}%
4100
5742
             \addcontentsline{toc}{section}{\appendixname: #1}}%
4101
5743
    % redefine \section command for appendix
4102
5744
    % leave \section* as is
4142
5784
 
4143
5785
 
4144
5786
 
 
5787
% V1.7 compoc uses nonbold drop cap and small caps word style
 
5788
\ifCLASSOPTIONcompsoc
 
5789
  \def\IEEEPARstartFONTSTYLE{\mdseries}
 
5790
  \def\IEEEPARstartWORDFONTSTYLE{\scshape}
 
5791
  \def\IEEEPARstartWORDCAPSTYLE{\relax}
 
5792
\fi
 
5793
%
 
5794
%
4145
5795
% \IEEEPARstart
4146
5796
% Definition for the big two line drop cap letter at the beginning of the
4147
5797
% first paragraph of journal papers. The first argument is the first letter
4163
5813
4164
5814
% the number of lines that are indented to clear it
4165
5815
% may need to increase if using decenders
4166
 
\def\@IEEEPARstartDROPLINES{2}
 
5816
\providecommand{\IEEEPARstartDROPLINES}{2}
4167
5817
% minimum number of lines left on a page to allow a \@IEEEPARstart
4168
5818
% Does not take into consideration rubber shrink, so it tends to
4169
5819
% be overly cautious
4170
 
\def\@IEEEPARstartMINPAGELINES{2}
 
5820
\providecommand{\IEEEPARstartMINPAGELINES}{2}
4171
5821
% V1.7 the height of the drop cap is adjusted to match the height of this text
4172
5822
% in the current font (when \IEEEPARstart is called).
4173
 
\def\@IEEEPARstartHEIGHTTEXT{T}
 
5823
\providecommand{\IEEEPARstartHEIGHTTEXT}{T}
4174
5824
% the depth the letter is lowered below the baseline
4175
5825
% the height (and size) of the letter is determined by the sum
4176
 
% of this value and the height of the \@IEEEPARstartHEIGHTTEXT in the current
 
5826
% of this value and the height of the \IEEEPARstartHEIGHTTEXT in the current
4177
5827
% font. It is a good idea to set this value in terms of the baselineskip
4178
5828
% so that it can respond to changes therein.
4179
 
\def\@IEEEPARstartDROPDEPTH{1.1\baselineskip}
 
5829
\providecommand{\IEEEPARstartDROPDEPTH}{1.1\baselineskip}
4180
5830
% V1.7 the font the drop cap will be rendered in,
4181
5831
% can take zero or one argument.
4182
 
\def\@IEEEPARstartFONTSTYLE{\bfseries}
 
5832
\providecommand{\IEEEPARstartFONTSTYLE}{\bfseries}
4183
5833
% V1.7 any additional, non-font related commands needed to modify
4184
5834
% the drop cap letter, can take zero or one argument.
4185
 
\def\@IEEEPARstartCAPSTYLE{\MakeUppercase}
 
5835
\providecommand{\IEEEPARstartCAPSTYLE}{\MakeUppercase}
4186
5836
% V1.7 the font that will be used to render the rest of the word,
4187
5837
% can take zero or one argument.
4188
 
\def\@IEEEPARstartWORDFONTSTYLE{\relax}
 
5838
\providecommand{\IEEEPARstartWORDFONTSTYLE}{\relax}
4189
5839
% V1.7 any additional, non-font related commands needed to modify
4190
5840
% the rest of the word, can take zero or one argument.
4191
 
\def\@IEEEPARstartWORDCAPSTYLE{\MakeUppercase}
 
5841
\providecommand{\IEEEPARstartWORDCAPSTYLE}{\MakeUppercase}
4192
5842
% This is the horizontal separation distance from the drop letter to the main text.
4193
5843
% Lengths that depend on the font (e.g., ex, em, etc.) will be referenced
4194
5844
% to the font that is active when \IEEEPARstart is called. 
4195
 
\def\@IEEEPARstartSEP{0.15em}
 
5845
\providecommand{\IEEEPARstartSEP}{0.15em}
4196
5846
% V1.7 horizontal offset applied to the left of the drop cap.
4197
 
\def\@IEEEPARstartHOFFSET{0em}
 
5847
\providecommand{\IEEEPARstartHOFFSET}{0em}
4198
5848
% V1.7 Italic correction command applied at the end of the drop cap.
4199
 
\def\@IEEEPARstartITLCORRECT{\/}
 
5849
\providecommand{\IEEEPARstartITLCORRECT}{\/}
4200
5850
 
4201
 
% V1.7 compoc uses nonbold drop cap and small caps word style
4202
 
\ifCLASSOPTIONcompsoc
4203
 
\def\@IEEEPARstartFONTSTYLE{\mdseries}
4204
 
\def\@IEEEPARstartWORDFONTSTYLE{\scshape}
4205
 
\def\@IEEEPARstartWORDCAPSTYLE{\relax}
4206
 
\fi
 
5851
% width of the letter output, set globally. Can be used in \IEEEPARstartSEP
 
5852
% or \IEEEPARstartHOFFSET, but not the height lengths.
 
5853
\newdimen\IEEEPARstartletwidth
 
5854
\IEEEPARstartletwidth 0pt\relax
4207
5855
 
4208
5856
% definition of \IEEEPARstart
4209
5857
% THIS IS A CONTROLLED SPACING AREA, DO NOT ALLOW SPACES WITHIN THESE LINES
4215
5863
\def\IEEEPARstart#1#2{\par{%
4216
5864
% if this page does not have enough space, break it and lets start
4217
5865
% on a new one
4218
 
\@IEEEtranneedspace{\@IEEEPARstartMINPAGELINES\baselineskip}{\relax}%
4219
 
% V1.7 move this up here in case user uses \textbf for \@IEEEPARstartFONTSTYLE
 
5866
\@IEEEtranneedspace{\IEEEPARstartMINPAGELINES\baselineskip}{\relax}%
 
5867
% V1.7 move this up here in case user uses \textbf for \IEEEPARstartFONTSTYLE
4220
5868
% which uses command \leavevmode which causes an unwanted \indent to be issued
4221
5869
\noindent
4222
5870
% calculate the desired height of the big letter
4223
 
% it extends from the top of \@IEEEPARstartHEIGHTTEXT in the current font
4224
 
% down to \@IEEEPARstartDROPDEPTH below the current baseline
4225
 
\settoheight{\@IEEEtrantmpdimenA}{\@IEEEPARstartHEIGHTTEXT}%
4226
 
\addtolength{\@IEEEtrantmpdimenA}{\@IEEEPARstartDROPDEPTH}%
 
5871
% it extends from the top of \IEEEPARstartHEIGHTTEXT in the current font
 
5872
% down to \IEEEPARstartDROPDEPTH below the current baseline
 
5873
\settoheight{\@IEEEtrantmpdimenA}{\IEEEPARstartHEIGHTTEXT}%
 
5874
\addtolength{\@IEEEtrantmpdimenA}{\IEEEPARstartDROPDEPTH}%
4227
5875
% extract the name of the current font in bold
4228
5876
% and place it in \@IEEEPARstartFONTNAME
4229
5877
\def\@IEEEPARstartGETFIRSTWORD##1 ##2\relax{##1}%
4230
 
{\@IEEEPARstartFONTSTYLE{\selectfont\edef\@IEEEPARstartFONTNAMESPACE{\fontname\font\space}%
 
5878
{\IEEEPARstartFONTSTYLE{\selectfont\edef\@IEEEPARstartFONTNAMESPACE{\fontname\font\space}%
4231
5879
\xdef\@IEEEPARstartFONTNAME{\expandafter\@IEEEPARstartGETFIRSTWORD\@IEEEPARstartFONTNAMESPACE\relax}}}%
4232
5880
% define a font based on this name with a point size equal to the desired
4233
5881
% height of the drop letter
4235
5883
% save this value as a counter (integer) value (sp points)
4236
5884
\@IEEEtrantmpcountA=\@IEEEtrantmpdimenA%
4237
5885
% now get the height of the actual letter produced by this font size
4238
 
\settoheight{\@IEEEtrantmpdimenB}{\@IEEEPARstartsubfont\@IEEEPARstartCAPSTYLE{#1}}%
 
5886
\settoheight{\@IEEEtrantmpdimenB}{\@IEEEPARstartsubfont\IEEEPARstartCAPSTYLE{#1}}%
4239
5887
% If something bogus happens like the first argument is empty or the
4240
5888
% current font is strange, do not allow a zero height.
4241
5889
\ifdim\@IEEEtrantmpdimenB=0pt\relax%
4268
5916
% We need to carry this out of the local calculation area to set the
4269
5917
% hanging indent
4270
5918
\settowidth{\global\@IEEEtrantmpdimenA}{\@IEEEPARstartfont
4271
 
\@IEEEPARstartCAPSTYLE{#1\@IEEEPARstartITLCORRECT}}}%
 
5919
\IEEEPARstartCAPSTYLE{#1\IEEEPARstartITLCORRECT}}}%
4272
5920
% end of the isolated calculation environment
 
5921
\global\IEEEPARstartletwidth\@IEEEtrantmpdimenA\relax%
4273
5922
% add in the extra clearance we want
4274
 
\advance\@IEEEtrantmpdimenA by \@IEEEPARstartSEP\relax%
 
5923
\advance\@IEEEtrantmpdimenA by \IEEEPARstartSEP\relax%
4275
5924
% add in the optional offset
4276
 
\advance\@IEEEtrantmpdimenA by \@IEEEPARstartHOFFSET\relax%
 
5925
\advance\@IEEEtrantmpdimenA by \IEEEPARstartHOFFSET\relax%
4277
5926
% V1.7 don't allow negative offsets to produce negative hanging indents
4278
5927
\@IEEEtrantmpdimenB\@IEEEtrantmpdimenA
4279
5928
\ifnum\@IEEEtrantmpdimenB < 0 \@IEEEtrantmpdimenB 0pt\fi
4282
5931
% Now, we make the letter and issue the hanging indent command
4283
5932
% The letter is placed in a box of zero width and height so that other
4284
5933
% text won't be displaced by it.
4285
 
\hangindent\@IEEEtrantmpdimenB\hangafter=-\@IEEEPARstartDROPLINES%
 
5934
\hangindent\@IEEEtrantmpdimenB\hangafter=-\IEEEPARstartDROPLINES%
4286
5935
\makebox[0pt][l]{\hspace{-\@IEEEtrantmpdimenA}%
4287
 
\raisebox{-\@IEEEPARstartDROPDEPTH}[0pt][0pt]{\hspace{\@IEEEPARstartHOFFSET}%
4288
 
\@IEEEPARstartfont\@IEEEPARstartCAPSTYLE{#1\@IEEEPARstartITLCORRECT}%
4289
 
\hspace{\@IEEEPARstartSEP}}}%
4290
 
{\@IEEEPARstartWORDFONTSTYLE{\@IEEEPARstartWORDCAPSTYLE{\selectfont#2}}}}
4291
 
 
4292
 
 
 
5936
\raisebox{-\IEEEPARstartDROPDEPTH}[0pt][0pt]{\hspace{\IEEEPARstartHOFFSET}%
 
5937
\@IEEEPARstartfont\IEEEPARstartCAPSTYLE{#1\IEEEPARstartITLCORRECT}%
 
5938
\hspace{\IEEEPARstartSEP}}}%
 
5939
{\IEEEPARstartWORDFONTSTYLE{\IEEEPARstartWORDCAPSTYLE{\selectfont#2}}}}
4293
5940
 
4294
5941
 
4295
5942
 
4475
6122
%
4476
6123
% the amount the main text is pulled up to make room for the
4477
6124
% publisher's ID footer
4478
 
% IEEE uses about 1.3\baselineskip for journals, 
 
6125
% The IEEE uses about 1.3\baselineskip for journals, 
4479
6126
% dynamic title spacing will clean up the fraction
4480
6127
\def\@IEEEpubidpullup{1.3\baselineskip}
4481
6128
\ifCLASSOPTIONtechnote
4484
6131
% in first column) and we should maintain an integer number of lines in the
4485
6132
% second column
4486
6133
% There are some examples (such as older issues of "Transactions on
4487
 
% Information Theory") in which IEEE really pulls the text off the ID for
 
6134
% Information Theory") in which the IEEE really pulls the text off the ID for
4488
6135
% technotes - about 0.55in (or 4\baselineskip). We'll use 2\baselineskip
4489
6136
% and call it even.
4490
6137
\def\@IEEEpubidpullup{2\baselineskip}
4649
6296
 
4650
6297
 
4651
6298
% hook to allow easy disabling of all legacy warnings
4652
 
\def\@IEEElegacywarn#1#2{\typeout{** ATTENTION: \@IEEEbackslash #1 is depreciated (line \the\inputlineno).
 
6299
\def\@IEEElegacywarn#1#2{\typeout{** ATTENTION: \@IEEEbackslash #1 is deprecated (line \the\inputlineno).
4653
6300
Use \@IEEEbackslash #2 instead.}}
4654
6301
 
4655
6302
 
4656
 
% provide for legacy commands
4657
 
\def\authorblockA{\@IEEElegacywarn{authorblockA}{IEEEauthorblockA}\IEEEauthorblockA}
4658
 
\def\authorblockN{\@IEEElegacywarn{authorblockN}{IEEEauthorblockN}\IEEEauthorblockN}
4659
 
\def\authorrefmark{\@IEEElegacywarn{authorrefmark}{IEEEauthorrefmark}\IEEEauthorrefmark}
4660
 
\def\PARstart{\@IEEElegacywarn{PARstart}{IEEEPARstart}\IEEEPARstart}
4661
 
\def\pubid{\@IEEElegacywarn{pubid}{IEEEpubid}\IEEEpubid}
4662
 
\def\pubidadjcol{\@IEEElegacywarn{pubidadjcol}{IEEEpubidadjcol}\IEEEpubidadjcol}
4663
 
\def\QED{\@IEEElegacywarn{QED}{IEEEQED}\IEEEQED}
4664
 
\def\QEDclosed{\@IEEElegacywarn{QEDclosed}{IEEEQEDclosed}\IEEEQEDclosed}
4665
 
\def\QEDopen{\@IEEElegacywarn{QEDopen}{IEEEQEDopen}\IEEEQEDopen}
4666
 
\def\specialpapernotice{\@IEEElegacywarn{specialpapernotice}{IEEEspecialpapernotice}\IEEEspecialpapernotice}
4667
 
 
4668
 
 
4669
 
 
4670
 
% provide for legacy environments
4671
 
\def\biography{\@IEEElegacywarn{biography}{IEEEbiography}\IEEEbiography}
4672
 
\def\biographynophoto{\@IEEElegacywarn{biographynophoto}{IEEEbiographynophoto}\IEEEbiographynophoto}
4673
 
\def\keywords{\@IEEElegacywarn{keywords}{IEEEkeywords}\IEEEkeywords}
4674
 
\def\endbiography{\endIEEEbiography}
4675
 
\def\endbiographynophoto{\endIEEEbiographynophoto}
4676
 
\def\endkeywords{\endIEEEkeywords}
4677
 
 
4678
 
 
4679
 
% provide for legacy IED commands/lengths when possible
4680
 
\let\labelindent\IEEElabelindent
4681
 
\def\calcleftmargin{\@IEEElegacywarn{calcleftmargin}{IEEEcalcleftmargin}\IEEEcalcleftmargin}
4682
 
\def\setlabelwidth{\@IEEElegacywarn{setlabelwidth}{IEEEsetlabelwidth}\IEEEsetlabelwidth}
4683
 
\def\usemathlabelsep{\@IEEElegacywarn{usemathlabelsep}{IEEEusemathlabelsep}\IEEEusemathlabelsep}
4684
 
\def\iedlabeljustifyc{\@IEEElegacywarn{iedlabeljustifyc}{IEEEiedlabeljustifyc}\IEEEiedlabeljustifyc}
4685
 
\def\iedlabeljustifyl{\@IEEElegacywarn{iedlabeljustifyl}{IEEEiedlabeljustifyl}\IEEEiedlabeljustifyl}
4686
 
\def\iedlabeljustifyr{\@IEEElegacywarn{iedlabeljustifyr}{IEEEiedlabeljustifyr}\IEEEiedlabeljustifyr}
4687
 
 
4688
 
 
4689
 
 
4690
 
% let \proof use the IEEEtran version even after amsthm is loaded
4691
 
% \proof is now depreciated in favor of \IEEEproof
4692
 
\AtBeginDocument{\def\proof{\@IEEElegacywarn{proof}{IEEEproof}\IEEEproof}\def\endproof{\endIEEEproof}}
4693
 
 
4694
 
% V1.7 \overrideIEEEmargins is no longer supported.
4695
 
\def\overrideIEEEmargins{%
4696
 
\typeout{** WARNING: \string\overrideIEEEmargins \space no longer supported (line \the\inputlineno).}%
4697
 
\typeout{** Use the \string\CLASSINPUTinnersidemargin, \string\CLASSINPUToutersidemargin \space controls instead.}}
4698
 
 
 
6303
% provide some legacy IEEEtran commands
 
6304
\def\IEEEcompsoctitleabstractindextext{\@IEEElegacywarn{IEEEcompsoctitleabstractindextext}{IEEEtitleabstractindextext}\IEEEtitleabstractindextext}
 
6305
\def\IEEEdisplaynotcompsoctitleabstractindextext{\@IEEElegacywarn{IEEEdisplaynotcompsoctitleabstractindextext}{IEEEdisplaynontitleabstractindextext}\IEEEdisplaynontitleabstractindextext}
 
6306
% provide some legacy IEEEtran environments
 
6307
 
 
6308
 
 
6309
% V1.8a no more support for these legacy commands
 
6310
%\def\authorblockA{\@IEEElegacywarn{authorblockA}{IEEEauthorblockA}\IEEEauthorblockA}
 
6311
%\def\authorblockN{\@IEEElegacywarn{authorblockN}{IEEEauthorblockN}\IEEEauthorblockN}
 
6312
%\def\authorrefmark{\@IEEElegacywarn{authorrefmark}{IEEEauthorrefmark}\IEEEauthorrefmark}
 
6313
%\def\PARstart{\@IEEElegacywarn{PARstart}{IEEEPARstart}\IEEEPARstart}
 
6314
%\def\pubid{\@IEEElegacywarn{pubid}{IEEEpubid}\IEEEpubid}
 
6315
%\def\pubidadjcol{\@IEEElegacywarn{pubidadjcol}{IEEEpubidadjcol}\IEEEpubidadjcol}
 
6316
%\def\specialpapernotice{\@IEEElegacywarn{specialpapernotice}{IEEEspecialpapernotice}\IEEEspecialpapernotice}
 
6317
% and environments
 
6318
%\def\keywords{\@IEEElegacywarn{keywords}{IEEEkeywords}\IEEEkeywords}
 
6319
%\def\endkeywords{\endIEEEkeywords}
 
6320
% V1.8 no more support for legacy IED list commands
 
6321
%\let\labelindent\IEEElabelindent
 
6322
%\def\calcleftmargin{\@IEEElegacywarn{calcleftmargin}{IEEEcalcleftmargin}\IEEEcalcleftmargin}
 
6323
%\def\setlabelwidth{\@IEEElegacywarn{setlabelwidth}{IEEEsetlabelwidth}\IEEEsetlabelwidth}
 
6324
%\def\usemathlabelsep{\@IEEElegacywarn{usemathlabelsep}{IEEEusemathlabelsep}\IEEEusemathlabelsep}
 
6325
%\def\iedlabeljustifyc{\@IEEElegacywarn{iedlabeljustifyc}{IEEEiedlabeljustifyc}\IEEEiedlabeljustifyc}
 
6326
%\def\iedlabeljustifyl{\@IEEElegacywarn{iedlabeljustifyl}{IEEEiedlabeljustifyl}\IEEEiedlabeljustifyl}
 
6327
%\def\iedlabeljustifyr{\@IEEElegacywarn{iedlabeljustifyr}{IEEEiedlabeljustifyr}\IEEEiedlabeljustifyr}
 
6328
% V1.8 no more support for QED and proof stuff
 
6329
%\def\QED{\@IEEElegacywarn{QED}{IEEEQED}\IEEEQED}
 
6330
%\def\QEDclosed{\@IEEElegacywarn{QEDclosed}{IEEEQEDclosed}\IEEEQEDclosed}
 
6331
%\def\QEDopen{\@IEEElegacywarn{QEDopen}{IEEEQEDopen}\IEEEQEDopen}
 
6332
%\AtBeginDocument{\def\proof{\@IEEElegacywarn{proof}{IEEEproof}\IEEEproof}\def\endproof{\endIEEEproof}}
 
6333
% V1.8 no longer support biography or biographynophoto
 
6334
%\def\biography{\@IEEElegacywarn{biography}{IEEEbiography}\IEEEbiography}
 
6335
%\def\biographynophoto{\@IEEElegacywarn{biographynophoto}{IEEEbiographynophoto}\IEEEbiographynophoto}
 
6336
%\def\endbiography{\endIEEEbiography}
 
6337
%\def\endbiographynophoto{\endIEEEbiographynophoto}
 
6338
% V1.7 and later no longer supports \overrideIEEEmargins
 
6339
%\def\overrideIEEEmargins{%
 
6340
%\typeout{** WARNING: \string\overrideIEEEmargins \space no longer supported (line \the\inputlineno).}%
 
6341
%\typeout{** Use the \string\CLASSINPUTinnersidemargin, \string\CLASSINPUToutersidemargin \space controls instead.}}
4699
6342
 
4700
6343
\endinput
4701
6344