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.

4733 lines
198 KiB

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