555
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4592 lines
193 KiB

  1. %%
  2. %% IEEEtran.cls 2002/11/18 version V1.6b
  3. %%
  4. %% NOTE: This text file uses MS Windows line feed conventions. When (human)
  5. %% reading this file on other platforms, you may have to use a text
  6. %% editor that can handle lines terminated by the MS Windows line feed
  7. %% characters (0x0D 0x0A).
  8. %%
  9. %%
  10. %% This is the official IEEE LaTeX class for authors of the Institute of
  11. %% Electrical and Electronics Engineers (IEEE) Transactions journals and
  12. %% conferences.
  13. %%
  14. %% The latest version and documentation of IEEEtran can be obtained at:
  15. %% http://www.ieee.org
  16. %% and/or
  17. %% http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/
  18. %%
  19. %% The CTAN page may have additional files related to obscure,
  20. %% non-IEEE standard and/or platform dependent use of this tool.
  21. %%
  22. %% Based on the original 1993 IEEEtran.cls, but with many bug fixes
  23. %% and enhancements (from both JVH and MDS) over the 1996/7 version.
  24. %%
  25. %%
  26. %% Contributors:
  27. %% Gerry Murray (1993), Silvano Balemi (1993),
  28. %% Jon Dixon (1996), Peter N"uchter (1996),
  29. %% Juergen von Hagen (2000), and Michael Shell (2001-2002)
  30. %%
  31. %%
  32. %% Copyright (c) 1993-2002 by Gerry Murray, Silvano Balemi,
  33. %% Jon Dixion, Peter N"uchter,
  34. %% Juergen von Hagen and Michael Shell
  35. %%
  36. %% Current maintainer (V1.3 to V1.6): Michael Shell
  37. %% mshell@ece.gatech.edu
  38. %% See the CTAN website above
  39. %% for current contact information.
  40. %%
  41. %% Special thanks to Peter Wilson (CUA) and Donald Arseneau
  42. %% for allowing the inclusion of the \@ifmtarg command
  43. %% from their ifmtarg LaTeX package.
  44. %%
  45. %%**********************************************************************
  46. %% Legal Notice:
  47. %% This code is offered as-is without any warranty either
  48. %% expressed or implied; without even the implied warranty of
  49. %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE!
  50. %% User assumes all risk.
  51. %% In no event shall IEEE or any contributor to this code
  52. %% be liable for any damages or losses, including, but not limited to,
  53. %% incidental, consequential, or any other damages, resulting from the
  54. %% use or misuse of any information contained here.
  55. %%
  56. %% All comments are the opinions of their respective authors and are not
  57. %% necessarily endorsed by the IEEE.
  58. %%
  59. %% This code is distributed under the Perl Artistic License
  60. %% ( http://language.perl.com/misc/Artistic.html )
  61. %% and may be freely used, distributed and modified.
  62. %% Retain the contribution notices and credits.
  63. %%
  64. %% Major changes to the user interface should be indicated by an
  65. %% increase in the version numbers. If a version is a beta, it will
  66. %% be indicated with a BETA suffix, i.e., 1.4 BETA.
  67. %% Small changes can be indicated by appending letters to the version
  68. %% such as "IEEEtran_v14a.cls".
  69. %% In all cases, \Providesclass, any \typeout messages to the user,
  70. %% \IEEEtransversionmajor and \IEEEtransversionminor must reflect the
  71. %% correct version information.
  72. %% The changes should also be documented via source comments.
  73. %%**********************************************************************
  74. %%
  75. %
  76. % Available class options
  77. % (e.g., \documentclass[10pt,conference]{ieeeconf}
  78. %
  79. % *** choose only one from each category ***
  80. %
  81. % 9pt, 10pt, 11pt, 12pt
  82. % Sets normal font size. The default is 10pt.
  83. %
  84. % conference, journal, technote, peerreview, peerreviewca
  85. % determines format mode - conference papers, journal papers,
  86. % correspondence papers (technotes), or peer review papers. The user
  87. % should also select 9pt when using technote. peerreview is like
  88. % journal mode, but provides for a single-column "cover" title page for
  89. % anonymous peer review. The paper title (without the author names) is
  90. % repeated at the top of the page after the cover page. For peer review
  91. % papers, the \IEEEpeerreviewmaketitle command must be executed (will
  92. % automatically be ignored for non-peerreview modes) at the place the
  93. % cover page is to end, usually just after the abstract (keywords are
  94. % not normally used with peer review papers). peerreviewca is like
  95. % peerreview, but allows the author names to be entered and formatted
  96. % as with conference mode so that author affiliation and contact
  97. % information can be easily seen on the cover page.
  98. % The default is journal.
  99. %
  100. % draft, draftcls, draftclsnofoot, final
  101. % determines if paper is formatted as a widely spaced draft (for
  102. % handwritten editor comments) or as a properly typeset final version.
  103. % draftcls restricts draft mode to the class file while all other LaTeX
  104. % packages (i.e., \usepackage{graphicx}) will behave as final - allows
  105. % for a draft paper with visible figures, etc. draftclsnofoot is like
  106. % draftcls, but does not display the date and the word "DRAFT" at the foot
  107. % of the pages. If using one of the draft modes, the user will probably
  108. % also want to select onecolumn.
  109. % The default is final.
  110. %
  111. % letterpaper, a4paper
  112. % determines paper size: 8.5in X 11in or 210mm X 297mm. CHANGING THE PAPER
  113. % SIZE WILL NOT ALTER THE TYPESETTING OF THE DOCUMENT - ONLY THE MARGINS
  114. % WILL BE AFFECTED. In particular, documents using the a4paper option will
  115. % have reduced side margins (A4 is narrower than US letter) and a longer
  116. % bottom margin (A4 is longer than US letter). For both cases, the top
  117. % margins will be the same and the text will be horizontally centered.
  118. % For final submission to IEEE, authors should use US letter (8.5 X 11in)
  119. % paper. Note that authors should ensure that all post-processing
  120. % (ps, pdf, etc.) uses the same paper specificiation as the .tex document.
  121. % Problems here are by far the number one reason for incorrect margins.
  122. % IEEEtran will automatically set the default paper size under pdflatex
  123. % (without requiring a change to pdftex.cfg), so this issue is more
  124. % important to dvips users. Fix config.ps, config.pdf, or ~/.dvipsrc for
  125. % dvips, or use the dvips -t papersize option instead as needed. See the
  126. % testflow documentation
  127. % http://www.ctan.org/tex-archive/macros/latex/contrib/supported/IEEEtran/testflow
  128. % for more details on dvips paper size configuration.
  129. % The default is letterpaper.
  130. %
  131. % oneside, twoside
  132. % determines if layout follows single sided or two sided (duplex)
  133. % printing. The only notable change is with the headings at the top of
  134. % the pages.
  135. % The default is oneside.
  136. %
  137. % onecolumn, twocolumn
  138. % determines if text is organized into one or two columns per page. One
  139. % column mode is usually used only with draft papers.
  140. % The default is twocolumn.
  141. %
  142. % nofonttune
  143. % turns off tuning of the font interword spacing. Maybe useful to those
  144. % not using the standard Times fonts or for those who have already "tuned"
  145. % their fonts.
  146. % The default is to enable IEEEtran to tune font parameters.
  147. %
  148. %
  149. %*******
  150. % 11/2002 V1.6b (MDS) changes:
  151. %
  152. % 1) Fixed problem with figure captions when using hyperref. Thanks to
  153. % Leandro Barajas and Michael Bassetti for reporting this bug.
  154. %
  155. % 2) Provide a fake nabib command \NAT@parse so that hyperref will not
  156. % interfere with the operation of cite.sty. However, as a result citation
  157. % numbers will not be hyperlinked. Also, natbib will not be able to work
  158. % with IEEEtran. However, this is perhaps the best solution until cite.sty
  159. % and hyperref.sty are able to co-exist with each other.
  160. % It easy enough to override the fake command via:
  161. % \makeatletter
  162. % \let\NAT@parse\undefined
  163. % \makeatother
  164. %
  165. % 3) Revised font selection method so as not to have problems when used
  166. % with setspace.sty. Thanks to Zhang Yan for reporting this bug.
  167. %
  168. % 4) Added \special to feed papersize to dvips. Thanks to Moritz Borgmann
  169. % for suggesting this feature.
  170. %
  171. % 5) In addition to the IEEE IED lists, the original IED style list
  172. % environments (as is done in article.cls) are now provided as
  173. % LaTeXitemize, LaTeXenumerate, and LaTeXdescription. Also, users can
  174. % now redefine \makelabel within IEEE IED list controls. There may be
  175. % some use for this in specialized applications. Thanks to Eli Barzilay
  176. % for suggesting this feature.
  177. %
  178. % 6) \table* now defaults to \footnotesize text like \table.
  179. %
  180. % 7) The draft modes now no longer force a pagebreak after the title.
  181. % Thanks to Christian Peel for suggesting this change.
  182. %
  183. % 8) New draftclsnofoot mode is like draftcls, but does not display the
  184. % date and the word "DRAFT" at the foot of the page. Thanks to
  185. % Christian Peel for suggesting this feature.
  186. %
  187. % 9) New peerreview and peerreviewca modes with \IEEEpeerreviewmaketitle
  188. % command allows for a "cover" titlepage for anonymous peer review.
  189. % Except for the cover titlepage, peerreview is much like journal mode.
  190. % peerreviewca is like peerreview, but allows the author names to be
  191. % entered and formatted as under conference mode so that author
  192. % affiliations and contact information can be easily seen on the cover
  193. % page. Thanks to Eric Benedict for suggesting this feature.
  194. %
  195. %
  196. %*******
  197. % 7/2002 V1.6 (MDS) changes:
  198. %
  199. % 1) Added conference mode via conference option. Defaults to the traditional
  200. % journal mode. i.e., \documentclass[conference]{IEEEtran}
  201. %
  202. % 2) Added support for A4 paper via new a4paper option. Pdflatex's paper size
  203. % lengths are now automatically set to the proper paper size being used.
  204. %
  205. % 3) Revised margins again. Page text is now horizontally centered.
  206. % Conference mode increases the top and bottom margins with the bottom
  207. % margin being slightly larger. For A4 paper, the top margin and text
  208. % typesetting will not change from those of US letter paper, but the side
  209. % margins will be smaller and the bottom margin will be larger than that of
  210. % US letter. All per IEEE specs.
  211. %
  212. % 4) Fixed footnote line spacing anomaly in draft mode.
  213. % Thanks to Alberto Rodriguez for reporting this bug.
  214. %
  215. % Also, slightly revised footnote and \thanks note spacing.
  216. % Set \interfootnotelinepenalty=10000 to prevent LaTeX
  217. % from breaking footnotes across multiple pages or columns.
  218. %
  219. % 5) Fixed bug that caused overwritten photo areas and sometimes anomalous
  220. % spacing when a new paragraph was started within a biography. Also,
  221. % the presence of \par's, new lines or spaces at the beginning of
  222. % abstract, keywords, biography, or biographynophoto will no longer
  223. % affect the first word spacing.
  224. % Thanks to Eric Durant for reporting this bug.
  225. %
  226. % The biography environment now does a better job in preventing
  227. % a biography photo area from being broken across pages or columns.
  228. %
  229. % 6) Fixed whitespace between \cite entries bug. i.e.,
  230. % both \cite{einstein24, knuth84} and \cite{einstein24,knuth84}
  231. % are now valid. \cite is now a robust command as it should be.
  232. % IEEEtran now no longer defines the old non-standard \shortcite or
  233. % \citename.
  234. %
  235. % The base IEEEtran.cls does not sort citation numbers or produce ranges
  236. % for three or more consecutive numbers. However, V1.6 of IEEEtran.cls
  237. % now pre-defines the following format control macros to facilitate easy
  238. % use with Donald Arseneau's cite.sty package (tested with cite.sty V3.9):
  239. %
  240. % \def\citepunct{], [}
  241. % \def\citedash{]--[}
  242. %
  243. % cite.sty is standard on most LaTeX sytems and can be obtained from
  244. % www.ctan.org. Thanks to Donald Arseneau for creating cite.sty, providing
  245. % the required format arguments to produce the IEEE style. and
  246. % designing a cite interface capable of handling the IEEE citation
  247. % style.
  248. %
  249. % Note: Historically, IEEE has wanted authors to "hardcode" symbolics.
  250. % (i.e., replace all \cite{} with fixed [x]). However, it now seems that
  251. % most electronic manuscript submissions to IEEE are in .pdf format, and
  252. % as such, do not require the LaTeX document reference numbers to be hard
  253. % coded. If an author is required to submit actual LaTeX files, I do
  254. % recommend that the bibliography file (.bbl) be copied into the .tex
  255. % document and the \bibliographystyle{} and \bibliography{} commands be
  256. % commented out so that the .tex file does not depend on (potentially
  257. % lengthy and/or confidential) external bibliography database files.
  258. %
  259. % 7) Adjusted some spacing parameters. The spacing above and below equations
  260. % has been revised (to a typical IEEE value). \jot now has a decent value.
  261. % The title text is now exactly 24pt. (On a related note, \fontsubfuzz has
  262. % been increased to 0.9pt to prevent annoying font substitution warnings
  263. % when using the Computer Modern fonts that use the 24.88pt size.)
  264. % In V1.6, \small is now 8.5pt in 9pt docs because \footnotesize is 8pt.
  265. % For 9pt docs, you should probably go ahead and use \footnotesize when you
  266. % need text a little smaller than \normalsize.
  267. % The interword spacing has been adjusted to be extremely close to that
  268. % which IEEE uses. You can use a new class option, nofonttune, if you need
  269. % to disable the adjusting of the interword spacing. This adjustment and
  270. % an increase to \hyphenpenalty have greatly reduced the amount of
  271. % hyphenation in a typical paper.
  272. % The baselineskip for the normalsize fonts has been tweaked to reduce
  273. % underfull vboxes on journal paper columns with only paragraphs.
  274. % Conference mode does the same thing but by also tweaking the \textheight
  275. % slightly off 9.25in (IEEE spec) to ensure an integer number of lines per
  276. % page. Draft (also draftcls) mode has also been revised to reduce
  277. % underfull vbox warnings. However, draft mode can still produce underfull
  278. % vboxes (a direct result of the increase in line spacing and margins) if:
  279. % A non-normalsize font occupies an entire column (abstract and index terms
  280. % take up a whole column by themselves); or the beginning of a section
  281. % occurs near the end of a column and cannot be squeezed into the bottom,
  282. % etc. This is normal as draft mode's liberal spacings cannot guarantee
  283. % perfect formatting.
  284. %
  285. % 8) New biographynophoto environment for biographies without photos.
  286. % Usage:
  287. %
  288. % \begin{biographynophoto}{author name}
  289. % biography text here
  290. % \end{biographynophoto}
  291. %
  292. % 9) Fixed bug that produced multiple table of contents entries for papers
  293. % with more than one biography. Also, biography now works better with
  294. % hyperref.
  295. %
  296. %10) New \sublargesize font size command provides for 11pt text in a 10pt
  297. % document. (Needed for things like author names.) For documents not
  298. % using 10pt normal size text, \sublargesize is currently identical
  299. % to \large.
  300. %
  301. %11) New \IEEEmembership command to provide correct font to indicate IEEE
  302. % membership for journal papers.
  303. %
  304. %12) Fixed author name line overflow problem when in journal mode. This
  305. % problem had been introduced in V1.5 in my rush to get \and to work for
  306. % conferences. \and is unneeded (and invalid) in journal mode. For
  307. % conference mode, \and will work as expected and features an optional
  308. % spacing argument. i.e., \and[\hspace{5ex}]
  309. % \and will default (recommended) to using \hfill which will result in
  310. % equal spacing between author blocks.
  311. %
  312. %13) New \authorblockN, \authorblockA and \authorrefmark commands to
  313. % facilitate easy formatting of author names, affiliations and cross
  314. % reference symbols, respectively, when in conference mode. These
  315. % three commands are to be used only for conference papers.
  316. % In conference mode, \author text is placed within a modified tabular
  317. % environment (somewhat like article.cls). So, within \author in conference
  318. % mode, you should not try to enclose multiple \\ within an environment or
  319. % command (other than the argument braces of \authorblockX{}). For example:
  320. %
  321. % \author{\authorblockN{{John Doe \\ Jane Doe}}} % WRONG!
  322. %
  323. % will generate an error.
  324. %
  325. % Note that font size/attribute changes will now persists across \\ within
  326. % \author. (But, not across author blocks nor across \and.)
  327. % However, with the new commands, there should be no need to alter any
  328. % font attributes within \author. All text sizing and spacing within
  329. % \author{} and the author block commands is per IEEE specs for both
  330. % conference and journal modes. (In conference mode, the author names
  331. % are only very slightly larger than the affiliations which are in normal
  332. % size.) For specialized applications you can alter the justification of
  333. % author lines by placing \hfill at the beginning or at the end of a line.
  334. % The interline spacing within \author is determined by the font attributes
  335. % that are in effect at the end of each line within author.
  336. %
  337. %14) Because the titles and author name blocks use different font sizes/styles
  338. % from the main text, it was possible that two column papers with titles that
  339. % span both columns (standard journal and conference papers, but not technotes)
  340. % with certain numbers of lines for the title and authors' name/affiliations
  341. % can cause underfull vbox problems (paragraphs with large spacings between
  342. % them) in the second column of the main text on the title page - if there were
  343. % no new sections, equations or figures in this column (they would provide some
  344. % needed rubber spacing). The use of things like special paper notices and
  345. % publisher ID marks also affected this issue. The problem could not happen
  346. % in the first column because the first column has a rubber length around the
  347. % heading of the first section. Furthermore, problems seldom occurred on pages
  348. % after the first as the margins had been chosen not to cause it with the popular
  349. % font sizes. Rubber lengths after the author names would not fix this problem.
  350. % Auto-calculating a "good" spacing after the title is a tad difficult
  351. % to do in LaTeX. However, I am pleased to report that V1.6 has this new
  352. % capability - "dynamically determined title spacing". IEEEtran will now
  353. % measure the height of all the title and author text in \maketitle
  354. % and then calculate a rigid (non-rubber) spacer to follow that meets
  355. % IEEE specs and also produces a \textheight on the title page that ensures
  356. % an integer number of normalsized lines on the rest of the page. Single
  357. % column papers, and two column papers with the title entirely in column
  358. % one (technotes) do not need dynamic rigid spacing and therefore use
  359. % standard rubber spacers.
  360. %
  361. % Note: This problem can still crop up if you use floats that span both
  362. % columns (i.e., figure*). It has been a decade+ long limitation with LaTeX
  363. % that the stretchable portion of \dbltextfloatsep is ignored.
  364. % If you get a problem with underful vbox warnings and paragraphs that "are
  365. % pulled apart" on page with a float that spans both columns, tweak the
  366. % space between the figure and the main text a little:
  367. %
  368. % \vskip 5pt
  369. % \end{figure*}
  370. %
  371. % If you can't find a value that fixes both columns, you are going to
  372. % have to put a rubber spacer somewhere in one or both of the columns.
  373. %
  374. %15) Because of change #14 above, those of you using \pubid will, as of V1.6,
  375. % have to place it *before* \maketitle in order for it have the intended
  376. % affect. The dynamic spacer algorithm must see if you are using \pubid when
  377. % \maketitle is called. \pubidadjcol works as before except that it now
  378. % has additional logic to prevent it from doing anything if \pubid was never
  379. % called.
  380. %
  381. %16) In some unusual, non-standard circumstances, an author may desire to
  382. % alter the spacing after the title area or put some unusual text above
  383. % the main text. For instance, to stop a bad break when a new section
  384. % occurs right at the start of the second page. This is difficult to do
  385. % when the title spans both columns of two column text since LaTeX treats
  386. % such title text as a type of float. A new command, \IEEEaftertitletext{},
  387. % gives access to the end of that produced by \maketitle. The types of
  388. % things that can go into \IEEEaftertitletext are the same as those into
  389. % \twocolumn[] - no \par, but \\ are OK. There is no restriction on the
  390. % range of spacings that can be used.
  391. % i.e., \IEEEaftertitletext{\vspace{-100pt}} will push the main text well
  392. % into the title and \IEEEaftertitletext{\vspace{100pt}} will push it far down
  393. % the page. You will have complete control. If used, place
  394. % \IEEEaftertitletext{} before \maketitle like \title and \author. IEEEtran's
  395. % dynamic title spacing intentionally does not take into consideration the
  396. % contents of \IEEEaftertitletext{} when determining the spacer after the title
  397. % area (otherwise it would try to second guess you), so the user will have
  398. % manually adjust the height of the contents in \IEEEaftertitletext{} if the
  399. % problem discussed in #14 above should develop. A safe bet is to keep
  400. % the height of contents of \IEEEaftertitletext{} to integer multiples of
  401. % \baselineskip, i.e., \IEEEaftertitletext{\vspace{-1\baselineskip}}
  402. %
  403. % Because it can result in an IEEE nonstandard format, the use of
  404. % \IEEEaftertitletext{} is discouraged. Possible uses include (1) the use of
  405. % IEEEtran for non-IEEE work with different title spacing requirements,
  406. % or (2) as an emergency manual override if a problem should develop in
  407. % IEEEtran's automatic spacing algorithm.
  408. %
  409. %17) completely rewritten \PARstart to:
  410. % a. no longer have problems when the user begins an environment
  411. % within the paragraph that uses \PARstart.
  412. % b. auto-detect and use the current font family
  413. % c. revise handling of the space at the end of the first word so that
  414. % interword glue will now work as normal.
  415. % d. produce correctly aligned edges for the (two) indented lines.
  416. %
  417. % Because the current font family is now auto-detected, there is no
  418. % longer any need for \CMPARstart - it is now the same as \PARstart.
  419. %
  420. %18) There is now a new "open box" Q.E.D. symbol (\QEDopen) as well as the
  421. % original default (\QED) closed one (\QEDclosed). Some journals use
  422. % the open form. To make \proof use the open form, just do:
  423. % \renewcommand{\QED}{\QEDopen}
  424. %
  425. %19) Additional \typeout{} notices added to warn the user when unusual
  426. % settings/commands are detected or as reminders to avoid common errors
  427. % when in conference mode.
  428. %
  429. %20) IEEEtran now provides \abovecaptionskip and \belowcaptionskip skip
  430. % registers because article class provides them and some packages
  431. % may error if they are missing. However, IEEEtran only uses
  432. % \abovecaptionskip for actual caption spacing.
  433. %
  434. %21) Fixed bug that prevented users from redefining the section headings
  435. % to use arabic digits. Thanks to Richardt H. Wilkinson for reporting
  436. % this bug.
  437. %
  438. %22) Code cleaned up to be more efficient with the use of TeX registers;
  439. % removed some old LaTeX 2.09 code; revised option processing to
  440. % LaTeX2e standard; eliminated unwanted "phantom" spaces in some
  441. % environments.
  442. %
  443. %23) Added new \IEEEeqnarray, \IEEEeqnarraybox, \IEEEeqnarrayboxm and
  444. % \IEEEeqnarrayboxt environments to provide superior alternatives to the
  445. % standard LaTeX \eqnarray, \array and \tabular. Additional new support
  446. % commands include \IEEEeqnarraydecl, \IEEEeqnarrayboxdecl,
  447. % \IEEEeqnarraymathstyle, \IEEEeqnarraytextstyle, \yesnumber. \IEEEnonumber,
  448. % \IEEEyesnumber, \IEEEyessubnumber, \IEEEeqnarraynumspace, \IEEEeqnarraymulticol,
  449. % \IEEEeqnarrayomit, \IEEEeqnarraydefcol, \IEEEeqnarraydefcolsep, \IEEEeqnarrayseprow,
  450. % \IEEEeqnarrayseprowcut, \IEEEeqnarrayrulerow, \IEEEeqnarraydblrulerowcut,
  451. % \IEEEeqnarraystrutmode, \IEEEeqnarraystrutsize, \IEEEeqnarraystrutsizeadd,
  452. % \IEEEvisiblestrutstrue, \IEEEvisiblestrutsfalse and \IEEEstrut.
  453. % These are documented in the user's guide.
  454. %
  455. %24) V1.6 changed back to using () around theorem names (which are also now in italics)
  456. % as this is what IEEE is using now. Thanks to Christian Peel for reporting this.
  457. % Also, when section numbers are used as the first part of theorem numbers, display
  458. % them in arabic, not Roman.
  459. %
  460. %25) New \IEEEtriggeratref{X} command allows a page break to be triggered just
  461. % before the given reference number "X". This is most useful when balancing
  462. % the columns on the last page and a \newpage between references is desired.
  463. % \IEEEtriggercmd{X} allows a different command to be executed at trigger.
  464. %
  465. %
  466. %*******
  467. % 7/2001 V1.5 (MDS) changes:
  468. %
  469. %
  470. % 1) Fixed \and within \author bug: (! Misplaced \crcr. \endtabular ->\crcr)
  471. % Thanks to Rainer Dorsch for discovering and reporting that \and
  472. % did not work.
  473. %
  474. % 2) Fixed the biography environment so that if a biography's text is shorter
  475. % than the area allocated for the photo, a collision with the next
  476. % biography does not occur. You can now put real graphics (using the
  477. % graphicx package) into the biography photo box with a new optional
  478. % argument of the biography command! For example:
  479. %
  480. % \begin{biography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{./tux.eps}}]{Linux Penguin}
  481. %
  482. % will use the specified graphic as the author's photo. The photo area is
  483. % exactly 1in wide by 1.25in high - as is done in IEEE Transactions. Try
  484. % to keep the same 4:5 aspect ratio if scanning/cropping your photos.
  485. % Note the need for the extra set of enclosing braces around the
  486. % \includegraphics. Without it, The LaTeX parser may get confused when it
  487. % sees the \includegraphics's brackets within the biography's optional
  488. % argument. Due to the length of the \includegraphics command, you may wish
  489. % to define your own shorthand form of it. I have not done so with IEEEtran
  490. % to prevent dependence on the graphicx package. If you do not use the
  491. % optional argument, or leave it empty, a standard frame box with the
  492. % words "Place Photo Here" will be used. If you want the space to remain
  493. % completely empty, you can do:
  494. %
  495. % \begin{biography}[\mbox{}]{The Invisible Man}
  496. %
  497. % The interface to biography's optional argument is into a
  498. % 1in X 1.25in minipage in which the argument text is centered both
  499. % horizontally and vertically:
  500. %
  501. % \begin{minipage}[b][1.25in][c]{1in}%
  502. % \centering
  503. % #1%
  504. % \end{minipage}
  505. %
  506. % Within the biography environment, \unitlength is set to 1in.
  507. % With this in mind, you can even design your own custom frameboxes.
  508. % For instance:
  509. %
  510. % \begin{biography}[\framebox(1,1.25){\parbox[][\height][c]{0.9in}{\centering PLACE\\ PHOTO\\ HERE}}]{Author Name}
  511. %
  512. % will yield the same type of result as the default photo box.
  513. %
  514. % Thanks to Herbert Voss for discovering the collision bug, suggesting the ability
  515. % to handle graphics and providing some prototype code.
  516. %
  517. %
  518. %
  519. %*******
  520. % 3/2001 V1.4 (MDS) changes:
  521. %
  522. %
  523. % 1) New "draftcls" and "final" options have been added.
  524. % Thanks to Dragan Cvetkovic for suggesting an option like draftcls.
  525. %
  526. % 2) Documentation changes to reflect the fact that this IEEEtran.cls
  527. % is no longer beta test.
  528. %
  529. % 3) Slightly revised caption sizes. Figure and table captions are now
  530. % in \footnotesize, not \small as before.
  531. %
  532. % 4) Allow user to control figure caption justification. IEEEtran.cls
  533. % normally defaults to left justified as is done in Transactions.
  534. % However, for conferences, you may wish to issue the command:
  535. % \centerfigcaptionstrue
  536. % in the preamble. Short (less than one line long) figure captions
  537. % will then be centered. Multi-line figure captions will always be
  538. % properly left justified. V1.6: This is already done for you when
  539. % using the conference mode.
  540. %
  541. %
  542. %
  543. %*******
  544. % 1/2001 V1.3
  545. % Michael Shell (MDS) made extensive changes and additions:
  546. %
  547. %
  548. % BUGS FIXED (and many others too numerous to mention!):
  549. % 1) Fixed improper alignment with itemized, enumerated and
  550. % description lists. Added new controls to these three
  551. % environments so that it is easy to get the alignment IEEE
  552. % uses. Furthermore, the itemize, enumerate and description lists
  553. % no longer force a new paragraph to begin at the end the list
  554. % (\par). (Sometimes lists are used within paragraphs.)
  555. %
  556. % 2) JVH's fixes now allow things like $\mathbf{N}(0,P(0))$
  557. % to work properly without needing the extra braces:
  558. % ${\mathbf{N}}(0,P(0))$. There is no longer any dependence
  559. % on the "rawfonts" and "oldlfont" packages. Thanks Juergen!
  560. %
  561. % 3) Fixed underfull hbox errors and incorrect reference number
  562. % alignment when the number of references in the bibliography
  563. % exceeded 9 entries (which is almost every paper!).
  564. %
  565. % 4) Removed dependence on the LaTeX sizexx.clo files.
  566. % Now, 9pt documents should work correctly even on systems that
  567. % lack a size9.clo file. This is most often used in conjunction
  568. % with the option "technote" for "correspondence" papers like those
  569. % in IEEE Transactions on Information Theory. For virtually all
  570. % other papers, 10pt is used and so it is the default.
  571. % Some improper font sizes have been corrected. \footnotesize is
  572. % now 8pt in 9pt docs, so footnotes in technotes should be the
  573. % correct size now.
  574. %
  575. % 5) Added \interlinepenalty within the bibliography section to discourage
  576. % LaTeX from breaking within a reference. IEEE almost never breaks within
  577. % a reference and when they do it is usually in technotes
  578. % (correspondence papers). You may get an underfull vbox warning in the
  579. % bibliography indicating that the spacing just before the "REFERENCES"
  580. % section is larger than normal, but the final result will be more like
  581. % what IEEE will publish. See the comments in the BIBLIOGRAPHY section
  582. % around line 2034 below if you want to change this behavior.
  583. %
  584. % 6) No longer "blows up" when you use \paragraph and have a table
  585. % of contents.
  586. %
  587. % 7) Theorem environment changed, (but for V1.6, back to the old way, sigh).
  588. %
  589. % 8) Figure captions adjusted: IEEE left (not center) justifies
  590. % figure captions (for journals) and does not indent figure caption text.
  591. %
  592. % 9) Adjusted some spacings in the table of contents(TOC))/list-of-figures/
  593. % list-of-tables so that section/table numbers will not so easily
  594. % collide with the titles. Section VIII was usually the worst offender.
  595. % Still doesn't right justify the section numbers, but neither does
  596. % article.cls (This must be why LaTeX likes the x.y.z section numbering
  597. % scheme unlike I, II, III, etc. of IEEE. )
  598. % It may be "normal" as it is (left justified). sigh.
  599. %
  600. %10) Now uses "index terms" now as a heading instead of "keywords".
  601. % Furthermore, the "index terms" and "abstract" headings are in bold
  602. % italic. This is how IEEE does things.
  603. %
  604. %11) \thebibliography and \biography now put entries into
  605. % the table of contents for you.
  606. %
  607. % *******
  608. %
  609. %
  610. %
  611. %
  612. %
  613. % *******
  614. % 9/2000 (JVH) changes: (now designated as V1.2)
  615. %
  616. % made some corrections to get closer to LaTeX2e
  617. % 20000906 Juergen v.Hagen
  618. % vonhagen@ihefiji.etec.uni-karlsruhe.de
  619. %
  620. % Permission to redistribute granted as of December 2000.
  621. % *******
  622. %
  623. %
  624. %
  625. %
  626. %
  627. % *******
  628. %
  629. % 1996 (JWD) LaTeX2e version: (now designated as V1.1)
  630. %
  631. % In the most recent TeXhax digest, there was a request for a copy of
  632. % IEEEtrans.sty modified to work with LaTeX2e. I have a version I
  633. % modified to make it IEEEtrans.cls, which I have sent to the person
  634. % making the request and am now sending to you to consider posting to
  635. % the archives.
  636. % --
  637. % Jon Dixon
  638. % dixonj@colorado.edu
  639. % http://spot.colorado.edu/~dixonj/
  640. %
  641. %*******
  642. %
  643. %
  644. %
  645. %
  646. %
  647. %*******
  648. %
  649. % 30-August-1993 original LaTeX 2.09 version (IEEEtran.sty),
  650. % (now designated as V1.0):
  651. %
  652. % by Gerry Murray and Silvano Balemi
  653. % Automatic Control Lab, ETH Zurich, Switzerland
  654. % balemi@aut.ee.ethz.ch
  655. %
  656. %*******
  657. %
  658. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  659. %
  660. %
  661. %
  662. %
  663. %
  664. \ProvidesClass{ieeeconf}[2004/1/15 revision V1.6b by Pradeep Misra]
  665. %\ProvidesClass{IEEEtran}[2002/11/18 revision V1.6b by Michael Shell]
  666. %\typeout{-- See the "IEEEtran_HOWTO" manual for usage information.}
  667. %\typeout{-- The source comments contain changelog notes.}
  668. \NeedsTeXFormat{LaTeX2e}
  669. % define new needed flags to indicate document options
  670. % and set a few "failsafe" defaults
  671. \newif\if@twocolumnmode \global\@twocolumnmodetrue
  672. \newif\if@draftversion \global\@draftversionfalse
  673. \newif\if@draftclsmode \global\@draftclsmodefalse
  674. \newif\if@draftclsmodefoot \global\@draftclsmodefootfalse
  675. \newif\if@confmode \global\@confmodefalse
  676. \newif\if@peerreviewoption \global\@peerreviewoptionfalse
  677. \newif\if@peerreviewcaoption \global\@peerreviewcaoptionfalse
  678. % we HAVE to turn off technote as there is no
  679. % "not a tech note" option
  680. \newif\if@technote \global\@technotefalse
  681. % V1.6 we allow the user to control whether or not the
  682. % font interword spacings are tuned to be more like
  683. % that of IEEE. The default is to tune things.
  684. \newif\if@fonttunesettings \global\@fonttunesettingstrue
  685. % V1.6b flag to show if using a4paper
  686. \newif\if@IEEEusingAfourpaper \global\@IEEEusingAfourpaperfalse
  687. % IEEEtran class scratch pad registers
  688. % dimen
  689. \newdimen\@IEEEtrantmpdimenA
  690. \newdimen\@IEEEtrantmpdimenB
  691. % count
  692. \newcount\@IEEEtrantmpcountA
  693. \newcount\@IEEEtrantmpcountB
  694. % token list
  695. \newtoks\@IEEEtrantmptoksA
  696. % we use \@IEEEptsize so that we can ID the point size (even for 9pt docs)
  697. % as well as LaTeX's \@ptsize to retain some compatability with some
  698. % external packages
  699. \def\@IEEEptsize{10}
  700. \def\@ptsize{0}
  701. % LaTeX does not support 9pt, so we set \@ptsize to 0 - same as that of 10pt
  702. \DeclareOption{9pt}{\def\@IEEEptsize{9}\def\@ptsize{0}}
  703. \DeclareOption{10pt}{\def\@IEEEptsize{10}\def\@ptsize{0}}
  704. \DeclareOption{11pt}{\def\@IEEEptsize{11}\def\@ptsize{1}}
  705. \DeclareOption{12pt}{\def\@IEEEptsize{12}\def\@ptsize{2}}
  706. % \@IEEEmarginE is the side margin for equal margins
  707. % \@IEEEmarginW is the wider side margin when the margins are not equal
  708. % NOTE: BOTH of the above margins are as they appear
  709. % on the paper - they are NOT offset by 1 inch
  710. %\DeclareOption{letterpaper}{\setlength{\paperheight}{11in}%
  711. % \setlength{\paperwidth}{8.5in}%
  712. % \def\@IEEEmarginE{0.680in}%
  713. % \def\@IEEEmarginW{0.775in}%
  714. % \@IEEEusingAfourpaperfalse}
  715. %
  716. %
  717. %\DeclareOption{a4paper}{\setlength{\paperheight}{297mm}%
  718. % \setlength{\paperwidth}{210mm}%
  719. % \def\@IEEEmarginE{14.32mm}%
  720. % \def\@IEEEmarginW{17mm}
  721. % \@IEEEusingAfourpapertrue}
  722. %
  723. % [2004/1/15 revision V1.6b by Pradeep Misra]
  724. \DeclareOption{letterpaper}{\setlength{\paperheight}{11in}%
  725. \setlength{\paperwidth}{8.5in}%
  726. % \setlength{\topmargin}{0in}%
  727. \def\@IEEEmarginE{0.75in}%
  728. \def\@IEEEmarginW{0.75in}}
  729. \DeclareOption{a4paper}{\setlength{\paperheight}{297mm}%
  730. \setlength{\paperwidth}{210mm}%
  731. \setlength{\topmargin}{-0.69in}%
  732. \def\@IEEEmarginE{13.15mm}%
  733. \def\@IEEEmarginW{0.75in}}
  734. \DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
  735. \DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
  736. \DeclareOption{onecolumn}{\global\@twocolumnmodefalse}
  737. % the file twocolumn.sty is not read as it changes \textwidth.
  738. \DeclareOption{twocolumn}{\global\@twocolumnmodetrue}
  739. % If the user selects draft, then this class AND any packages
  740. % will go into draft mode.
  741. \DeclareOption{draft}{\global\@draftversiontrue \global\@draftclsmodetrue
  742. \global\@draftclsmodefoottrue}
  743. % draftcls is for a draft mode which will not affect any packages
  744. % used by the document.
  745. \DeclareOption{draftcls}{\global\@draftversionfalse \global\@draftclsmodetrue
  746. \global\@draftclsmodefoottrue}
  747. % draftclsnofoot is like draftcls, but without the footer.
  748. \DeclareOption{draftclsnofoot}{\global\@draftversionfalse \global\@draftclsmodetrue
  749. \global\@draftclsmodefootfalse}
  750. % we provide a final option just for completeness (article.cls has one)
  751. \DeclareOption{final}{\global\@draftversionfalse \global\@draftclsmodefalse
  752. \global\@draftclsmodefootfalse}
  753. \DeclareOption{journal}{\global\@peerreviewoptionfalse \global\@peerreviewcaoptionfalse
  754. \global\@confmodefalse \global\@technotefalse}
  755. \DeclareOption{conference}{\global\@peerreviewoptionfalse \global\@peerreviewcaoptionfalse
  756. \global\@confmodetrue \global\@technotefalse}
  757. \DeclareOption{technote}{\global\@peerreviewoptionfalse \global\@peerreviewcaoptionfalse
  758. \global\@confmodefalse \global\@technotetrue}
  759. \DeclareOption{peerreview}{\global\@peerreviewoptiontrue \global\@peerreviewcaoptionfalse
  760. \global\@confmodefalse \global\@technotefalse}
  761. \DeclareOption{peerreviewca}{\global\@peerreviewoptiontrue \global\@peerreviewcaoptiontrue
  762. \global\@confmodefalse \global\@technotefalse}
  763. \DeclareOption{nofonttune}{\global\@fonttunesettingsfalse}
  764. % IEEE uses Times font, so we'll default to times.
  765. % These three commands make up the entire times.sty package.
  766. \renewcommand{\sfdefault}{phv}
  767. \renewcommand{\rmdefault}{ptm}
  768. \renewcommand{\ttdefault}{pcr}
  769. % enable Times now - so that all class options can see the correct font families
  770. \normalfont\selectfont
  771. % default to US letter paper, 10pt, twocolumn, one sided, final, journal
  772. \ExecuteOptions{letterpaper,10pt,twocolumn,oneside,final,journal}
  773. % overrride these defaults per user requests
  774. \ProcessOptions
  775. % we can send console reminder messages to the user here
  776. \AtEndDocument{\if@confmode%
  777. \typeout{}%
  778. \typeout{** Conference Paper **}%
  779. \typeout{Before submitting the final camera ready copy, remember to:}%
  780. \typeout{}%
  781. \typeout{ 1. Manually equalize the lengths of two columns on the last page}%
  782. \typeout{ of your paper;}%
  783. \typeout{}%
  784. \typeout{ 2. Ensure that any PostScript and/or PDF output post-processing}%
  785. \typeout{ uses only Type 1 fonts and that every step in the generation}%
  786. \typeout{ process uses the US letter (8.5in X 11in) paper size.}%
  787. \typeout{}%
  788. \fi}
  789. % warn about the use of single column other than for draft mode
  790. \if@twocolumnmode\else%
  791. \if@draftclsmode\else%
  792. \typeout{** ATTENTION: Single column mode is not normally used with IEEE publications.}%
  793. \fi%
  794. \fi
  795. % V1.6, if the user is using pdflatex, go ahead and set the output paper size.
  796. % Otherwise, we declare the papersize via a \special for dvips.
  797. % We keep the tests within braces because otherwise, if not using pdflatex,
  798. % \pdfpageheight and \pdfpagewidth will be set to \relax - possibly affecting
  799. % similar tests of other packages.
  800. {\@ifundefined{pdfpageheight}{% not using pdflatex, setup paper size for dvips
  801. \if@IEEEusingAfourpaper
  802. \special{papersize=210mm,297mm}%
  803. \else
  804. \special{papersize=8.5in,11in}%
  805. \fi}%
  806. {% using pdftex, set paper size for pdftex
  807. \global\pdfpageheight\paperheight\global\pdfpagewidth\paperwidth}}
  808. % The idea hinted here is for LaTeX to generate markleft{} and markright{}
  809. % automatically for you after you enter \author{}, \journal{},
  810. % \journaldate{}, journalvol{}, \journalnum{}, etc.
  811. % However, there may be some backward compatibility issues here as
  812. % well as some special applications for IEEEtran.cls and special issues
  813. % that may require the flexible \markleft{}, \markright{} and/or \markboth{}.
  814. % We'll leave this as an open future suggestion.
  815. %\newcommand{\journal}[1]{\def\@journal{#1}}
  816. %\def\@journal{}
  817. % pointsize values
  818. % used with ifx to determine the document's normal size
  819. \def\@IEEEptsizenine{9}
  820. \def\@IEEEptsizeten{10}
  821. \def\@IEEEptsizeeleven{11}
  822. \def\@IEEEptsizetwelve{12}
  823. % FONT DEFINITIONS (No sizexx.clo file needed)
  824. % V1.6 revised font sizes, displayskip values and
  825. % revised normalsize baselineskip to reduce underfull vbox problems
  826. % on the 58pc = 696pt = 9.5in text height we want
  827. % normalsize #lines/column baselineskip (aka leading)
  828. % 9pt 63 11.0476pt (truncated down)
  829. % 10pt 58 12pt (exact)
  830. % 11pt 52 13.3846pt (truncated down)
  831. % 12pt 50 13.92pt (exact)
  832. %
  833. % we need to store the nominal baselineskip for the given font size
  834. % in case baselinestretch ever changes.
  835. \newskip\@IEEEnormalsizefontbaselineskip
  836. \@IEEEnormalsizefontbaselineskip\baselineskip
  837. \ifx\@IEEEptsize\@IEEEptsizenine
  838. \typeout{-- This is a 9 point document.}
  839. \def\normalsize{\@setfontsize{\normalsize}{9}{11.0476pt}}%
  840. \setlength{\@IEEEnormalsizefontbaselineskip}{11.0476pt}%
  841. \normalsize
  842. \abovedisplayskip 1.5ex plus3pt minus1pt%
  843. \belowdisplayskip \abovedisplayskip%
  844. \abovedisplayshortskip 0pt plus3pt%
  845. \belowdisplayshortskip 1.5ex plus3pt minus1pt
  846. \def\small{\@setfontsize{\small}{8.5}{10pt}}
  847. \def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}}
  848. \def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}}
  849. \def\tiny{\@setfontsize{\tiny}{5}{6pt}}
  850. % sublargesize is the same as large - 10pt
  851. \def\sublargesize{\@setfontsize{\sublargesize}{10}{12pt}}
  852. \def\large{\@setfontsize{\large}{10}{12pt}}
  853. \def\Large{\@setfontsize{\Large}{12}{14pt}}
  854. \def\LARGE{\@setfontsize{\LARGE}{14}{17pt}}
  855. \def\huge{\@setfontsize{\huge}{17}{20pt}}
  856. \def\Huge{\@setfontsize{\Huge}{20}{24pt}}
  857. \fi
  858. % Check if we have selected 10 points
  859. \ifx\@IEEEptsize\@IEEEptsizeten
  860. \typeout{-- This is a 10 point document.}
  861. \def\normalsize{\@setfontsize{\normalsize}{10}{12.00pt}}%
  862. \setlength{\@IEEEnormalsizefontbaselineskip}{12pt}%
  863. \normalsize
  864. \abovedisplayskip 1.5ex plus4pt minus2pt%
  865. \belowdisplayskip \abovedisplayskip%
  866. \abovedisplayshortskip 0pt plus4pt%
  867. \belowdisplayshortskip 1.5ex plus4pt minus2pt
  868. \def\small{\@setfontsize{\small}{9}{10pt}}
  869. \def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}}
  870. \def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}}
  871. \def\tiny{\@setfontsize{\tiny}{5}{6pt}}
  872. % sublargesize is a tad smaller than large - 11pt
  873. \def\sublargesize{\@setfontsize{\sublargesize}{11}{13.4pt}}
  874. \def\large{\@setfontsize{\large}{12}{14pt}}
  875. \def\Large{\@setfontsize{\Large}{14}{17pt}}
  876. \def\LARGE{\@setfontsize{\LARGE}{16}{20pt}}
  877. \def\huge{\@setfontsize{\huge}{20}{24pt}}
  878. \def\Huge{\@setfontsize{\Huge}{24}{28pt}}
  879. \fi
  880. % Check if we have selected 11 points
  881. \ifx\@IEEEptsize\@IEEEptsizeeleven
  882. \typeout{-- This is an 11 point document.}
  883. \def\normalsize{\@setfontsize{\normalsize}{11}{13.3846pt}}%
  884. \setlength{\@IEEEnormalsizefontbaselineskip}{13.3846pt}%
  885. \normalsize
  886. \abovedisplayskip 1.5ex plus5pt minus3pt%
  887. \belowdisplayskip \abovedisplayskip%
  888. \abovedisplayshortskip 0pt plus5pt%
  889. \belowdisplayshortskip 1.5ex plus5pt minus3pt
  890. \def\small{\@setfontsize{\small}{10}{12pt}}
  891. \def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}}
  892. \def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}}
  893. \def\tiny{\@setfontsize{\tiny}{6}{7pt}}
  894. % sublargesize is the same as large - 12pt
  895. \def\sublargesize{\@setfontsize{\sublargesize}{12}{14pt}}
  896. \def\large{\@setfontsize{\large}{12}{14pt}}
  897. \def\Large{\@setfontsize{\Large}{14}{17pt}}
  898. \def\LARGE{\@setfontsize{\LARGE}{17}{20pt}}
  899. \def\huge{\@setfontsize{\huge}{20}{24pt}}
  900. \def\Huge{\@setfontsize{\Huge}{24}{28pt}}
  901. \fi
  902. % Check if we have selected 12 points
  903. \ifx\@IEEEptsize\@IEEEptsizetwelve
  904. \typeout{-- This is a 12 point document.}
  905. \def\normalsize{\@setfontsize{\normalsize}{12}{13.92pt}}%
  906. \setlength{\@IEEEnormalsizefontbaselineskip}{13.92pt}%
  907. \normalsize
  908. \abovedisplayskip 1.5ex plus6pt minus4pt%
  909. \belowdisplayskip \abovedisplayskip%
  910. \abovedisplayshortskip 0pt plus6pt%
  911. \belowdisplayshortskip 1.5ex plus6pt minus4pt
  912. \def\small{\@setfontsize{\small}{10}{12pt}}
  913. \def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}}
  914. \def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}}
  915. \def\tiny{\@setfontsize{\tiny}{6}{7pt}}
  916. % sublargesize is the same as large - 14pt
  917. \def\sublargesize{\@setfontsize{\sublargesize}{14}{17pt}}
  918. \def\large{\@setfontsize{\large}{14}{17pt}}
  919. \def\Large{\@setfontsize{\Large}{17}{20pt}}
  920. \def\LARGE{\@setfontsize{\LARGE}{20}{24pt}}
  921. \def\huge{\@setfontsize{\huge}{22}{26pt}}
  922. \def\Huge{\@setfontsize{\Huge}{24}{28pt}}
  923. \fi
  924. % V1.6 The Computer Modern Fonts will issue a substitution warning for
  925. % 24pt titles (24.88pt is used instead) increase the substitution
  926. % tolerance to turn off this warning
  927. \def\fontsubfuzz{.9pt}
  928. % However, the default (and correct) Times font will scale exactly as needed.
  929. % warn the user in case they forget to use the 9pt option with
  930. % technote
  931. \if@technote%
  932. \ifx\@IEEEptsize\@IEEEptsizenine\else%
  933. \typeout{** ATTENTION: Technotes are normally 9pt documents.}%
  934. \fi%
  935. \fi
  936. % set \baselinestretch
  937. \def\baselinestretch{1}
  938. \if@draftclsmode% draft mode uses larger than normal spacing
  939. \def\baselinestretch{1.5} % controls line spacing for draft version
  940. \fi % some people may like 1.7 or greater
  941. % so that there will be even more space
  942. % for hand written comments
  943. \normalsize % make \baselinestretch take affect
  944. % V1.6
  945. % store the normalsize baselineskip
  946. \newskip\normalsizebaselineskip
  947. \normalsizebaselineskip=\baselineskip\relax
  948. % store the nominal value of jot
  949. \newskip\normaljot
  950. \normaljot=0.25\normalsizebaselineskip\relax
  951. % set \jot
  952. \jot=\normaljot\relax
  953. % abstract and keywords are in \small, except
  954. % for 9pt docs in which they are in \footnotesize
  955. % Since 9pt docs use an 8pt footnotesize, \small
  956. % becomes a rather awkward 8.5pt
  957. \let\@IEEEabskeysecsize=\small
  958. \ifx\@IEEEptsize\@IEEEptsizenine
  959. \let\@IEEEabskeysecsize=\footnotesize
  960. \fi
  961. % V1.6, we are now going to fine tune the interword spacing
  962. % The default interword glue for Times under TeX appears to use a
  963. % nominal interword spacing of 25% (relative to the font size, i.e., 1em)
  964. % a maximum of 40% and a minimum of 19%.
  965. % For example, 10pt text uses an interword glue of:
  966. %
  967. % 2.5pt plus 1.49998pt minus 0.59998pt
  968. %
  969. % However, IEEE allows for a more generous range which reduces the need
  970. % for hyphenation, especially for two column text. Furthermore, IEEE
  971. % tends to use a little bit more nominal space between the words.
  972. % IEEE's interword spacing percentages appear to be:
  973. % 35% nominal
  974. % 23% minimum
  975. % 50% maximum
  976. % (They may even be using a tad more for the largest fonts such as 24pt.)
  977. %
  978. % for bold text, IEEE increases the spacing a little more:
  979. % 37.5% nominal
  980. % 23% minimum
  981. % 55% maximum
  982. % here are the interword spacing ratios we'll use
  983. % for medium (normal weight)
  984. \def\@IEEEinterspaceratioM{0.35}
  985. \def\@IEEEinterspaceMINratioM{0.23}
  986. \def\@IEEEinterspaceMAXratioM{0.50}
  987. % for bold
  988. \def\@IEEEinterspaceratioB{0.375}
  989. \def\@IEEEinterspaceMINratioB{0.23}
  990. \def\@IEEEinterspaceMAXratioB{0.55}
  991. % command to revise the interword spacing for the current font under TeX:
  992. % \fontdimen2 = nominal interword space
  993. % \fontdimen3 = interword stretch
  994. % \fontdimen4 = interword shrink
  995. % since all changes to the \fontdimen are global, we can enclose these commands
  996. % in braces to confine any font attribute or length changes
  997. \def\@@@IEEEsetfontdimens#1#2#3{{%
  998. \setlength{\@IEEEtrantmpdimenB}{\f@size pt}% grab the font size in pt, could use 1em instead.
  999. \setlength{\@IEEEtrantmpdimenA}{#1\@IEEEtrantmpdimenB}%
  1000. \fontdimen2\font=\@IEEEtrantmpdimenA\relax
  1001. \addtolength{\@IEEEtrantmpdimenA}{-#2\@IEEEtrantmpdimenB}%
  1002. \fontdimen3\font=-\@IEEEtrantmpdimenA\relax
  1003. \setlength{\@IEEEtrantmpdimenA}{#1\@IEEEtrantmpdimenB}%
  1004. \addtolength{\@IEEEtrantmpdimenA}{-#3\@IEEEtrantmpdimenB}%
  1005. \fontdimen4\font=\@IEEEtrantmpdimenA\relax}}
  1006. % revise the interword spacing for each font weight
  1007. \def\@@IEEEsetfontdimens{{%
  1008. \mdseries
  1009. \@@@IEEEsetfontdimens{\@IEEEinterspaceratioM}{\@IEEEinterspaceMAXratioM}{\@IEEEinterspaceMINratioM}%
  1010. \bfseries
  1011. \@@@IEEEsetfontdimens{\@IEEEinterspaceratioB}{\@IEEEinterspaceMAXratioB}{\@IEEEinterspaceMINratioB}%
  1012. }}
  1013. % revise the interword spacing for each font shape
  1014. % \slshape is not often used for IEEE work and is not altered here. The \scshape caps are
  1015. % already a tad too large in the free LaTeX fonts (as compared to what IEEE uses) so we
  1016. % won't alter these either.
  1017. \def\@IEEEsetfontdimens{{%
  1018. \normalfont
  1019. \@@IEEEsetfontdimens
  1020. \normalfont\itshape
  1021. \@@IEEEsetfontdimens
  1022. }}
  1023. % if the nofonttune class option is not given, revise the interword spacing
  1024. % for each font size (and shape and weight). Only the \rmfamily is done here
  1025. % as \ttfamily uses a fixed spacing and \sffamily is not used as the main
  1026. % text of IEEE papers.
  1027. \def\@IEEEtunefonts{%
  1028. \if@fonttunesettings
  1029. {\selectfont\rmfamily
  1030. \tiny\@IEEEsetfontdimens
  1031. \scriptsize\@IEEEsetfontdimens
  1032. \footnotesize\@IEEEsetfontdimens
  1033. \small\@IEEEsetfontdimens
  1034. \normalsize\@IEEEsetfontdimens
  1035. \sublargesize\@IEEEsetfontdimens
  1036. \large\@IEEEsetfontdimens
  1037. \LARGE\@IEEEsetfontdimens
  1038. \huge\@IEEEsetfontdimens
  1039. \Huge\@IEEEsetfontdimens}\fi}
  1040. % if needed, revise the interword spacing now - in case IEEEtran makes any default
  1041. % length measurements, and make sure all the default fonts are loaded
  1042. \@IEEEtunefonts
  1043. % and again at the start of the document in case the user loaded different fonts
  1044. \AtBeginDocument{\@IEEEtunefonts}
  1045. % V1.6
  1046. % LaTeX is a little to quick to use hyphenations
  1047. % So, we increase the penalty for their use and raise
  1048. % the badness level that triggers an underfull hbox
  1049. % warning. The author may still have to tweak things,
  1050. % but the appearance will be much better "right out
  1051. % of the box" than that under V1.5 and prior.
  1052. % TeX default is 50
  1053. \hyphenpenalty=750
  1054. % If we didn't adjust the interword spacing, 2200 might be better.
  1055. % The TeX default is 1000
  1056. \hbadness=1350
  1057. % IEEE does not use extra spacing after punctuation
  1058. \frenchspacing
  1059. % we want to maintain textheight as an integer multiple of
  1060. % \baselineskip. Keep \topsep in with this game plan too.
  1061. \topskip=\baselineskip
  1062. % set sizes and margins
  1063. % Book typesetting is a world where point and pica (12pt) reign supreme.
  1064. % IEEE textwidth is 21 pica. They have a colsep of 1 pica.
  1065. % V1.6 conference mode margins
  1066. \if@confmode
  1067. % [2004/10/15 revision V1.6c by Pradeep Misra]
  1068. \topmargin -0.25in
  1069. \textheight 9.5in % The standard for conferences
  1070. % However, we will adjust this a tad so that an integer number
  1071. % of lines will always fit on each page
  1072. % The baselineskip (leading) for each document point size is used
  1073. % to determine these values
  1074. % rounded up an extra 0.1pt or so to prevent trouble with any rounding errors
  1075. \ifx\@IEEEptsize\@IEEEptsizenine\textheight=682.0pt\fi %9.4722in 61 lines/page
  1076. \ifx\@IEEEptsize\@IEEEptsizeten\textheight=684.0pt\fi %9.5in 57 lines/page
  1077. \ifx\@IEEEptsize\@IEEEptsizeeleven\textheight=673.2pt\fi %9.2611in 51 lines/page
  1078. \ifx\@IEEEptsize\@IEEEptsizetwelve\textheight=676.8pt\fi %9.2473in 47 lines/page
  1079. \else
  1080. \topmargin -49.0pt
  1081. \textheight 58pc % = 9.63in or 696pt
  1082. \fi
  1083. % [2004/1/15 revision V1.6b by Pradeep Misra]
  1084. %\textwidth 43pc % 2 x 21pc + 1pc = 43pc
  1085. %\columnsep 1pc
  1086. \textwidth 7.0in % 2 x 21pc + 1pc = 43pc
  1087. \columnsep 0.2in
  1088. % IEEE MARGIN INFO and new \overrideIEEEmargins command
  1089. % V1.6 revised margins again
  1090. % IEEE wants the side margins to be equal under both US letter
  1091. % and A4 paper
  1092. %
  1093. % However, for those of you who need to bind copies of your work
  1094. % (for review distribution, etc.) the \overrideIEEEmargins
  1095. % command will shift the text a tad away from the binding
  1096. % edge.
  1097. %
  1098. %
  1099. % the default side margins are equal
  1100. \oddsidemargin \@IEEEmarginE
  1101. \addtolength{\oddsidemargin}{-1in}% compensate for LaTeX's 1in offset
  1102. \evensidemargin \@IEEEmarginE
  1103. \addtolength{\evensidemargin}{-1in}% compensate for LaTeX's 1in offset
  1104. % execute \overrideIEEEmargins in the preamble to make the side margin
  1105. % near the spine slightly wider so that the paper will be much more
  1106. % agreeable to being bound. \overrideIEEEmargins will have no effect
  1107. % when in draft or draftcls mode.
  1108. \def\overrideIEEEmargins{\if@draftclsmode\relax\else%
  1109. \typeout{** ATTENTION: Overriding IEEE standard margins (line \the\inputlineno).}%
  1110. \if@twoside
  1111. % for double sided, odd pages have the bound side on the left
  1112. % make this the wide margin
  1113. \oddsidemargin\@IEEEmarginW
  1114. % and even pages have the narrow margin on the left
  1115. % as they are bound on the right
  1116. % evensidemargin is to be the narrow margin
  1117. % calculate the narrow margin and set evensidemargin
  1118. \setlength{\evensidemargin}{\paperwidth}%
  1119. \addtolength{\evensidemargin}{-\@IEEEmarginW}%
  1120. \addtolength{\evensidemargin}{-\textwidth}%
  1121. \else
  1122. % for single sided the bound side is always on the left
  1123. % make this the wide margin
  1124. \oddsidemargin\@IEEEmarginW
  1125. \evensidemargin\@IEEEmarginW
  1126. \fi
  1127. \addtolength{\oddsidemargin}{-1.0in}% compensate for LaTeX's 1in offset
  1128. \addtolength{\evensidemargin}{-1.0in}%
  1129. \fi}
  1130. \parindent 1.0em
  1131. % conference papers do not have headers, other papers need
  1132. % to reserve space for them
  1133. \if@confmode
  1134. \headsep 0in
  1135. \headheight 0in
  1136. \else
  1137. \headsep 0.25in
  1138. \headheight 12pt
  1139. \fi
  1140. % V1.6, if things get too close, go ahead and let them touch
  1141. \lineskip 0pt
  1142. \normallineskip 0pt
  1143. \lineskiplimit 0pt
  1144. \normallineskiplimit 0pt
  1145. % The distance from the lower edge of the text body to the
  1146. % footline
  1147. \footskip 0.4in
  1148. % normally zero, should be relative to font height.
  1149. % put in a little rubber to help stop some bad breaks (underfull vboxes)
  1150. \parskip 0ex plus 0.2ex minus 0.1ex
  1151. % draft mode settings override that of all other modes
  1152. % provides a nice 1" margin all around the paper and extra
  1153. % space between the lines for editor's comments
  1154. \if@draftclsmode
  1155. \headsep 0.25in
  1156. \headheight 12pt
  1157. % want 1" from top of paper to text
  1158. \setlength{\topmargin}{-\headsep}%
  1159. \addtolength{\topmargin}{-\headheight}%
  1160. % we want 1in side margins regardless of paper type
  1161. \oddsidemargin 0in
  1162. \evensidemargin 0in
  1163. % set the text width - start with the entire page
  1164. \setlength{\textwidth}{\paperwidth}%
  1165. % subtract for the 1" top/bottom margins
  1166. \addtolength{\textwidth}{-2.0in}%
  1167. % give them a textheight that won't have underfull
  1168. % vbox problems, but can't help them if they later change
  1169. % baselinestretch from its default
  1170. \setlength{\textheight}{\paperheight}%
  1171. \addtolength{\textheight}{-2.0in}%
  1172. % subtract of first line taken by \topskip
  1173. \addtolength{\textheight}{-1\topskip}%
  1174. % now digitize \textheight so that the length after
  1175. % the first line is an integer multiple of \baselineskip
  1176. % to cut down on underfull vbox errors in draft mode
  1177. \divide\textheight by \baselineskip%
  1178. \multiply\textheight by \baselineskip%
  1179. % add back the first line
  1180. \addtolength{\textheight}{\topskip}%
  1181. \fi
  1182. % margin note stuff
  1183. \marginparsep 10pt
  1184. \marginparwidth 20pt
  1185. \marginparpush 25pt
  1186. % LIST SPACING CONTROLS
  1187. % Controls the amount of EXTRA spacing
  1188. % above and below \trivlist
  1189. % Both \list and IED lists override this.
  1190. % However, \trivlist will use this as will most
  1191. % things built from \trivlist like the \center
  1192. % environment.
  1193. \topsep 0.5\baselineskip
  1194. % Controls the additional spacing around lists preceded
  1195. % or followed by blank lines. IEEE does not increase
  1196. % spacing before or after paragraphs so it is set to zero.
  1197. % \z@ is the same as zero, but faster.
  1198. \partopsep \z@
  1199. % Controls the spacing between paragraphs in lists.
  1200. % IEEE does not increase spacing before or after paragraphs
  1201. % so this is also zero.
  1202. % With IEEEtran.cls, global changes to
  1203. % this value DO affect lists (but not IED lists).
  1204. \parsep \z@
  1205. % Controls the extra spacing between list items.
  1206. % IEEE does not put extra spacing between items.
  1207. % With IEEEtran.cls, global changes to this value DO affect
  1208. % lists (but not IED lists).
  1209. \itemsep \z@
  1210. % \itemindent is the amount to indent the FIRST line of a list
  1211. % item. It is auto set to zero within the \list environment. To alter
  1212. % it, you have to do so when you call the \list.
  1213. % However, IEEE uses this for the theorem environment
  1214. % There is an alternative value for this near \leftmargini below
  1215. \itemindent -1em
  1216. % \leftmargin, the spacing from the left margin of the main text to
  1217. % the left of the main body of a list item is set by \list.
  1218. % Hence this statement does nothing for lists.
  1219. % But, quote and verse do use it for indention.
  1220. \leftmargin 2em
  1221. % we retain this stuff from the older IEEEtran.cls so that \list
  1222. % will work the same way as before. However, itemize, enumerate and
  1223. % description (IED) could care less about what these are as they
  1224. % all are overridden.
  1225. \leftmargini 2em
  1226. %\itemindent 2em % Alternative values: sometimes used.
  1227. %\leftmargini 0em
  1228. \leftmarginii 1em
  1229. \leftmarginiii 1.5em
  1230. \leftmarginiv 1.5em
  1231. \leftmarginv 1.0em
  1232. \leftmarginvi 1.0em
  1233. \labelsep 0.5em
  1234. \labelwidth \z@
  1235. % The old IEEEtran.cls behavior of \list is retained.
  1236. % However, the new V1.3 IED list environments override all the
  1237. % @list stuff (\@listX is called within \list for the
  1238. % appropriate level just before the user's list_decl is called).
  1239. % \topsep is now 2pt as IEEE puts a little extra space around
  1240. % lists - used by those non-IED macros that depend on \list.
  1241. % Note that \parsep and \itemsep are not redefined as in
  1242. % the sizexx.clo \@listX (which article.cls uses) so global changes
  1243. % of these values DO affect \list
  1244. %
  1245. \def\@listi{\leftmargin\leftmargini \topsep 2pt plus 1pt minus 1pt}
  1246. \let\@listI\@listi
  1247. \def\@listii{\leftmargin\leftmarginii\labelwidth\leftmarginii%
  1248. \advance\labelwidth-\labelsep \topsep 2pt}
  1249. \def\@listiii{\leftmargin\leftmarginiii\labelwidth\leftmarginiii%
  1250. \advance\labelwidth-\labelsep \topsep 2pt}
  1251. \def\@listiv{\leftmargin\leftmarginiv\labelwidth\leftmarginiv%
  1252. \advance\labelwidth-\labelsep \topsep 2pt}
  1253. \def\@listv{\leftmargin\leftmarginv\labelwidth\leftmarginv%
  1254. \advance\labelwidth-\labelsep \topsep 2pt}
  1255. \def\@listvi{\leftmargin\leftmarginvi\labelwidth\leftmarginvi%
  1256. \advance\labelwidth-\labelsep \topsep 2pt}
  1257. % IEEE uses 5) not 5.
  1258. \def\labelenumi{\theenumi)} \def\theenumi{\arabic{enumi}}
  1259. % IEEE uses a) not (a)
  1260. \def\labelenumii{\theenumii)} \def\theenumii{\alph{enumii}}
  1261. % IEEE uses iii) not iii.
  1262. \def\labelenumiii{\theenumiii)} \def\theenumiii{\roman{enumiii}}
  1263. % IEEE uses A) not A.
  1264. \def\labelenumiv{\theenumiv)} \def\theenumiv{\Alph{enumiv}}
  1265. % exactly the same as in article.cls
  1266. \def\p@enumii{\theenumi}
  1267. \def\p@enumiii{\theenumi(\theenumii)}
  1268. \def\p@enumiv{\p@enumiii\theenumiii}
  1269. % itemized list label styles
  1270. \def\labelitemi{$\scriptstyle\bullet$}
  1271. \def\labelitemii{\textbf{--}}
  1272. \def\labelitemiii{$\ast$}
  1273. \def\labelitemiv{$\cdot$}
  1274. % IEEEtran.cls version numbers, provided as of V1.3
  1275. % These values serve as a way a .tex file can
  1276. % determine if the new features are provided.
  1277. % The version number of this IEEEtrans.cls can be obtained from
  1278. % these values. i.e., V1.4
  1279. % KEEP THESE AS INTEGERS! i.e., NO {4a} or anything like that-
  1280. % (no need to enumerate "a" minor changes here)
  1281. \def\IEEEtransversionmajor{1}
  1282. \def\IEEEtransversionminor{6}
  1283. % **** V1.3 ENHANCEMENTS ****
  1284. % Itemize, Enumerate and Description (IED) List Controls
  1285. % ***************************
  1286. %
  1287. %
  1288. % IEEE seems to use at least two different values by
  1289. % which ITEMIZED list labels are indented to the right
  1290. % For The Journal of Lightwave Technology (JLT) and The Journal
  1291. % on Selected Areas in Communications (JSAC), they tend to use
  1292. % an indention equal to \parindent. For Transactions on Communications
  1293. % they tend to indent ITEMIZED lists a little more--- 1.3\parindent.
  1294. % We'll provide both values here for you so that you can choose
  1295. % which one you like in your document using a command such as:
  1296. % setlength{\IEEEilabelindent}{\IEEEilabelindentB}
  1297. \newdimen\IEEEilabelindentA
  1298. \IEEEilabelindentA \parindent
  1299. \newdimen\IEEEilabelindentB
  1300. \IEEEilabelindentB 1.3\parindent
  1301. % However, we'll default to using \parindent
  1302. % which makes more sense to me
  1303. \newdimen\IEEEilabelindent
  1304. \IEEEilabelindent \IEEEilabelindentA
  1305. % This controls the default amount the enumerated list labels
  1306. % are indented to the right.
  1307. % Normally, this is the same as the paragraph indention
  1308. \newdimen\IEEEelabelindent
  1309. \IEEEelabelindent \parindent
  1310. % This controls the default amount the description list labels
  1311. % are indented to the right.
  1312. % Normally, this is the same as the paragraph indention
  1313. \newdimen\IEEEdlabelindent
  1314. \IEEEdlabelindent \parindent
  1315. % This is the value actually used within the IED lists.
  1316. % The IED environments automatically set its value to
  1317. % one of the three values above, so global changes do
  1318. % not have any effect
  1319. \newdimen\labelindent
  1320. \labelindent \parindent
  1321. % The actual amount labels will be indented is
  1322. % \labelindent multiplied by the factor below
  1323. % corresponding to the level of nesting depth
  1324. % This provides a means by which the user can
  1325. % alter the effective \labelindent for deeper
  1326. % levels
  1327. % There may not be such a thing as correct "standard IEEE"
  1328. % values. What IEEE actually does may depend on the specific
  1329. % circumstances.
  1330. % The first list level almost always has full indention.
  1331. % The second levels I've seen have only 75% of the normal indentation
  1332. % Three level or greater nestings are very rare. I am guessing
  1333. % that they don't use any indentation.
  1334. \def\IEEElabelindentfactori{1.0} % almost always one
  1335. \def\IEEElabelindentfactorii{0.75} % 0.0 or 1.0 may be used in some cases
  1336. \def\IEEElabelindentfactoriii{0.0} % 0.75? 0.5? 0.0?
  1337. \def\IEEElabelindentfactoriv{0.0}
  1338. \def\IEEElabelindentfactorv{0.0}
  1339. \def\IEEElabelindentfactorvi{0.0}
  1340. % value actually used within IED lists, it is auto
  1341. % set to one of the 6 values above
  1342. % global changes here have no effect
  1343. \def\labelindentfactor{1.0}
  1344. % This controls the default spacing between the end of the IED
  1345. % list labels and the list text, when normal text is used for
  1346. % the labels.
  1347. \newdimen\IEEEiednormlabelsep
  1348. \IEEEiednormlabelsep 0.6em
  1349. % This controls the default spacing between the end of the IED
  1350. % list labels and the list text, when math symbols are used for
  1351. % the labels (nomenclature lists). IEEE usually increases the
  1352. % spacing in these cases
  1353. \newdimen\IEEEiedmathlabelsep
  1354. \IEEEiedmathlabelsep 1.2em
  1355. % This controls the extra vertical separation put above and
  1356. % below each IED list. IEEE usually puts a little extra spacing
  1357. % around each list. However, this spacing is barely noticeable.
  1358. \newskip\IEEEiedtopsep
  1359. \IEEEiedtopsep 2pt plus 1pt minus 1pt
  1360. % This command is executed within each IED list environment
  1361. % at the beginning of the list. You can use this to set the
  1362. % parameters for some/all your IED list(s) without disturbing
  1363. % global parameters that affect things other than lists.
  1364. % i.e., renewcommand{\iedlistdecl}{\setlength{\labelsep}{5em}}
  1365. % will alter the \labelsep for the next list(s) until
  1366. % \iedlistdecl is redefined.
  1367. \def\iedlistdecl{\relax}
  1368. % This command provides an easy way to set \leftmargin based
  1369. % on the \labelwidth, \labelsep and the argument \labelindent
  1370. % Usage: \calcleftmargin{width-to-indent-the-label}
  1371. % output is in the \leftmargin variable, i.e., effectively:
  1372. % \leftmargin = argument + \labelwidth + \labelsep
  1373. % Note controlled spacing here, shield end of lines with %
  1374. \def\calcleftmargin#1{\setlength{\leftmargin}{#1}%
  1375. \addtolength{\leftmargin}{\labelwidth}%
  1376. \addtolength{\leftmargin}{\labelsep}}
  1377. % This command provides an easy way to set \labelwidth to the
  1378. % width of the given text. It is the same as
  1379. % \settowidth{\labelwidth}{label-text}
  1380. % and useful as a shorter alternative.
  1381. % Typically used to set \labelwidth to be the width
  1382. % of the longest label in the list
  1383. \def\setlabelwidth#1{\settowidth{\labelwidth}{#1}}
  1384. % When this command is executed, IED lists will use the
  1385. % IEEEiedmathlabelsep label separation rather than the normal
  1386. % spacing. To have an effect, this command must be executed via
  1387. % the \iedlistdecl or within the option of the IED list
  1388. % environments.
  1389. \def\usemathlabelsep{\setlength{\labelsep}{\IEEEiedmathlabelsep}}
  1390. % A flag which controls whether the IED lists automatically
  1391. % calculate \leftmargin from \labelindent, \labelwidth and \labelsep
  1392. % Useful if you want to specify your own \leftmargin
  1393. % This flag must be set (\nocalcleftmargintrue or \nocalcleftmarginfalse)
  1394. % via the \iedlistdecl or within the option of the IED list
  1395. % environments to have an effect.
  1396. \newif\ifnocalcleftmargin
  1397. \nocalcleftmarginfalse
  1398. % A flag which controls whether \labelindent is multiplied by
  1399. % the \labelindentfactor for each list level.
  1400. % This flag must be set via the \iedlistdecl or within the option
  1401. % of the IED list environments to have an effect.
  1402. \newif\ifnolabelindentfactor
  1403. \nolabelindentfactorfalse
  1404. % internal variable to indicate type of IED label
  1405. % justification
  1406. % 0 - left; 1 - center; 2 - right
  1407. \def\@iedjustify{0}
  1408. % commands to allow the user to control IED
  1409. % label justifications. Use these commands within
  1410. % the IED environment option or in the \iedlistdecl
  1411. % Note that changing the normal list justifications
  1412. % is nonstandard and IEEE may not like it if you do so!
  1413. % I include these commands as they may be helpful to
  1414. % those who are using these enhanced list controls for
  1415. % other non-IEEE related LaTeX work.
  1416. % itemize and enumerate automatically default to right
  1417. % justification, description defaults to left.
  1418. \def\iedlabeljustifyl{\def\@iedjustify{0}}%left
  1419. \def\iedlabeljustifyc{\def\@iedjustify{1}}%center
  1420. \def\iedlabeljustifyr{\def\@iedjustify{2}}%right
  1421. % commands to save to and restore from the list parameter copies
  1422. % this allows us to set all the list parameters within
  1423. % the list_decl and prevent \list (and its \@list)
  1424. % from overriding any of our parameters
  1425. % V1.6 use \edefs instead of dimen's to conserve dimen registers
  1426. % Note controlled spacing here, shield end of lines with %
  1427. \def\@IEEEsavelistparams{\edef\@IEEEiedtopsep{\the\topsep}%
  1428. \edef\@IEEEiedlabelwidth{\the\labelwidth}%
  1429. \edef\@IEEEiedlabelsep{\the\labelsep}%
  1430. \edef\@IEEEiedleftmargin{\the\leftmargin}%
  1431. \edef\@IEEEiedpartopsep{\the\partopsep}%
  1432. \edef\@IEEEiedparsep{\the\parsep}%
  1433. \edef\@IEEEieditemsep{\the\itemsep}%
  1434. \edef\@IEEEiedrightmargin{\the\rightmargin}%
  1435. \edef\@IEEEiedlistparindent{\the\listparindent}%
  1436. \edef\@IEEEieditemindent{\the\itemindent}}
  1437. % Note controlled spacing here
  1438. \def\@IEEErestorelistparams{\topsep\@IEEEiedtopsep\relax%
  1439. \labelwidth\@IEEEiedlabelwidth\relax%
  1440. \labelsep\@IEEEiedlabelsep\relax%
  1441. \leftmargin\@IEEEiedleftmargin\relax%
  1442. \partopsep\@IEEEiedpartopsep\relax%
  1443. \parsep\@IEEEiedparsep\relax%
  1444. \itemsep\@IEEEieditemsep\relax%
  1445. \rightmargin\@IEEEiedrightmargin\relax%
  1446. \listparindent\@IEEEiedlistparindent\relax%
  1447. \itemindent\@IEEEieditemindent\relax}
  1448. % v1.6b provide original LaTeX IED list environments
  1449. % note that latex.ltx defines \itemize and \enumerate, but not \description
  1450. % which must be created by the base classes
  1451. % save original LaTeX itemize and enumerate
  1452. \let\LaTeXitemize\itemize
  1453. \let\endLaTeXitemize\enditemize
  1454. \let\LaTeXenumerate\enumerate
  1455. \let\endLaTeXenumerate\endenumerate
  1456. % provide original LaTeX description environment from article.cls
  1457. \newenvironment{LaTeXdescription}
  1458. {\list{}{\labelwidth\z@ \itemindent-\leftmargin
  1459. \let\makelabel\descriptionlabel}}
  1460. {\endlist}
  1461. \newcommand*\descriptionlabel[1]{\hspace\labelsep
  1462. \normalfont\bfseries #1}
  1463. % override LaTeX's default IED lists
  1464. \def\itemize{\@IEEEitemize}
  1465. \def\enditemize{\@endIEEEitemize}
  1466. \def\enumerate{\@IEEEenumerate}
  1467. \def\endenumerate{\@endIEEEenumerate}
  1468. \def\description{\@IEEEdescription}
  1469. \def\enddescription{\@endIEEEdescription}
  1470. % provide the user with aliases - may help those using packages that
  1471. % override itemize, enumerate, or description
  1472. \def\IEEEitemize{\@IEEEitemize}
  1473. \def\endIEEEitemize{\@endIEEEitemize}
  1474. \def\IEEEenumerate{\@IEEEenumerate}
  1475. \def\endIEEEenumerate{\@endIEEEenumerate}
  1476. \def\IEEEdescription{\@IEEEdescription}
  1477. \def\endIEEEdescription{\@endIEEEdescription}
  1478. % V1.6 we want to keep the IEEEtran IED list definitions as our own internal
  1479. % commands so they are protected against redefinition
  1480. \def\@IEEEitemize{\@ifnextchar[{\@@IEEEitemize}{\@@IEEEitemize[\relax]}}
  1481. \def\@IEEEenumerate{\@ifnextchar[{\@@IEEEenumerate}{\@@IEEEenumerate[\relax]}}
  1482. \def\@IEEEdescription{\@ifnextchar[{\@@IEEEdescription}{\@@IEEEdescription[\relax]}}
  1483. \def\@endIEEEitemize{\endlist}
  1484. \def\@endIEEEenumerate{\endlist}
  1485. \def\@endIEEEdescription{\endlist}
  1486. % DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS
  1487. % AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS
  1488. % IEEEtran itemized list MDS 1/2001
  1489. % Note controlled spacing here, shield end of lines with %
  1490. \def\@@IEEEitemize[#1]{%
  1491. \ifnum\@itemdepth>3\relax\@toodeep\else%
  1492. \ifnum\@listdepth>5\relax\@toodeep\else%
  1493. \advance\@itemdepth\@ne%
  1494. \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
  1495. % get the labelindentfactor for this level
  1496. \advance\@listdepth\@ne% we need to know what the level WILL be
  1497. \edef\labelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
  1498. \advance\@listdepth-\@ne% undo our increment
  1499. \def\@iedjustify{2}% right justified labels are default
  1500. % set other defaults
  1501. \nocalcleftmarginfalse%
  1502. \nolabelindentfactorfalse%
  1503. \topsep\IEEEiedtopsep%
  1504. \labelindent\IEEEilabelindent%
  1505. \labelsep\IEEEiednormlabelsep%
  1506. \partopsep 0ex%
  1507. \parsep 0ex%
  1508. \itemsep 0ex%
  1509. \rightmargin 0em%
  1510. \listparindent 0em%
  1511. \itemindent 0em%
  1512. % calculate the label width
  1513. % the user can override this later if
  1514. % they specified a \labelwidth
  1515. \settowidth{\labelwidth}{\csname labelitem\romannumeral\the\@itemdepth\endcsname}%
  1516. \@IEEEsavelistparams% save our list parameters
  1517. \list{\csname\@itemitem\endcsname}{%
  1518. \@IEEErestorelistparams% override any list{} changes
  1519. % to our globals
  1520. \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel
  1521. \iedlistdecl% let user alter parameters
  1522. #1\relax%
  1523. % If the user has requested not to use the
  1524. % labelindent factor, don't revise \labelindent
  1525. \ifnolabelindentfactor\relax%
  1526. \else\labelindent=\labelindentfactor\labelindent%
  1527. \fi%
  1528. % Unless the user has requested otherwise,
  1529. % calculate our left margin based
  1530. % on \labelindent, \labelwidth and
  1531. % \labelsep
  1532. \ifnocalcleftmargin\relax%
  1533. \else\calcleftmargin{\labelindent}%
  1534. \fi}\fi\fi}%
  1535. % DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS
  1536. % AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS
  1537. % IEEEtran enumerate list MDS 1/2001
  1538. % Note controlled spacing here, shield end of lines with %
  1539. \def\@@IEEEenumerate[#1]{%
  1540. \ifnum\@enumdepth>3\relax\@toodeep\else%
  1541. \ifnum\@listdepth>5\relax\@toodeep\else%
  1542. \advance\@enumdepth\@ne%
  1543. \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
  1544. % get the labelindentfactor for this level
  1545. \advance\@listdepth\@ne% we need to know what the level WILL be
  1546. \edef\labelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
  1547. \advance\@listdepth-\@ne% undo our increment
  1548. \def\@iedjustify{2}% right justified labels are default
  1549. % set other defaults
  1550. \nocalcleftmarginfalse%
  1551. \nolabelindentfactorfalse%
  1552. \topsep\IEEEiedtopsep%
  1553. \labelindent\IEEEelabelindent%
  1554. \labelsep\IEEEiednormlabelsep%
  1555. \partopsep 0ex%
  1556. \parsep 0ex%
  1557. \itemsep 0ex%
  1558. \rightmargin 0em%
  1559. \listparindent 0em%
  1560. \itemindent 0em%
  1561. % calculate the label width
  1562. % We'll set it to the width suitable for all labels using
  1563. % normalfont 1) to 9)
  1564. % The user can override this later
  1565. \settowidth{\labelwidth}{9)}%
  1566. \@IEEEsavelistparams% save our list parameters
  1567. \list{\csname label\@enumctr\endcsname}{\usecounter{\@enumctr}%
  1568. \@IEEErestorelistparams% override any list{} changes
  1569. % to our globals
  1570. \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel
  1571. \iedlistdecl% let user alter parameters
  1572. #1\relax%
  1573. % If the user has requested not to use the
  1574. % labelindent factor, don't revise \labelindent
  1575. \ifnolabelindentfactor\relax%
  1576. \else\labelindent=\labelindentfactor\labelindent%
  1577. \fi%
  1578. % Unless the user has requested otherwise,
  1579. % calculate our left margin based
  1580. % on \labelindent, \labelwidth and
  1581. % \labelsep
  1582. \ifnocalcleftmargin\relax%
  1583. \else\calcleftmargin{\labelindent}%
  1584. \fi}\fi\fi}%
  1585. % DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS
  1586. % AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS
  1587. % IEEEtran description list MDS 1/2001
  1588. % Note controlled spacing here, shield end of lines with %
  1589. \def\@@IEEEdescription[#1]{%
  1590. \ifnum\@listdepth>5\relax\@toodeep\else%
  1591. % get the labelindentfactor for this level
  1592. \advance\@listdepth\@ne% we need to know what the level WILL be
  1593. \edef\labelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
  1594. \advance\@listdepth-\@ne% undo our increment
  1595. \def\@iedjustify{0}% left justified labels are default
  1596. % set other defaults
  1597. \nocalcleftmarginfalse%
  1598. \nolabelindentfactorfalse%
  1599. \topsep\IEEEiedtopsep%
  1600. \labelindent\IEEEdlabelindent%
  1601. % assume normal labelsep
  1602. \labelsep\IEEEiednormlabelsep%
  1603. \partopsep 0ex%
  1604. \parsep 0ex%
  1605. \itemsep 0ex%
  1606. \rightmargin 0em%
  1607. \listparindent 0em%
  1608. \itemindent 0em%
  1609. % Bogus label width in case the user forgets
  1610. % to set it.
  1611. % TIP: If you want to see what a variable's width is you
  1612. % can use the TeX command \showthe\width-variable to
  1613. % display it on the screen during compilation
  1614. % (This might be helpful to know when you need to find out
  1615. % which label is the widest)
  1616. \settowidth{\labelwidth}{Hello}%
  1617. \@IEEEsavelistparams% save our list parameters
  1618. \list{}{\@IEEErestorelistparams% override any list{} changes
  1619. % to our globals
  1620. \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel
  1621. \iedlistdecl% let user alter parameters
  1622. #1\relax%
  1623. % If the user has requested not to use the
  1624. % labelindent factor, don't revise \labelindent
  1625. \ifnolabelindentfactor\relax%
  1626. \else\labelindent=\labelindentfactor\labelindent%
  1627. \fi%
  1628. % Unless the user has requested otherwise,
  1629. % calculate our left margin based
  1630. % on \labelindent, \labelwidth and
  1631. % \labelsep
  1632. \ifnocalcleftmargin\relax%
  1633. \else\calcleftmargin{\labelindent}\relax%
  1634. \fi}\fi}
  1635. % v1.6b we use one makelabel that does justification as needed.
  1636. \def\@IEEEiedmakelabel#1{\relax\if\@iedjustify 0\relax
  1637. \makebox[\labelwidth][l]{\normalfont #1}\else
  1638. \if\@iedjustify 1\relax
  1639. \makebox[\labelwidth][c]{\normalfont #1}\else
  1640. \makebox[\labelwidth][r]{\normalfont #1}\fi\fi}
  1641. % VERSE and QUOTE
  1642. \def\verse{\let\\=\@centercr
  1643. \list{}{\itemsep\z@ \itemindent -1.5em \listparindent \itemindent
  1644. \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]}
  1645. \let\endverse\endlist
  1646. \def\quotation{\list{}{\listparindent 1.5em \itemindent\listparindent
  1647. \rightmargin\leftmargin \parsep 0pt plus 1pt}\item[]}
  1648. \let\endquotation=\endlist
  1649. \def\quote{\list{}{\rightmargin\leftmargin}\item[]}
  1650. \let\endquote=\endlist
  1651. % \titlepage
  1652. % provided only for backward compatibility. \maketitle is the correct
  1653. % way to create the title page.
  1654. \newif\if@restonecol
  1655. \def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
  1656. \else \newpage \fi \thispagestyle{empty}\c@page\z@}
  1657. \def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi}
  1658. % standard values from article.cls
  1659. \arraycolsep 5pt
  1660. \arrayrulewidth .4pt
  1661. \doublerulesep 2pt
  1662. \tabcolsep 6pt
  1663. \tabbingsep 0.5em
  1664. %% FOOTNOTES
  1665. %
  1666. %\skip\footins 10pt plus 4pt minus 2pt
  1667. % V1.6 respond to changes in font size
  1668. % space added above the footnotes (if present)
  1669. \skip\footins 0.9\baselineskip plus 0.4\baselineskip minus 0.2\baselineskip
  1670. % V1.6, we need to make \footnotesep responsive to changes
  1671. % in \baselineskip or strange spacings will result when in
  1672. % draft mode. Here is a little LaTeX secret - \footnotesep
  1673. % determines the height of an invisible strut that is placed
  1674. % *above* the baseline of footnotes after the first. Since
  1675. % LaTeX considers the space for characters to be 0.7/baselineskip
  1676. % above the baseline and 0.3/baselineskip below it, we need to
  1677. % use 0.7/baselineskip as a \footnotesep to maintain equal spacing
  1678. % between all the lines of the footnotes. IEEE often uses a tad
  1679. % more, so use 0.8\baselineskip. This slightly larger value also helps
  1680. % the text to clear the footnote marks. Note that \thanks now uses
  1681. % its own value of \footnotesep.
  1682. {\footnotesize
  1683. \global\footnotesep 0.8\baselineskip}
  1684. \skip\@mpfootins = \skip\footins
  1685. \fboxsep = 3pt
  1686. \fboxrule = .4pt
  1687. % V1.6 use 1em, the use LaTeX2e's \@makefnmark
  1688. % Note that IEEE normally *left* aligns the footnote marks, so we don't need
  1689. % box resizing tricks here.
  1690. \long\def\@makefntext#1{\parindent 1em\indent\hbox{\@makefnmark}#1}% V1.6 use 1em
  1691. \def\footnoterule{}
  1692. % V1.6 do not allow LaTeX to break a footnote across multiple pages
  1693. \interfootnotelinepenalty=10000
  1694. % V1.6 discourage breaks within equations
  1695. % Note that amsmath normally sets this to 10000,
  1696. % but LaTeX2e normally uses 100.
  1697. \interdisplaylinepenalty=2500
  1698. \if@technote
  1699. \setcounter{secnumdepth}{3}
  1700. \else
  1701. \setcounter{secnumdepth}{4}
  1702. \fi
  1703. \newcounter{section}
  1704. \newcounter{subsection}[section]
  1705. \newcounter{subsubsection}[subsection]
  1706. \newcounter{paragraph}[subsubsection]
  1707. % used only by IEEEtran's IEEEeqnarray as other packages may
  1708. % have their own, different, implementations
  1709. \newcounter{IEEEsubequation}[equation]
  1710. % as shown when called by user from \ref, \label and in table of contents
  1711. \def\thesection{\Roman{section}} % I
  1712. \def\thesubsection{\thesection-\Alph{subsection}} % I-A
  1713. \def\thesubsubsection{\thesubsection.\arabic{subsubsection}} % I-A.1
  1714. \def\theparagraph{\thesubsubsection.\alph{paragraph}} % I-A.1.a
  1715. \def\theequation{\arabic{equation}} % 1
  1716. \def\theIEEEsubequation{\theequation\alph{IEEEsubequation}} % 1a (used only by IEEEtran's IEEEeqnarray)
  1717. % Main text forms (how shown in main text headings)
  1718. % V1.6, using \thesection in \thesectiondis allows changes
  1719. % in the former to automatically appear in the latter
  1720. \def\thesectiondis{\thesection.} % I.
  1721. \def\thesubsectiondis{\Alph{subsection}.} % B.
  1722. \def\thesubsubsectiondis{\arabic{subsubsection})} % 3)
  1723. \def\theparagraphdis{\alph{paragraph})} % d)
  1724. % just like LaTeX2e's \@eqnnum
  1725. \def\theequationdis{{\normalfont \normalcolor (\theequation)}}% (1)
  1726. % IEEEsubequation used only by IEEEtran's IEEEeqnarray
  1727. \def\theIEEEsubequationdis{{\normalfont \normalcolor (\theIEEEsubequation)}}% (1a)
  1728. % redirect LaTeX2e's equation number display and all that depend on
  1729. % it, through IEEEtran's \theequationdis
  1730. \def\@eqnnum{\theequationdis}
  1731. % LIST OF FIGURES AND TABLES AND TABLE OF CONTENTS
  1732. %
  1733. \def\@pnumwidth{1.55em}
  1734. \def\@tocrmarg{2.55em}
  1735. \def\@dotsep{4.5}
  1736. \setcounter{tocdepth}{3}
  1737. % adjusted some spacings here so that section numbers will not easily
  1738. % collide with the section titles.
  1739. % VIII; VIII-A; and VIII-A.1 are usually the worst offenders.
  1740. % MDS 1/2001
  1741. \def\tableofcontents{\section*{Contents}\@starttoc{toc}}
  1742. \def\l@section#1#2{\addpenalty{\@secpenalty}\addvspace{1.0em plus 1pt}%
  1743. \@tempdima 2.75em \begingroup \parindent \z@ \rightskip \@pnumwidth%
  1744. \parfillskip-\@pnumwidth {\bfseries\leavevmode #1}\hfil\hbox to\@pnumwidth{\hss #2}\par%
  1745. \endgroup}
  1746. % argument format #1:level, #2:labelindent,#3:labelsep
  1747. \def\l@subsection{\@dottedtocline{2}{2.75em}{3.75em}}
  1748. \def\l@subsubsection{\@dottedtocline{3}{6.5em}{4.5em}}
  1749. % must provide \l@ defs for ALL sublevels EVEN if tocdepth
  1750. % is such as they will not appear in the table of contents
  1751. % these defs are how TOC knows what level these things are!
  1752. \def\l@paragraph{\@dottedtocline{4}{6.5em}{5.5em}}
  1753. \def\l@subparagraph{\@dottedtocline{5}{6.5em}{6.5em}}
  1754. \def\listoffigures{\section*{List of Figures}\@starttoc{lof}}
  1755. \def\l@figure{\@dottedtocline{1}{0em}{2.75em}}
  1756. \def\listoftables{\section*{List of Tables}\@starttoc{lot}}
  1757. \let\l@table\l@figure
  1758. %% Definitions for floats
  1759. %%
  1760. %% Normal Floats
  1761. \floatsep 1\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
  1762. \textfloatsep 1.7\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip
  1763. \@fptop 0pt plus 1fil
  1764. \@fpsep 0.75\baselineskip plus 2fil
  1765. \@fpbot 0pt plus 1fil
  1766. \def\topfraction{1.0}
  1767. \def\bottomfraction{.4}
  1768. \def\floatpagefraction{0.8}
  1769. \def\textfraction{.2}
  1770. %% Double Column Floats
  1771. \dblfloatsep 1\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
  1772. \dbltextfloatsep 1.7\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip
  1773. % Note that it would be nice if the rubber here actually worked in LaTeX2e.
  1774. % There is a long standing limitation in LaTeX, first discovered (to the best
  1775. % of my knowledge) by Alan Jeffrey in 1992. LaTeX ignores the stretchable
  1776. % portion of \dbltextfloatsep, and as a result, double column figures can and
  1777. % do result in an non-integer number of lines in the main text columns with
  1778. % underfull vbox errors as a consequence. A post to comp.text.tex
  1779. % by Donald Arseneau confirms that this had not yet been fixed in 1998.
  1780. % IEEEtran V1.6 will fix this problem for you in the titles, but it doesn't
  1781. % protect you from other double floats. Happy vspace'ing.
  1782. \@dblfptop 0pt plus 1fil
  1783. \@dblfpsep 0.75\baselineskip plus 2fil
  1784. \@dblfpbot 0pt plus 1fil
  1785. \def\dbltopfraction{1.0}
  1786. \def\dblfloatpagefraction{0.8}
  1787. \setcounter{dbltopnumber}{4}
  1788. \intextsep 1\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
  1789. \setcounter{topnumber}{2}
  1790. \setcounter{bottomnumber}{2}
  1791. \setcounter{totalnumber}{4}
  1792. %% redefine CAPTION
  1793. % V1.4 add user control for short figure caption justification
  1794. \newif\ifcenterfigcaptions
  1795. % V1.6 set the default according to conference mode
  1796. \if@confmode
  1797. \centerfigcaptionstrue
  1798. \else
  1799. \centerfigcaptionsfalse
  1800. \fi
  1801. % article class provides these, we should too.
  1802. \newlength\abovecaptionskip
  1803. \newlength\belowcaptionskip
  1804. % but only \abovecaptionskip is used above figure captions and *below* table
  1805. % captions
  1806. \setlength\abovecaptionskip{0.5\baselineskip}
  1807. \setlength\belowcaptionskip{0pt}
  1808. % V1.6 create hooks in case the caption spacing ever needs to be
  1809. % overridden by a user
  1810. \def\@IEEEfigurecaptionsepspace{\vskip\abovecaptionskip\relax}%
  1811. \def\@IEEEtablecaptionsepspace{\vskip\abovecaptionskip\relax}%
  1812. % 1.6b revise caption system so that \@makecaption uses two arguments
  1813. % as with LaTeX2e. Otherwise, there will be problems when using hyperref.
  1814. \def\@IEEEtablestring{table}
  1815. \long\def\@makecaption#1#2{%
  1816. % test if is a for a figure or table
  1817. \ifx\@captype\@IEEEtablestring%
  1818. % if a table, do table caption
  1819. \begin{center}{\footnotesize #1}\\{\footnotesize\scshape #2}\end{center}%
  1820. \@IEEEtablecaptionsepspace% V1.6 was a hard coded 8pt
  1821. % if not a table, format it as a figure
  1822. \else
  1823. \@IEEEfigurecaptionsepspace% V1.6 was a hard coded 5pt
  1824. % 3/2001 use footnotesize, not small; use two nonbreaking spaces, not one
  1825. \setbox\@tempboxa\hbox{\footnotesize #1.~~ #2}%
  1826. \ifdim \wd\@tempboxa >\hsize%
  1827. % if caption is longer than a line, let it wrap around
  1828. \setbox\@tempboxa\hbox{\footnotesize #1.~~ }%
  1829. \parbox[t]{\hsize}{\footnotesize \noindent\unhbox\@tempboxa#2}%
  1830. % if caption is shorter than a line,
  1831. % allow user to control short figure caption justification (left or center)
  1832. \else%
  1833. \ifcenterfigcaptions \hbox to\hsize{\footnotesize\hfil\box\@tempboxa\hfil}%
  1834. \else \hbox to\hsize{\footnotesize\box\@tempboxa\hfil}%
  1835. \fi\fi\fi}
  1836. \newcounter{figure}
  1837. \def\thefigure{\@arabic\c@figure}
  1838. \def\fps@figure{tbp}
  1839. \def\ftype@figure{1}
  1840. \def\ext@figure{lof}
  1841. \def\fnum@figure{Fig.~\thefigure}
  1842. \def\figure{\@float{figure}}
  1843. \let\endfigure\end@float
  1844. \@namedef{figure*}{\@dblfloat{figure}}
  1845. \@namedef{endfigure*}{\end@dblfloat}
  1846. \newcounter{table}
  1847. \def\thetable{\@Roman\c@table}
  1848. \def\fps@table{tbp}
  1849. \def\ftype@table{2}
  1850. \def\ext@table{lot}
  1851. \def\fnum@table{TABLE~\thetable}
  1852. % V1.6 IEEE uses 8pt text for tables
  1853. % to default to footnotesize, we hack into LaTeX2e's \@floatboxreset and pray
  1854. \def\table{\def\@floatboxreset{\reset@font\footnotesize\@setminipage}\@float{table}}
  1855. \let\endtable\end@float
  1856. % v1.6b double column tables need to default to footnotesize as well.
  1857. \@namedef{table*}{\def\@floatboxreset{\reset@font\footnotesize\@setminipage}\@dblfloat{table}}
  1858. \@namedef{endtable*}{\end@dblfloat}
  1859. %%
  1860. %% START OF IEEEeqnarry DEFINITIONS
  1861. %%
  1862. %% Inspired by the concepts, examples, and previous works of LaTeX
  1863. %% coders and developers such as Donald Arseneau, Fred Bartlett,
  1864. %% David Carlisle, Tony Liu, Frank Mittelbach, Piet van Oostrum,
  1865. %% Roland Winkler and Mark Wooding.
  1866. %% I don't make the claim that my work here is even near their calibre. ;)
  1867. % hook to allow easy changeover to IEEEtran.cls/tools.sty error reporting
  1868. \def\@IEEEclspkgerror{\ClassError{IEEEtran}}
  1869. \newif\if@IEEEeqnarraystarform% flag to indicate if the environment was called as the star form
  1870. \@IEEEeqnarraystarformfalse
  1871. \newif\if@advanceIEEEeqncolcnt% tracks if the environment should advance the col counter
  1872. % allows a way to make an \IEEEeqnarraybox that can be used within an \IEEEeqnarray
  1873. % used by IEEEeqnarraymulticol so that it can work properly in both
  1874. \@advanceIEEEeqncolcnttrue
  1875. \newcount\@IEEEeqnnumcols % tracks how many IEEEeqnarray cols are defined
  1876. \newcount\@IEEEeqncolcnt % tracks how many IEEEeqnarray cols the user actually used
  1877. % The default math style used by the columns
  1878. \def\IEEEeqnarraymathstyle{\displaystyle}
  1879. % The default text style used by the columns
  1880. % default to using the current font
  1881. \def\IEEEeqnarraytextstyle{\relax}
  1882. % like the iedlistdecl but for \IEEEeqnarray
  1883. \def\IEEEeqnarraydecl{\relax}
  1884. \def\IEEEeqnarrayboxdecl{\relax}
  1885. % \yesnumber is the opposite of \nonumber
  1886. % a novel concept with the same def as the equationarray package
  1887. % However, we give IEEE versions too since some LaTeX packages such as
  1888. % the MDWtools mathenv.sty redefine \nonumber to something else.
  1889. \providecommand{\yesnumber}{\global\@eqnswtrue}
  1890. \def\IEEEyesnumber{\global\@eqnswtrue}
  1891. \def\IEEEnonumber{\global\@eqnswfalse}
  1892. \def\IEEEyessubnumber{\global\@IEEEissubequationtrue\global\@eqnswtrue%
  1893. \if@IEEEeqnarrayISinner% only do something inside an IEEEeqnarray
  1894. \if@IEEElastlinewassubequation\addtocounter{equation}{-1}\else\setcounter{IEEEsubequation}{1}\fi%
  1895. \def\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\fi}
  1896. % flag to indicate that an equation is a sub equation
  1897. \newif\if@IEEEissubequation%
  1898. \@IEEEissubequationfalse
  1899. % allows users to "push away" equations that get too close to the equation numbers
  1900. \def\IEEEeqnarraynumspace{\hphantom{\if@IEEEissubequation\theIEEEsubequationdis\else\theequationdis\fi}}
  1901. % provides a way to span multiple columns within IEEEeqnarray environments
  1902. % will consider \if@advanceIEEEeqncolcnt before globally advancing the
  1903. % column counter - so as to work within \IEEEeqnarraybox
  1904. % usage: \IEEEeqnarraymulticol{number cols. to span}{col type}{cell text}
  1905. \long\def\IEEEeqnarraymulticol#1#2#3{\multispan{#1}%
  1906. % check if column is defined
  1907. \relax\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined%
  1908. \csname @IEEEeqnarraycolPRE#2\endcsname#3\relax\relax\relax\relax\relax%
  1909. \relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST#2\endcsname%
  1910. \else% if not, error and use default type
  1911. \@IEEEclspkgerror{Invalid column type "#2" in \string\IEEEeqnarraymulticol.\MessageBreak
  1912. Using a default centering column instead}%
  1913. {You must define IEEEeqnarray column types before use.}%
  1914. \csname @IEEEeqnarraycolPRE@IEEEdefault\endcsname#3\relax\relax\relax\relax\relax%
  1915. \relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST@IEEEdefault\endcsname%
  1916. \fi%
  1917. % advance column counter only if the IEEEeqnarray environment wants it
  1918. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by #1\relax\fi}
  1919. % like \omit, but maintains track of the column counter for \IEEEeqnarray
  1920. \def\IEEEeqnarrayomit{\omit\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by 1\relax\fi}
  1921. % provides a way to define a letter referenced column type
  1922. % usage: \IEEEeqnarraydefcol{col. type letter/name}{pre insertion text}{post insertion text}
  1923. \def\IEEEeqnarraydefcol#1#2#3{\expandafter\def\csname @IEEEeqnarraycolPRE#1\endcsname{#2}%
  1924. \expandafter\def\csname @IEEEeqnarraycolPOST#1\endcsname{#3}%
  1925. \expandafter\def\csname @IEEEeqnarraycolDEF#1\endcsname{1}}
  1926. % provides a way to define a numerically referenced inter-column glue types
  1927. % usage: \IEEEeqnarraydefcolsep{col. glue number}{glue definition}
  1928. \def\IEEEeqnarraydefcolsep#1#2{\expandafter\def\csname @IEEEeqnarraycolSEP\romannumeral #1\endcsname{#2}%
  1929. \expandafter\def\csname @IEEEeqnarraycolSEPDEF\romannumeral #1\endcsname{1}}
  1930. \def\@IEEEeqnarraycolisdefined{1}% just a macro for 1, used for checking undefined column types
  1931. % expands and appends the given argument to the \@IEEEtrantmptoksA token list
  1932. % used to build up the \halign preamble
  1933. \def\@IEEEappendtoksA#1{\edef\@@IEEEappendtoksA{\@IEEEtrantmptoksA={\the\@IEEEtrantmptoksA #1}}%
  1934. \@@IEEEappendtoksA}
  1935. % also appends to \@IEEEtrantmptoksA, but does not expand the argument
  1936. % uses \toks8 as a scratchpad register
  1937. \def\@IEEEappendNOEXPANDtoksA#1{\toks8={#1}%
  1938. \edef\@@IEEEappendNOEXPANDtoksA{\@IEEEtrantmptoksA={\the\@IEEEtrantmptoksA\the\toks8}}%
  1939. \@@IEEEappendNOEXPANDtoksA}
  1940. % define some common column types for the user
  1941. % math
  1942. \IEEEeqnarraydefcol{l}{$\IEEEeqnarraymathstyle}{$\hfil}
  1943. \IEEEeqnarraydefcol{c}{\hfil$\IEEEeqnarraymathstyle}{$\hfil}
  1944. \IEEEeqnarraydefcol{r}{\hfil$\IEEEeqnarraymathstyle}{$}
  1945. \IEEEeqnarraydefcol{L}{$\IEEEeqnarraymathstyle{}}{{}$\hfil}
  1946. \IEEEeqnarraydefcol{C}{\hfil$\IEEEeqnarraymathstyle{}}{{}$\hfil}
  1947. \IEEEeqnarraydefcol{R}{\hfil$\IEEEeqnarraymathstyle{}}{{}$}
  1948. % text
  1949. \IEEEeqnarraydefcol{s}{\IEEEeqnarraytextstyle}{\hfil}
  1950. \IEEEeqnarraydefcol{t}{\hfil\IEEEeqnarraytextstyle}{\hfil}
  1951. \IEEEeqnarraydefcol{u}{\hfil\IEEEeqnarraytextstyle}{}
  1952. % vertical rules
  1953. \IEEEeqnarraydefcol{v}{}{\vrule width\arrayrulewidth}
  1954. \IEEEeqnarraydefcol{vv}{\vrule width\arrayrulewidth\hfil}{\hfil\vrule width\arrayrulewidth}
  1955. \IEEEeqnarraydefcol{V}{}{\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth}
  1956. \IEEEeqnarraydefcol{VV}{\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth\hfil}%
  1957. {\hfil\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth}
  1958. % horizontal rules
  1959. \IEEEeqnarraydefcol{h}{}{\leaders\hrule height\arrayrulewidth\hfil}
  1960. \IEEEeqnarraydefcol{H}{}{\leaders\vbox{\hrule width\arrayrulewidth\vskip\doublerulesep\hrule width\arrayrulewidth}\hfil}
  1961. % plain
  1962. \IEEEeqnarraydefcol{x}{}{}
  1963. \IEEEeqnarraydefcol{X}{$}{$}
  1964. % the default column type to use in the event a column type is not defined
  1965. \IEEEeqnarraydefcol{@IEEEdefault}{\hfil$\IEEEeqnarraymathstyle}{$\hfil}
  1966. % a zero tabskip (used for "-" col types)
  1967. \def\@IEEEeqnarraycolSEPzero{0pt plus 0pt minus 0pt}
  1968. % a centering tabskip (used for "+" col types)
  1969. \def\@IEEEeqnarraycolSEPcenter{1000pt plus 0pt minus 1000pt}
  1970. % top level default tabskip glues for the start, end, and inter-column
  1971. % may be reset within environments not always at the top level, e.g., \IEEEeqnarraybox
  1972. \edef\@IEEEeqnarraycolSEPdefaultstart{\@IEEEeqnarraycolSEPcenter}% default start glue
  1973. \edef\@IEEEeqnarraycolSEPdefaultend{\@IEEEeqnarraycolSEPcenter}% default end glue
  1974. \edef\@IEEEeqnarraycolSEPdefaultmid{\@IEEEeqnarraycolSEPzero}% default inter-column glue
  1975. % creates a vertical rule that extends from the bottom to the top a a cell
  1976. % Provided in case other packages redefine \vline some other way.
  1977. % usage: \IEEEeqnarrayvrule[rule thickness]
  1978. % If no argument is provided, \arrayrulewidth will be used for the rule thickness.
  1979. \newcommand\IEEEeqnarrayvrule[1][\arrayrulewidth]{\vrule\@width#1\relax}
  1980. % creates a blank separator row
  1981. % usage: \IEEEeqnarrayseprow[separation length][font size commands]
  1982. % default is \IEEEeqnarrayseprow[0.25\normalbaselineskip][\relax]
  1983. % blank arguments inherit the default values
  1984. % uses \skip5 as a scratch register - calls \@IEEEeqnarraystrutsize which uses more scratch registers
  1985. \def\IEEEeqnarrayseprow{\relax\@ifnextchar[{\@IEEEeqnarrayseprow}{\@IEEEeqnarrayseprow[0.25\normalbaselineskip]}}
  1986. \def\@IEEEeqnarrayseprow[#1]{\relax\@ifnextchar[{\@@IEEEeqnarrayseprow[#1]}{\@@IEEEeqnarrayseprow[#1][\relax]}}
  1987. \def\@@IEEEeqnarrayseprow[#1][#2]{\def\@IEEEeqnarrayseprowARGONE{#1}%
  1988. \ifx\@IEEEeqnarrayseprowARGONE\@empty%
  1989. % get the skip value, based on the font commands
  1990. % use skip5 because \IEEEeqnarraystrutsize uses \skip0, \skip2, \skip3
  1991. % assign within a bogus box to confine the font changes
  1992. {\setbox0=\hbox{#2\relax\global\skip5=0.25\normalbaselineskip}}%
  1993. \else%
  1994. {\setbox0=\hbox{#2\relax\global\skip5=#1}}%
  1995. \fi%
  1996. \@IEEEeqnarrayhoptolastcolumn\IEEEeqnarraystrutsize{\skip5}{0pt}[\relax]\relax}
  1997. % creates a blank separator row, but omits all the column templates
  1998. % usage: \IEEEeqnarrayseprowcut[separation length][font size commands]
  1999. % default is \IEEEeqnarrayseprowcut[0.25\normalbaselineskip][\relax]
  2000. % blank arguments inherit the default values
  2001. % uses \skip5 as a scratch register - calls \@IEEEeqnarraystrutsize which uses more scratch registers
  2002. \def\IEEEeqnarrayseprowcut{\multispan{\@IEEEeqnnumcols}\relax% span all the cols
  2003. % advance column counter only if the IEEEeqnarray environment wants it
  2004. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2005. \@ifnextchar[{\@IEEEeqnarrayseprowcut}{\@IEEEeqnarrayseprowcut[0.25\normalbaselineskip]}}
  2006. \def\@IEEEeqnarrayseprowcut[#1]{\relax\@ifnextchar[{\@@IEEEeqnarrayseprowcut[#1]}{\@@IEEEeqnarrayseprowcut[#1][\relax]}}
  2007. \def\@@IEEEeqnarrayseprowcut[#1][#2]{\def\@IEEEeqnarrayseprowARGONE{#1}%
  2008. \ifx\@IEEEeqnarrayseprowARGONE\@empty%
  2009. % get the skip value, based on the font commands
  2010. % use skip5 because \IEEEeqnarraystrutsize uses \skip0, \skip2, \skip3
  2011. % assign within a bogus box to confine the font changes
  2012. {\setbox0=\hbox{#2\relax\global\skip5=0.25\normalbaselineskip}}%
  2013. \else%
  2014. {\setbox0=\hbox{#2\relax\global\skip5=#1}}%
  2015. \fi%
  2016. \IEEEeqnarraystrutsize{\skip5}{0pt}[\relax]\relax}
  2017. % draws a single rule across all the columns optional
  2018. % argument determines the rule width, \arrayrulewidth is the default
  2019. % updates column counter as needed and turns off struts
  2020. % usage: \IEEEeqnarrayrulerow[rule line thickness]
  2021. \def\IEEEeqnarrayrulerow{\multispan{\@IEEEeqnnumcols}\relax% span all the cols
  2022. % advance column counter only if the IEEEeqnarray environment wants it
  2023. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2024. \@ifnextchar[{\@IEEEeqnarrayrulerow}{\@IEEEeqnarrayrulerow[\arrayrulewidth]}}
  2025. \def\@IEEEeqnarrayrulerow[#1]{\leaders\hrule height#1\hfil\relax% put in our rule
  2026. % turn off any struts
  2027. \IEEEeqnarraystrutsize{0pt}{0pt}[\relax]\relax}
  2028. % draws a double rule by using a single rule row, a separator row, and then
  2029. % another single rule row
  2030. % first optional argument determines the rule thicknesses, \arrayrulewidth is the default
  2031. % second optional argument determines the rule spacing, \doublerulesep is the default
  2032. % usage: \IEEEeqnarraydblrulerow[rule line thickness][rule spacing]
  2033. \def\IEEEeqnarraydblrulerow{\multispan{\@IEEEeqnnumcols}\relax% span all the cols
  2034. % advance column counter only if the IEEEeqnarray environment wants it
  2035. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2036. \@ifnextchar[{\@IEEEeqnarraydblrulerow}{\@IEEEeqnarraydblrulerow[\arrayrulewidth]}}
  2037. \def\@IEEEeqnarraydblrulerow[#1]{\relax\@ifnextchar[{\@@IEEEeqnarraydblrulerow[#1]}%
  2038. {\@@IEEEeqnarraydblrulerow[#1][\doublerulesep]}}
  2039. \def\@@IEEEeqnarraydblrulerow[#1][#2]{\def\@IEEEeqnarraydblrulerowARG{#1}%
  2040. % we allow the user to say \IEEEeqnarraydblrulerow[][]
  2041. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2042. \@IEEEeqnarrayrulerow[\arrayrulewidth]%
  2043. \else%
  2044. \@IEEEeqnarrayrulerow[#1]\relax%
  2045. \fi%
  2046. \def\@IEEEeqnarraydblrulerowARG{#2}%
  2047. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2048. \\\IEEEeqnarrayseprow[\doublerulesep][\relax]%
  2049. \else%
  2050. \\\IEEEeqnarrayseprow[#2][\relax]%
  2051. \fi%
  2052. \\\multispan{\@IEEEeqnnumcols}%
  2053. % advance column counter only if the IEEEeqnarray environment wants it
  2054. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2055. \def\@IEEEeqnarraydblrulerowARG{#1}%
  2056. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2057. \@IEEEeqnarrayrulerow[\arrayrulewidth]%
  2058. \else%
  2059. \@IEEEeqnarrayrulerow[#1]%
  2060. \fi%
  2061. }
  2062. % draws a double rule by using a single rule row, a separator (cutting) row, and then
  2063. % another single rule row
  2064. % first optional argument determines the rule thicknesses, \arrayrulewidth is the default
  2065. % second optional argument determines the rule spacing, \doublerulesep is the default
  2066. % usage: \IEEEeqnarraydblrulerow[rule line thickness][rule spacing]
  2067. \def\IEEEeqnarraydblrulerowcut{\multispan{\@IEEEeqnnumcols}\relax% span all the cols
  2068. % advance column counter only if the IEEEeqnarray environment wants it
  2069. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2070. \@ifnextchar[{\@IEEEeqnarraydblrulerowcut}{\@IEEEeqnarraydblrulerowcut[\arrayrulewidth]}}
  2071. \def\@IEEEeqnarraydblrulerowcut[#1]{\relax\@ifnextchar[{\@@IEEEeqnarraydblrulerowcut[#1]}%
  2072. {\@@IEEEeqnarraydblrulerowcut[#1][\doublerulesep]}}
  2073. \def\@@IEEEeqnarraydblrulerowcut[#1][#2]{\def\@IEEEeqnarraydblrulerowARG{#1}%
  2074. % we allow the user to say \IEEEeqnarraydblrulerow[][]
  2075. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2076. \@IEEEeqnarrayrulerow[\arrayrulewidth]%
  2077. \else%
  2078. \@IEEEeqnarrayrulerow[#1]%
  2079. \fi%
  2080. \def\@IEEEeqnarraydblrulerowARG{#2}%
  2081. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2082. \\\IEEEeqnarrayseprowcut[\doublerulesep][\relax]%
  2083. \else%
  2084. \\\IEEEeqnarrayseprowcut[#2][\relax]%
  2085. \fi%
  2086. \\\multispan{\@IEEEeqnnumcols}%
  2087. % advance column counter only if the IEEEeqnarray environment wants it
  2088. \if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi%
  2089. \def\@IEEEeqnarraydblrulerowARG{#1}%
  2090. \ifx\@IEEEeqnarraydblrulerowARG\@empty%
  2091. \@IEEEeqnarrayrulerow[\arrayrulewidth]%
  2092. \else%
  2093. \@IEEEeqnarrayrulerow[#1]%
  2094. \fi%
  2095. }
  2096. % inserts a full row's worth of &'s
  2097. % relies on \@IEEEeqnnumcols to provide the correct number of columns
  2098. % uses \@IEEEtrantmptoksA, \count0 as scratch registers
  2099. \def\@IEEEeqnarrayhoptolastcolumn{\@IEEEtrantmptoksA={}\count0=1\relax%
  2100. \loop% add cols if the user did not use them all
  2101. \ifnum\count0<\@IEEEeqnnumcols\relax%
  2102. \@IEEEappendtoksA{&}%
  2103. \advance\count0 by 1\relax% update the col count
  2104. \repeat%
  2105. \the\@IEEEtrantmptoksA%execute the &'s
  2106. }
  2107. \newif\if@IEEEeqnarrayISinner % flag to indicate if we are within the lines
  2108. \@IEEEeqnarrayISinnerfalse % of an IEEEeqnarray - after the IEEEeqnarraydecl
  2109. \edef\@IEEEeqnarrayTHEstrutheight{0pt} % height and depth of IEEEeqnarray struts
  2110. \edef\@IEEEeqnarrayTHEstrutdepth{0pt}
  2111. \edef\@IEEEeqnarrayTHEmasterstrutheight{0pt} % default height and depth of
  2112. \edef\@IEEEeqnarrayTHEmasterstrutdepth{0pt} % struts within an IEEEeqnarray
  2113. \edef\@IEEEeqnarrayTHEmasterstrutHSAVE{0pt} % saved master strut height
  2114. \edef\@IEEEeqnarrayTHEmasterstrutDSAVE{0pt} % and depth
  2115. \newif\if@IEEEeqnarrayusemasterstrut % flag to indicate that the master strut value
  2116. \@IEEEeqnarrayusemasterstruttrue % is to be used
  2117. % saves the strut height and depth of the master strut
  2118. \def\@IEEEeqnarraymasterstrutsave{\relax%
  2119. \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax%
  2120. \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax%
  2121. % remove stretchability
  2122. \dimen0\skip0\relax%
  2123. \dimen2\skip2\relax%
  2124. % save values
  2125. \edef\@IEEEeqnarrayTHEmasterstrutHSAVE{\the\dimen0}%
  2126. \edef\@IEEEeqnarrayTHEmasterstrutDSAVE{\the\dimen2}}
  2127. % restores the strut height and depth of the master strut
  2128. \def\@IEEEeqnarraymasterstrutrestore{\relax%
  2129. \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutHSAVE\relax%
  2130. \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutDSAVE\relax%
  2131. % remove stretchability
  2132. \dimen0\skip0\relax%
  2133. \dimen2\skip2\relax%
  2134. % restore values
  2135. \edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}%
  2136. \edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}}
  2137. % globally restores the strut height and depth to the
  2138. % master values and sets the master strut flag to true
  2139. \def\@IEEEeqnarraystrutreset{\relax%
  2140. \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax%
  2141. \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax%
  2142. % remove stretchability
  2143. \dimen0\skip0\relax%
  2144. \dimen2\skip2\relax%
  2145. % restore values
  2146. \xdef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}%
  2147. \xdef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}%
  2148. \global\@IEEEeqnarrayusemasterstruttrue}
  2149. % if the master strut is not to be used, make the current
  2150. % values of \@IEEEeqnarrayTHEstrutheight, \@IEEEeqnarrayTHEstrutdepth
  2151. % and the use master strut flag, global
  2152. % this allows user strut commands issued in the last column to be carried
  2153. % into the isolation/strut column
  2154. \def\@IEEEeqnarrayglobalizestrutstatus{\relax%
  2155. \if@IEEEeqnarrayusemasterstrut\else%
  2156. \xdef\@IEEEeqnarrayTHEstrutheight{\@IEEEeqnarrayTHEstrutheight}%
  2157. \xdef\@IEEEeqnarrayTHEstrutdepth{\@IEEEeqnarrayTHEstrutdepth}%
  2158. \global\@IEEEeqnarrayusemasterstrutfalse%
  2159. \fi}
  2160. % usage: \IEEEeqnarraystrutsize{height}{depth}[font size commands]
  2161. % If called outside the lines of an IEEEeqnarray, sets the height
  2162. % and depth of both the master and local struts. If called inside
  2163. % an IEEEeqnarray line, sets the height and depth of the local strut
  2164. % only and sets the flag to indicate the use of the local strut
  2165. % values. If the height or depth is left blank, 0.7\normalbaselineskip
  2166. % and 0.3\normalbaselineskip will be used, respectively.
  2167. % The optional argument can be used to evaluate the lengths under
  2168. % a different font size and styles. If none is specified, the current
  2169. % font is used.
  2170. % uses scratch registers \skip0, \skip2, \skip3, \dimen0, \dimen2
  2171. \def\IEEEeqnarraystrutsize#1#2{\relax\@ifnextchar[{\@IEEEeqnarraystrutsize{#1}{#2}}{\@IEEEeqnarraystrutsize{#1}{#2}[\relax]}}
  2172. \def\@IEEEeqnarraystrutsize#1#2[#3]{\def\@IEEEeqnarraystrutsizeARG{#1}%
  2173. \ifx\@IEEEeqnarraystrutsizeARG\@empty%
  2174. {\setbox0=\hbox{#3\relax\global\skip3=0.7\normalbaselineskip}}%
  2175. \skip0=\skip3\relax%
  2176. \else% arg one present
  2177. {\setbox0=\hbox{#3\relax\global\skip3=#1\relax}}%
  2178. \skip0=\skip3\relax%
  2179. \fi% if null arg
  2180. \def\@IEEEeqnarraystrutsizeARG{#2}%
  2181. \ifx\@IEEEeqnarraystrutsizeARG\@empty%
  2182. {\setbox0=\hbox{#3\relax\global\skip3=0.3\normalbaselineskip}}%
  2183. \skip2=\skip3\relax%
  2184. \else% arg two present
  2185. {\setbox0=\hbox{#3\relax\global\skip3=#2\relax}}%
  2186. \skip2=\skip3\relax%
  2187. \fi% if null arg
  2188. % remove stretchability, just to be safe
  2189. \dimen0\skip0\relax%
  2190. \dimen2\skip2\relax%
  2191. % dimen0 = height, dimen2 = depth
  2192. \if@IEEEeqnarrayISinner% inner does not touch master strut size
  2193. \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}%
  2194. \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}%
  2195. \@IEEEeqnarrayusemasterstrutfalse% do not use master
  2196. \else% outer, have to set master strut too
  2197. \edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}%
  2198. \edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}%
  2199. \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}%
  2200. \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}%
  2201. \@IEEEeqnarrayusemasterstruttrue% use master strut
  2202. \fi}
  2203. % usage: \IEEEeqnarraystrutsizeadd{added height}{added depth}[font size commands]
  2204. % If called outside the lines of an IEEEeqnarray, adds the given height
  2205. % and depth to both the master and local struts.
  2206. % If called inside an IEEEeqnarray line, adds the given height and depth
  2207. % to the local strut only and sets the flag to indicate the use
  2208. % of the local strut values.
  2209. % In both cases, if a height or depth is left blank, 0pt is used instead.
  2210. % The optional argument can be used to evaluate the lengths under
  2211. % a different font size and styles. If none is specified, the current
  2212. % font is used.
  2213. % uses scratch registers \skip0, \skip2, \skip3, \dimen0, \dimen2
  2214. \def\IEEEeqnarraystrutsizeadd#1#2{\relax\@ifnextchar[{\@IEEEeqnarraystrutsizeadd{#1}{#2}}{\@IEEEeqnarraystrutsizeadd{#1}{#2}[\relax]}}
  2215. \def\@IEEEeqnarraystrutsizeadd#1#2[#3]{\def\@IEEEeqnarraystrutsizearg{#1}%
  2216. \ifx\@IEEEeqnarraystrutsizearg\@empty%
  2217. \skip0=0pt\relax%
  2218. \else% arg one present
  2219. {\setbox0=\hbox{#3\relax\global\skip3=#1}}%
  2220. \skip0=\skip3\relax%
  2221. \fi% if null arg
  2222. \def\@IEEEeqnarraystrutsizearg{#2}%
  2223. \ifx\@IEEEeqnarraystrutsizearg\@empty%
  2224. \skip2=0pt\relax%
  2225. \else% arg two present
  2226. {\setbox0=\hbox{#3\relax\global\skip3=#2}}%
  2227. \skip2=\skip3\relax%
  2228. \fi% if null arg
  2229. % remove stretchability, just to be safe
  2230. \dimen0\skip0\relax%
  2231. \dimen2\skip2\relax%
  2232. % dimen0 = height, dimen2 = depth
  2233. \if@IEEEeqnarrayISinner% inner does not touch master strut size
  2234. % get local strut size
  2235. \expandafter\skip0=\@IEEEeqnarrayTHEstrutheight\relax%
  2236. \expandafter\skip2=\@IEEEeqnarrayTHEstrutdepth\relax%
  2237. % add it to the user supplied values
  2238. \advance\dimen0 by \skip0\relax%
  2239. \advance\dimen2 by \skip2\relax%
  2240. % update the local strut size
  2241. \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}%
  2242. \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}%
  2243. \@IEEEeqnarrayusemasterstrutfalse% do not use master
  2244. \else% outer, have to set master strut too
  2245. % get master strut size
  2246. \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax%
  2247. \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax%
  2248. % add it to the user supplied values
  2249. \advance\dimen0 by \skip0\relax%
  2250. \advance\dimen2 by \skip2\relax%
  2251. % update the local and master strut sizes
  2252. \edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}%
  2253. \edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}%
  2254. \edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}%
  2255. \edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}%
  2256. \@IEEEeqnarrayusemasterstruttrue% use master strut
  2257. \fi}
  2258. % allow user a way to see the struts
  2259. \newif\ifIEEEvisiblestruts
  2260. \IEEEvisiblestrutsfalse
  2261. % inserts an invisible strut using the master or local strut values
  2262. % uses scratch registers \skip0, \skip2, \dimen0, \dimen2
  2263. \def\@IEEEeqnarrayinsertstrut{\relax%
  2264. \if@IEEEeqnarrayusemasterstrut
  2265. % get master strut size
  2266. \expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax%
  2267. \expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax%
  2268. \else%
  2269. % get local strut size
  2270. \expandafter\skip0=\@IEEEeqnarrayTHEstrutheight\relax%
  2271. \expandafter\skip2=\@IEEEeqnarrayTHEstrutdepth\relax%
  2272. \fi%
  2273. % remove stretchability, probably not needed
  2274. \dimen0\skip0\relax%
  2275. \dimen2\skip2\relax%
  2276. % dimen0 = height, dimen2 = depth
  2277. % allow user to see struts if desired
  2278. \ifIEEEvisiblestruts%
  2279. \vrule width0.2pt height\dimen0 depth\dimen2\relax%
  2280. \else%
  2281. \vrule width0pt height\dimen0 depth\dimen2\relax\fi}
  2282. % creates an invisible strut, useable even outside \IEEEeqnarray
  2283. % if \IEEEvisiblestrutstrue, the strut will be visible and 0.2pt wide.
  2284. % usage: \IEEEstrut[height][depth][font size commands]
  2285. % default is \IEEEstrut[0.7\normalbaselineskip][0.3\normalbaselineskip][\relax]
  2286. % blank arguments inherit the default values
  2287. % uses \dimen0, \dimen2, \skip0, \skip2
  2288. \def\IEEEstrut{\relax\@ifnextchar[{\@IEEEstrut}{\@IEEEstrut[0.7\normalbaselineskip]}}
  2289. \def\@IEEEstrut[#1]{\relax\@ifnextchar[{\@@IEEEstrut[#1]}{\@@IEEEstrut[#1][0.3\normalbaselineskip]}}
  2290. \def\@@IEEEstrut[#1][#2]{\relax\@ifnextchar[{\@@@IEEEstrut[#1][#2]}{\@@@IEEEstrut[#1][#2][\relax]}}
  2291. \def\@@@IEEEstrut[#1][#2][#3]{\mbox{#3\relax%
  2292. \def\@IEEEstrutARG{#1}%
  2293. \ifx\@IEEEstrutARG\@empty%
  2294. \skip0=0.7\normalbaselineskip\relax%
  2295. \else%
  2296. \skip0=#1\relax%
  2297. \fi%
  2298. \def\@IEEEstrutARG{#2}%
  2299. \ifx\@IEEEstrutARG\@empty%
  2300. \skip2=0.3\normalbaselineskip\relax%
  2301. \else%
  2302. \skip2=#2\relax%
  2303. \fi%
  2304. % remove stretchability, probably not needed
  2305. \dimen0\skip0\relax%
  2306. \dimen2\skip2\relax%
  2307. \ifIEEEvisiblestruts%
  2308. \vrule width0.2pt height\dimen0 depth\dimen2\relax%
  2309. \else%
  2310. \vrule width0.0pt height\dimen0 depth\dimen2\relax\fi}}
  2311. % enables strut mode by setting a default strut size and then zeroing the
  2312. % \baselineskip, \lineskip, \lineskiplimit and \jot
  2313. \def\IEEEeqnarraystrutmode{\IEEEeqnarraystrutsize{0.7\normalbaselineskip}{0.3\normalbaselineskip}[\relax]%
  2314. \baselineskip=0pt\lineskip=0pt\lineskiplimit=0pt\jot=0pt}
  2315. \def\IEEEeqnarray{\@IEEEeqnarraystarformfalse\@IEEEeqnarray}
  2316. \def\endIEEEeqnarray{\end@IEEEeqnarray}
  2317. \@namedef{IEEEeqnarray*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarray}
  2318. \@namedef{endIEEEeqnarray*}{\end@IEEEeqnarray}
  2319. % \IEEEeqnarray is an enhanced \eqnarray.
  2320. % The star form defaults to not putting equation numbers at the end of each row.
  2321. % usage: \IEEEeqnarray[decl]{cols}
  2322. \def\@IEEEeqnarray{\relax\@ifnextchar[{\@@IEEEeqnarray}{\@@IEEEeqnarray[\relax]}}
  2323. \def\@@IEEEeqnarray[#1]#2{%
  2324. % default to showing the equation number or not based on whether or not
  2325. % the star form was involked
  2326. \if@IEEEeqnarraystarform\global\@eqnswfalse
  2327. \else% not the star form
  2328. \global\@eqnswtrue
  2329. \fi% if star form
  2330. \@IEEEissubequationfalse% default to no subequations
  2331. \@IEEElastlinewassubequationfalse% assume last line is not a sub equation
  2332. \@IEEEeqnarrayISinnerfalse% not yet within the lines of the halign
  2333. \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default
  2334. \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise
  2335. \IEEEvisiblestrutsfalse% diagnostic mode defaults to off
  2336. % no extra space unless the user specifically requests it
  2337. \lineskip=0pt\relax
  2338. \lineskiplimit=0pt\relax
  2339. \baselineskip=\normalbaselineskip\relax%
  2340. \jot=\normaljot\relax%
  2341. \mathsurround\z@\relax% no extra spacing around math
  2342. \@advanceIEEEeqncolcnttrue% advance the col counter for each col the user uses,
  2343. % used in \IEEEeqnarraymulticol and in the preamble build
  2344. \stepcounter{equation}% advance equation counter before first line
  2345. \setcounter{IEEEsubequation}{0}% no subequation yet
  2346. \def\@currentlabel{\p@equation\theequation}% redefine the ref label
  2347. \IEEEeqnarraydecl\relax% allow a way for the user to make global overrides
  2348. #1\relax% allow user to override defaults
  2349. \let\\\@IEEEeqnarraycr% replace newline with one that can put in eqn. numbers
  2350. \global\@IEEEeqncolcnt\z@% col. count = 0 for first line
  2351. \@IEEEbuildpreamble #2\end\relax% build the preamble and put it into \@IEEEtrantmptoksA
  2352. % put in the column for the equation number
  2353. \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first
  2354. \toks0={##}%
  2355. % advance the \@IEEEeqncolcnt for the isolation col, this helps with error checking
  2356. \@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}%
  2357. % add the isolation column
  2358. \@IEEEappendtoksA{\tabskip\z@skip\bgroup\the\toks0\egroup}%
  2359. % advance the \@IEEEeqncolcnt for the equation number col, this helps with error checking
  2360. \@IEEEappendtoksA{&\global\advance\@IEEEeqncolcnt by 1\relax}%
  2361. % add the equation number col to the preamble
  2362. \@IEEEappendtoksA{\tabskip\z@skip\hb@xt@\z@\bgroup\hss\the\toks0\egroup}%
  2363. % note \@IEEEeqnnumcols does not count the equation col or isolation col
  2364. % set the starting tabskip glue as determined by the preamble build
  2365. \tabskip=\@IEEEBPstartglue\relax
  2366. % begin the display alignment
  2367. \@IEEEeqnarrayISinnertrue% commands are now within the lines
  2368. $$\everycr{}\halign to\displaywidth\bgroup
  2369. % "exspand" the preamble
  2370. \span\the\@IEEEtrantmptoksA\cr}
  2371. % enter isolation/strut column (or the next column if the user did not use
  2372. % every column), record the strut status, complete the columns, do the strut if needed,
  2373. % restore counters to correct values and exit
  2374. \def\end@IEEEeqnarray{\@IEEEeqnarrayglobalizestrutstatus&\@@IEEEeqnarraycr\egroup%
  2375. \if@IEEElastlinewassubequation\global\advance\c@IEEEsubequation\m@ne\fi%
  2376. \global\advance\c@equation\m@ne%
  2377. $$\@ignoretrue}
  2378. % need a way to remember if last line is a subequation
  2379. \newif\if@IEEElastlinewassubequation%
  2380. \@IEEElastlinewassubequationfalse
  2381. % IEEEeqnarray uses a modifed \\ instead of the plain \cr to
  2382. % end rows. This allows for things like \\*[vskip amount]
  2383. % This "cr" macros are modified versions those for LaTeX2e's eqnarray
  2384. % the {\ifnum0=`} braces must be kept away from the last column to avoid
  2385. % altering spacing of its math, so we use & to advance to the next column
  2386. % as there is an isolation/strut column after the user's columns
  2387. \def\@IEEEeqnarraycr{\@IEEEeqnarrayglobalizestrutstatus&% save strut status and advance to next column
  2388. {\ifnum0=`}\fi
  2389. \@ifstar{%
  2390. \global\@eqpen\@M\@IEEEeqnarrayYCR
  2391. }{%
  2392. \global\@eqpen\interdisplaylinepenalty \@IEEEeqnarrayYCR
  2393. }%
  2394. }
  2395. \def\@IEEEeqnarrayYCR{\@testopt\@IEEEeqnarrayXCR\z@skip}
  2396. \def\@IEEEeqnarrayXCR[#1]{%
  2397. \ifnum0=`{\fi}%
  2398. \@@IEEEeqnarraycr
  2399. \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}}%
  2400. \def\@@IEEEeqnarraycr{\@IEEEtrantmptoksA={}% clear token register
  2401. \advance\@IEEEeqncolcnt by -1\relax% adjust col count because of the isolation column
  2402. \ifnum\@IEEEeqncolcnt>\@IEEEeqnnumcols\relax
  2403. \@IEEEclspkgerror{Too many columns within the IEEEeqnarray\MessageBreak
  2404. environment}%
  2405. {Use fewer \string &'s or put more columns in the IEEEeqnarry column\MessageBreak
  2406. specifications.}\relax%
  2407. \else
  2408. \loop% add cols if the user did not use them all
  2409. \ifnum\@IEEEeqncolcnt<\@IEEEeqnnumcols\relax
  2410. \@IEEEappendtoksA{&}%
  2411. \advance\@IEEEeqncolcnt by 1\relax% update the col count
  2412. \repeat
  2413. % this number of &'s will take us the the isolation column
  2414. \fi
  2415. % execute the &'s
  2416. \the\@IEEEtrantmptoksA%
  2417. % handle the strut/isolation column
  2418. \@IEEEeqnarrayinsertstrut% do the strut if needed
  2419. \@IEEEeqnarraystrutreset% reset the strut system for next line or IEEEeqnarray
  2420. &% and enter the equation number column
  2421. % is this line needs an equation number, display it and advance the
  2422. % (sub)equation counters, record what type this line was
  2423. \if@eqnsw%
  2424. \if@IEEEissubequation\theIEEEsubequationdis\addtocounter{equation}{1}\stepcounter{IEEEsubequation}%
  2425. \global\@IEEElastlinewassubequationtrue%
  2426. \else% display a standard equation number, initialize the IEEEsubequation counter
  2427. \theequationdis\stepcounter{equation}\setcounter{IEEEsubequation}{0}%
  2428. \global\@IEEElastlinewassubequationfalse\fi%
  2429. \fi%
  2430. % reset the eqnsw flag to indicate default preference of the display of equation numbers
  2431. \if@IEEEeqnarraystarform\global\@eqnswfalse\else\global\@eqnswtrue\fi
  2432. \global\@IEEEissubequationfalse% reset the subequation flag
  2433. % reset the number of columns the user actually used
  2434. \global\@IEEEeqncolcnt\z@\relax
  2435. % the real end of the line
  2436. \cr}
  2437. % \IEEEeqnarraybox is like \IEEEeqnarray except the box form puts everything
  2438. % inside a vtop, vbox, or vcenter box depending on the letter in the second
  2439. % optional argument (t,b,c). Vbox is the default. Unlike \IEEEeqnarray,
  2440. % equation numbers are not displayed and \IEEEeqnarraybox can be nested.
  2441. % \IEEEeqnarrayboxm is for math mode (like \array) and does not put the vbox
  2442. % within an hbox.
  2443. % \IEEEeqnarrayboxt is for text mode (like \tabular) and puts the vbox within
  2444. % a \hbox{$ $} construct.
  2445. % \IEEEeqnarraybox will auto detect whether to use \IEEEeqnarrayboxm or
  2446. % \IEEEeqnarrayboxt depending on the math mode.
  2447. % The third optional argument specifies the width this box is to be set to -
  2448. % natural width is the default.
  2449. % The * forms do not add \jot line spacing
  2450. % usage: \IEEEeqnarraybox[decl][pos][width]{cols}
  2451. \def\IEEEeqnarrayboxm{\@IEEEeqnarraystarformfalse\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
  2452. \def\endIEEEeqnarrayboxm{\end@IEEEeqnarraybox}
  2453. \@namedef{IEEEeqnarrayboxm*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
  2454. \@namedef{endIEEEeqnarrayboxm*}{\end@IEEEeqnarraybox}
  2455. \def\IEEEeqnarrayboxt{\@IEEEeqnarraystarformfalse\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
  2456. \def\endIEEEeqnarrayboxt{\end@IEEEeqnarraybox}
  2457. \@namedef{IEEEeqnarrayboxt*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
  2458. \@namedef{endIEEEeqnarrayboxt*}{\end@IEEEeqnarraybox}
  2459. \def\IEEEeqnarraybox{\@IEEEeqnarraystarformfalse\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
  2460. \@IEEEeqnarraybox}
  2461. \def\endIEEEeqnarraybox{\end@IEEEeqnarraybox}
  2462. \@namedef{IEEEeqnarraybox*}{\@IEEEeqnarraystarformtrue\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
  2463. \@IEEEeqnarraybox}
  2464. \@namedef{endIEEEeqnarraybox*}{\end@IEEEeqnarraybox}
  2465. % flag to indicate if the \IEEEeqnarraybox needs to put things into an hbox{$ $}
  2466. % for \vcenter in non-math mode
  2467. \newif\if@IEEEeqnarrayboxHBOXSW%
  2468. \@IEEEeqnarrayboxHBOXSWfalse
  2469. \def\@IEEEeqnarraybox{\relax\@ifnextchar[{\@@IEEEeqnarraybox}{\@@IEEEeqnarraybox[\relax]}}
  2470. \def\@@IEEEeqnarraybox[#1]{\relax\@ifnextchar[{\@@@IEEEeqnarraybox[#1]}{\@@@IEEEeqnarraybox[#1][b]}}
  2471. \def\@@@IEEEeqnarraybox[#1][#2]{\relax\@ifnextchar[{\@@@@IEEEeqnarraybox[#1][#2]}{\@@@@IEEEeqnarraybox[#1][#2][\relax]}}
  2472. % #1 = decl; #2 = t,b,c; #3 = width, #4 = col specs
  2473. \def\@@@@IEEEeqnarraybox[#1][#2][#3]#4{\@IEEEeqnarrayISinnerfalse % not yet within the lines of the halign
  2474. \@IEEEeqnarraymasterstrutsave% save current master strut values
  2475. \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default
  2476. \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise
  2477. \IEEEvisiblestrutsfalse% diagnostic mode defaults to off
  2478. % no extra space unless the user specifically requests it
  2479. \lineskip=0pt\relax%
  2480. \lineskiplimit=0pt\relax%
  2481. \baselineskip=\normalbaselineskip\relax%
  2482. \jot=\normaljot\relax%
  2483. \mathsurround\z@\relax% no extra spacing around math
  2484. % the default end glues are zero for an \IEEEeqnarraybox
  2485. \edef\@IEEEeqnarraycolSEPdefaultstart{\@IEEEeqnarraycolSEPzero}% default start glue
  2486. \edef\@IEEEeqnarraycolSEPdefaultend{\@IEEEeqnarraycolSEPzero}% default end glue
  2487. \edef\@IEEEeqnarraycolSEPdefaultmid{\@IEEEeqnarraycolSEPzero}% default inter-column glue
  2488. \@advanceIEEEeqncolcntfalse% do not advance the col counter for each col the user uses,
  2489. % used in \IEEEeqnarraymulticol and in the preamble build
  2490. \IEEEeqnarrayboxdecl\relax% allow a way for the user to make global overrides
  2491. #1\relax% allow user to override defaults
  2492. \let\\\@IEEEeqnarrayboxcr% replace newline with one that allows optional spacing
  2493. \@IEEEbuildpreamble #4\end\relax% build the preamble and put it into \@IEEEtrantmptoksA
  2494. % add an isolation column to the preamble to stop \\'s {} from getting into the last col
  2495. \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first
  2496. \toks0={##}%
  2497. % add the isolation column to the preamble
  2498. \@IEEEappendtoksA{\tabskip\z@skip\bgroup\the\toks0\egroup}%
  2499. % set the starting tabskip glue as determined by the preamble build
  2500. \tabskip=\@IEEEBPstartglue\relax
  2501. % begin the alignment
  2502. \everycr{}%
  2503. % use only the very first token to determine the positioning
  2504. % this stops some problems when the user uses more than one letter,
  2505. % but is probably not worth the effort
  2506. % \noindent is used as a delimiter
  2507. \def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}%
  2508. \@IEEEgrabfirstoken#2\relax\relax\noindent
  2509. % \@IEEEgrabbedfirstoken has the first token, the rest are discarded
  2510. % if we need to put things into and hbox and go into math mode, do so now
  2511. \if@IEEEeqnarrayboxHBOXSW \leavevmode \hbox \bgroup $\fi%
  2512. % use the appropriate vbox type
  2513. \if\@IEEEgrabbedfirstoken t\relax\vtop\else\if\@IEEEgrabbedfirstoken c\relax%
  2514. \vcenter\else\vbox\fi\fi\bgroup%
  2515. \@IEEEeqnarrayISinnertrue% commands are now within the lines
  2516. \ifx#3\relax\halign\else\halign to #3\relax\fi%
  2517. \bgroup
  2518. % "exspand" the preamble
  2519. \span\the\@IEEEtrantmptoksA\cr}
  2520. % carry strut status and enter the isolation/strut column,
  2521. % exit from math mode if needed, and exit
  2522. \def\end@IEEEeqnarraybox{\@IEEEeqnarrayglobalizestrutstatus% carry strut status
  2523. &% enter isolation/strut column
  2524. \@IEEEeqnarrayinsertstrut% do strut if needed
  2525. \@IEEEeqnarraymasterstrutrestore% restore the previous master strut values
  2526. % reset the strut system for next IEEEeqnarray
  2527. % (sets local strut values back to previous master strut values)
  2528. \@IEEEeqnarraystrutreset%
  2529. % ensure last line, exit from halign, close vbox
  2530. \crcr\egroup\egroup%
  2531. % exit from math mode and close hbox if needed
  2532. \if@IEEEeqnarrayboxHBOXSW $\egroup\fi}
  2533. % IEEEeqnarraybox uses a modifed \\ instead of the plain \cr to
  2534. % end rows. This allows for things like \\[vskip amount]
  2535. % This "cr" macros are modified versions those for LaTeX2e's eqnarray
  2536. % For IEEEeqnarraybox, \\* is the same as \\
  2537. % the {\ifnum0=`} braces must be kept away from the last column to avoid
  2538. % altering spacing of its math, so we use & to advance to the isolation/strut column
  2539. % carry strut status into isolation/strut column
  2540. \def\@IEEEeqnarrayboxcr{\@IEEEeqnarrayglobalizestrutstatus% carry strut status
  2541. &% enter isolation/strut column
  2542. \@IEEEeqnarrayinsertstrut% do strut if needed
  2543. % reset the strut system for next line or IEEEeqnarray
  2544. \@IEEEeqnarraystrutreset%
  2545. {\ifnum0=`}\fi%
  2546. \@ifstar{\@IEEEeqnarrayboxYCR}{\@IEEEeqnarrayboxYCR}}
  2547. % test and setup the optional argument to \\[]
  2548. \def\@IEEEeqnarrayboxYCR{\@testopt\@IEEEeqnarrayboxXCR\z@skip}
  2549. % IEEEeqnarraybox does not automatically increase line spacing by \jot
  2550. \def\@IEEEeqnarrayboxXCR[#1]{\ifnum0=`{\fi}%
  2551. \cr\noalign{\if@IEEEeqnarraystarform\else\vskip\jot\fi\vskip#1\relax}}
  2552. % starts the halign preamble build
  2553. \def\@IEEEbuildpreamble{\@IEEEtrantmptoksA={}% clear token register
  2554. \let\@IEEEBPcurtype=u%current column type is not yet known
  2555. \let\@IEEEBPprevtype=s%the previous column type was the start
  2556. \let\@IEEEBPnexttype=u%next column type is not yet known
  2557. % ensure these are valid
  2558. \def\@IEEEBPcurglue={0pt plus 0pt minus 0pt}%
  2559. \def\@IEEEBPcurcolname{@IEEEdefault}% name of current column definition
  2560. % currently acquired numerically referenced glue
  2561. % use a name that is easier to remember
  2562. \let\@IEEEBPcurnum=\@IEEEtrantmpcountA%
  2563. \@IEEEBPcurnum=0%
  2564. % tracks number of columns in the preamble
  2565. \@IEEEeqnnumcols=0%
  2566. % record the default end glues
  2567. \edef\@IEEEBPstartglue{\@IEEEeqnarraycolSEPdefaultstart}%
  2568. \edef\@IEEEBPendglue{\@IEEEeqnarraycolSEPdefaultend}%
  2569. % now parse the user's column specifications
  2570. \@@IEEEbuildpreamble}
  2571. % parses and builds the halign preamble
  2572. \def\@@IEEEbuildpreamble#1#2{\let\@@nextIEEEbuildpreamble=\@@IEEEbuildpreamble%
  2573. % use only the very first token to check the end
  2574. % \noindent is used as a delimiter as \end can be present here
  2575. \def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}%
  2576. \@IEEEgrabfirstoken#1\relax\relax\noindent
  2577. \ifx\@IEEEgrabbedfirstoken\end\let\@@nextIEEEbuildpreamble=\@@IEEEfinishpreamble\else%
  2578. % identify current and next token type
  2579. \@IEEEgetcoltype{#1}{\@IEEEBPcurtype}{1}% current, error on invalid
  2580. \@IEEEgetcoltype{#2}{\@IEEEBPnexttype}{0}% next, no error on invalid next
  2581. % if curtype is a glue, get the glue def
  2582. \if\@IEEEBPcurtype g\@IEEEgetcurglue{#1}{\@IEEEBPcurglue}\fi%
  2583. % if curtype is a column, get the column def and set the current column name
  2584. \if\@IEEEBPcurtype c\@IEEEgetcurcol{#1}\fi%
  2585. % if curtype is a numeral, acquire the user defined glue
  2586. \if\@IEEEBPcurtype n\@IEEEprocessNcol{#1}\fi%
  2587. % process the acquired glue
  2588. \if\@IEEEBPcurtype g\@IEEEprocessGcol\fi%
  2589. % process the acquired col
  2590. \if\@IEEEBPcurtype c\@IEEEprocessCcol\fi%
  2591. % ready prevtype for next col spec.
  2592. \let\@IEEEBPprevtype=\@IEEEBPcurtype%
  2593. % be sure and put back the future token(s) as a group
  2594. \fi\@@nextIEEEbuildpreamble{#2}}
  2595. % executed just after preamble build is completed
  2596. % warn about zero cols, and if prevtype type = u, put in end tabskip glue
  2597. \def\@@IEEEfinishpreamble#1{\ifnum\@IEEEeqnnumcols<1\relax
  2598. \@IEEEclspkgerror{No column specifiers declared for IEEEeqnarray}%
  2599. {At least one column type must be declared for each IEEEeqnarray.}%
  2600. \fi%num cols less than 1
  2601. %if last type undefined, set default end tabskip glue
  2602. \if\@IEEEBPprevtype u\@IEEEappendtoksA{\tabskip=\@IEEEBPendglue}\fi}
  2603. % Identify and return the column specifier's type code
  2604. \def\@IEEEgetcoltype#1#2#3{%
  2605. % use only the very first token to determine the type
  2606. % \noindent is used as a delimiter as \end can be present here
  2607. \def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}%
  2608. \@IEEEgrabfirstoken#1\relax\relax\noindent
  2609. % \@IEEEgrabfirstoken has the first token, the rest are discarded
  2610. % n = number
  2611. % g = glue (any other char in catagory 12)
  2612. % c = letter
  2613. % e = \end
  2614. % u = undefined
  2615. % third argument: 0 = no error message, 1 = error on invalid char
  2616. \let#2=u\relax% assume invalid until know otherwise
  2617. \ifx\@IEEEgrabbedfirstoken\end\let#2=e\else
  2618. \ifcat\@IEEEgrabbedfirstoken\relax\else% screen out control sequences
  2619. \if0\@IEEEgrabbedfirstoken\let#2=n\else
  2620. \if1\@IEEEgrabbedfirstoken\let#2=n\else
  2621. \if2\@IEEEgrabbedfirstoken\let#2=n\else
  2622. \if3\@IEEEgrabbedfirstoken\let#2=n\else
  2623. \if4\@IEEEgrabbedfirstoken\let#2=n\else
  2624. \if5\@IEEEgrabbedfirstoken\let#2=n\else
  2625. \if6\@IEEEgrabbedfirstoken\let#2=n\else
  2626. \if7\@IEEEgrabbedfirstoken\let#2=n\else
  2627. \if8\@IEEEgrabbedfirstoken\let#2=n\else
  2628. \if9\@IEEEgrabbedfirstoken\let#2=n\else
  2629. \ifcat,\@IEEEgrabbedfirstoken\let#2=g\relax
  2630. \else\ifcat a\@IEEEgrabbedfirstoken\let#2=c\relax\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
  2631. \if#2u\relax
  2632. \if0\noexpand#3\relax\else\@IEEEclspkgerror{Invalid character in column specifications}%
  2633. {Only letters, numerals and certain other symbols are allowed \MessageBreak
  2634. as IEEEeqnarray column specifiers.}\fi\fi}
  2635. % identify the current letter referenced column
  2636. % if invalid, use a default column
  2637. \def\@IEEEgetcurcol#1{\expandafter\ifx\csname @IEEEeqnarraycolDEF#1\endcsname\@IEEEeqnarraycolisdefined%
  2638. \def\@IEEEBPcurcolname{#1}\else% invalid column name
  2639. \@IEEEclspkgerror{Invalid column type "#1" in column specifications.\MessageBreak
  2640. Using a default centering column instead}%
  2641. {You must define IEEEeqnarray column types before use.}%
  2642. \def\@IEEEBPcurcolname{@IEEEdefault}\fi}
  2643. % identify and return the predefined (punctuation) glue value
  2644. \def\@IEEEgetcurglue#1#2{%
  2645. % ! = \! (neg small) -0.16667em (-3/18 em)
  2646. % , = \, (small) 0.16667em ( 3/18 em)
  2647. % : = \: (med) 0.22222em ( 4/18 em)
  2648. % ; = \; (large) 0.27778em ( 5/18 em)
  2649. % ' = \quad 1em
  2650. % " = \qquad 2em
  2651. % . = 0.5\arraycolsep
  2652. % / = \arraycolsep
  2653. % ? = 2\arraycolsep
  2654. % * = 1fil
  2655. % + = \@IEEEeqnarraycolSEPcenter
  2656. % - = \@IEEEeqnarraycolSEPzero
  2657. % Note that all em values are referenced to the math font (textfont2) fontdimen6
  2658. % value for 1em.
  2659. %
  2660. % use only the very first token to determine the type
  2661. % this prevents errant tokens from getting in the main text
  2662. % \noindent is used as a delimiter here
  2663. \def\@IEEEgrabfirstoken##1##2\noindent{\let\@IEEEgrabbedfirstoken=##1}%
  2664. \@IEEEgrabfirstoken#1\relax\relax\noindent
  2665. % get the math font 1em value
  2666. % LaTeX2e's NFSS2 does not preload the fonts, but \IEEEeqnarray needs
  2667. % to gain access to the math (\textfont2) font's spacing parameters.
  2668. % So we create a bogus box here that uses the math font to ensure
  2669. % that \textfont2 is loaded and ready. If this is not done,
  2670. % the \textfont2 stuff here may not work.
  2671. % Thanks to Bernd Raichle for his 1997 post on this topic.
  2672. {\setbox0=\hbox{$\displaystyle\relax$}}%
  2673. % fontdimen6 has the width of 1em (a quad).
  2674. \@IEEEtrantmpdimenA=\fontdimen6\textfont2\relax%
  2675. % identify the glue value based on the first token
  2676. % we discard anything after the first
  2677. \if!\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=-0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  2678. \if,\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  2679. \if:\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.22222\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  2680. \if;\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.27778\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  2681. \if'\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=1\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  2682. \if"\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=2\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else
  2683. \if.\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=0.5\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else
  2684. \if/\@IEEEgrabbedfirstoken\edef#2{\the\arraycolsep}\else
  2685. \if?\@IEEEgrabbedfirstoken\@IEEEtrantmpdimenA=2\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else
  2686. \if *\@IEEEgrabbedfirstoken\edef#2{0pt plus 1fil minus 0pt}\else
  2687. \if+\@IEEEgrabbedfirstoken\edef#2{\@IEEEeqnarraycolSEPcenter}\else
  2688. \if-\@IEEEgrabbedfirstoken\edef#2{\@IEEEeqnarraycolSEPzero}\else
  2689. \edef#2{\@IEEEeqnarraycolSEPzero}%
  2690. \@IEEEclspkgerror{Invalid predefined inter-column glue type "#1" in\MessageBreak
  2691. column specifications. Using a default value of\MessageBreak
  2692. 0pt instead}%
  2693. {Only !,:;'"./?*+ and - are valid predefined glue types in the\MessageBreak
  2694. IEEEeqnarray column specifications.}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
  2695. % process a numerical digit from the column specification
  2696. % and look up the corresponding user defined glue value
  2697. % can transform current type from n to g or a as the user defined glue is acquired
  2698. \def\@IEEEprocessNcol#1{\if\@IEEEBPprevtype g%
  2699. \@IEEEclspkgerror{Back-to-back inter-column glue specifiers in column\MessageBreak
  2700. specifications. Ignoring consecutive glue specifiers\MessageBreak
  2701. after the first}%
  2702. {You cannot have two or more glue types next to each other\MessageBreak
  2703. in the IEEEeqnarray column specifications.}%
  2704. \let\@IEEEBPcurtype=a% abort this glue, future digits will be discarded
  2705. \@IEEEBPcurnum=0\relax%
  2706. \else% if we previously aborted a glue
  2707. \if\@IEEEBPprevtype a\@IEEEBPcurnum=0\let\@IEEEBPcurtype=a%maintain digit abortion
  2708. \else%acquire this number
  2709. % save the previous type before the numerical digits started
  2710. \if\@IEEEBPprevtype n\else\let\@IEEEBPprevsavedtype=\@IEEEBPprevtype\fi%
  2711. \multiply\@IEEEBPcurnum by 10\relax%
  2712. \advance\@IEEEBPcurnum by #1\relax% add in number, \relax is needed to stop TeX's number scan
  2713. \if\@IEEEBPnexttype n\else%close acquisition
  2714. \expandafter\ifx\csname @IEEEeqnarraycolSEPDEF\expandafter\romannumeral\number\@IEEEBPcurnum\endcsname\@IEEEeqnarraycolisdefined%
  2715. \edef\@IEEEBPcurglue{\csname @IEEEeqnarraycolSEP\expandafter\romannumeral\number\@IEEEBPcurnum\endcsname}%
  2716. \else%user glue not defined
  2717. \@IEEEclspkgerror{Invalid user defined inter-column glue type "\number\@IEEEBPcurnum" in\MessageBreak
  2718. column specifications. Using a default value of\MessageBreak
  2719. 0pt instead}%
  2720. {You must define all IEEEeqnarray numerical inter-column glue types via\MessageBreak
  2721. \string\IEEEeqnarraydefcolsep \space before they are used in column specifications.}%
  2722. \edef\@IEEEBPcurglue{\@IEEEeqnarraycolSEPzero}%
  2723. \fi% glue defined or not
  2724. \let\@IEEEBPcurtype=g% change the type to reflect the acquired glue
  2725. \let\@IEEEBPprevtype=\@IEEEBPprevsavedtype% restore the prev type before this number glue
  2726. \@IEEEBPcurnum=0\relax%ready for next acquisition
  2727. \fi%close acquisition, get glue
  2728. \fi%discard or acquire number
  2729. \fi%prevtype glue or not
  2730. }
  2731. % process an acquired glue
  2732. % add any acquired column/glue pair to the preamble
  2733. \def\@IEEEprocessGcol{\if\@IEEEBPprevtype a\let\@IEEEBPcurtype=a%maintain previous glue abortions
  2734. \else
  2735. % if this is the start glue, save it, but do nothing else
  2736. % as this is not used in the preamble, but before
  2737. \if\@IEEEBPprevtype s\edef\@IEEEBPstartglue{\@IEEEBPcurglue}%
  2738. \else%not the start glue
  2739. \if\@IEEEBPprevtype g%ignore if back to back glues
  2740. \@IEEEclspkgerror{Back-to-back inter-column glue specifiers in column\MessageBreak
  2741. specifications. Ignoring consecutive glue specifiers\MessageBreak
  2742. after the first}%
  2743. {You cannot have two or more glue types next to each other\MessageBreak
  2744. in the IEEEeqnarray column specifications.}%
  2745. \let\@IEEEBPcurtype=a% abort this glue
  2746. \else% not a back to back glue
  2747. \if\@IEEEBPprevtype c\relax% if the previoustype was a col, add column/glue pair to preamble
  2748. \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi
  2749. \toks0={##}%
  2750. % make preamble advance col counter if this environment needs this
  2751. \if@advanceIEEEeqncolcnt\@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}\fi
  2752. % insert the column defintion into the preamble, being careful not to expand
  2753. % the column definition
  2754. \@IEEEappendtoksA{\tabskip=\@IEEEBPcurglue}%
  2755. \@IEEEappendNOEXPANDtoksA{\begingroup\csname @IEEEeqnarraycolPRE}%
  2756. \@IEEEappendtoksA{\@IEEEBPcurcolname}%
  2757. \@IEEEappendNOEXPANDtoksA{\endcsname}%
  2758. \@IEEEappendtoksA{\the\toks0}%
  2759. \@IEEEappendNOEXPANDtoksA{\relax\relax\relax\relax\relax%
  2760. \relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST}%
  2761. \@IEEEappendtoksA{\@IEEEBPcurcolname}%
  2762. \@IEEEappendNOEXPANDtoksA{\endcsname\relax\relax\relax\relax\relax%
  2763. \relax\relax\relax\relax\relax\endgroup}%
  2764. \advance\@IEEEeqnnumcols by 1\relax%one more column in the preamble
  2765. \else% error: non-start glue with no pending column
  2766. \@IEEEclspkgerror{Inter-column glue specifier without a prior column\MessageBreak
  2767. type in the column specifications. Ignoring this glue\MessageBreak
  2768. specifier}%
  2769. {Except for the first and last positions, glue can be placed only\MessageBreak
  2770. between column types.}%
  2771. \let\@IEEEBPcurtype=a% abort this glue
  2772. \fi% previous was a column
  2773. \fi% back-to-back glues
  2774. \fi% is start column glue
  2775. \fi% prev type not a
  2776. }
  2777. % process an acquired letter referenced column and, if necessary, add it to the preamble
  2778. \def\@IEEEprocessCcol{\if\@IEEEBPnexttype g\else
  2779. \if\@IEEEBPnexttype n\else
  2780. % we have a column followed by something other than a glue (or numeral glue)
  2781. % so we must add this column to the preamble now
  2782. \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi%col separator for those after the first
  2783. \if\@IEEEBPnexttype e\@IEEEappendtoksA{\tabskip=\@IEEEBPendglue\relax}\else%put in end glue
  2784. \@IEEEappendtoksA{\tabskip=\@IEEEeqnarraycolSEPdefaultmid\relax}\fi% or default mid glue
  2785. \toks0={##}%
  2786. % make preamble advance col counter if this environment needs this
  2787. \if@advanceIEEEeqncolcnt\@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}\fi
  2788. % insert the column definition into the preamble, being careful not to expand
  2789. % the column definition
  2790. \@IEEEappendNOEXPANDtoksA{\begingroup\csname @IEEEeqnarraycolPRE}%
  2791. \@IEEEappendtoksA{\@IEEEBPcurcolname}%
  2792. \@IEEEappendNOEXPANDtoksA{\endcsname}%
  2793. \@IEEEappendtoksA{\the\toks0}%
  2794. \@IEEEappendNOEXPANDtoksA{\relax\relax\relax\relax\relax%
  2795. \relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST}%
  2796. \@IEEEappendtoksA{\@IEEEBPcurcolname}%
  2797. \@IEEEappendNOEXPANDtoksA{\endcsname\relax\relax\relax\relax\relax%
  2798. \relax\relax\relax\relax\relax\endgroup}%
  2799. \advance\@IEEEeqnnumcols by 1\relax%one more column in the preamble
  2800. \fi%next type not numeral
  2801. \fi%next type not glue
  2802. }
  2803. %%
  2804. %% END OF IEEEeqnarry DEFINITIONS
  2805. %%
  2806. % set up the running headings, this complex because of all the different
  2807. % modes IEEEtran supports
  2808. \if@twoside
  2809. \if@technote
  2810. \def\ps@headings{%
  2811. \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}
  2812. \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}
  2813. \if@draftclsmode
  2814. \if@draftclsmodefoot
  2815. \def\@oddfoot{\scriptsize\@date\hfil DRAFT}
  2816. \def\@evenfoot{\scriptsize DRAFT\hfil\@date}
  2817. \else
  2818. \def\@oddfoot{}\def\@evenfoot{}%
  2819. \fi
  2820. \else
  2821. \def\@oddfoot{}\def\@evenfoot{}
  2822. \fi}
  2823. \else % not a technote
  2824. \def\ps@headings{%
  2825. \if@confmode
  2826. \def\@oddhead{}
  2827. \def\@evenhead{}
  2828. \else
  2829. \def\@oddhead{\hbox{}\scriptsize\rightmark \hfil \thepage}
  2830. \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}
  2831. \fi
  2832. \if@draftclsmode
  2833. \def\@oddhead{\hbox{}\scriptsize\rightmark \hfil \thepage}
  2834. \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}
  2835. \if@draftclsmodefoot
  2836. \def\@oddfoot{\scriptsize\@date\hfil DRAFT}
  2837. \def\@evenfoot{\scriptsize DRAFT\hfil\@date}
  2838. \else
  2839. \def\@oddfoot{}\def\@evenfoot{}%
  2840. \fi
  2841. \else
  2842. \def\@oddfoot{}\def\@evenfoot{}%
  2843. \fi}
  2844. \fi
  2845. \else % single side
  2846. \def\ps@headings{%
  2847. \if@confmode
  2848. \def\@oddhead{}
  2849. \def\@evenhead{}
  2850. \else
  2851. \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}
  2852. \def\@evenhead{}
  2853. \fi
  2854. \if@draftclsmode
  2855. \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}
  2856. \def\@evenhead{}
  2857. \if@draftclsmodefoot
  2858. \def\@oddfoot{\scriptsize \@date \hfil DRAFT}
  2859. \else
  2860. \def\@oddfoot{}
  2861. \fi
  2862. \else
  2863. \def\@oddfoot{}
  2864. \fi
  2865. \def\@evenfoot{}}
  2866. \fi
  2867. % title page style
  2868. \def\ps@titlepagestyle{\def\@oddfoot{}\def\@evenfoot{}%
  2869. \if@confmode
  2870. \def\@oddhead{}%
  2871. \def\@evenhead{}%
  2872. \else
  2873. \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}%
  2874. \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}%
  2875. \fi
  2876. \if@draftclsmode
  2877. \def\@oddhead{\hbox{}\scriptsize\leftmark \hfil \thepage}%
  2878. \def\@evenhead{\scriptsize\thepage \hfil \leftmark\hbox{}}%
  2879. \if@draftclsmodefoot
  2880. \def\@oddfoot{\scriptsize \@date\hfil DRAFT}%
  2881. \def\@evenfoot{\scriptsize DRAFT\hfil \@date}%
  2882. \fi
  2883. \else
  2884. % all non-draft mode footers
  2885. \if@IEEEusingpubid
  2886. % for title pages that are using a pubid
  2887. % do not repeat pubid if using peer review option
  2888. \if@peerreviewoption
  2889. \else
  2890. \footskip 0pt%
  2891. \def\@oddfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@pubid}\hss}%
  2892. \def\@evenfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@pubid}\hss}%
  2893. \fi
  2894. \fi
  2895. \fi}
  2896. % peer review cover page style
  2897. \def\ps@peerreviewcoverpagestyle{%
  2898. \def\@oddhead{}\def\@evenhead{}%
  2899. \def\@oddfoot{}\def\@evenfoot{}%
  2900. \if@draftclsmode
  2901. \if@draftclsmodefoot
  2902. \def\@oddfoot{\scriptsize \@date\hfil DRAFT}%
  2903. \def\@evenfoot{\scriptsize DRAFT\hfil \@date}%
  2904. \fi
  2905. \else
  2906. % non-draft mode footers
  2907. \if@IEEEusingpubid
  2908. \footskip 0pt%
  2909. \def\@oddfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@pubid}\hss}%
  2910. \def\@evenfoot{\hss\normalfont\footnotesize\raisebox{1.5ex}[1.5ex]{\@pubid}\hss}%
  2911. \fi
  2912. \fi}
  2913. % start with empty headings
  2914. \def\rightmark{}\def\leftmark{}
  2915. %% Defines the command for putting the header. \footernote{TEXT} is the same
  2916. %% as \markboth{TEXT}{TEXT}.
  2917. %% Note that all the text is forced into uppercase, if you have some text
  2918. %% that needs to be in lower case, for instance et. al., then either manually
  2919. %% set \leftmark and \rightmark or use \MakeLowercase{et. al.} within the
  2920. %% arguments to \markboth.
  2921. \def\markboth#1#2{\def\leftmark{\MakeUppercase{#1}}\def\rightmark{\MakeUppercase{#2}}}
  2922. \def\footernote#1{\markboth{#1}{#1}}
  2923. \def\today{\ifcase\month\or
  2924. January\or February\or March\or April\or May\or June\or
  2925. July\or August\or September\or October\or November\or December\fi
  2926. \space\number\day, \number\year}
  2927. %% CITATION AND BIBLIOGRAPHY COMMANDS
  2928. %%
  2929. %% V1.6 no longer supports the older, nonstandard \shortcite and \citename setup stuff
  2930. %
  2931. %
  2932. % Modify Latex2e \@citex to separate citations with "], ["
  2933. \def\@citex[#1]#2{%
  2934. \let\@citea\@empty
  2935. \@cite{\@for\@citeb:=#2\do
  2936. {\@citea\def\@citea{], [}%
  2937. \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
  2938. \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
  2939. \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
  2940. \G@refundefinedtrue
  2941. \@latex@warning
  2942. {Citation `\@citeb' on page \thepage \space undefined}}%
  2943. {\hbox{\csname b@\@citeb\endcsname}}}}{#1}}
  2944. % V1.6 we create hooks for the optional use of Donald Arseneau's
  2945. % cite.sty package. cite.sty is "smart" and will notice that the
  2946. % following format controls are already defined and will not
  2947. % redefine them. The result will be the proper sorting of the
  2948. % citation numbers and auto detection of 3 or more entry "ranges" -
  2949. % all in IEEE style: [1], [2], [5]--[7], [12]
  2950. % This also allows for an optional note, i.e., \cite[mynote]{..}.
  2951. % If the \cite with note has more than one reference, the note will
  2952. % be applied to the last of the listed references. It is generally
  2953. % desired that if a note is given, only one reference is listed in
  2954. % that \cite.
  2955. % Thanks to Mr. Arseneau for providing the required format arguments
  2956. % to produce the IEEE style.
  2957. \def\citepunct{], [}
  2958. \def\citedash{]--[}
  2959. % V1.6b providing this command makes hyperref think the natbib package is
  2960. % in use so that it will not interfere with cite.sty. However, as a result,
  2961. % citation numbers will not be hyperlinked.
  2962. \def\NAT@parse{\typeout{IEEEtran error: Attempt to use fake Natbib command
  2963. which is provided to fool Hyperref.}}
  2964. % it easy enough to override via:
  2965. % \let\NAT@parse\undefined
  2966. % V1.6 class files should always provide these
  2967. \def\newblock{\hskip .11em\@plus.33em\@minus.07em}
  2968. \let\@openbib@code\@empty
  2969. % Provide support for the control entries of IEEEtran.bst V1.00 and later.
  2970. \def\bstctlcite#1{\@bsphack
  2971. \@for\@citeb:=#1\do{%
  2972. \edef\@citeb{\expandafter\@firstofone\@citeb}%
  2973. \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi}%
  2974. \@esphack}
  2975. % V1.6 provide a way for a user to execute a command just before
  2976. % a given reference number - used to insert a \newpage to balance
  2977. % the columns on the last page
  2978. \edef\@IEEEtriggerrefnum{0} % the default of zero means that
  2979. % the command is not executed
  2980. \def\@IEEEtriggercmd{\newpage}
  2981. % allow the user to alter the triggered command
  2982. \long\def\IEEEtriggercmd#1{\long\def\@IEEEtriggercmd{#1}}
  2983. % allow user a way to specify the reference number just before the
  2984. % command is executed
  2985. \def\IEEEtriggeratref#1{\@IEEEtrantmpcountA=#1%
  2986. \edef\@IEEEtriggerrefnum{\the\@IEEEtrantmpcountA}}%
  2987. % trigger command at the given reference
  2988. \def\@IEEEbibitemprefix{\@IEEEtrantmpcountA=\@IEEEtriggerrefnum\relax%
  2989. \advance\@IEEEtrantmpcountA by -1\relax%
  2990. \ifnum\c@enumiv=\@IEEEtrantmpcountA\relax\@IEEEtriggercmd\relax\fi}
  2991. \def\@biblabel#1{[#1]}
  2992. \def\thebibliography#1{\section*{References}%
  2993. \addcontentsline{toc}{section}{References}%
  2994. % V1.6 add some rubber space here and provide a command trigger
  2995. \footnotesize \vskip 0.3\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip%
  2996. \list{\@biblabel{\@arabic\c@enumiv}}%
  2997. {\settowidth\labelwidth{\@biblabel{#1}}%
  2998. \leftmargin\labelwidth
  2999. \advance\leftmargin\labelsep\relax
  3000. \itemsep 0pt plus .5pt\relax%
  3001. \usecounter{enumiv}%
  3002. \let\p@enumiv\@empty
  3003. \renewcommand\theenumiv{\@arabic\c@enumiv}}%
  3004. \let\@IEEElatexbibitem\bibitem%
  3005. \def\bibitem{\@IEEEbibitemprefix\@IEEElatexbibitem}%
  3006. \def\newblock{\hskip .11em plus .33em minus .07em}%
  3007. % originally:
  3008. % \sloppy\clubpenalty4000\widowpenalty4000%
  3009. % by adding the \interlinepenalty here, we make it more
  3010. % difficult, but not impossible, for LaTeX to break within a reference.
  3011. % IEEE almost never breaks a reference (but they do it more often with
  3012. % technotes). You may get an underfull vbox warning around the bibliography,
  3013. % but the final result will be much more like what IEEE will publish.
  3014. % MDS 11/2000
  3015. \if@technote\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty100%
  3016. \else\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty500\fi%
  3017. \sfcode`\.=1000\relax}
  3018. \let\endthebibliography=\endlist
  3019. % TITLE PAGE COMMANDS
  3020. %
  3021. %
  3022. % \IEEEmembership is used to produce the sublargesize italic font used to indicate author
  3023. % IEEE membership.
  3024. \def\IEEEmembership#1{{\sublargesize\normalfont\textit{#1}}}
  3025. % \authorrefmark{} produces a footnote type symbol to indicate author affiliation.
  3026. % When given an argument of 1 to 9, \authorrefmark{} follows the standard LaTeX footnote
  3027. % symbol sequence convention. However, for arguments 10 and above, \authorrefmark{}
  3028. % reverts to using lower case roman numerals, so it cannot overflow. Do note that you
  3029. % cannot use \footnotemark[] in place of \authorrefmark{} within \author as the footnote
  3030. % symbols will have been turned off to prevent \thanks from creating footnote marks.
  3031. % \authorrefmark{} produces a symbol that appears to LaTeX as having zero vertical
  3032. % height - this allows for a more compact line packing, but the user must ensure that
  3033. % the interline spacing is large enough to prevent \authorrefmark{} from colliding
  3034. % with the text above.
  3035. \def\authorrefmark#1{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or%
  3036. \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger%
  3037. \or \ddagger\ddagger \else\textsuperscript{\expandafter\romannumeral#1}\fi}}}}
  3038. % FONT CONTROLS AND SPACINGS FOR CONFERENCE MODE AUTHOR NAME AND AFFILIATION BLOCKS
  3039. %
  3040. % The default font styles for the author name and affiliation blocks (confmode)
  3041. \def\@IEEEauthorblockNstyle{\normalfont\sublargesize}
  3042. \def\@IEEEauthorblockAstyle{\normalfont\normalsize}
  3043. % The default if the user does not use an author block
  3044. \def\@IEEEauthordefaulttextstyle{\normalfont\sublargesize}
  3045. % spacing from title (or special paper notice) to author name blocks (confmode)
  3046. % can be negative
  3047. \def\@IEEEauthorblockconfadjspace{-0.25em}
  3048. % spacing between name and affiliation blocks (confmode)
  3049. % This can be negative.
  3050. % IEEE doesn't want any added spacing here, but I will leave these
  3051. % controls in place in case they ever change their mind.
  3052. % Personally, I like 0.75ex.
  3053. %\def\@IEEEauthorblockNtopspace{0.75ex}
  3054. %\def\@IEEEauthorblockAtopspace{0.75ex}
  3055. \def\@IEEEauthorblockNtopspace{0.0ex}
  3056. \def\@IEEEauthorblockAtopspace{0.0ex}
  3057. % baseline spacing within name and affiliation blocks (confmode)
  3058. % must be positive, spacings below certain values will make
  3059. % the position of line of text sensitive to the contents of the
  3060. % line above it i.e., whether or not the prior line has descenders,
  3061. % subscripts, etc. For this reason it is a good idea to keep
  3062. % these above 2.6ex
  3063. \def\@IEEEauthorblockNinterlinespace{2.6ex}
  3064. \def\@IEEEauthorblockAinterlinespace{2.75ex}
  3065. % This tracks the required strut size.
  3066. % See the \@IEEEauthorhalign command for the actual default value used.
  3067. \def\@IEEEauthorblockXinterlinespace{2.7ex}
  3068. % variables to retain font size and style across groups
  3069. % values given here have no effect as they will be overwritten later
  3070. \gdef\@IEEESAVESTATEfontsize{10}
  3071. \gdef\@IEEESAVESTATEfontbaselineskip{12}
  3072. \gdef\@IEEESAVESTATEfontencoding{OT1}
  3073. \gdef\@IEEESAVESTATEfontfamily{ptm}
  3074. \gdef\@IEEESAVESTATEfontseries{m}
  3075. \gdef\@IEEESAVESTATEfontshape{n}
  3076. % saves the current font attributes
  3077. \def\@IEEEcurfontSAVE{\global\let\@IEEESAVESTATEfontsize\f@size%
  3078. \global\let\@IEEESAVESTATEfontbaselineskip\f@baselineskip%
  3079. \global\let\@IEEESAVESTATEfontencoding\f@encoding%
  3080. \global\let\@IEEESAVESTATEfontfamily\f@family%
  3081. \global\let\@IEEESAVESTATEfontseries\f@series%
  3082. \global\let\@IEEESAVESTATEfontshape\f@shape}
  3083. % restores the saved font attributes
  3084. \def\@IEEEcurfontRESTORE{\fontsize{\@IEEESAVESTATEfontsize}{\@IEEESAVESTATEfontbaselineskip}%
  3085. \fontencoding{\@IEEESAVESTATEfontencoding}%
  3086. \fontfamily{\@IEEESAVESTATEfontfamily}%
  3087. \fontseries{\@IEEESAVESTATEfontseries}%
  3088. \fontshape{\@IEEESAVESTATEfontshape}%
  3089. \selectfont}
  3090. % variable to indicate if the current block is the first block in the column
  3091. \newif\if@IEEEprevauthorblockincol \@IEEEprevauthorblockincolfalse
  3092. % the command places a strut with height and depth = \@IEEEauthorblockXinterlinespace
  3093. % we use this technique to have complete manual control over the spacing of the lines
  3094. % within the halign environment.
  3095. % We set the below baseline portion at 30%, the above
  3096. % baseline portion at 70% of the total length.
  3097. % Responds to changes in the document's \baselinestretch
  3098. \def\@IEEEauthorstrutrule{\@IEEEtrantmpdimenA\@IEEEauthorblockXinterlinespace%
  3099. \@IEEEtrantmpdimenA=\baselinestretch\@IEEEtrantmpdimenA%
  3100. \rule[-0.3\@IEEEtrantmpdimenA]{0pt}{\@IEEEtrantmpdimenA}}
  3101. % blocks to hold the authors' names and affilations.
  3102. % Makes formatting easy for conferences
  3103. %
  3104. % use real definitions in conference mode
  3105. % name block
  3106. \def\authorblockN#1{\relax\@IEEEauthorblockNstyle% set the default text style
  3107. \gdef\@IEEEauthorblockXinterlinespace{0pt}% disable strut for spacer row
  3108. % the \expandafter hides the \cr in conditional tex, see the array.sty docs
  3109. % for details, probably not needed here as the \cr is in a macro
  3110. % do a spacer row if needed
  3111. \if@IEEEprevauthorblockincol\expandafter\@IEEEauthorblockNtopspaceline\fi
  3112. \global\@IEEEprevauthorblockincoltrue% we now have a block in this column
  3113. %restore the correct strut value
  3114. \gdef\@IEEEauthorblockXinterlinespace{\@IEEEauthorblockNinterlinespace}%
  3115. % input the author names
  3116. #1%
  3117. % end the row if the user did not already
  3118. \crcr}
  3119. % spacer row for names
  3120. \def\@IEEEauthorblockNtopspaceline{\cr\noalign{\vskip\@IEEEauthorblockNtopspace}}
  3121. %
  3122. % affiliation block
  3123. \def\authorblockA#1{\relax\@IEEEauthorblockAstyle% set the default text style
  3124. \gdef\@IEEEauthorblockXinterlinespace{0pt}%disable strut for spacer row
  3125. % the \expandafter hides the \cr in conditional tex, see the array.sty docs
  3126. % for details, probably not needed here as the \cr is in a macro
  3127. % do a spacer row if needed
  3128. \if@IEEEprevauthorblockincol\expandafter\@IEEEauthorblockAtopspaceline\fi
  3129. \global\@IEEEprevauthorblockincoltrue% we now have a block in this column
  3130. %restore the correct strut value
  3131. \gdef\@IEEEauthorblockXinterlinespace{\@IEEEauthorblockAinterlinespace}%
  3132. % input the author affiliations
  3133. #1%
  3134. % end the row if the user did not already
  3135. \crcr}
  3136. % spacer row for affiliations
  3137. \def\@IEEEauthorblockAtopspaceline{\cr\noalign{\vskip\@IEEEauthorblockAtopspace}}
  3138. % allow papers to compile even if author blocks are used in modes other
  3139. % than conference or peerreviewca. For such cases, we provide dummy blocks.
  3140. \if@confmode
  3141. \else
  3142. \if@peerreviewcaoption\else
  3143. % not conference or peerreviewca mode
  3144. \def\authorblockN#1{#1}%
  3145. \def\authorblockA#1{#1}%
  3146. \fi
  3147. \fi
  3148. % we provide our own halign so as not to have to depend on tabular
  3149. \def\@IEEEauthorhalign{\@IEEEauthordefaulttextstyle% default text style
  3150. \lineskip=0pt\relax% disable line spacing
  3151. \lineskiplimit=0pt\relax%
  3152. \baselineskip=0pt\relax%
  3153. \@IEEEcurfontSAVE% save the current font
  3154. \mathsurround\z@\relax% no extra spacing around math
  3155. \let\\\@IEEEauthorhaligncr% replace newline with halign friendly one
  3156. \tabskip=0pt\relax% no column spacing
  3157. \everycr{}% ensure no problems here
  3158. \@IEEEprevauthorblockincolfalse% no author blocks yet
  3159. \def\@IEEEauthorblockXinterlinespace{2.7ex}% default interline space
  3160. \vtop\bgroup%vtop box
  3161. \halign\bgroup&\relax\hfil\@IEEEcurfontRESTORE\relax ##\relax
  3162. \hfil\@IEEEcurfontSAVE\@IEEEauthorstrutrule\cr}
  3163. % ensure last line, exit from halign, close vbox
  3164. \def\end@IEEEauthorhalign{\crcr\egroup\egroup}
  3165. % handle bogus star form
  3166. \def\@IEEEauthorhaligncr{{\ifnum0=`}\fi\@ifstar{\@@IEEEauthorhaligncr}{\@@IEEEauthorhaligncr}}
  3167. % test and setup the optional argument to \\[]
  3168. \def\@@IEEEauthorhaligncr{\@testopt\@@@IEEEauthorhaligncr\z@skip}
  3169. % end the line and do the optional spacer
  3170. \def\@@@IEEEauthorhaligncr[#1]{\ifnum0=`{\fi}\cr\noalign{\vskip#1\relax}}
  3171. % flag to prevent multiple \and warning messages
  3172. \newif\if@IEEEWARNand
  3173. \@IEEEWARNandtrue
  3174. % if in conference or peerreviewca modes, we support the use of \and as \author is a
  3175. % tabular environment, otherwise we warn the user that \and is invalid
  3176. % outside of conference or peerreviewca modes.
  3177. \def\and{\relax} % provide a bogus \and that we will then override
  3178. \renewcommand{\and}[1][\relax]{\if@IEEEWARNand\typeout{** WARNING: \noexpand\and is valid only
  3179. when in conference or peerreviewca}\typeout{modes (line \the\inputlineno).}\fi\global\@IEEEWARNandfalse}
  3180. \if@confmode%
  3181. \renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}%
  3182. \fi
  3183. \if@peerreviewcaoption
  3184. \renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}%
  3185. \fi
  3186. % page clearing command
  3187. % based on LaTeX2e's \cleardoublepage, but allows different page styles
  3188. % for the inserted blank pages
  3189. \def\@IEEEcleardoublepage#1{\clearpage\if@twoside\ifodd\c@page\else
  3190. \hbox{}\thispagestyle{#1}\newpage\if@twocolumn\hbox{}\thispagestyle{#1}\newpage\fi\fi\fi}
  3191. % user command to invoke the title page
  3192. \def\maketitle{\par%
  3193. \begingroup%
  3194. \normalfont%
  3195. \def\thefootnote{}% the \thanks{} mark type is empty
  3196. \def\footnotemark{}% and kill space from \thanks within author
  3197. \footnotesize% equal spacing between thanks lines
  3198. \footnotesep 0.7\baselineskip%see global setting of \footnotesep for more info
  3199. \normalsize%
  3200. \if@peerreviewoption
  3201. \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext%
  3202. \thispagestyle{peerreviewcoverpagestyle}\@thanks%
  3203. \else
  3204. \if@twocolumn%
  3205. \if@technote%
  3206. \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext%
  3207. \else
  3208. \twocolumn[\@maketitle\@IEEEdynamictitlevspace\@IEEEaftertitletext]%
  3209. \fi
  3210. \else
  3211. \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext%
  3212. \fi
  3213. \thispagestyle{titlepagestyle}\@thanks%
  3214. \fi
  3215. % pullup page for pubid if used.
  3216. \if@IEEEusingpubid
  3217. \enlargethispage{-\@pubidpullup}%
  3218. \fi
  3219. \endgroup
  3220. \setcounter{footnote}{0}\let\maketitle\relax\let\@maketitle\relax
  3221. \gdef\@thanks{}
  3222. % v1.6b do not clear these as we will need the title again for peer review papers
  3223. % \gdef\@author{}\gdef\@title{}%
  3224. \let\thanks\relax}
  3225. % formats the Title, authors names, affiliations and special paper notice
  3226. % THIS IS A CONTROLLED SPACING COMMAND! Do not allow blank lines or unintentional
  3227. % spaces to enter the definition - use % at the end of each line
  3228. % Changed Title font to \LARGE from \Huge
  3229. \def\@maketitle{\newpage
  3230. \begin{center}%
  3231. \if@technote%
  3232. {\bfseries\large\@title\par}\vskip 1.3em{\lineskip .5em\@author\@specialpapernotice\par}%
  3233. \else% not a technote
  3234. \vskip0.25in{\LARGE\@title\par}\vskip1.0em\par%
  3235. % V1.6 handle \author differently if in conference mode
  3236. \if@confmode%
  3237. {\@specialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
  3238. \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par}%
  3239. \else% peerreviewca, peerreview or journal
  3240. \if@peerreviewcaoption
  3241. % peerreviewca handles author names just like conference mode
  3242. {\@specialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
  3243. \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par}%
  3244. \else % journal or peerreview
  3245. {\lineskip.5em\sublargesize\@author\@specialpapernotice\par}%
  3246. \fi
  3247. \fi
  3248. \fi\end{center}}
  3249. % V1.6b define the \IEEEpeerreviewmaketitle as needed
  3250. \if@peerreviewoption
  3251. \def\IEEEpeerreviewmaketitle{\@IEEEcleardoublepage{empty}%
  3252. \if@twocolumnmode
  3253. \twocolumn[\@IEEEpeerreviewmaketitle\@IEEEdynamictitlevspace]
  3254. \else
  3255. \newpage\@IEEEpeerreviewmaketitle\@IEEEstatictitlevskip
  3256. \fi
  3257. \thispagestyle{titlepagestyle}}
  3258. \else
  3259. % \IEEEpeerreviewmaketitle does nothing if peer review option has not been selected
  3260. \def\IEEEpeerreviewmaketitle{\relax}
  3261. \fi
  3262. % peerreview formats the repeated title like the title in journal papers.
  3263. \def\@IEEEpeerreviewmaketitle{\begin{center}%
  3264. \normalfont\normalsize\vskip0.2em{\Huge\@title\par}\vskip1.0em\par
  3265. \end{center}}
  3266. % V1.6
  3267. % this is a static rubber spacer between the title/authors and the main text
  3268. % used for single column text, or when the title appears in the first column
  3269. % of two column text (technotes).
  3270. \def\@IEEEstatictitlevskip{{\normalfont\normalsize
  3271. % adjust spacing to next text
  3272. % v1.6b handle peer review papers
  3273. \if@peerreviewoption
  3274. % for peer review papers, the same value is used for both title pages
  3275. % regardless of the other paper modes
  3276. \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip
  3277. \else
  3278. \if@confmode% conference
  3279. \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip%
  3280. \else%
  3281. \if@technote% technote
  3282. \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip%
  3283. \else% journal uses more space
  3284. \vskip 2.5\baselineskip plus 0.75\baselineskip minus 0.375\baselineskip%
  3285. \fi
  3286. \fi
  3287. \fi}}
  3288. % V1.6
  3289. % This is a dynamically determined rigid spacer between the title/authors
  3290. % and the main text. This is used only for single column titles over two
  3291. % column text (most common)
  3292. % This is bit tricky because we have to ensure that the textheight of the
  3293. % main text is an integer multiple of \baselineskip
  3294. % otherwise underfull vbox problems may develop in the second column of the
  3295. % text on the titlepage
  3296. % The possible use of \pubid must also be taken into account.
  3297. \def\@IEEEdynamictitlevspace{{%
  3298. % we run within a group so that all the macros can be forgotten when we are done
  3299. \def\thanks##1{\relax}%don't allow \thanks to run when we evaluate the vbox height
  3300. \normalfont\normalsize% we declare more descriptive variable names
  3301. \let\@maintextheight=\@IEEEtrantmpdimenA%height of the main text columns
  3302. \let\@INTmaintextheight=\@IEEEtrantmpdimenB%height of the main text columns with integer # lines
  3303. % set the nominal and minimum values for the title spacer
  3304. % the dynamic algorithm will not allow the spacer size to
  3305. % become less than \@MINtitlevspace - instead it will be
  3306. % lengthened
  3307. % default to journal values
  3308. \def\@NORMtitlevspace{2.5\baselineskip}%
  3309. \def\@MINtitlevspace{2\baselineskip}%
  3310. % conferences and technotes need tighter spacing
  3311. \if@confmode%conference
  3312. \def\@NORMtitlevspace{1\baselineskip}%
  3313. \def\@MINtitlevspace{0.75\baselineskip}%
  3314. \fi
  3315. \if@technote%technote
  3316. \def\@NORMtitlevspace{1\baselineskip}%
  3317. \def\@MINtitlevspace{0.75\baselineskip}%
  3318. \fi%
  3319. % get the height that the title will take up
  3320. \if@peerreviewoption
  3321. \settoheight{\@maintextheight}{\vbox{\hsize\textwidth \@IEEEpeerreviewmaketitle}}%
  3322. \else
  3323. \settoheight{\@maintextheight}{\vbox{\hsize\textwidth \@maketitle}}%
  3324. \fi
  3325. \@maintextheight=-\@maintextheight% title takes away from maintext, so reverse sign
  3326. % add the height of the page textheight
  3327. \advance\@maintextheight by \textheight%
  3328. % correct for title pages using pubid
  3329. \if@peerreviewoption\else
  3330. % peerreview papers use the pubid on the cover page only.
  3331. % And the cover page uses a static spacer.
  3332. \if@IEEEusingpubid\advance\@maintextheight by -\@pubidpullup\fi
  3333. \fi%
  3334. % subtract off the nominal value of the title bottom spacer
  3335. \advance\@maintextheight by -\@NORMtitlevspace%
  3336. % \topskip takes away some too
  3337. \advance\@maintextheight by -\topskip%
  3338. % calculate the column height of the main text for lines
  3339. % now we calculate the main text height as if holding
  3340. % an integer number of \normalsize lines after the first
  3341. % and discard any excess fractional remainder
  3342. % we subtracted the first line, because the first line
  3343. % is placed \topskip into the maintext, not \baselineskip like the
  3344. % rest of the lines.
  3345. \@INTmaintextheight=\@maintextheight%
  3346. \divide\@INTmaintextheight by \baselineskip%
  3347. \multiply\@INTmaintextheight by \baselineskip%
  3348. % now we calculate how much the title spacer height will
  3349. % have to be reduced from nominal (\@REDUCEmaintextheight is always
  3350. % a positive value) so that the maintext area will contain an integer
  3351. % number of normal size lines
  3352. % we change variable names here (to avoid confusion) as we no longer
  3353. % need \@INTmaintextheight and can reuse its dimen register
  3354. \let\@REDUCEmaintextheight=\@INTmaintextheight%
  3355. \advance\@REDUCEmaintextheight by -\@maintextheight%
  3356. \advance\@REDUCEmaintextheight by \baselineskip%
  3357. % this is the calculated height of the spacer
  3358. % we change variable names here (to avoid confusion) as we no longer
  3359. % need \@maintextheight and can reuse its dimen register
  3360. \let\@COMPENSATElen=\@maintextheight%
  3361. \@COMPENSATElen=\@NORMtitlevspace% set the nominal value
  3362. % we go with the reduced length if it is smaller than an increase
  3363. \ifdim\@REDUCEmaintextheight < 0.5\baselineskip\relax%
  3364. \advance\@COMPENSATElen by -\@REDUCEmaintextheight%
  3365. % if the resulting spacer is too small back out and go with an increase instead
  3366. \ifdim\@COMPENSATElen<\@MINtitlevspace\relax%
  3367. \advance\@COMPENSATElen by \baselineskip%
  3368. \fi%
  3369. \else%
  3370. % go with an increase because it is closer to the nominal than a decrease
  3371. \advance\@COMPENSATElen by -\@REDUCEmaintextheight%
  3372. \advance\@COMPENSATElen by \baselineskip%
  3373. \fi%
  3374. % set the calculated rigid spacer
  3375. \vspace{\@COMPENSATElen}}}
  3376. % V1.6
  3377. % we allow the user access to the last part of the title area
  3378. % useful in emergencies such as when a different spacing is needed
  3379. % This text is NOT compensated for in the dynamic sizer.
  3380. \let\@IEEEaftertitletext=\relax
  3381. \def\IEEEaftertitletext#1{\def\@IEEEaftertitletext{#1}}
  3382. % V1.6 have abstract and keywords strip leading spaces, pars and newlines
  3383. % so that spacing is more tightly controlled.
  3384. \def\abstract{\normalfont%
  3385. \if@twocolumn%
  3386. \@IEEEabskeysecsize\bfseries\textit{Abstract}---\,%
  3387. \else%
  3388. \begin{center}\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{Abstract}\end{center}\quotation\@IEEEabskeysecsize%
  3389. \fi\@IEEEgobbleleadPARNLSP}
  3390. % V1.6 IEEE wants only 1 pica from end of abstract to introduction heading when in
  3391. % conference mode (the heading already has this much above it)
  3392. \def\endabstract{\relax\if@confmode\vspace{0ex}\else\vspace{1.34ex}\fi\par\if@twocolumn\else\endquotation\fi%
  3393. \normalfont\normalsize}
  3394. \def\keywords{\normalfont%
  3395. % IEEE uses the term (in bold italics) "Index Terms" now.
  3396. \if@twocolumn%
  3397. \@IEEEabskeysecsize\bfseries\textit{Index Terms}---\,\relax%
  3398. \else%
  3399. \begin{center}\@IEEEabskeysecsize\bfseries Index Terms\end{center}\quotation\@IEEEabskeysecsize%
  3400. \fi\@IEEEgobbleleadPARNLSP}
  3401. \def\endkeywords{\relax\if@technote\vspace{1.34ex}\else\vspace{0.67ex}\fi%
  3402. \par\if@twocolumn\else\endquotation\fi%
  3403. \normalsize\normalfont}
  3404. % gobbles all leading \, \\ and \par, upon finding first token that
  3405. % is not a \ , \\ or a \par, it ceases and returns that token
  3406. %
  3407. % used to strip leading \, \\ and \par from the input
  3408. % so that such things in the beginning of an environment will not
  3409. % affect the formatting of the text
  3410. \long\def\@IEEEgobbleleadPARNLSP#1{\let\@IEEEswallowthistoken=0%
  3411. \let\@IEEEgobbleleadPARNLSPtoken#1%
  3412. \let\@IEEEgobbleleadPARtoken=\par%
  3413. \let\@IEEEgobbleleadNLtoken=\\%
  3414. \let\@IEEEgobbleleadSPtoken=\ %
  3415. \def\@IEEEgobbleleadSPMACRO{\ }%
  3416. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadPARtoken%
  3417. \let\@IEEEswallowthistoken=1%
  3418. \fi%
  3419. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadNLtoken%
  3420. \let\@IEEEswallowthistoken=1%
  3421. \fi%
  3422. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadSPtoken%
  3423. \let\@IEEEswallowthistoken=1%
  3424. \fi%
  3425. % a control space will come in as a macro
  3426. % when it is the last one on a line
  3427. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadSPMACRO%
  3428. \let\@IEEEswallowthistoken=1%
  3429. \fi%
  3430. % if we have to swallow this token, do so and taste the next one
  3431. % else spit it out and stop gobbling
  3432. \ifx\@IEEEswallowthistoken 1\let\@IEEEnextgobbleleadPARNLSP=\@IEEEgobbleleadPARNLSP\else%
  3433. \let\@IEEEnextgobbleleadPARNLSP=#1\fi%
  3434. \@IEEEnextgobbleleadPARNLSP}%
  3435. % TITLING OF SECTIONS
  3436. \def\@IEEEsectpunct{:\ \,} % Punctuation after run-in section heading (headings which are
  3437. % part of the paragraphs), need little bit more than a space
  3438. \def\@seccntformat#1{\csname the#1dis\endcsname\hskip 0.5em\relax}
  3439. \def\@sect#1#2#3#4#5#6[#7]#8{%
  3440. \ifnum #2>\c@secnumdepth%
  3441. \def\@svsec{}%
  3442. \else%
  3443. \refstepcounter{#1}
  3444. % load section label and spacer into \@svsec
  3445. \protected@edef\@svsec{\@seccntformat{#1}\relax}%
  3446. \fi%
  3447. \@tempskipa #5\relax%
  3448. \ifdim \@tempskipa>\z@% tempskipa determines whether is treated as a high
  3449. \begingroup #6\relax% or low level heading
  3450. \noindent % subsections are NOT indented
  3451. % print top level headings. \@svsec is label, #8 is heading title
  3452. %\@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}
  3453. % IEEE does not block indent the section title text, it flows like normal
  3454. \relax{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par}%
  3455. \endgroup%
  3456. % got rid of sectionmark stuff
  3457. % \csname #1mark\endcsname{#7}
  3458. \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth\relax\else%
  3459. \protect\numberline{\csname the#1\endcsname}\fi#7}%
  3460. \else % printout low level headings
  3461. % svsechd seems to swallow the trailing space, protect it with \mbox{}
  3462. % got rid of sectionmark stuff
  3463. \def\@svsechd{#6\hskip #3\@svsec #8\@IEEEsectpunct\mbox{}%\csname #1mark\endcsname{#7}
  3464. \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth\relax\else%
  3465. \protect\numberline{\csname the#1\endcsname}\fi#7}}
  3466. \fi%skip down
  3467. \@xsect{#5}}
  3468. % section* handler
  3469. \def\@ssect#1#2#3#4#5{\@tempskipa #3\relax%
  3470. \ifdim \@tempskipa>\z@%
  3471. %\begingroup #4\@hangfrom{\hskip #1}{\interlinepenalty \@M #5\par}\endgroup
  3472. % IEEE does not block indent the section title text, it flows like normal
  3473. \begingroup \noindent #4\relax{\hskip #1}{\interlinepenalty \@M #5\par}\endgroup%
  3474. % svsechd swallows the trailing space, protect it with \mbox{}
  3475. \else \def\@svsechd{#4\hskip #1\relax #5\@IEEEsectpunct\mbox{}}\fi%
  3476. \@xsect{#3}}
  3477. %% SECTION heading spacing and font
  3478. %%
  3479. % arguments are: #1 - sectiontype name
  3480. % (for \@sect) #2 - section level
  3481. % #3 - section heading indent
  3482. % #4 - top separation (absolute value used, neg indicates not to indent main text)
  3483. % If negative, make stretch parts negative too!
  3484. % #5 - (absolute value used) positive: bottom separation after heading,
  3485. % negative: amount to indent main text after heading
  3486. % Both #4 and #5 negative means to indent main text and use negative top separation
  3487. % #6 - font control
  3488. % You've got to have \normalfont\normalsize in the font specs below to prevent
  3489. % trouble when you do something like:
  3490. % \section{Note}{\ttfamily TT-TEXT} is known to ...
  3491. % IEEE sometimes REALLY stretches the area before a section
  3492. % heading by up to about 0.5in. However, it may not be a good
  3493. % idea to let LaTeX have quite this much rubber.
  3494. \if@confmode%
  3495. % IEEE wants section heading spacing to decrease for conference mode
  3496. \def\section{\@startsection{section}{1}{\z@}{1.5ex plus 1.5ex minus 0.5ex}%
  3497. {0.7ex plus 1ex minus 0ex}{\normalfont\normalsize\centering\scshape}}%
  3498. \def\subsection{\@startsection{subsection}{2}{\z@}{1.5ex plus 1.5ex minus 0.5ex}%
  3499. {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}%
  3500. \else % for journals
  3501. \def\section{\@startsection{section}{1}{\z@}{3.0ex plus 1.5ex minus 1.5ex}% V1.6 3.0ex from 3.5ex
  3502. {0.7ex plus 1ex minus 0ex}{\normalfont\normalsize\centering\scshape}}%
  3503. \def\subsection{\@startsection{subsection}{2}{\z@}{3.5ex plus 1.5ex minus 1.5ex}%
  3504. {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}%
  3505. \fi
  3506. % decided to put in a little rubber above the section, might help somebody
  3507. \def\subsubsection{\@startsection{subsubsection}{3}{\parindent}{0ex plus 0.1ex minus 0.1ex}%
  3508. {0ex}{\normalfont\normalsize\itshape}}%
  3509. \def\paragraph{\@startsection{paragraph}{4}{2\parindent}{0ex plus 0.1ex minus 0.1ex}%
  3510. {0ex}{\normalfont\normalsize\itshape}}%
  3511. %% ENVIRONMENTS
  3512. % "box" symbols at end of proofs
  3513. \def\QEDclosed{\mbox{\rule[0pt]{1.3ex}{1.3ex}}} % for a filled box
  3514. % V1.6 some journals use an open box instead that will just fit around a closed one
  3515. \def\QEDopen{{\setlength{\fboxsep}{0pt}\setlength{\fboxrule}{0.2pt}\fbox{\rule[0pt]{0pt}{1.3ex}\rule[0pt]{1.3ex}{0pt}}}}
  3516. \def\QED{\QEDclosed} % default to closed
  3517. \def\proof{\noindent\hspace{2em}{\itshape Proof: }}
  3518. \def\endproof{\hspace*{\fill}~\QED\par\endtrivlist\unskip}
  3519. %\itemindent is set to \z@ by list, so define new temporary variable
  3520. \newdimen\@IEEEtmpitemindent
  3521. \def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\topsep 0pt\rmfamily\trivlist%
  3522. \item[\hskip \labelsep{\indent\itshape #1\ #2:}]\itemindent\@IEEEtmpitemindent}
  3523. \def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\topsep 0pt\rmfamily \trivlist%
  3524. % V1.6 IEEE is back to using () around theorem names which are also in italics
  3525. % Thanks to Christian Peel for reporting this.
  3526. \item[\hskip\labelsep{\indent\itshape #1\ #2\ (#3):}]\itemindent\@IEEEtmpitemindent}
  3527. \def\@endtheorem{\endtrivlist\unskip}
  3528. % V1.6
  3529. % display command for the section the theorem is in - so that \thesection
  3530. % is not used as this will be in Roman numerals when we want arabic.
  3531. % LaTeX2e uses \def\@thmcounter#1{\noexpand\arabic{#1}} for the theorem number
  3532. % (second part) display and \def\@thmcountersep{.} as a separator.
  3533. \def\@IEEEthmcounterin#1{\arabic{#1}}
  3534. % redefine the #1#2[#3] form of newtheorem to use a hook to \@IEEEthmcounterin
  3535. \def\@xnthm#1#2[#3]{%
  3536. \expandafter\@ifdefinable\csname #1\endcsname
  3537. {\@definecounter{#1}\@newctr{#1}[#3]%
  3538. \expandafter\xdef\csname the#1\endcsname{%
  3539. \noexpand\@IEEEthmcounterin{#3}\@thmcountersep\@thmcounter{#1}}%
  3540. \global\@namedef{#1}{\@thm{#1}{#2}}%
  3541. \global\@namedef{end#1}{\@endtheorem}}}
  3542. %% SET UP THE DEFAULT PAGESTYLE
  3543. \ps@headings
  3544. \pagenumbering{arabic}
  3545. % normally the page counter starts at 1
  3546. \setcounter{page}{1}
  3547. % however, for peerreview the cover sheet is page 0 or page -1
  3548. % (for duplex printing)
  3549. \if@peerreviewoption
  3550. \if@twoside
  3551. \setcounter{page}{-1}
  3552. \else
  3553. \setcounter{page}{0}
  3554. \fi
  3555. \fi
  3556. % standard book class behavior - let bottom line float up and down as
  3557. % needed when single sided
  3558. \if@twoside\else\raggedbottom\fi
  3559. % if two column - turn on twocolumn, allow word spacings to stretch more and
  3560. % enforce a rigid position for the last lines
  3561. \if@twocolumnmode
  3562. % the peer review option delays invoking twocolumn
  3563. \if@peerreviewoption\else
  3564. \twocolumn
  3565. \fi
  3566. \sloppy
  3567. \flushbottom
  3568. \fi
  3569. % \APPENDIX and \APPENDICES definitions
  3570. % This is the \@ifmtarg command from the LaTeX ifmtarg package
  3571. % by Peter Wilson (CUA) and Donald Arseneau
  3572. % \@ifmtarg is used to determine if an argument to a command
  3573. % is present or not.
  3574. % For instance:
  3575. % \@ifmtarg{#1}{\typeout{empty}}{\typeout{has something}}
  3576. % \@ifmtarg is used with our redefined \section command if
  3577. % \appendices is invoked.
  3578. % The command \section will behave slightly differently depending
  3579. % on whether the user specifies a title:
  3580. % \section{My appendix title}
  3581. % or not:
  3582. % \section{}
  3583. % This way, we can eliminate the blank lines where the title
  3584. % would be, and the unneeded : after Appendix in the table of
  3585. % contents
  3586. \begingroup
  3587. \catcode`\Q=3
  3588. \long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil}
  3589. \long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4}
  3590. \endgroup
  3591. % end of \@ifmtarg defs
  3592. % save the "original" meaning of \section so we can redefine
  3593. % \section after a call to \appendix or \appendices
  3594. \let\@IEEEappendixsavesection\section
  3595. % neat trick to grab and process the argument from \section{argument}
  3596. % we process differently if the user invoked \section{} with no
  3597. % argument (title)
  3598. % note we reroute the call to the old \section*
  3599. \def\@IEEEprocessthesectionargument#1{%
  3600. \@ifmtarg{#1}{%
  3601. \@IEEEappendixsavesection*{Appendix \thesectiondis}%
  3602. \addcontentsline{toc}{section}{Appendix \thesection}}{%
  3603. \@IEEEappendixsavesection*{Appendix \thesectiondis \\* #1}%
  3604. \addcontentsline{toc}{section}{Appendix \thesection: #1}}}
  3605. % we use this if the user calls \section{} after
  3606. % \appendix-- which has no meaning. So, we ignore the
  3607. % command and its argument. Then, warn the user.
  3608. \def\@IEEEdestroythesectionargument#1{\typeout{** WARNING: Ignoring useless
  3609. \protect\section\space in Appendix (line \the\inputlineno).}}
  3610. % remember \thesection forms will be displayed in \ref calls
  3611. % and in the Table of Contents.
  3612. % The \sectiondis form is used in the actual heading itself
  3613. % appendix command for one single appendix
  3614. % normally has no heading. However, if you want a
  3615. % heading, you can do so via the optional argument:
  3616. % \appendix[Optional Heading]
  3617. \def\appendix{\relax}
  3618. \renewcommand{\appendix}[1][]{\par%
  3619. % v1.6 keep hyperref's identifiers unique
  3620. \def\theHsection{Appendix.A}%
  3621. % v1.6 adjust hyperref's string name for the section
  3622. \xdef\Hy@chapapp{appendix}%
  3623. \setcounter{section}{0}%
  3624. \setcounter{subsection}{0}%
  3625. \setcounter{subsubsection}{0}%
  3626. \setcounter{paragraph}{0}%
  3627. \def\thesection{}%
  3628. \def\thesectiondis{}%
  3629. \def\thesubsection{\Alph{subsection}}%
  3630. \refstepcounter{section}% update the \ref counter
  3631. \@ifmtarg{#1}{\@IEEEappendixsavesection*{Appendix}%
  3632. \addcontentsline{toc}{section}{Appendix}}{%
  3633. \@IEEEappendixsavesection*{Appendix \\* #1}%
  3634. \addcontentsline{toc}{section}{Appendix: #1}}%
  3635. % redefine \section command for appendix
  3636. % leave \section* as is
  3637. \def\section{\@ifstar{\@IEEEappendixsavesection*}{%
  3638. \@IEEEdestroythesectionargument}}% throw out the argument
  3639. % of the normal form
  3640. }
  3641. % provides the user a way to choose between
  3642. % Appendix A
  3643. % and
  3644. % Appendix I
  3645. % notation
  3646. % defaults to Roman.
  3647. \newif\ifuseRomanappendices
  3648. \useRomanappendicestrue
  3649. % appendices command for multiple appendices
  3650. % user then calls \section with an argument (possibly empty) to
  3651. % declare the individual appendices
  3652. \def\appendices{\par%
  3653. % v1.6 keep hyperref's identifiers unique
  3654. \def\theHsection{Appendix.\Alph{section}}%
  3655. % v1.6 adjust hyperref's string name for the section
  3656. \xdef\Hy@chapapp{appendix}%
  3657. \setcounter{section}{-1}% we want \refstepcounter to use section 0
  3658. \setcounter{subsection}{0}%
  3659. \setcounter{subsubsection}{0}%
  3660. \setcounter{paragraph}{0}%
  3661. \ifuseRomanappendices%
  3662. \def\thesection{\Roman{section}}%
  3663. \def\thesectiondis{\Roman{section}}%
  3664. \else%
  3665. \def\thesection{\Alph{section}}%
  3666. \def\thesectiondis{\Alph{section}}%
  3667. \fi%
  3668. \refstepcounter{section}% update the \ref counter
  3669. \setcounter{section}{0}% NEXT \section will be the FIRST appendix
  3670. % redefine \section command for appendices
  3671. % leave \section* as is
  3672. \def\section{\@ifstar{\@IEEEappendixsavesection*}{% process the *-form
  3673. \refstepcounter{section}% or is a new section so,
  3674. \@IEEEprocessthesectionargument}}% process the argument
  3675. % of the normal form
  3676. }
  3677. % \PARstart
  3678. % Definition for the big two line drop cap letter at the beginning of the
  3679. % first paragraph of journal papers. The first argument is the first letter
  3680. % of the first word, the second argument is the remaining letters of the
  3681. % first word which will be rendered in upper case.
  3682. % In V1.6 this has been completely rewritten to:
  3683. %
  3684. % 1. no longer have problems when the user begins an environment
  3685. % within the paragraph that uses \PARstart.
  3686. % 2. auto-detect and use the current font family
  3687. % 3. revise handling of the space at the end of the first word so that
  3688. % interword glue will now work as normal.
  3689. % 4. produce correctly aligned edges for the (two) indented lines.
  3690. %
  3691. % We generalize things via control macros - playing with these is fun too.
  3692. %
  3693. % the number of lines that are indented to clear it
  3694. \def\@IEEEPARstartDROPLINES{2}
  3695. % minimum number of lines left on a page to allow a \@PARstart
  3696. % Does not take into consideration rubber shrink, so it tends to
  3697. % be overly cautious
  3698. \def\@IEEEPARstartMINPAGELINES{2}
  3699. % the depth the letter is lowered below the baseline
  3700. % the height (and size) of the letter is determined by the sum
  3701. % of this value and the height of a capital "T" in the current
  3702. % font. It is a good idea to set this value in terms of the baselineskip
  3703. % so that it can respond to changes therein.
  3704. \def\@IEEEPARstartDROPDEPTH{1.1\baselineskip}
  3705. % This is the separation distance from the drop letter to the main text.
  3706. % Lengths that depend on the font (i.e., ex, em, etc.) will be referenced
  3707. % to the font that is active when PARstart is called.
  3708. \def\@IEEEPARstartSEP{0.15em}
  3709. % definition of \PARstart
  3710. % THIS IS A CONTROLLED SPACING AREA, DO NOT ALLOW SPACES WITHIN THESE LINES
  3711. %
  3712. % The token \@IEEEPARstartfont will be globally defined after the first use
  3713. % of \PARstart and will be a font command which creates the big letter
  3714. % The first argument is the first letter of the first word and the second
  3715. % argument is the rest of the first word(s).
  3716. \def\PARstart#1#2{\par{%
  3717. % if this page does not have enough space, break it and lets start
  3718. % on a new one
  3719. \@IEEEtranneedspace{\@IEEEPARstartMINPAGELINES\baselineskip}{\relax}%
  3720. % calculate the desired height of the big letter
  3721. % it extends from the top of a capital "T" in the current font
  3722. % down to \@IEEEPARstartDROPDEPTH below the current baseline
  3723. \settoheight{\@IEEEtrantmpdimenA}{T}%
  3724. \addtolength{\@IEEEtrantmpdimenA}{\@IEEEPARstartDROPDEPTH}%
  3725. % extract the name of the current font in bold
  3726. % and place it in \@IEEEPARstartFONTNAME
  3727. \def\@IEEEPARstartGETFIRSTWORD##1 ##2\relax{##1}%
  3728. {\bfseries%
  3729. \edef\@IEEEPARstartFONTNAMESPACE{\fontname\font\space}%
  3730. \xdef\@IEEEPARstartFONTNAME{\expandafter\@IEEEPARstartGETFIRSTWORD\@IEEEPARstartFONTNAMESPACE\relax}}%
  3731. % define a font based on this name with a point size equal to the desired
  3732. % height of the drop letter
  3733. \font\@IEEEPARstartsubfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenA\relax%
  3734. % save this value as a counter (integer) value (sp points)
  3735. \@IEEEtrantmpcountA=\@IEEEtrantmpdimenA%
  3736. % now get the height of the actual letter produced by this font size
  3737. \settoheight{\@IEEEtrantmpdimenB}{\@IEEEPARstartsubfont\MakeUppercase{#1}}%
  3738. % If something bogus happens like the first argument is empty or the
  3739. % current font is strange, do not allow a zero height.
  3740. \ifdim\@IEEEtrantmpdimenB=0pt\relax%
  3741. \typeout{** WARNING: PARstart drop letter has zero height! (line \the\inputlineno)}%
  3742. \typeout{ Forcing the drop letter font size to 10pt.}%
  3743. \@IEEEtrantmpdimenB=10pt%
  3744. \fi%
  3745. % and store it as a counter
  3746. \@IEEEtrantmpcountB=\@IEEEtrantmpdimenB%
  3747. % Since a font size doesn't exactly correspond to the height of the capital
  3748. % letters in that font, the actual height of the letter, \@IEEEtrantmpcountB,
  3749. % will be less than that desired, \@IEEEtrantmpcountA
  3750. % we need to raise the font size, \@IEEEtrantmpdimenA
  3751. % by \@IEEEtrantmpcountA / \@IEEEtrantmpcountB
  3752. % But, TeX doesn't have floating point division, so we have to use integer
  3753. % division. Hence the use of the counters.
  3754. % We need to reduce the denominator so that the loss of the remainder will
  3755. % have minimal affect on the accuracy of the result
  3756. \divide\@IEEEtrantmpcountB by 200%
  3757. \divide\@IEEEtrantmpcountA by \@IEEEtrantmpcountB%
  3758. % Then reequalize things when we use TeX's ability to multiply by
  3759. % floating point values
  3760. \@IEEEtrantmpdimenB=0.005\@IEEEtrantmpdimenA%
  3761. \multiply\@IEEEtrantmpdimenB by \@IEEEtrantmpcountA%
  3762. % \@IEEEPARstartfont is globaly set to the calculated font of the big letter
  3763. % We need to carry this out of the local calculation area to to create the
  3764. % big letter.
  3765. \global\font\@IEEEPARstartfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenB%
  3766. % Now set \@IEEEtrantmpdimenA to the width of the big letter
  3767. % We need to carry this out of the local calculation area to set the
  3768. % hanging indent
  3769. \settowidth{\global\@IEEEtrantmpdimenA}{\@IEEEPARstartfont\MakeUppercase{#1}}}%
  3770. % end of the isolated calculation environment
  3771. % add in the extra clearance we want
  3772. \advance\@IEEEtrantmpdimenA by \@IEEEPARstartSEP%
  3773. % \@IEEEtrantmpdimenA has the width of the big letter plus the
  3774. % separation space and \@IEEEPARstartfont is the font we need to use
  3775. % Now, we make the letter and issue the hanging indent command
  3776. % The letter is placed in a box of zero width and height so that other
  3777. % text won't be displaced by it.
  3778. \noindent\hangindent\@IEEEtrantmpdimenA\hangafter=-\@IEEEPARstartDROPLINES%
  3779. \makebox[0pt][l]{\hspace{-\@IEEEtrantmpdimenA}\raisebox{-\@IEEEPARstartDROPDEPTH}[0pt][0pt]{\@IEEEPARstartfont\MakeUppercase{#1}}}\MakeUppercase{#2}}
  3780. % V1.6 \CMPARstart is no longer needed as \PARstart now uses whatever
  3781. % the current font family is.
  3782. % \CMPARstart is provided here for backward compatability.
  3783. \let\CMPARstart=\PARstart
  3784. % determines if the space remaining on a given page is equal to or greater
  3785. % than the specified space of argument one
  3786. % if not, execute argument two (only if the remaining space is greater than zero)
  3787. % and issue a \newpage
  3788. %
  3789. % example: \@IEEEtranneedspace{2in}{\vfill}
  3790. %
  3791. % Does not take into consideration rubber shrinkage, so it tends to
  3792. % be overly cautious
  3793. % Based on an example posted by Donald Arseneau
  3794. % Note this macro uses \@IEEEtrantmpdimenB internally for calculations,
  3795. % so DO NOT PASS \@IEEEtrantmpdimenB to this routine
  3796. % if you need a dimen register, import with \@IEEEtrantmpdimenA instead
  3797. \def\@IEEEtranneedspace#1#2{\penalty-100\begingroup%shield temp variable
  3798. \@IEEEtrantmpdimenB\pagegoal\advance\@IEEEtrantmpdimenB-\pagetotal% space left
  3799. \ifdim #1>\@IEEEtrantmpdimenB\relax% not enough space left
  3800. \ifdim\@IEEEtrantmpdimenB>\z@\relax #2\fi%
  3801. \newpage%
  3802. \fi\endgroup}
  3803. % BIOGRAPHY ENVIRONMENT
  3804. % Allows user to enter BIOGRAPHY leaving place for picture (adapts to font size)
  3805. % As of V1.5, a new optional argument allows you to have a real graphic!
  3806. % V1.5 and later also fixes the "colliding biographies" which could happen when a
  3807. % biography's text was shorter than the space for the photo.
  3808. % MDS 7/2001
  3809. % V1.6 prevent multiple biographies from making multiple TOC entries
  3810. \newif\if@biographyTOCentrynotmade
  3811. \global\@biographyTOCentrynotmadetrue
  3812. % biography counter so hyperref can jump directly to the biographies
  3813. % and not just the previous section
  3814. \newcounter{biography}
  3815. \setcounter{biography}{0}
  3816. % photo area size
  3817. \def\@IEEEBIOphotowidth{1.0in} % width of the biography photo area
  3818. \def\@IEEEBIOphotodepth{1.25in} % depth (height) of the biography photo area
  3819. % area cleared for photo
  3820. \def\@IEEEBIOhangwidth{1.14in} % width cleared for the biography photo area
  3821. \def\@IEEEBIOhangdepth{1.25in} % depth cleared for the biography photo area
  3822. % actual depth will be a multiple of
  3823. % \baselineskip, rounded up
  3824. \def\@IEEEBIOskipN{4\baselineskip}% nominal value of the vskip above the biography
  3825. \newenvironment{biography}[2][]{\normalfont\footnotesize%
  3826. \unitlength 1in\parskip=0pt\par\parindent 1em\interlinepenalty500%
  3827. % we need enough space to support the hanging indent
  3828. % the nominal value of the spacer
  3829. % and one extra line for good measure
  3830. \@IEEEtrantmpdimenA=\@IEEEBIOhangdepth%
  3831. \advance\@IEEEtrantmpdimenA by \@IEEEBIOskipN%
  3832. \advance\@IEEEtrantmpdimenA by 1\baselineskip%
  3833. % if this page does not have enough space, break it and lets start
  3834. % with a new one
  3835. \@IEEEtranneedspace{\@IEEEtrantmpdimenA}{\relax}%
  3836. % nominal spacer can strech, not shrink use 1fil so user can out stretch with \vfill
  3837. \vskip \@IEEEBIOskipN plus 1fil minus 0\baselineskip%
  3838. % the default box for where the photo goes
  3839. \def\@IEEEtempbiographybox{{\setlength{\fboxsep}{0pt}\framebox{\begin{minipage}[b][\@IEEEBIOphotodepth][c]{\@IEEEBIOphotowidth}\centering PLACE\\ PHOTO\\ HERE \end{minipage}}}}%
  3840. %
  3841. % detect if the optional argument was supplied, this requires the
  3842. % \@ifmtarg command as defined in the appendix section above
  3843. % and if so, override the default box with what they want
  3844. \@ifmtarg{#1}{\relax}{\def\@IEEEtempbiographybox{\mbox{\begin{minipage}[b][\@IEEEBIOphotodepth][c]{\@IEEEBIOphotowidth}%
  3845. \centering%
  3846. #1%
  3847. \end{minipage}}}}% end if optional argument supplied
  3848. % Make an entry into the table of contents only if we have not done so before
  3849. \if@biographyTOCentrynotmade%
  3850. % link labels to the biography counter so hyperref will jump
  3851. % to the biography, not the previous section
  3852. \setcounter{biography}{-1}%
  3853. \refstepcounter{biography}%
  3854. \addcontentsline{toc}{section}{Biographies}%
  3855. \global\@biographyTOCentrynotmadefalse%
  3856. \fi%
  3857. % one more biography
  3858. \refstepcounter{biography}%
  3859. % Make an entry for this name into the table of contents
  3860. \addcontentsline{toc}{subsection}{#2}%
  3861. % V1.6 properly handle if a new paragraph should occur while the
  3862. % hanging indent is still active. Do this by redefining \par so
  3863. % that it will not start a new paragraph. (But it will appear to the
  3864. % user as if it did.) Also, strip any leading pars, newlines, or spaces.
  3865. \let\@IEEEBIOORGparCMD=\par% save the original \par command
  3866. \edef\par{\hfil\break\indent}% the new \par will not be a "real" \par
  3867. \settoheight{\@IEEEtrantmpdimenA}{\@IEEEtempbiographybox}% get height of biography box
  3868. \@IEEEtrantmpdimenB=\@IEEEBIOhangdepth%
  3869. \@IEEEtrantmpcountA=\@IEEEtrantmpdimenB% countA has the hang depth
  3870. \divide\@IEEEtrantmpcountA by \baselineskip% calculates lines needed to produce the hang depth
  3871. \advance\@IEEEtrantmpcountA by 1% ensure we overestimate
  3872. % set the hanging indent
  3873. \hangindent\@IEEEBIOhangwidth%
  3874. \hangafter-\@IEEEtrantmpcountA%
  3875. % reference the top of the photo area to the top of a capital T
  3876. \settoheight{\@IEEEtrantmpdimenB}{\mbox{T}}%
  3877. % set the photo box, give it zero width and height so as not to disturb anything
  3878. \noindent\makebox[0pt][l]{\hspace{-\@IEEEBIOhangwidth}\raisebox{\@IEEEtrantmpdimenB}[0pt][0pt]{\raisebox{-\@IEEEBIOphotodepth}[0pt][0pt]{\@IEEEtempbiographybox}}}%
  3879. % now place the author name and begin the bio text
  3880. \noindent\textbf{#2\ }\@IEEEgobbleleadPARNLSP}{\relax\let\par=\@IEEEBIOORGparCMD\par%
  3881. % 7/2001 V1.5 detect when the biography text is shorter than the photo area
  3882. % and pad the unused area - preventing a collision from the next biography entry
  3883. % MDS
  3884. \ifnum \prevgraf <\@IEEEtrantmpcountA\relax% detect when the biography text is shorter than the photo
  3885. \advance\@IEEEtrantmpcountA by -\prevgraf% calculate how many lines we need to pad
  3886. \advance\@IEEEtrantmpcountA by -1\relax% we compensate for the fact that we indented an extra line
  3887. \@IEEEtrantmpdimenA=\baselineskip% calculate the length of the padding
  3888. \multiply\@IEEEtrantmpdimenA by \@IEEEtrantmpcountA%
  3889. \noindent\rule{0pt}{\@IEEEtrantmpdimenA}% insert an invisible support strut
  3890. \fi%
  3891. \par\normalfont}
  3892. % V1.6
  3893. % added biography without a photo environment
  3894. \newenvironment{biographynophoto}[1]{%
  3895. % Make an entry into the table of contents only if we have not done so before
  3896. \if@biographyTOCentrynotmade%
  3897. % link labels to the biography counter so hyperref will jump
  3898. % to the biography, not the previous section
  3899. \setcounter{biography}{-1}%
  3900. \refstepcounter{biography}%
  3901. \addcontentsline{toc}{section}{Biographies}%
  3902. \global\@biographyTOCentrynotmadefalse%
  3903. \fi%
  3904. % one more biography
  3905. \refstepcounter{biography}%
  3906. % Make an entry for this name into the table of contents
  3907. \addcontentsline{toc}{subsection}{#1}%
  3908. \normalfont\footnotesize\interlinepenalty500%
  3909. \vskip 4\baselineskip plus 1fil minus 0\baselineskip%
  3910. \parskip=0pt\par%
  3911. \noindent\textbf{#1\ }\@IEEEgobbleleadPARNLSP}{\relax\par\normalfont}
  3912. % provide the user with some old font commands
  3913. % got this from article.cls
  3914. \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
  3915. \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
  3916. \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
  3917. \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
  3918. \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
  3919. \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
  3920. \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
  3921. \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
  3922. \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
  3923. % SPECIAL PAPER NOTICE COMMANDS
  3924. %
  3925. % holds the special notice text
  3926. \def\@specialpapernotice{\relax}
  3927. % for special papers, like invited papers, the user can do:
  3928. % \specialpapernotice{(Invited Paper)} before \maketitle
  3929. \def\specialpapernotice#1{\if@confmode%
  3930. \def\@specialpapernotice{{\sublargesize\textit{#1}\vspace*{1em}}}%
  3931. \else%
  3932. \def\@specialpapernotice{{\\*[1.5ex]\sublargesize\textit{#1}}\vspace*{-2ex}}%
  3933. \fi}
  3934. % PUBLISHER ID COMMANDS
  3935. % to insert a publisher's ID footer
  3936. % V1.6 \pubid has been changed so that the change in page size and style
  3937. % occurs in \maketitle. \pubid must now be issued prior to \maketitle
  3938. % use \pubidadjcol as before - in the second column of the title page
  3939. % These changes allow \maketitle to take the reduced page height into
  3940. % consideration when dynamically setting the space between the author
  3941. % names and the maintext.
  3942. %
  3943. % the amount the main text is pulled up to make room for the
  3944. % publisher's ID footer
  3945. % IEEE uses about 1.3\baselineskip for journals,
  3946. % dynamic title spacing will clean up the fraction
  3947. \def\@pubidpullup{1.3\baselineskip}
  3948. \if@technote
  3949. % for technotes it must be an integer of baselineskip as there can be no
  3950. % dynamic title spacing for two column mode technotes (the title is in the
  3951. % in first column) and we should maintain an integer number of lines in the
  3952. % second column
  3953. % There are some examples (such as older issues of "Transactions on
  3954. % Information Theory") in which IEEE really pulls the text off the ID for
  3955. % technotes - about 0.55in (or 4\baselineskip). We'll use 2\baselineskip
  3956. % and call it even.
  3957. \def\@pubidpullup{2\baselineskip}
  3958. \fi
  3959. % holds the ID text
  3960. \def\@pubid{\relax}
  3961. % flag so \maketitle can tell if \pubid was called
  3962. \newif\if@IEEEusingpubid
  3963. \global\@IEEEusingpubidfalse
  3964. % issue this command in the page to have the ID at the bottom
  3965. % V1.6 use before \maketitle
  3966. \def\pubid#1{\def\@pubid{#1} \global\@IEEEusingpubidtrue}
  3967. % command which will pull up (shorten) the column it is executed in
  3968. % to make room for the publisher ID. Place in the second column of
  3969. % the title page when using \pubid
  3970. % Is smart enough not to do anything when in single column text or
  3971. % if the user hasn't called \pubid
  3972. % currently needed in for the second column of a page with the
  3973. % publisher ID. If not needed in future releases, please provide this
  3974. % command and define it as \relax for backward compatibility
  3975. % v1.6b do not allow command to operate if the peer review option has been
  3976. % selected because \pubidadjcol will not be on the cover page.
  3977. \def\pubidadjcol{\if@peerreviewoption\else\if@twocolumn\if@IEEEusingpubid\enlargethispage{-\@pubidpullup}\fi\fi\fi}
  3978. % Special thanks to Peter Wilson, Daniel Luecking, and the other
  3979. % gurus at comp.text.tex, for helping me to understand how best to
  3980. % implement the pubid command in LaTeX.
  3981. %% Lockout some commands under various conditions
  3982. % general purpose bit bucket
  3983. \newsavebox{\@IEEEtranrubishbin}
  3984. % flags to prevent multiple warning messages
  3985. \newif\if@IEEEWARNthanks
  3986. \newif\if@IEEEWARNPARstart
  3987. \newif\if@IEEEWARNCMPARstart
  3988. \newif\if@IEEEWARNkeywords
  3989. \newif\if@IEEEWARNbiography
  3990. \newif\if@IEEEWARNbiographynophoto
  3991. \newif\if@IEEEWARNpubid
  3992. \newif\if@IEEEWARNpubidadjcol
  3993. \newif\if@IEEEWARNIEEEmembership
  3994. \newif\if@IEEEWARNIEEEaftertitletext
  3995. \@IEEEWARNthankstrue
  3996. \@IEEEWARNPARstarttrue
  3997. \@IEEEWARNCMPARstarttrue
  3998. \@IEEEWARNkeywordstrue
  3999. \@IEEEWARNbiographytrue
  4000. \@IEEEWARNbiographynophototrue
  4001. \@IEEEWARNpubidtrue
  4002. \@IEEEWARNpubidadjcoltrue
  4003. \@IEEEWARNIEEEmembershiptrue
  4004. \@IEEEWARNIEEEaftertitletexttrue
  4005. %% Lockout some commands when in various modes, but allow them to be restored if needed
  4006. %%
  4007. % save commands which might be locked out
  4008. % so that the user can later restore them if needed
  4009. \let\@IEEESAVECMDthanks\thanks
  4010. \let\@IEEESAVECMDPARstart\PARstart
  4011. \let\@IEEESAVECMDCMPARstart\CMPARstart
  4012. \let\@IEEESAVECMDkeywords\keywords
  4013. \let\@IEEESAVECMDendkeywords\endkeywords
  4014. \let\@IEEESAVECMDbiography\biography
  4015. \let\@IEEESAVECMDendbiography\endbiography
  4016. \let\@IEEESAVECMDbiographynophoto\biographynophoto
  4017. \let\@IEEESAVECMDendbiographynophoto\endbiographynophoto
  4018. \let\@IEEESAVECMDpubid\pubid
  4019. \let\@IEEESAVECMDpubidadjcol\pubidadjcol
  4020. \let\@IEEESAVECMDIEEEmembership\IEEEmembership
  4021. \let\@IEEESAVECMDIEEEaftertitletext\IEEEaftertitletext
  4022. % disable \PARstart when in draft mode
  4023. % This may have originally been done because the pre-V1.6 drop letter
  4024. % algorithm had problems with a non-unity baselinestretch
  4025. % At any rate, it seems too formal to have a drop letter in a draft
  4026. % paper.
  4027. \if@draftclsmode
  4028. \def\PARstart#1#2{#1#2\if@IEEEWARNPARstart\typeout{** ATTENTION: \noexpand\PARstart is disabled in draft mode (line \the\inputlineno).}\fi\global\@IEEEWARNPARstartfalse}
  4029. \def\CMPARstart#1#2{#1#2\if@IEEEWARNPARstart\typeout{** ATTENTION: \noexpand\CMPARstart is disabled in draft mode (line \the\inputlineno).}\fi\global\@IEEEWARNCMPARstartfalse}
  4030. \fi
  4031. % and for technotes
  4032. \if@technote
  4033. \def\PARstart#1#2{#1#2\if@IEEEWARNPARstart\typeout{** WARNING: \noexpand\PARstart is locked out for technotes (line \the\inputlineno).}\fi\global\@IEEEWARNPARstartfalse}
  4034. \def\CMPARstart#1#2{#1#2\if@IEEEWARNPARstart\typeout{** WARNING: \noexpand\CMPARstart is locked out for technotes (line \the\inputlineno).}\fi\global\@IEEEWARNCMPARstartfalse}
  4035. \fi
  4036. % lockout unneeded commands when in conference mode
  4037. \if@confmode
  4038. % when locked out, \thanks, \keywords, \biography, \biographynophoto, \pubid,
  4039. % \IEEEmembership and \IEEEaftertitletext will all swallow their given text.
  4040. % \PARstart and \CMPARstart will output a normal character instead
  4041. % warn the user about these commands only once to prevent the console screen
  4042. % from filling up with redundant messages
  4043. \def\thanks#1{\if@IEEEWARNthanks\typeout{** WARNING: \noexpand\thanks is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNthanksfalse}
  4044. \def\PARstart#1#2{#1#2\if@IEEEWARNPARstart\typeout{** WARNING: \noexpand\PARstart is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNPARstartfalse}
  4045. \def\CMPARstart#1#2{#1#2\if@IEEEWARNPARstart\typeout{** WARNING: \noexpand\CMPARstart is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNCMPARstartfalse}
  4046. \renewenvironment{keywords}[1]{\if@IEEEWARNkeywords\typeout{** WARNING: \noexpand\keywords is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNkeywordsfalse%
  4047. \setbox\@IEEEtranrubishbin\vbox\bgroup}{\egroup\relax}
  4048. % LaTeX treats environments and commands with optional arguments differently.
  4049. % the actual ("internal") command is stored as \\commandname
  4050. % (accessed via \csname\string\commandname\endcsname )
  4051. % the "external" command \commandname is a macro with code to determine
  4052. % whether or not the optional argument is presented and to provide the
  4053. % default if it is absent. So, in order to save and restore such a command
  4054. % we would have to save and restore \\commandname as well. But, if LaTeX
  4055. % ever changes the way it names the internal names, the trick would break.
  4056. % Instead let us just define a new environment so that the internal
  4057. % name can be left undisturbed.
  4058. \newenvironment{@IEEEbogusbiography}[2][]{\if@IEEEWARNbiography\typeout{** WARNING: \noexpand\biography is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNbiographyfalse%
  4059. \setbox\@IEEEtranrubishbin\vbox\bgroup}{\egroup\relax}
  4060. % and make biography point to our bogus biography
  4061. \let\biography=\@IEEEbogusbiography
  4062. \let\endbiography=\end@IEEEbogusbiography
  4063. \renewenvironment{biographynophoto}[1]{\if@IEEEWARNbiographynophoto\typeout{** WARNING: \noexpand\biographynophoto is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNbiographynophotofalse%
  4064. \setbox\@IEEEtranrubishbin\vbox\bgroup}{\egroup\relax}
  4065. \def\pubid#1{\if@IEEEWARNpubid\typeout{** WARNING: \noexpand\pubid is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNpubidfalse}
  4066. \def\pubidadjcol{\if@IEEEWARNpubidadjcol\typeout{** WARNING: \noexpand\pubidadjcol is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNpubidadjcolfalse}
  4067. \def\IEEEmembership#1{\if@IEEEWARNIEEEmembership\typeout{** WARNING: \noexpand\IEEEmembership is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEmembershipfalse}
  4068. \def\IEEEaftertitletext#1{\if@IEEEWARNIEEEaftertitletext\typeout{** WARNING: \noexpand\IEEEaftertitletext is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEaftertitletextfalse}
  4069. \fi
  4070. % provide a way to restore the commands that are locked out
  4071. \def\IEEEoverridecommandlockouts{%
  4072. \typeout{** ATTENTION: Overriding command lockouts (line \the\inputlineno).}%
  4073. \let\thanks\@IEEESAVECMDthanks%
  4074. \let\PARstart\@IEEESAVECMDPARstart%
  4075. \let\CMPARstart\@IEEESAVECMDCMPARstart%
  4076. \let\keywords\@IEEESAVECMDkeywords%
  4077. \let\endkeywords\@IEEESAVECMDendkeywords%
  4078. \let\biography\@IEEESAVECMDbiography%
  4079. \let\endbiography\@IEEESAVECMDendbiography%
  4080. \let\biographynophoto\@IEEESAVECMDbiographynophoto%
  4081. \let\endbiographynophoto\@IEEESAVECMDendbiographynophoto%
  4082. \let\pubid\@IEEESAVECMDpubid%
  4083. \let\pubidadjcol\@IEEESAVECMDpubidadjcol%
  4084. \let\IEEEmembership\@IEEESAVECMDIEEEmembership%
  4085. \let\IEEEaftertitletext\@IEEESAVECMDIEEEaftertitletext}
  4086. \endinput
  4087. %%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of IEEEtran.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  4088. % That's all folks!