-
Notifications
You must be signed in to change notification settings - Fork 0
/
IEEEtran.cls
executable file
·4733 lines (4114 loc) · 203 KB
/
IEEEtran.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%%
%% IEEEtran.cls 2011/11/03 version V1.8 based on
%% IEEEtran.cls 2007/03/05 version V1.7a
%% The changes in V1.8 are made with a single goal in mind:
%% to change the look of the output using the [conference] option
%% and the default font size (10pt) to match the Word template more closely.
%% These changes may well have undesired side effects when other options
%% are in force!
%%
%%
%% This is the official IEEE LaTeX class for authors of the Institute of
%% Electrical and Electronics Engineers (IEEE) Transactions journals and
%% conferences.
%%
%% Support sites:
%% http://www.michaelshell.org/tex/ieeetran/
%% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/
%% and
%% http://www.ieee.org/
%%
%% Based on the original 1993 IEEEtran.cls, but with many bug fixes
%% and enhancements (from both JVH and MDS) over the 1996/7 version.
%%
%%
%% Contributors:
%% Gerry Murray (1993), Silvano Balemi (1993),
%% Jon Dixon (1996), Peter N"uchter (1996),
%% Juergen von Hagen (2000), and Michael Shell (2001-2007)
%%
%%
%% Copyright (c) 1993-2000 by Gerry Murray, Silvano Balemi,
%% Jon Dixon, Peter N"uchter,
%% Juergen von Hagen
%% and
%% Copyright (c) 2001-2007 by Michael Shell
%%
%% Current maintainer (V1.3 to V1.7): Michael Shell
%% See:
%% http://www.michaelshell.org/
%% for current contact information.
%%
%% Special thanks to Peter Wilson (CUA) and Donald Arseneau
%% for allowing the inclusion of the \@ifmtarg command
%% from their ifmtarg LaTeX package.
%%
%%*************************************************************************
%% Legal Notice:
%% This code is offered as-is without any warranty either expressed or
%% implied; without even the implied warranty of MERCHANTABILITY or
%% FITNESS FOR A PARTICULAR PURPOSE!
%% User assumes all risk.
%% In no event shall IEEE or any contributor to this code be liable for
%% any damages or losses, including, but not limited to, incidental,
%% consequential, or any other damages, resulting from the use or misuse
%% of any information contained here.
%%
%% All comments are the opinions of their respective authors and are not
%% necessarily endorsed by the IEEE.
%%
%% This work is distributed under the LaTeX Project Public License (LPPL)
%% ( http://www.latex-project.org/ ) version 1.3, and may be freely used,
%% distributed and modified. A copy of the LPPL, version 1.3, is included
%% in the base LaTeX documentation of all distributions of LaTeX released
%% 2003/12/01 or later.
%% Retain all contribution notices and credits.
%% ** Modified files should be clearly indicated as such, including **
%% ** renaming them and changing author support contact information. **
%%
%% File list of work: IEEEtran.cls, IEEEtran_HOWTO.pdf, bare_adv.tex,
%% bare_conf.tex, bare_jrnl.tex, bare_jrnl_compsoc.tex
%%
%% Major changes to the user interface should be indicated by an
%% increase in the version numbers. If a version is a beta, it will
%% be indicated with a BETA suffix, i.e., 1.4 BETA.
%% Small changes can be indicated by appending letters to the version
%% such as "IEEEtran_v14a.cls".
%% In all cases, \Providesclass, any \typeout messages to the user,
%% \IEEEtransversionmajor and \IEEEtransversionminor must reflect the
%% correct version information.
%% The changes should also be documented via source comments.
%%*************************************************************************
%%
%
% Available class options
% e.g., \documentclass[10pt,conference]{IEEEtran}
%
% *** choose only one from each category ***
%
% 9pt, 10pt, 11pt, 12pt
% Sets normal font size. The default is 10pt.
%
% conference, journal, technote, peerreview, peerreviewca
% determines format mode - conference papers, journal papers,
% correspondence papers (technotes), or peer review papers. The user
% should also select 9pt when using technote. peerreview is like
% journal mode, but provides for a single-column "cover" title page for
% anonymous peer review. The paper title (without the author names) is
% repeated at the top of the page after the cover page. For peer review
% papers, the \IEEEpeerreviewmaketitle command must be executed (will
% automatically be ignored for non-peerreview modes) at the place the
% cover page is to end, usually just after the abstract (keywords are
% not normally used with peer review papers). peerreviewca is like
% peerreview, but allows the author names to be entered and formatted
% as with conference mode so that author affiliation and contact
% information can be easily seen on the cover page.
% The default is journal.
%
% draft, draftcls, draftclsnofoot, final
% determines if paper is formatted as a widely spaced draft (for
% handwritten editor comments) or as a properly typeset final version.
% draftcls restricts draft mode to the class file while all other LaTeX
% packages (i.e., \usepackage{graphicx}) will behave as final - allows
% for a draft paper with visible figures, etc. draftclsnofoot is like
% draftcls, but does not display the date and the word "DRAFT" at the foot
% of the pages. If using one of the draft modes, the user will probably
% also want to select onecolumn.
% The default is final.
%
% letterpaper, a4paper
% determines paper size: 8.5in X 11in or 210mm X 297mm. CHANGING THE PAPER
% SIZE WILL NOT ALTER THE TYPESETTING OF THE DOCUMENT - ONLY THE MARGINS
% WILL BE AFFECTED. In particular, documents using the a4paper option will
% have reduced side margins (A4 is narrower than US letter) and a longer
% bottom margin (A4 is longer than US letter). For both cases, the top
% margins will be the same and the text will be horizontally centered.
% For final submission to IEEE, authors should use US letter (8.5 X 11in)
% paper. Note that authors should ensure that all post-processing
% (ps, pdf, etc.) uses the same paper specificiation as the .tex document.
% Problems here are by far the number one reason for incorrect margins.
% IEEEtran will automatically set the default paper size under pdflatex
% (without requiring a change to pdftex.cfg), so this issue is more
% important to dvips users. Fix config.ps, config.pdf, or ~/.dvipsrc for
% dvips, or use the dvips -t papersize option instead as needed. See the
% testflow documentation
% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/testflow
% for more details on dvips paper size configuration.
% The default is letterpaper.
%
% oneside, twoside
% determines if layout follows single sided or two sided (duplex)
% printing. The only notable change is with the headings at the top of
% the pages.
% The default is oneside.
%
% onecolumn, twocolumn
% determines if text is organized into one or two columns per page. One
% column mode is usually used only with draft papers.
% The default is twocolumn.
%
% compsoc
% Use the format of the IEEE Computer Society.
%
% romanappendices
% Use the "Appendix I" convention when numbering appendices. IEEEtran.cls
% now defaults to Alpha "Appendix A" convention - the opposite of what
% v1.6b and earlier did.
%
% captionsoff
% disables the display of the figure/table captions. Some IEEE journals
% request that captions be removed and figures/tables be put on pages
% of their own at the end of an initial paper submission. The endfloat
% package can be used with this class option to achieve this format.
%
% nofonttune
% turns off tuning of the font interword spacing. Maybe useful to those
% not using the standard Times fonts or for those who have already "tuned"
% their fonts.
% The default is to enable IEEEtran to tune font parameters.
%
%
%----------
% Available CLASSINPUTs provided (all are macros unless otherwise noted):
% \CLASSINPUTbaselinestretch
% \CLASSINPUTinnersidemargin
% \CLASSINPUToutersidemargin
% \CLASSINPUTtoptextmargin
% \CLASSINPUTbottomtextmargin
%
% Available CLASSINFOs provided:
% \ifCLASSINFOpdf (TeX if conditional)
% \CLASSINFOpaperwidth (macro)
% \CLASSINFOpaperheight (macro)
% \CLASSINFOnormalsizebaselineskip (length)
% \CLASSINFOnormalsizeunitybaselineskip (length)
%
% Available CLASSOPTIONs provided:
% all class option flags (TeX if conditionals) unless otherwise noted,
% e.g., \ifCLASSOPTIONcaptionsoff
% point size options provided as a single macro:
% \CLASSOPTIONpt
% which will be defined as 9, 10, 11, or 12 depending on the document's
% normalsize point size.
% also, class option peerreviewca implies the use of class option peerreview
% and classoption draft implies the use of class option draftcls
\ProvidesClass{IEEEtran}[2012/11/21 V1.8c by Harald Hanche-Olsen and Anders Christensen]
\typeout{-- Based on V1.7a by Michael Shell}
\typeout{-- See the "IEEEtran_HOWTO" manual for usage information.}
\typeout{-- http://www.michaelshell.org/tex/ieeetran/}
\NeedsTeXFormat{LaTeX2e}
% IEEEtran.cls version numbers, provided as of V1.3
% These values serve as a way a .tex file can
% determine if the new features are provided.
% The version number of this IEEEtrans.cls can be obtained from
% these values. i.e., V1.4
% KEEP THESE AS INTEGERS! i.e., NO {4a} or anything like that-
% (no need to enumerate "a" minor changes here)
\def\IEEEtransversionmajor{1}
\def\IEEEtransversionminor{7}
% These do nothing, but provide them like in article.cls
\newif\if@restonecol
\newif\if@titlepage
% class option conditionals
\newif\ifCLASSOPTIONonecolumn \CLASSOPTIONonecolumnfalse
\newif\ifCLASSOPTIONtwocolumn \CLASSOPTIONtwocolumntrue
\newif\ifCLASSOPTIONoneside \CLASSOPTIONonesidetrue
\newif\ifCLASSOPTIONtwoside \CLASSOPTIONtwosidefalse
\newif\ifCLASSOPTIONfinal \CLASSOPTIONfinaltrue
\newif\ifCLASSOPTIONdraft \CLASSOPTIONdraftfalse
\newif\ifCLASSOPTIONdraftcls \CLASSOPTIONdraftclsfalse
\newif\ifCLASSOPTIONdraftclsnofoot \CLASSOPTIONdraftclsnofootfalse
\newif\ifCLASSOPTIONpeerreview \CLASSOPTIONpeerreviewfalse
\newif\ifCLASSOPTIONpeerreviewca \CLASSOPTIONpeerreviewcafalse
\newif\ifCLASSOPTIONjournal \CLASSOPTIONjournaltrue
\newif\ifCLASSOPTIONconference \CLASSOPTIONconferencefalse
\newif\ifCLASSOPTIONtechnote \CLASSOPTIONtechnotefalse
\newif\ifCLASSOPTIONnofonttune \CLASSOPTIONnofonttunefalse
\newif\ifCLASSOPTIONcaptionsoff \CLASSOPTIONcaptionsofffalse
\newif\ifCLASSOPTIONcompsoc \CLASSOPTIONcompsocfalse
\newif\ifCLASSOPTIONromanappendices \CLASSOPTIONromanappendicesfalse
% class info conditionals
% indicates if pdf (via pdflatex) output
\newif\ifCLASSINFOpdf \CLASSINFOpdffalse
% V1.6b internal flag to show if using a4paper
\newif\if@IEEEusingAfourpaper \@IEEEusingAfourpaperfalse
% IEEEtran class scratch pad registers
% dimen
\newdimen\@IEEEtrantmpdimenA
\newdimen\@IEEEtrantmpdimenB
% count
\newcount\@IEEEtrantmpcountA
\newcount\@IEEEtrantmpcountB
% token list
\newtoks\@IEEEtrantmptoksA
% we use \CLASSOPTIONpt so that we can ID the point size (even for 9pt docs)
% as well as LaTeX's \@ptsize to retain some compatability with some
% external packages
\def\@ptsize{0}
% LaTeX does not support 9pt, so we set \@ptsize to 0 - same as that of 10pt
\DeclareOption{9pt}{\def\CLASSOPTIONpt{9}\def\@ptsize{0}}
\DeclareOption{10pt}{\def\CLASSOPTIONpt{10}\def\@ptsize{0}}
\DeclareOption{11pt}{\def\CLASSOPTIONpt{11}\def\@ptsize{1}}
\DeclareOption{12pt}{\def\CLASSOPTIONpt{12}\def\@ptsize{2}}
\DeclareOption{letterpaper}{\setlength{\paperheight}{11in}%
\setlength{\paperwidth}{8.5in}%
\@IEEEusingAfourpaperfalse
\def\CLASSOPTIONpaper{letter}%
\def\CLASSINFOpaperwidth{8.5in}%
\def\CLASSINFOpaperheight{11in}}
\DeclareOption{a4paper}{\setlength{\paperheight}{297mm}%
\setlength{\paperwidth}{210mm}%
\@IEEEusingAfourpapertrue
\def\CLASSOPTIONpaper{a4}%
\def\CLASSINFOpaperwidth{210mm}%
\def\CLASSINFOpaperheight{297mm}}
\DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse
\CLASSOPTIONonesidetrue\CLASSOPTIONtwosidefalse}
\DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue
\CLASSOPTIONtwosidetrue\CLASSOPTIONonesidefalse}
\DeclareOption{onecolumn}{\CLASSOPTIONonecolumntrue\CLASSOPTIONtwocolumnfalse}
\DeclareOption{twocolumn}{\CLASSOPTIONtwocolumntrue\CLASSOPTIONonecolumnfalse}
% If the user selects draft, then this class AND any packages
% will go into draft mode.
\DeclareOption{draft}{\CLASSOPTIONdrafttrue\CLASSOPTIONdraftclstrue
\CLASSOPTIONdraftclsnofootfalse}
% draftcls is for a draft mode which will not affect any packages
% used by the document.
\DeclareOption{draftcls}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclstrue
\CLASSOPTIONdraftclsnofootfalse}
% draftclsnofoot is like draftcls, but without the footer.
\DeclareOption{draftclsnofoot}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclstrue
\CLASSOPTIONdraftclsnofoottrue}
\DeclareOption{final}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclsfalse
\CLASSOPTIONdraftclsnofootfalse}
\DeclareOption{journal}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse
\CLASSOPTIONjournaltrue\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse}
\DeclareOption{conference}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse
\CLASSOPTIONjournalfalse\CLASSOPTIONconferencetrue\CLASSOPTIONtechnotefalse}
\DeclareOption{technote}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse
\CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotetrue}
\DeclareOption{peerreview}{\CLASSOPTIONpeerreviewtrue\CLASSOPTIONpeerreviewcafalse
\CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse}
\DeclareOption{peerreviewca}{\CLASSOPTIONpeerreviewtrue\CLASSOPTIONpeerreviewcatrue
\CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse}
\DeclareOption{nofonttune}{\CLASSOPTIONnofonttunetrue}
\DeclareOption{captionsoff}{\CLASSOPTIONcaptionsofftrue}
\DeclareOption{compsoc}{\CLASSOPTIONcompsoctrue}
\DeclareOption{romanappendices}{\CLASSOPTIONromanappendicestrue}
% default to US letter paper, 10pt, twocolumn, one sided, final, journal
\ExecuteOptions{letterpaper,10pt,twocolumn,oneside,final,journal}
% overrride these defaults per user requests
\ProcessOptions
% Computer Society conditional execution command
\long\def\@IEEEcompsoconly#1{\relax\ifCLASSOPTIONcompsoc\relax#1\relax\fi\relax}
% inverse
\long\def\@IEEEnotcompsoconly#1{\relax\ifCLASSOPTIONcompsoc\else\relax#1\relax\fi\relax}
% compsoc conference
\long\def\@IEEEcompsocconfonly#1{\relax\ifCLASSOPTIONcompsoc\ifCLASSOPTIONconference\relax#1\relax\fi\fi\relax}
% compsoc not conference
\long\def\@IEEEcompsocnotconfonly#1{\relax\ifCLASSOPTIONcompsoc\ifCLASSOPTIONconference\else\relax#1\relax\fi\fi\relax}
% IEEE uses Times Roman font, so we'll default to Times.
% These three commands make up the entire times.sty package.
\renewcommand{\sfdefault}{phv}
\renewcommand{\rmdefault}{ptm}
\renewcommand{\ttdefault}{pcr}
\@IEEEcompsoconly{\typeout{-- Using IEEE Computer Society mode.}}
% V1.7 compsoc nonconference papers, use Palatino/Palladio as the main text font,
% not Times Roman.
\@IEEEcompsocnotconfonly{\renewcommand{\rmdefault}{ppl}}
% enable Times/Palatino main text font
\normalfont\selectfont
% V1.7 conference notice message hook
\def\@IEEEconsolenoticeconference{\typeout{}%
\typeout{** Conference Paper **}%
\typeout{Before submitting the final camera ready copy, remember to:}%
\typeout{}%
\typeout{ 1. Manually equalize the lengths of two columns on the last page}%
\typeout{ of your paper;}%
\typeout{}%
\typeout{ 2. Ensure that any PostScript and/or PDF output post-processing}%
\typeout{ uses only Type 1 fonts and that every step in the generation}%
\typeout{ process uses the appropriate paper size.}%
\typeout{}}
% we can send console reminder messages to the user here
\AtEndDocument{\ifCLASSOPTIONconference\@IEEEconsolenoticeconference\fi}
% warn about the use of single column other than for draft mode
\ifCLASSOPTIONtwocolumn\else%
\ifCLASSOPTIONdraftcls\else%
\typeout{** ATTENTION: Single column mode is not typically used with IEEE publications.}%
\fi%
\fi
% V1.7 improved paper size setting code.
% Set pdfpage and dvips paper sizes. Conditional tests are similar to that
% of ifpdf.sty. Retain within {} to ensure tested macros are never altered,
% even if only effect is to set them to \relax.
% if \pdfoutput is undefined or equal to relax, output a dvips special
{\@ifundefined{pdfoutput}{\AtBeginDvi{\special{papersize=\CLASSINFOpaperwidth,\CLASSINFOpaperheight}}}{%
% pdfoutput is defined and not equal to \relax
% check for pdfpageheight existence just in case someone sets pdfoutput
% under non-pdflatex. If exists, set them regardless of value of \pdfoutput.
\@ifundefined{pdfpageheight}{\relax}{\global\pdfpagewidth\paperwidth
\global\pdfpageheight\paperheight}%
% if using \pdfoutput=0 under pdflatex, send dvips papersize special
\ifcase\pdfoutput
\AtBeginDvi{\special{papersize=\CLASSINFOpaperwidth,\CLASSINFOpaperheight}}%
\else
% we are using pdf output, set CLASSINFOpdf flag
\global\CLASSINFOpdftrue
\fi}}
% let the user know the selected papersize
\typeout{-- Using \CLASSINFOpaperwidth\space x \CLASSINFOpaperheight\space
(\CLASSOPTIONpaper)\space paper.}
\ifCLASSINFOpdf
\typeout{-- Using PDF output.}
\else
\typeout{-- Using DVI output.}
\fi
% The idea hinted here is for LaTeX to generate markleft{} and markright{}
% automatically for you after you enter \author{}, \journal{},
% \journaldate{}, journalvol{}, \journalnum{}, etc.
% However, there may be some backward compatibility issues here as
% well as some special applications for IEEEtran.cls and special issues
% that may require the flexible \markleft{}, \markright{} and/or \markboth{}.
% We'll leave this as an open future suggestion.
%\newcommand{\journal}[1]{\def\@journal{#1}}
%\def\@journal{}
% pointsize values
% used with ifx to determine the document's normal size
\def\@IEEEptsizenine{9}
\def\@IEEEptsizeten{10}
\def\@IEEEptsizeeleven{11}
\def\@IEEEptsizetwelve{12}
% FONT DEFINITIONS (No sizexx.clo file needed)
% V1.6 revised font sizes, displayskip values and
% revised normalsize baselineskip to reduce underfull vbox problems
% on the 58pc = 696pt = 9.5in text height we want
% normalsize #lines/column baselineskip (aka leading)
% 9pt 63 11.0476pt (truncated down)
% 10pt 58 12pt (exact)
% 11pt 52 13.3846pt (truncated down)
% 12pt 50 13.92pt (exact)
%
% we need to store the nominal baselineskip for the given font size
% in case baselinestretch ever changes.
% this is a dimen, so it will not hold stretch or shrink
\newdimen\@IEEEnormalsizeunitybaselineskip
\@IEEEnormalsizeunitybaselineskip\baselineskip
\ifx\CLASSOPTIONpt\@IEEEptsizenine
\typeout{-- This is a 9 point document.}
\def\normalsize{\@setfontsize{\normalsize}{9}{11.0476pt}}%
\setlength{\@IEEEnormalsizeunitybaselineskip}{11.0476pt}%
\normalsize
\abovedisplayskip 1.5ex plus3pt minus1pt%
\belowdisplayskip \abovedisplayskip%
\abovedisplayshortskip 0pt plus3pt%
\belowdisplayshortskip 1.5ex plus3pt minus1pt
\def\small{\@setfontsize{\small}{8.5}{10pt}}
\def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}}
\def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}}
\def\tiny{\@setfontsize{\tiny}{5}{6pt}}
% sublargesize is the same as large - 10pt
\def\sublargesize{\@setfontsize{\sublargesize}{10}{12pt}}
\def\large{\@setfontsize{\large}{10}{12pt}}
\def\Large{\@setfontsize{\Large}{12}{14pt}}
\def\LARGE{\@setfontsize{\LARGE}{14}{17pt}}
\def\huge{\@setfontsize{\huge}{17}{20pt}}
\def\Huge{\@setfontsize{\Huge}{20}{24pt}}
\fi
% Check if we have selected 10 points
\ifx\CLASSOPTIONpt\@IEEEptsizeten
\typeout{-- This is a 10 point document.}
\def\normalsize{\@setfontsize{\normalsize}{10}{11}}%
\setlength{\@IEEEnormalsizeunitybaselineskip}{11pt}%
\normalsize
\abovedisplayskip 1.5ex plus4pt minus2pt%
\belowdisplayskip \abovedisplayskip%
\abovedisplayshortskip 0pt plus4pt%
\belowdisplayshortskip 1.5ex plus4pt minus2pt
\def\small{\@setfontsize{\small}{9}{10pt}}
\def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}}
\def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}}
\def\tiny{\@setfontsize{\tiny}{5}{6pt}}
% sublargesize is a tad smaller than large - 11pt
\def\sublargesize{\@setfontsize{\sublargesize}{11}{13.4pt}}
\def\large{\@setfontsize{\large}{12}{14pt}}
\def\Large{\@setfontsize{\Large}{14}{17pt}}
\def\LARGE{\@setfontsize{\LARGE}{17}{20pt}}
\def\huge{\@setfontsize{\huge}{20}{24pt}}
\def\Huge{\@setfontsize{\Huge}{24}{28pt}}
\fi
% Check if we have selected 11 points
\ifx\CLASSOPTIONpt\@IEEEptsizeeleven
\typeout{-- This is an 11 point document.}
\def\normalsize{\@setfontsize{\normalsize}{11}{13.3846pt}}%
\setlength{\@IEEEnormalsizeunitybaselineskip}{13.3846pt}%
\normalsize
\abovedisplayskip 1.5ex plus5pt minus3pt%
\belowdisplayskip \abovedisplayskip%
\abovedisplayshortskip 0pt plus5pt%
\belowdisplayshortskip 1.5ex plus5pt minus3pt
\def\small{\@setfontsize{\small}{10}{12pt}}
\def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}}
\def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}}
\def\tiny{\@setfontsize{\tiny}{6}{7pt}}
% sublargesize is the same as large - 12pt
\def\sublargesize{\@setfontsize{\sublargesize}{12}{14pt}}
\def\large{\@setfontsize{\large}{12}{14pt}}
\def\Large{\@setfontsize{\Large}{14}{17pt}}
\def\LARGE{\@setfontsize{\LARGE}{17}{20pt}}
\def\huge{\@setfontsize{\huge}{20}{24pt}}
\def\Huge{\@setfontsize{\Huge}{24}{28pt}}
\fi
% Check if we have selected 12 points
\ifx\CLASSOPTIONpt\@IEEEptsizetwelve
\typeout{-- This is a 12 point document.}
\def\normalsize{\@setfontsize{\normalsize}{12}{13.92pt}}%
\setlength{\@IEEEnormalsizeunitybaselineskip}{13.92pt}%
\normalsize
\abovedisplayskip 1.5ex plus6pt minus4pt%
\belowdisplayskip \abovedisplayskip%
\abovedisplayshortskip 0pt plus6pt%
\belowdisplayshortskip 1.5ex plus6pt minus4pt
\def\small{\@setfontsize{\small}{10}{12pt}}
\def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}}
\def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}}
\def\tiny{\@setfontsize{\tiny}{6}{7pt}}
% sublargesize is the same as large - 14pt
\def\sublargesize{\@setfontsize{\sublargesize}{14}{17pt}}
\def\large{\@setfontsize{\large}{14}{17pt}}
\def\Large{\@setfontsize{\Large}{17}{20pt}}
\def\LARGE{\@setfontsize{\LARGE}{20}{24pt}}
\def\huge{\@setfontsize{\huge}{22}{26pt}}
\def\Huge{\@setfontsize{\Huge}{24}{28pt}}
\fi
% V1.6 The Computer Modern Fonts will issue a substitution warning for
% 24pt titles (24.88pt is used instead) increase the substitution
% tolerance to turn off this warning
\def\fontsubfuzz{.9pt}
% However, the default (and correct) Times font will scale exactly as needed.
% warn the user in case they forget to use the 9pt option with
% technote
\ifCLASSOPTIONtechnote%
\ifx\CLASSOPTIONpt\@IEEEptsizenine\else%
\typeout{** ATTENTION: Technotes are normally 9pt documents.}%
\fi%
\fi
% V1.7
% Improved \textunderscore to provide a much better fake _ when used with
% OT1 encoding. Under OT1, detect use of pcr or cmtt \ttfamily and use
% available true _ glyph for those two typewriter fonts.
\def\@IEEEstringptm{ptm} % Times Roman family
\def\@IEEEstringppl{ppl} % Palatino Roman family
\def\@IEEEstringphv{phv} % Helvetica Sans Serif family
\def\@IEEEstringpcr{pcr} % Courier typewriter family
\def\@IEEEstringcmtt{cmtt} % Computer Modern typewriter family
\DeclareTextCommandDefault{\textunderscore}{\leavevmode
\ifx\f@family\@IEEEstringpcr\string_\else
\ifx\f@family\@IEEEstringcmtt\string_\else
\ifx\f@family\@IEEEstringptm\kern 0em\vbox{\hrule\@width 0.5em\@height 0.5pt\kern -0.3ex}\else
\ifx\f@family\@IEEEstringppl\kern 0em\vbox{\hrule\@width 0.5em\@height 0.5pt\kern -0.3ex}\else
\ifx\f@family\@IEEEstringphv\kern -0.03em\vbox{\hrule\@width 0.62em\@height 0.52pt\kern -0.33ex}\kern -0.03em\else
\kern 0.09em\vbox{\hrule\@width 0.6em\@height 0.44pt\kern -0.63pt\kern -0.42ex}\kern 0.09em\fi\fi\fi\fi\fi\relax}
% set the default \baselinestretch
\def\baselinestretch{1}
\ifCLASSOPTIONdraftcls
\def\baselinestretch{1.5}% default baselinestretch for draft modes
\fi
% process CLASSINPUT baselinestretch
\ifx\CLASSINPUTbaselinestretch\@IEEEundefined
\else
\edef\baselinestretch{\CLASSINPUTbaselinestretch} % user CLASSINPUT override
\typeout{** ATTENTION: Overriding \string\baselinestretch\space to
\baselinestretch\space via \string\CLASSINPUT.}
\fi
\normalsize % make \baselinestretch take affect
% store the normalsize baselineskip
\newdimen\CLASSINFOnormalsizebaselineskip
\CLASSINFOnormalsizebaselineskip=\baselineskip\relax
% and the normalsize unity (baselinestretch=1) baselineskip
% we could save a register by giving the user access to
% \@IEEEnormalsizeunitybaselineskip. However, let's protect
% its read only internal status
\newdimen\CLASSINFOnormalsizeunitybaselineskip
\CLASSINFOnormalsizeunitybaselineskip=\@IEEEnormalsizeunitybaselineskip\relax
% store the nominal value of jot
\newdimen\IEEEnormaljot
\IEEEnormaljot=0.25\baselineskip\relax
% set \jot
\jot=\IEEEnormaljot\relax
% V1.6, we are now going to fine tune the interword spacing
% The default interword glue for Times under TeX appears to use a
% nominal interword spacing of 25% (relative to the font size, i.e., 1em)
% a maximum of 40% and a minimum of 19%.
% For example, 10pt text uses an interword glue of:
%
% 2.5pt plus 1.49998pt minus 0.59998pt
%
% However, IEEE allows for a more generous range which reduces the need
% for hyphenation, especially for two column text. Furthermore, IEEE
% tends to use a little bit more nominal space between the words.
% IEEE's interword spacing percentages appear to be:
% 35% nominal
% 23% minimum
% 50% maximum
% (They may even be using a tad more for the largest fonts such as 24pt.)
%
% for bold text, IEEE increases the spacing a little more:
% 37.5% nominal
% 23% minimum
% 55% maximum
% here are the interword spacing ratios we'll use
% for medium (normal weight)
\def\@IEEEinterspaceratioM{0.35}
\def\@IEEEinterspaceMINratioM{0.23}
\def\@IEEEinterspaceMAXratioM{0.50}
% for bold
\def\@IEEEinterspaceratioB{0.375}
\def\@IEEEinterspaceMINratioB{0.23}
\def\@IEEEinterspaceMAXratioB{0.55}
% command to revise the interword spacing for the current font under TeX:
% \fontdimen2 = nominal interword space
% \fontdimen3 = interword stretch
% \fontdimen4 = interword shrink
% since all changes to the \fontdimen are global, we can enclose these commands
% in braces to confine any font attribute or length changes
\def\@@@IEEEsetfontdimens#1#2#3{{%
\setlength{\@IEEEtrantmpdimenB}{\f@size pt}% grab the font size in pt, could use 1em instead.
\setlength{\@IEEEtrantmpdimenA}{#1\@IEEEtrantmpdimenB}%
\fontdimen2\font=\@IEEEtrantmpdimenA\relax
\addtolength{\@IEEEtrantmpdimenA}{-#2\@IEEEtrantmpdimenB}%
\fontdimen3\font=-\@IEEEtrantmpdimenA\relax
\setlength{\@IEEEtrantmpdimenA}{#1\@IEEEtrantmpdimenB}%
\addtolength{\@IEEEtrantmpdimenA}{-#3\@IEEEtrantmpdimenB}%
\fontdimen4\font=\@IEEEtrantmpdimenA\relax}}
% revise the interword spacing for each font weight
\def\@@IEEEsetfontdimens{{%
\mdseries
\@@@IEEEsetfontdimens{\@IEEEinterspaceratioM}{\@IEEEinterspaceMAXratioM}{\@IEEEinterspaceMINratioM}%
\bfseries
\@@@IEEEsetfontdimens{\@IEEEinterspaceratioB}{\@IEEEinterspaceMAXratioB}{\@IEEEinterspaceMINratioB}%
}}
% revise the interword spacing for each font shape
% \slshape is not often used for IEEE work and is not altered here. The \scshape caps are
% already a tad too large in the free LaTeX fonts (as compared to what IEEE uses) so we
% won't alter these either.
\def\@IEEEsetfontdimens{{%
\normalfont
\@@IEEEsetfontdimens
\normalfont\itshape
\@@IEEEsetfontdimens
}}
% command to revise the interword spacing for each font size (and shape
% and weight). Only the \rmfamily is done here as \ttfamily uses a
% fixed spacing and \sffamily is not used as the main text of IEEE papers.
\def\@IEEEtunefonts{{\selectfont\rmfamily
\tiny\@IEEEsetfontdimens
\scriptsize\@IEEEsetfontdimens
\footnotesize\@IEEEsetfontdimens
\small\@IEEEsetfontdimens
\normalsize\@IEEEsetfontdimens
\sublargesize\@IEEEsetfontdimens
\large\@IEEEsetfontdimens
\LARGE\@IEEEsetfontdimens
\huge\@IEEEsetfontdimens
\Huge\@IEEEsetfontdimens}}
% if the nofonttune class option is not given, revise the interword spacing
% now - in case IEEEtran makes any default length measurements, and make
% sure all the default fonts are loaded
\ifCLASSOPTIONnofonttune\else
\@IEEEtunefonts
\fi
% and again at the start of the document in case the user loaded different fonts
\AtBeginDocument{\ifCLASSOPTIONnofonttune\else\@IEEEtunefonts\fi}
% V1.6
% LaTeX is a little to quick to use hyphenations
% So, we increase the penalty for their use and raise
% the badness level that triggers an underfull hbox
% warning. The author may still have to tweak things,
% but the appearance will be much better "right out
% of the box" than that under V1.5 and prior.
% TeX default is 50
\hyphenpenalty=750
% If we didn't adjust the interword spacing, 2200 might be better.
% The TeX default is 1000
\hbadness=1350
% IEEE does not use extra spacing after punctuation
\frenchspacing
% V1.7 increase this a tad to discourage equation breaks
\binoppenalty=1000 % default 700
\relpenalty=800 % default 500
% margin note stuff
\marginparsep 10pt
\marginparwidth 20pt
\marginparpush 25pt
% if things get too close, go ahead and let them touch
\lineskip 0pt
\normallineskip 0pt
\lineskiplimit 0pt
\normallineskiplimit 0pt
% The distance from the lower edge of the text body to the
% footline
\footskip 0.4in
% normally zero, should be relative to font height.
% put in a little rubber to help stop some bad breaks (underfull vboxes)
\parskip 0ex plus 0.2ex minus 0.1ex
\ifCLASSOPTIONconference
\parskip 6pt plus 2pt minus 1pt
\fi
\parindent 1.0em
\ifCLASSOPTIONconference
\parindent 14.45pt
\fi
\topmargin -49.0pt
\headheight 12pt
\headsep 0.25in
% use the normal font baselineskip
% so that \topskip is unaffected by changes in \baselinestretch
\topskip=\@IEEEnormalsizeunitybaselineskip
\textheight 58pc % 9.63in, 696pt
% Tweak textheight to a perfect integer number of lines/page.
% The normal baselineskip for each document point size is used
% to determine these values.
\ifx\CLASSOPTIONpt\@IEEEptsizenine\textheight=63\@IEEEnormalsizeunitybaselineskip\fi % 63 lines/page
\ifx\CLASSOPTIONpt\@IEEEptsizeten\textheight=58\@IEEEnormalsizeunitybaselineskip\fi % 58 lines/page
\ifx\CLASSOPTIONpt\@IEEEptsizeeleven\textheight=52\@IEEEnormalsizeunitybaselineskip\fi % 52 lines/page
\ifx\CLASSOPTIONpt\@IEEEptsizetwelve\textheight=50\@IEEEnormalsizeunitybaselineskip\fi % 50 lines/page
\columnsep 1.5pc
\textwidth 184.2mm
% the default side margins are equal
\if@IEEEusingAfourpaper
\oddsidemargin 14.32mm
\evensidemargin 14.32mm
\else
\oddsidemargin 0.680in
\evensidemargin 0.680in
\fi
% compensate for LaTeX's 1in offset
\addtolength{\oddsidemargin}{-1in}
\addtolength{\evensidemargin}{-1in}
% adjust margins for conference mode
\ifCLASSOPTIONconference
\topmargin -0.25in
% we retain the reserved, but unused space for headers
\addtolength{\topmargin}{-\headheight}
\addtolength{\topmargin}{-\headsep}
\textheight 9.25in % The standard for conferences (668.4975pt)
% Tweak textheight to a perfect integer number of lines/page.
\ifx\CLASSOPTIONpt\@IEEEptsizenine\textheight=61\@IEEEnormalsizeunitybaselineskip\fi % 61 lines/page
\ifx\CLASSOPTIONpt\@IEEEptsizeten\textheight=62\@IEEEnormalsizeunitybaselineskip\fi % 62 lines/page
\ifx\CLASSOPTIONpt\@IEEEptsizeeleven\textheight=50\@IEEEnormalsizeunitybaselineskip\fi % 50 lines/page
\ifx\CLASSOPTIONpt\@IEEEptsizetwelve\textheight=48\@IEEEnormalsizeunitybaselineskip\fi % 48 lines/page
\fi
% compsoc conference
\ifCLASSOPTIONcompsoc
\ifCLASSOPTIONconference
% compsoc conference use a larger value for columnsep
\columnsep 0.375in
% compsoc conferences want 1in top margin, 1.125in bottom margin
\topmargin 0in
\addtolength{\topmargin}{-6pt}% we tweak this a tad to better comply with top of line stuff
% we retain the reserved, but unused space for headers
\addtolength{\topmargin}{-\headheight}
\addtolength{\topmargin}{-\headsep}
\textheight 8.875in % (641.39625pt)
% Tweak textheight to a perfect integer number of lines/page.
\ifx\CLASSOPTIONpt\@IEEEptsizenine\textheight=58\@IEEEnormalsizeunitybaselineskip\fi % 58 lines/page
\ifx\CLASSOPTIONpt\@IEEEptsizeten\textheight=53\@IEEEnormalsizeunitybaselineskip\fi % 53 lines/page
\ifx\CLASSOPTIONpt\@IEEEptsizeeleven\textheight=48\@IEEEnormalsizeunitybaselineskip\fi % 48 lines/page
\ifx\CLASSOPTIONpt\@IEEEptsizetwelve\textheight=46\@IEEEnormalsizeunitybaselineskip\fi % 46 lines/page
\textwidth 6.5in
% the default side margins are equal
\if@IEEEusingAfourpaper
\oddsidemargin 22.45mm
\evensidemargin 22.45mm
\else
\oddsidemargin 1in
\evensidemargin 1in
\fi
% compensate for LaTeX's 1in offset
\addtolength{\oddsidemargin}{-1in}
\addtolength{\evensidemargin}{-1in}
\fi\fi
% draft mode settings override that of all other modes
% provides a nice 1in margin all around the paper and extra
% space between the lines for editor's comments
\ifCLASSOPTIONdraftcls
% want 1in from top of paper to text
\setlength{\topmargin}{-\headsep}%
\addtolength{\topmargin}{-\headheight}%
% we want 1in side margins regardless of paper type
\oddsidemargin 0in
\evensidemargin 0in
% set the text width
\setlength{\textwidth}{\paperwidth}%
\addtolength{\textwidth}{-2.0in}%
\setlength{\textheight}{\paperheight}%
\addtolength{\textheight}{-2.0in}%
% digitize textheight to be an integer number of lines.
% this may cause the bottom margin to be off a tad
\addtolength{\textheight}{-1\topskip}%
\divide\textheight by \baselineskip%
\multiply\textheight by \baselineskip%
\addtolength{\textheight}{\topskip}%
\fi
% process CLASSINPUT inner/outer margin
% if inner margin defined, but outer margin not, set outer to inner.
\ifx\CLASSINPUTinnersidemargin\@IEEEundefined
\else
\ifx\CLASSINPUToutersidemargin\@IEEEundefined
\edef\CLASSINPUToutersidemargin{\CLASSINPUTinnersidemargin}
\fi
\fi
\ifx\CLASSINPUToutersidemargin\@IEEEundefined
\else
% if outer margin defined, but inner margin not, set inner to outer.
\ifx\CLASSINPUTinnersidemargin\@IEEEundefined
\edef\CLASSINPUTinnersidemargin{\CLASSINPUToutersidemargin}
\fi
\setlength{\oddsidemargin}{\CLASSINPUTinnersidemargin}
\ifCLASSOPTIONtwoside
\setlength{\evensidemargin}{\CLASSINPUToutersidemargin}
\else
\setlength{\evensidemargin}{\CLASSINPUTinnersidemargin}
\fi
\addtolength{\oddsidemargin}{-1in}
\addtolength{\evensidemargin}{-1in}
\setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-\CLASSINPUTinnersidemargin}
\addtolength{\textwidth}{-\CLASSINPUToutersidemargin}
\typeout{** ATTENTION: Overriding inner side margin to \CLASSINPUTinnersidemargin\space and
outer side margin to \CLASSINPUToutersidemargin\space via \string\CLASSINPUT.}
\fi
% process CLASSINPUT top/bottom text margin
% if toptext margin defined, but bottomtext margin not, set bottomtext to toptext margin
\ifx\CLASSINPUTtoptextmargin\@IEEEundefined
\else
\ifx\CLASSINPUTbottomtextmargin\@IEEEundefined
\edef\CLASSINPUTbottomtextmargin{\CLASSINPUTtoptextmargin}
\fi
\fi
\ifx\CLASSINPUTbottomtextmargin\@IEEEundefined
\else
% if bottomtext margin defined, but toptext margin not, set toptext to bottomtext margin
\ifx\CLASSINPUTtoptextmargin\@IEEEundefined
\edef\CLASSINPUTtoptextmargin{\CLASSINPUTbottomtextmargin}
\fi
\setlength{\topmargin}{\CLASSINPUTtoptextmargin}
\addtolength{\topmargin}{-1in}
\addtolength{\topmargin}{-\headheight}
\addtolength{\topmargin}{-\headsep}
\setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-\CLASSINPUTtoptextmargin}
\addtolength{\textheight}{-\CLASSINPUTbottomtextmargin}
% in the default format we use the normal baselineskip as topskip
% we only need 0.7 of this to clear typical top text and we need
% an extra 0.3 spacing at the bottom for descenders. This will
% correct for both.
\addtolength{\topmargin}{-0.3\@IEEEnormalsizeunitybaselineskip}
\typeout{** ATTENTION: Overriding top text margin to \CLASSINPUTtoptextmargin\space and
bottom text margin to \CLASSINPUTbottomtextmargin\space via \string\CLASSINPUT.}
\fi
% LIST SPACING CONTROLS
% Controls the amount of EXTRA spacing
% above and below \trivlist
% Both \list and IED lists override this.
% However, \trivlist will use this as will most
% things built from \trivlist like the \center
% environment.
\topsep 0.5\baselineskip
% Controls the additional spacing around lists preceded
% or followed by blank lines. IEEE does not increase
% spacing before or after paragraphs so it is set to zero.
% \z@ is the same as zero, but faster.
\partopsep \z@
% Controls the spacing between paragraphs in lists.
% IEEE does not increase spacing before or after paragraphs
% so this is also zero.
% With IEEEtran.cls, global changes to
% this value DO affect lists (but not IED lists).
\parsep \z@
% Controls the extra spacing between list items.
% IEEE does not put extra spacing between items.
% With IEEEtran.cls, global changes to this value DO affect
% lists (but not IED lists).
\itemsep \z@
% \itemindent is the amount to indent the FIRST line of a list
% item. It is auto set to zero within the \list environment. To alter
% it, you have to do so when you call the \list.
% However, IEEE uses this for the theorem environment
% There is an alternative value for this near \leftmargini below
\itemindent -1em
% \leftmargin, the spacing from the left margin of the main text to