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.

4737 lines
203 KiB

  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{Figure}
  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. %ADDED TODO if no conference option:
  2951. %%\renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}%
  2952. %TODO \renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}%
  2953. % page clearing command
  2954. % based on LaTeX2e's \cleardoublepage, but allows different page styles
  2955. % for the inserted blank pages
  2956. \def\@IEEEcleardoublepage#1{\clearpage\if@twoside\ifodd\c@page\else
  2957. \hbox{}\thispagestyle{#1}\newpage\if@twocolumn\hbox{}\thispagestyle{#1}\newpage\fi\fi\fi}
  2958. % user command to invoke the title page
  2959. \def\maketitle{\par%
  2960. \begingroup%
  2961. \normalfont%
  2962. \def\thefootnote{}% the \thanks{} mark type is empty
  2963. \def\footnotemark{}% and kill space from \thanks within author
  2964. \let\@makefnmark\relax% V1.7, must *really* kill footnotemark to remove all \textsuperscript spacing as well.
  2965. \footnotesize% equal spacing between thanks lines
  2966. \footnotesep 0.7\baselineskip%see global setting of \footnotesep for more info
  2967. % V1.7 disable \thanks note indention for compsoc
  2968. \@IEEEcompsoconly{\long\def\@makefntext##1{\parindent 1em\noindent\hbox{\@makefnmark}##1}}%
  2969. \normalsize%
  2970. \ifCLASSOPTIONpeerreview
  2971. \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext%
  2972. \thispagestyle{IEEEpeerreviewcoverpagestyle}\@thanks%
  2973. \else
  2974. \if@twocolumn%
  2975. \ifCLASSOPTIONtechnote%
  2976. \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext%
  2977. \else
  2978. \twocolumn[\@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext]%
  2979. \fi
  2980. \else
  2981. \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext%
  2982. \fi
  2983. \thispagestyle{IEEEtitlepagestyle}\@thanks%
  2984. \fi
  2985. % pullup page for pubid if used.
  2986. \if@IEEEusingpubid
  2987. \enlargethispage{-\@IEEEpubidpullup}%
  2988. \fi
  2989. \endgroup
  2990. \setcounter{footnote}{0}\let\maketitle\relax\let\@maketitle\relax
  2991. \gdef\@thanks{}%
  2992. % v1.6b do not clear these as we will need the title again for peer review papers
  2993. % \gdef\@author{}\gdef\@title{}%
  2994. \let\thanks\relax}
  2995. % V1.7 parbox to format \@IEEEcompsoctitleabstractindextext
  2996. \long\def\@IEEEcompsoctitleabstractindextextbox#1{\parbox{0.915\textwidth}{#1}}
  2997. % formats the Title, authors names, affiliations and special paper notice
  2998. % THIS IS A CONTROLLED SPACING COMMAND! Do not allow blank lines or unintentional
  2999. % spaces to enter the definition - use % at the end of each line
  3000. \def\@maketitle{\newpage
  3001. \begingroup\centering
  3002. \ifCLASSOPTIONtechnote% technotes
  3003. {\bfseries\large\@IEEEcompsoconly{\sffamily}\@title\par}\vskip 1.3em{\lineskip .5em\@IEEEcompsoconly{\sffamily}\@author
  3004. \@IEEEspecialpapernotice\par{\@IEEEcompsoconly{\vskip 1.5em\relax
  3005. \@IEEEcompsoctitleabstractindextextbox{\@IEEEcompsoctitleabstractindextext}\par
  3006. \hfill\@IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
  3007. \else% not a technote
  3008. \vskip0.2em{\Huge\@IEEEcompsoconly{\sffamily}\@IEEEcompsocconfonly{\normalfont\normalsize\vskip 2\@IEEEnormalsizeunitybaselineskip
  3009. \bfseries\Large}\@title\par}\vskip1.0em\par%
  3010. % V1.6 handle \author differently if in conference mode
  3011. \ifCLASSOPTIONconference%
  3012. {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
  3013. \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par}\relax
  3014. \else% peerreviewca, peerreview or journal
  3015. \ifCLASSOPTIONpeerreviewca
  3016. % peerreviewca handles author names just like conference mode
  3017. {\@IEEEcompsoconly{\sffamily}\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
  3018. \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par
  3019. {\@IEEEcompsoconly{\vskip 1.5em\relax
  3020. \@IEEEcompsoctitleabstractindextextbox{\@IEEEcompsoctitleabstractindextext}\par\hfill
  3021. \@IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
  3022. \else% journal or peerreview
  3023. {\lineskip.5em\@IEEEcompsoconly{\sffamily}\sublargesize\@author\@IEEEspecialpapernotice\par
  3024. {\@IEEEcompsoconly{\vskip 1.5em\relax
  3025. \@IEEEcompsoctitleabstractindextextbox{\@IEEEcompsoctitleabstractindextext}\par\hfill
  3026. \@IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
  3027. \fi
  3028. \fi
  3029. \fi\par\endgroup}
  3030. % V1.7 Computer Society "diamond line" which follows index terms for nonconference papers
  3031. \def\@IEEEcompsocdiamondline{\vrule depth 0pt height 0.5pt width 4cm\hspace{7.5pt}%
  3032. \raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}%
  3033. \hspace{7.5pt}\vrule depth 0pt height 0.5pt width 4cm\relax}
  3034. % V1.7 standard LateX2e \thanks, but with \itshape under compsoc. Also make it a \long\def
  3035. % We also need to trigger the one-shot footnote rule
  3036. \def\@IEEEtriggeroneshotfootnoterule{\global\@IEEEenableoneshotfootnoteruletrue}
  3037. \long\def\thanks#1{\footnotemark
  3038. \protected@xdef\@thanks{\@thanks
  3039. \protect\footnotetext[\the\c@footnote]{\@IEEEcompsoconly{\itshape
  3040. \protect\@IEEEtriggeroneshotfootnoterule\relax}\ignorespaces#1}}}
  3041. \let\@thanks\@empty
  3042. % V1.7 allow \author to contain \par's. This is needed to allow \thanks to contain \par.
  3043. \long\def\author#1{\gdef\@author{#1}}
  3044. % in addition to setting up IEEEitemize, we need to remove a baselineskip space above and
  3045. % below it because \list's \pars introduce blank lines because of the footnote struts.
  3046. \def\@IEEEsetupcompsocitemizelist{\def\labelitemi{$\bullet$}%
  3047. \setlength{\IEEElabelindent}{0pt}\setlength{\parskip}{0pt}%
  3048. \setlength{\partopsep}{0pt}\setlength{\topsep}{0.5\baselineskip}\vspace{-1\baselineskip}\relax}
  3049. % flag for fake non-compsoc \IEEEcompsocthanksitem - prevents line break on very first item
  3050. \newif\if@IEEEbreakcompsocthanksitem \@IEEEbreakcompsocthanksitemfalse
  3051. \ifCLASSOPTIONcompsoc
  3052. % V1.7 compsoc bullet item \thanks
  3053. % also, we need to redefine this to destroy the argument in \@IEEEdynamictitlevspace
  3054. \long\def\IEEEcompsocitemizethanks#1{\relax\@IEEEbreakcompsocthanksitemfalse\footnotemark
  3055. \protected@xdef\@thanks{\@thanks
  3056. \protect\footnotetext[\the\c@footnote]{\itshape\protect\@IEEEtriggeroneshotfootnoterule
  3057. {\let\IEEEiedlistdecl\relax\protect\begin{IEEEitemize}[\protect\@IEEEsetupcompsocitemizelist]\ignorespaces#1\relax
  3058. \protect\end{IEEEitemize}}\protect\vspace{-1\baselineskip}}}}
  3059. \DeclareRobustCommand*{\IEEEcompsocthanksitem}{\item}
  3060. \else
  3061. % non-compsoc, allow for dual compilation via rerouting to normal \thanks
  3062. \long\def\IEEEcompsocitemizethanks#1{\thanks{#1}}
  3063. % redirect to "pseudo-par" \hfil\break\indent after swallowing [] from \IEEEcompsocthanksitem[]
  3064. \DeclareRobustCommand{\IEEEcompsocthanksitem}{\@ifnextchar [{\@IEEEthanksswallowoptionalarg}%
  3065. {\@IEEEthanksswallowoptionalarg[\relax]}}
  3066. % be sure and break only after first item, be sure and ignore spaces after optional argument
  3067. \def\@IEEEthanksswallowoptionalarg[#1]{\relax\if@IEEEbreakcompsocthanksitem\hfil\break
  3068. \indent\fi\@IEEEbreakcompsocthanksitemtrue\ignorespaces}
  3069. \fi
  3070. % V1.6b define the \IEEEpeerreviewmaketitle as needed
  3071. \ifCLASSOPTIONpeerreview
  3072. \def\IEEEpeerreviewmaketitle{\@IEEEcleardoublepage{empty}%
  3073. \ifCLASSOPTIONtwocolumn
  3074. \twocolumn[\@IEEEpeerreviewmaketitle\@IEEEdynamictitlevspace]
  3075. \else
  3076. \newpage\@IEEEpeerreviewmaketitle\@IEEEstatictitlevskip
  3077. \fi
  3078. \thispagestyle{IEEEtitlepagestyle}}
  3079. \else
  3080. % \IEEEpeerreviewmaketitle does nothing if peer review option has not been selected
  3081. \def\IEEEpeerreviewmaketitle{\relax}
  3082. \fi
  3083. % peerreview formats the repeated title like the title in journal papers.
  3084. \def\@IEEEpeerreviewmaketitle{\begin{center}\@IEEEcompsoconly{\sffamily}%
  3085. \normalfont\normalsize\vskip0.2em{\Huge\@title\par}\vskip1.0em\par
  3086. \end{center}}
  3087. % V1.6
  3088. % this is a static rubber spacer between the title/authors and the main text
  3089. % used for single column text, or when the title appears in the first column
  3090. % of two column text (technotes).
  3091. \def\@IEEEstatictitlevskip{{\normalfont\normalsize
  3092. % adjust spacing to next text
  3093. % v1.6b handle peer review papers
  3094. \ifCLASSOPTIONpeerreview
  3095. % for peer review papers, the same value is used for both title pages
  3096. % regardless of the other paper modes
  3097. \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip
  3098. \else
  3099. \ifCLASSOPTIONconference% conference
  3100. \vskip 0.6\baselineskip
  3101. \else%
  3102. \ifCLASSOPTIONtechnote% technote
  3103. \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip%
  3104. \else% journal uses more space
  3105. \vskip 2.5\baselineskip plus 0.75\baselineskip minus 0.375\baselineskip%
  3106. \fi
  3107. \fi
  3108. \fi}}
  3109. % V1.6
  3110. % This is a dynamically determined rigid spacer between the title/authors
  3111. % and the main text. This is used only for single column titles over two
  3112. % column text (most common)
  3113. % This is bit tricky because we have to ensure that the textheight of the
  3114. % main text is an integer multiple of \baselineskip
  3115. % otherwise underfull vbox problems may develop in the second column of the
  3116. % text on the titlepage
  3117. % The possible use of \IEEEpubid must also be taken into account.
  3118. \def\@IEEEdynamictitlevspace{{%
  3119. % we run within a group so that all the macros can be forgotten when we are done
  3120. \long\def\thanks##1{\relax}%don't allow \thanks to run when we evaluate the vbox height
  3121. \long\def\IEEEcompsocitemizethanks##1{\relax}%don't allow \IEEEcompsocitemizethanks to run when we evaluate the vbox height
  3122. \normalfont\normalsize% we declare more descriptive variable names
  3123. \let\@IEEEmaintextheight=\@IEEEtrantmpdimenA%height of the main text columns
  3124. \let\@IEEEINTmaintextheight=\@IEEEtrantmpdimenB%height of the main text columns with integer # lines
  3125. % set the nominal and minimum values for the title spacer
  3126. % the dynamic algorithm will not allow the spacer size to
  3127. % become less than \@IEEEMINtitlevspace - instead it will be
  3128. % lengthened
  3129. % default to journal values
  3130. \def\@IEEENORMtitlevspace{2.5\baselineskip}%
  3131. \def\@IEEEMINtitlevspace{2\baselineskip}%
  3132. % conferences and technotes need tighter spacing
  3133. \ifCLASSOPTIONconference%conference
  3134. \def\@IEEENORMtitlevspace{1\baselineskip}%
  3135. \def\@IEEEMINtitlevspace{0.75\baselineskip}%
  3136. \fi
  3137. \ifCLASSOPTIONtechnote%technote
  3138. \def\@IEEENORMtitlevspace{1\baselineskip}%
  3139. \def\@IEEEMINtitlevspace{0.75\baselineskip}%
  3140. \fi%
  3141. % get the height that the title will take up
  3142. \ifCLASSOPTIONpeerreview
  3143. \settoheight{\@IEEEmaintextheight}{\vbox{\hsize\textwidth \@IEEEpeerreviewmaketitle}}%
  3144. \else
  3145. \settoheight{\@IEEEmaintextheight}{\vbox{\hsize\textwidth \@maketitle}}%
  3146. \fi
  3147. \@IEEEmaintextheight=-\@IEEEmaintextheight% title takes away from maintext, so reverse sign
  3148. % add the height of the page textheight
  3149. \advance\@IEEEmaintextheight by \textheight%
  3150. % correct for title pages using pubid
  3151. \ifCLASSOPTIONpeerreview\else
  3152. % peerreview papers use the pubid on the cover page only.
  3153. % And the cover page uses a static spacer.
  3154. \if@IEEEusingpubid\advance\@IEEEmaintextheight by -\@IEEEpubidpullup\fi
  3155. \fi%
  3156. % subtract off the nominal value of the title bottom spacer
  3157. \advance\@IEEEmaintextheight by -\@IEEENORMtitlevspace%
  3158. % \topskip takes away some too
  3159. \advance\@IEEEmaintextheight by -\topskip%
  3160. % calculate the column height of the main text for lines
  3161. % now we calculate the main text height as if holding
  3162. % an integer number of \normalsize lines after the first
  3163. % and discard any excess fractional remainder
  3164. % we subtracted the first line, because the first line
  3165. % is placed \topskip into the maintext, not \baselineskip like the
  3166. % rest of the lines.
  3167. \@IEEEINTmaintextheight=\@IEEEmaintextheight%
  3168. \divide\@IEEEINTmaintextheight by \baselineskip%
  3169. \multiply\@IEEEINTmaintextheight by \baselineskip%
  3170. % now we calculate how much the title spacer height will
  3171. % have to be reduced from nominal (\@IEEEREDUCEmaintextheight is always
  3172. % a positive value) so that the maintext area will contain an integer
  3173. % number of normal size lines
  3174. % we change variable names here (to avoid confusion) as we no longer
  3175. % need \@IEEEINTmaintextheight and can reuse its dimen register
  3176. \let\@IEEEREDUCEmaintextheight=\@IEEEINTmaintextheight%
  3177. \advance\@IEEEREDUCEmaintextheight by -\@IEEEmaintextheight%
  3178. \advance\@IEEEREDUCEmaintextheight by \baselineskip%
  3179. % this is the calculated height of the spacer
  3180. % we change variable names here (to avoid confusion) as we no longer
  3181. % need \@IEEEmaintextheight and can reuse its dimen register
  3182. \let\@IEEECOMPENSATElen=\@IEEEmaintextheight%
  3183. \@IEEECOMPENSATElen=\@IEEENORMtitlevspace% set the nominal value
  3184. % we go with the reduced length if it is smaller than an increase
  3185. \ifdim\@IEEEREDUCEmaintextheight < 0.5\baselineskip\relax%
  3186. \advance\@IEEECOMPENSATElen by -\@IEEEREDUCEmaintextheight%
  3187. % if the resulting spacer is too small back out and go with an increase instead
  3188. \ifdim\@IEEECOMPENSATElen<\@IEEEMINtitlevspace\relax%
  3189. \advance\@IEEECOMPENSATElen by \baselineskip%
  3190. \fi%
  3191. \else%
  3192. % go with an increase because it is closer to the nominal than a decrease
  3193. \advance\@IEEECOMPENSATElen by -\@IEEEREDUCEmaintextheight%
  3194. \advance\@IEEECOMPENSATElen by \baselineskip%
  3195. \fi%
  3196. % set the calculated rigid spacer
  3197. \vspace{\@IEEECOMPENSATElen}}}
  3198. % V1.6
  3199. % we allow the user access to the last part of the title area
  3200. % useful in emergencies such as when a different spacing is needed
  3201. % This text is NOT compensated for in the dynamic sizer.
  3202. \let\@IEEEaftertitletext=\relax
  3203. \long\def\IEEEaftertitletext#1{\def\@IEEEaftertitletext{#1}}
  3204. % V1.7 provide a way for users to enter abstract and keywords
  3205. % into the onecolumn title are. This text is compensated for
  3206. % in the dynamic sizer.
  3207. \let\@IEEEcompsoctitleabstractindextext=\relax
  3208. \long\def\IEEEcompsoctitleabstractindextext#1{\def\@IEEEcompsoctitleabstractindextext{#1}}
  3209. % V1.7 provide a way for users to get the \@IEEEcompsoctitleabstractindextext if
  3210. % not in compsoc journal mode - this way abstract and keywords can be placed
  3211. % in their conventional position if not in compsoc mode.
  3212. \def\IEEEdisplaynotcompsoctitleabstractindextext{%
  3213. \ifCLASSOPTIONcompsoc% display if compsoc conf
  3214. \ifCLASSOPTIONconference\@IEEEcompsoctitleabstractindextext\fi
  3215. \else% or if not compsoc
  3216. \@IEEEcompsoctitleabstractindextext\fi}
  3217. % command to allow alteration of baselinestretch, but only if the current
  3218. % baselineskip is unity. Used to tweak the compsoc abstract and keywords line spacing.
  3219. \def\@IEEEtweakunitybaselinestretch#1{{\def\baselinestretch{1}\selectfont
  3220. \global\@tempskipa\baselineskip}\ifnum\@tempskipa=\baselineskip%
  3221. \def\baselinestretch{#1}\selectfont\fi\relax}
  3222. % abstract and keywords are in \small, except
  3223. % for 9pt docs in which they are in \footnotesize
  3224. % Because 9pt docs use an 8pt footnotesize, \small
  3225. % becomes a rather awkward 8.5pt
  3226. \def\@IEEEabskeysecsize{\small}
  3227. \ifx\CLASSOPTIONpt\@IEEEptsizenine
  3228. \def\@IEEEabskeysecsize{\footnotesize}
  3229. \fi
  3230. % compsoc journals use \footnotesize, compsoc conferences use normalsize
  3231. \@IEEEcompsoconly{\def\@IEEEabskeysecsize{\footnotesize}}
  3232. \@IEEEcompsocconfonly{\def\@IEEEabskeysecsize{\normalsize}}
  3233. % V1.6 have abstract and keywords strip leading spaces, pars and newlines
  3234. % so that spacing is more tightly controlled.
  3235. \def\abstract{\normalfont
  3236. \if@twocolumn
  3237. \par\noindent\@IEEEabskeysecsize\bfseries\leavevmode\kern-0pt\textit{\abstractname}---\relax
  3238. \else
  3239. \begin{center}\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\end{center}\quotation\@IEEEabskeysecsize
  3240. \fi\@IEEEgobbleleadPARNLSP}
  3241. % V1.6 IEEE wants only 1 pica from end of abstract to introduction heading when in
  3242. % conference mode (the heading already has this much above it)
  3243. \def\endabstract{\relax\ifCLASSOPTIONconference\vspace{0ex}\else\vspace{1.34ex}\fi\par\if@twocolumn\else\endquotation\fi
  3244. \normalfont\normalsize}
  3245. \def\IEEEkeywords{\normalfont
  3246. \if@twocolumn
  3247. \@IEEEabskeysecsize\bfseries\leavevmode\kern-1pt\textit{\IEEEkeywordsname}--\relax
  3248. \else
  3249. \begin{center}\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\end{center}\quotation\@IEEEabskeysecsize
  3250. \fi\itshape\@IEEEgobbleleadPARNLSP}
  3251. \def\endIEEEkeywords{\relax\ifCLASSOPTIONtechnote\vspace{1.34ex}\else\vspace{0.5ex}\fi
  3252. \par\if@twocolumn\else\endquotation\fi%
  3253. \normalfont\normalsize}
  3254. % V1.7 compsoc keywords index terms
  3255. \ifCLASSOPTIONcompsoc
  3256. \ifCLASSOPTIONconference% compsoc conference
  3257. \def\abstract{\normalfont
  3258. \begin{center}\@IEEEabskeysecsize\textbf{\large\abstractname}\end{center}\vskip 0.5\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip
  3259. \if@twocolumn\else\quotation\fi\itshape\@IEEEabskeysecsize%
  3260. \par\@IEEEgobbleleadPARNLSP}
  3261. \def\IEEEkeywords{\normalfont\vskip 1.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip
  3262. \begin{center}\@IEEEabskeysecsize\textbf{\large\IEEEkeywordsname}\end{center}\vskip 0.5\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip
  3263. \if@twocolumn\else\quotation\fi\itshape\@IEEEabskeysecsize%
  3264. \par\@IEEEgobbleleadPARNLSP}
  3265. \else% compsoc not conference
  3266. \def\abstract{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\sffamily
  3267. \if@twocolumn
  3268. \@IEEEabskeysecsize\noindent\textbf{\abstractname}---\relax
  3269. \else
  3270. \begin{center}\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\end{center}\quotation\@IEEEabskeysecsize%
  3271. \fi\@IEEEgobbleleadPARNLSP}
  3272. \def\IEEEkeywords{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\sffamily
  3273. \if@twocolumn
  3274. \@IEEEabskeysecsize\vskip 0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip\noindent
  3275. \textbf{\IEEEkeywordsname}---\relax
  3276. \else
  3277. \begin{center}\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\end{center}\quotation\@IEEEabskeysecsize%
  3278. \fi\@IEEEgobbleleadPARNLSP}
  3279. \fi
  3280. \fi
  3281. % gobbles all leading \, \\ and \par, upon finding first token that
  3282. % is not a \ , \\ or a \par, it ceases and returns that token
  3283. %
  3284. % used to strip leading \, \\ and \par from the input
  3285. % so that such things in the beginning of an environment will not
  3286. % affect the formatting of the text
  3287. \long\def\@IEEEgobbleleadPARNLSP#1{\let\@IEEEswallowthistoken=0%
  3288. \let\@IEEEgobbleleadPARNLSPtoken#1%
  3289. \let\@IEEEgobbleleadPARtoken=\par%
  3290. \let\@IEEEgobbleleadNLtoken=\\%
  3291. \let\@IEEEgobbleleadSPtoken=\ %
  3292. \def\@IEEEgobbleleadSPMACRO{\ }%
  3293. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadPARtoken%
  3294. \let\@IEEEswallowthistoken=1%
  3295. \fi%
  3296. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadNLtoken%
  3297. \let\@IEEEswallowthistoken=1%
  3298. \fi%
  3299. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadSPtoken%
  3300. \let\@IEEEswallowthistoken=1%
  3301. \fi%
  3302. % a control space will come in as a macro
  3303. % when it is the last one on a line
  3304. \ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadSPMACRO%
  3305. \let\@IEEEswallowthistoken=1%
  3306. \fi%
  3307. % if we have to swallow this token, do so and taste the next one
  3308. % else spit it out and stop gobbling
  3309. \ifx\@IEEEswallowthistoken 1\let\@IEEEnextgobbleleadPARNLSP=\@IEEEgobbleleadPARNLSP\else%
  3310. \let\@IEEEnextgobbleleadPARNLSP=#1\fi%
  3311. \@IEEEnextgobbleleadPARNLSP}%
  3312. % TITLING OF SECTIONS
  3313. \def\@IEEEsectpunct{:\ \,} % Punctuation after run-in section heading (headings which are
  3314. % part of the paragraphs), need little bit more than a single space
  3315. % spacing from section number to title
  3316. % compsoc conferences use regular period/space punctuation
  3317. \ifCLASSOPTIONcompsoc
  3318. \ifCLASSOPTIONconference
  3319. \def\@IEEEsectpunct{.\ }
  3320. \fi\fi
  3321. \def\@seccntformat#1{\hb@xt@ 1.4em{\csname the#1dis\endcsname\hss\relax}}
  3322. \def\@seccntformatinl#1{\hb@xt@ 1.1em{\csname the#1dis\endcsname\hss\relax}}
  3323. \def\@seccntformatch#1{\csname the#1dis\endcsname\hskip 1em\relax}
  3324. \ifCLASSOPTIONcompsoc
  3325. % compsoc journals need extra spacing
  3326. \ifCLASSOPTIONconference\else
  3327. \def\@seccntformat#1{\csname the#1dis\endcsname\hskip 1em\relax}
  3328. \fi\fi
  3329. %v1.7 put {} after #6 to allow for some types of user font control
  3330. %and use \@@par rather than \par
  3331. \def\@sect#1#2#3#4#5#6[#7]#8{%
  3332. \ifnum #2>\c@secnumdepth
  3333. \let\@svsec\@empty
  3334. \else
  3335. \refstepcounter{#1}%
  3336. % load section label and spacer into \@svsec
  3337. \ifnum #2=1
  3338. \protected@edef\@svsec{\@seccntformatch{#1}\relax}%
  3339. \else
  3340. \ifnum #2>2
  3341. \protected@edef\@svsec{\@seccntformatinl{#1}\relax}%
  3342. \else
  3343. \protected@edef\@svsec{\@seccntformat{#1}\relax}%
  3344. \fi
  3345. \fi
  3346. \fi%
  3347. \@tempskipa #5\relax
  3348. \ifdim \@tempskipa>\z@% tempskipa determines whether is treated as a high
  3349. \begingroup #6{\relax% or low level heading
  3350. \noindent % subsections are NOT indented
  3351. % print top level headings. \@svsec is label, #8 is heading title
  3352. % IEEE does not block indent the section title text, it flows like normal
  3353. {\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\@@par}}%
  3354. \endgroup
  3355. \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth\relax\else
  3356. \protect\numberline{\csname the#1\endcsname}\fi#7}%
  3357. \else % printout low level headings
  3358. % svsechd seems to swallow the trailing space, protect it with \mbox{}
  3359. % got rid of sectionmark stuff
  3360. \def\@svsechd{#6{\hskip #3\relax\@svsec #8\@IEEEsectpunct\mbox{}}%
  3361. \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth\relax\else
  3362. \protect\numberline{\csname the#1\endcsname}\fi#7}}%
  3363. \fi%skip down
  3364. \@xsect{#5}}
  3365. % section* handler
  3366. %v1.7 put {} after #4 to allow for some types of user font control
  3367. %and use \@@par rather than \par
  3368. \def\@ssect#1#2#3#4#5{\@tempskipa #3\relax
  3369. \ifdim \@tempskipa>\z@
  3370. %\begingroup #4\@hangfrom{\hskip #1}{\interlinepenalty \@M #5\par}\endgroup
  3371. % IEEE does not block indent the section title text, it flows like normal
  3372. \begingroup \noindent #4{\relax{\hskip #1}{\interlinepenalty \@M #5\@@par}}\endgroup
  3373. % svsechd swallows the trailing space, protect it with \mbox{}
  3374. \else \def\@svsechd{#4{\hskip #1\relax #5\@IEEEsectpunct\mbox{}}}\fi
  3375. \@xsect{#3}}
  3376. %% SECTION heading spacing and font
  3377. %%
  3378. % arguments are: #1 - sectiontype name
  3379. % (for \@sect) #2 - section level
  3380. % #3 - section heading indent
  3381. % #4 - top separation (absolute value used, neg indicates not to indent main text)
  3382. % If negative, make stretch parts negative too!
  3383. % #5 - (absolute value used) positive: bottom separation after heading,
  3384. % negative: amount to indent main text after heading
  3385. % Both #4 and #5 negative means to indent main text and use negative top separation
  3386. % #6 - font control
  3387. % You've got to have \normalfont\normalsize in the font specs below to prevent
  3388. % trouble when you do something like:
  3389. % \section{Note}{\ttfamily TT-TEXT} is known to ...
  3390. % IEEE sometimes REALLY stretches the area before a section
  3391. % heading by up to about 0.5in. However, it may not be a good
  3392. % idea to let LaTeX have quite this much rubber.
  3393. \ifCLASSOPTIONconference%
  3394. % IEEE wants section heading spacing to decrease for conference mode
  3395. \def\section{\@startsection{section}{1}{\z@}{1.5ex plus 1.5ex minus 0.5ex}%
  3396. {1sp}{\normalfont\normalsize\centering\scshape}}%
  3397. \def\subsection{\@startsection{subsection}{2}{\z@}{1.5ex plus 1.5ex minus 0.5ex}%
  3398. {1sp}{\normalfont\normalsize\itshape}}%
  3399. \else % for journals
  3400. \def\section{\@startsection{section}{1}{\z@}{3.0ex plus 1.5ex minus 1.5ex}% V1.6 3.0ex from 3.5ex
  3401. {0.7ex plus 1ex minus 0ex}{\normalfont\normalsize\centering\scshape}}%
  3402. \def\subsection{\@startsection{subsection}{2}{\z@}{3.5ex plus 1.5ex minus 1.5ex}%
  3403. {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}%
  3404. \fi
  3405. % for both journals and conferences
  3406. % decided to put in a little rubber above the section, might help somebody
  3407. \def\subsubsection{\@startsection{subsubsection}{3}{\parindent}{0ex plus 0.1ex minus 0.1ex}%
  3408. {0ex}{\normalfont\normalsize\itshape}}%
  3409. \def\paragraph{\@startsection{paragraph}{4}{2\parindent}{0ex plus 0.1ex minus 0.1ex}%
  3410. {0ex}{\normalfont\normalsize\itshape}}%
  3411. % compsoc
  3412. \ifCLASSOPTIONcompsoc
  3413. \ifCLASSOPTIONconference
  3414. % compsoc conference
  3415. \def\section{\@startsection{section}{1}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}%
  3416. {1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}{\normalfont\large\bfseries}}%
  3417. \def\subsection{\@startsection{subsection}{2}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}%
  3418. {1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}{\normalfont\sublargesize\bfseries}}%
  3419. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}%
  3420. {0ex}{\normalfont\normalsize\bfseries}}%
  3421. \def\paragraph{\@startsection{paragraph}{4}{2\parindent}{0ex plus 0.1ex minus 0.1ex}%
  3422. {0ex}{\normalfont\normalsize}}%
  3423. \else% compsoc journals
  3424. % use negative top separation as compsoc journals do not indent paragraphs after section titles
  3425. \def\section{\@startsection{section}{1}{\z@}{-3ex plus -2ex minus -1.5ex}%
  3426. {0.7ex plus 1ex minus 0ex}{\normalfont\large\sffamily\bfseries\scshape}}%
  3427. % Note that subsection and smaller may not be correct for the Computer Society,
  3428. % I have to look up an example.
  3429. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.5ex plus -1.5ex minus -1.5ex}%
  3430. {0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\sffamily\bfseries}}%
  3431. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.5ex plus -1ex minus -1ex}%
  3432. {0.5ex plus 0.5ex minus 0ex}{\normalfont\normalsize\sffamily\itshape}}%
  3433. \def\paragraph{\@startsection{paragraph}{4}{2\parindent}{-0ex plus -0.1ex minus -0.1ex}%
  3434. {0ex}{\normalfont\normalsize}}%
  3435. \fi\fi
  3436. %% ENVIRONMENTS
  3437. % "box" symbols at end of proofs
  3438. \def\IEEEQEDclosed{\mbox{\rule[0pt]{1.3ex}{1.3ex}}} % for a filled box
  3439. % V1.6 some journals use an open box instead that will just fit around a closed one
  3440. \def\IEEEQEDopen{{\setlength{\fboxsep}{0pt}\setlength{\fboxrule}{0.2pt}\fbox{\rule[0pt]{0pt}{1.3ex}\rule[0pt]{1.3ex}{0pt}}}}
  3441. \ifCLASSOPTIONcompsoc
  3442. \def\IEEEQED{\IEEEQEDopen} % default to open for compsoc
  3443. \else
  3444. \def\IEEEQED{\IEEEQEDclosed} % otherwise default to closed
  3445. \fi
  3446. % v1.7 name change to avoid namespace collision with amsthm. Also add support
  3447. % for an optional argument.
  3448. \def\IEEEproof{\@ifnextchar[{\@IEEEproof}{\@IEEEproof[\IEEEproofname]}}
  3449. \def\@IEEEproof[#1]{\par\noindent\hspace{2em}{\itshape #1: }}
  3450. \def\endIEEEproof{\hspace*{\fill}~\IEEEQED\par}
  3451. %\itemindent is set to \z@ by list, so define new temporary variable
  3452. \newdimen\@IEEEtmpitemindent
  3453. \def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\topsep 0pt\rmfamily\trivlist%
  3454. \item[\hskip \labelsep{\indent\itshape #1\ #2:}]\itemindent\@IEEEtmpitemindent}
  3455. \def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\topsep 0pt\rmfamily \trivlist%
  3456. % V1.6 IEEE is back to using () around theorem names which are also in italics
  3457. % Thanks to Christian Peel for reporting this.
  3458. \item[\hskip\labelsep{\indent\itshape #1\ #2\ (#3):}]\itemindent\@IEEEtmpitemindent}
  3459. % V1.7 remove bogus \unskip that caused equations in theorems to collide with
  3460. % lines below.
  3461. \def\@endtheorem{\endtrivlist}
  3462. % V1.6
  3463. % display command for the section the theorem is in - so that \thesection
  3464. % is not used as this will be in Roman numerals when we want arabic.
  3465. % LaTeX2e uses \def\@thmcounter#1{\noexpand\arabic{#1}} for the theorem number
  3466. % (second part) display and \def\@thmcountersep{.} as a separator.
  3467. % V1.7 intercept calls to the section counter and reroute to \@IEEEthmcounterinsection
  3468. % to allow \appendix(ices} to override as needed.
  3469. %
  3470. % special handler for sections, allows appendix(ices) to override
  3471. \gdef\@IEEEthmcounterinsection#1{\arabic{#1}}
  3472. % string macro
  3473. \edef\@IEEEstringsection{section}
  3474. % redefine the #1#2[#3] form of newtheorem to use a hook to \@IEEEthmcounterinsection
  3475. % if section in_counter is used
  3476. \def\@xnthm#1#2[#3]{%
  3477. \expandafter\@ifdefinable\csname #1\endcsname
  3478. {\@definecounter{#1}\@newctr{#1}[#3]%
  3479. \edef\@IEEEstringtmp{#3}
  3480. \ifx\@IEEEstringtmp\@IEEEstringsection
  3481. \expandafter\xdef\csname the#1\endcsname{%
  3482. \noexpand\@IEEEthmcounterinsection{#3}\@thmcountersep
  3483. \@thmcounter{#1}}%
  3484. \else
  3485. \expandafter\xdef\csname the#1\endcsname{%
  3486. \expandafter\noexpand\csname the#3\endcsname \@thmcountersep
  3487. \@thmcounter{#1}}%
  3488. \fi
  3489. \global\@namedef{#1}{\@thm{#1}{#2}}%
  3490. \global\@namedef{end#1}{\@endtheorem}}}
  3491. %% SET UP THE DEFAULT PAGESTYLE
  3492. \ps@headings
  3493. \pagenumbering{arabic}
  3494. % normally the page counter starts at 1
  3495. \setcounter{page}{1}
  3496. % however, for peerreview the cover sheet is page 0 or page -1
  3497. % (for duplex printing)
  3498. \ifCLASSOPTIONpeerreview
  3499. \if@twoside
  3500. \setcounter{page}{-1}
  3501. \else
  3502. \setcounter{page}{0}
  3503. \fi
  3504. \fi
  3505. % standard book class behavior - let bottom line float up and down as
  3506. % needed when single sided
  3507. \ifCLASSOPTIONtwoside\else\raggedbottom\fi
  3508. % if two column - turn on twocolumn, allow word spacings to stretch more and
  3509. % enforce a rigid position for the last lines
  3510. \ifCLASSOPTIONtwocolumn
  3511. % the peer review option delays invoking twocolumn
  3512. \ifCLASSOPTIONpeerreview\else
  3513. \twocolumn
  3514. \fi
  3515. \sloppy
  3516. \flushbottom
  3517. \fi
  3518. % \APPENDIX and \APPENDICES definitions
  3519. % This is the \@ifmtarg command from the LaTeX ifmtarg package
  3520. % by Peter Wilson (CUA) and Donald Arseneau
  3521. % \@ifmtarg is used to determine if an argument to a command
  3522. % is present or not.
  3523. % For instance:
  3524. % \@ifmtarg{#1}{\typeout{empty}}{\typeout{has something}}
  3525. % \@ifmtarg is used with our redefined \section command if
  3526. % \appendices is invoked.
  3527. % The command \section will behave slightly differently depending
  3528. % on whether the user specifies a title:
  3529. % \section{My appendix title}
  3530. % or not:
  3531. % \section{}
  3532. % This way, we can eliminate the blank lines where the title
  3533. % would be, and the unneeded : after Appendix in the table of
  3534. % contents
  3535. \begingroup
  3536. \catcode`\Q=3
  3537. \long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil}
  3538. \long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4}
  3539. \endgroup
  3540. % end of \@ifmtarg defs
  3541. % V1.7
  3542. % command that allows the one time saving of the original definition
  3543. % of section to \@IEEEappendixsavesection for \appendix or \appendices
  3544. % we don't save \section here as it may be redefined later by other
  3545. % packages (hyperref.sty, etc.)
  3546. \def\@IEEEsaveoriginalsectiononce{\let\@IEEEappendixsavesection\section
  3547. \let\@IEEEsaveoriginalsectiononce\relax}
  3548. % neat trick to grab and process the argument from \section{argument}
  3549. % we process differently if the user invoked \section{} with no
  3550. % argument (title)
  3551. % note we reroute the call to the old \section*
  3552. \def\@IEEEprocessthesectionargument#1{%
  3553. \@ifmtarg{#1}{%
  3554. \@IEEEappendixsavesection*{\appendixname~\thesectiondis}%
  3555. \addcontentsline{toc}{section}{\appendixname~\thesection}}{%
  3556. \@IEEEappendixsavesection*{\appendixname~\thesectiondis \\* #1}%
  3557. \addcontentsline{toc}{section}{\appendixname~\thesection: #1}}}
  3558. % we use this if the user calls \section{} after
  3559. % \appendix-- which has no meaning. So, we ignore the
  3560. % command and its argument. Then, warn the user.
  3561. \def\@IEEEdestroythesectionargument#1{\typeout{** WARNING: Ignoring useless
  3562. \protect\section\space in Appendix (line \the\inputlineno).}}
  3563. % remember \thesection forms will be displayed in \ref calls
  3564. % and in the Table of Contents.
  3565. % The \sectiondis form is used in the actual heading itself
  3566. % appendix command for one single appendix
  3567. % normally has no heading. However, if you want a
  3568. % heading, you can do so via the optional argument:
  3569. % \appendix[Optional Heading]
  3570. \def\appendix{\relax}
  3571. \renewcommand{\appendix}[1][]{\@IEEEsaveoriginalsectiononce\par
  3572. % v1.6 keep hyperref's identifiers unique
  3573. \gdef\theHsection{Appendix.A}%
  3574. % v1.6 adjust hyperref's string name for the section
  3575. \xdef\Hy@chapapp{appendix}%
  3576. \setcounter{section}{0}%
  3577. \setcounter{subsection}{0}%
  3578. \setcounter{subsubsection}{0}%
  3579. \setcounter{paragraph}{0}%
  3580. \gdef\thesection{A}%
  3581. \gdef\thesectiondis{}%
  3582. \gdef\thesubsection{\Alph{subsection}}%
  3583. \gdef\@IEEEthmcounterinsection##1{A}
  3584. \refstepcounter{section}% update the \ref counter
  3585. \@ifmtarg{#1}{\@IEEEappendixsavesection*{\appendixname}%
  3586. \addcontentsline{toc}{section}{\appendixname}}{%
  3587. \@IEEEappendixsavesection*{\appendixname~\\* #1}%
  3588. \addcontentsline{toc}{section}{\appendixname: #1}}%
  3589. % redefine \section command for appendix
  3590. % leave \section* as is
  3591. \def\section{\@ifstar{\@IEEEappendixsavesection*}{%
  3592. \@IEEEdestroythesectionargument}}% throw out the argument
  3593. % of the normal form
  3594. }
  3595. % appendices command for multiple appendices
  3596. % user then calls \section with an argument (possibly empty) to
  3597. % declare the individual appendices
  3598. \def\appendices{\@IEEEsaveoriginalsectiononce\par
  3599. % v1.6 keep hyperref's identifiers unique
  3600. \gdef\theHsection{Appendix.\Alph{section}}%
  3601. % v1.6 adjust hyperref's string name for the section
  3602. \xdef\Hy@chapapp{appendix}%
  3603. \setcounter{section}{-1}% we want \refstepcounter to use section 0
  3604. \setcounter{subsection}{0}%
  3605. \setcounter{subsubsection}{0}%
  3606. \setcounter{paragraph}{0}%
  3607. \ifCLASSOPTIONromanappendices%
  3608. \gdef\thesection{\Roman{section}}%
  3609. \gdef\thesectiondis{\Roman{section}}%
  3610. \@IEEEcompsocconfonly{\gdef\thesectiondis{\Roman{section}.}}%
  3611. \gdef\@IEEEthmcounterinsection##1{A\arabic{##1}}
  3612. \else%
  3613. \gdef\thesection{\Alph{section}}%
  3614. \gdef\thesectiondis{\Alph{section}}%
  3615. \@IEEEcompsocconfonly{\gdef\thesectiondis{\Alph{section}.}}%
  3616. \gdef\@IEEEthmcounterinsection##1{\Alph{##1}}
  3617. \fi%
  3618. \refstepcounter{section}% update the \ref counter
  3619. \setcounter{section}{0}% NEXT \section will be the FIRST appendix
  3620. % redefine \section command for appendices
  3621. % leave \section* as is
  3622. \def\section{\@ifstar{\@IEEEappendixsavesection*}{% process the *-form
  3623. \refstepcounter{section}% or is a new section so,
  3624. \@IEEEprocessthesectionargument}}% process the argument
  3625. % of the normal form
  3626. }
  3627. % \IEEEPARstart
  3628. % Definition for the big two line drop cap letter at the beginning of the
  3629. % first paragraph of journal papers. The first argument is the first letter
  3630. % of the first word, the second argument is the remaining letters of the
  3631. % first word which will be rendered in upper case.
  3632. % In V1.6 this has been completely rewritten to:
  3633. %
  3634. % 1. no longer have problems when the user begins an environment
  3635. % within the paragraph that uses \IEEEPARstart.
  3636. % 2. auto-detect and use the current font family
  3637. % 3. revise handling of the space at the end of the first word so that
  3638. % interword glue will now work as normal.
  3639. % 4. produce correctly aligned edges for the (two) indented lines.
  3640. %
  3641. % We generalize things via control macros - playing with these is fun too.
  3642. %
  3643. % V1.7 added more control macros to make it easy for IEEEtrantools.sty users
  3644. % to change the font style.
  3645. %
  3646. % the number of lines that are indented to clear it
  3647. % may need to increase if using decenders
  3648. \def\@IEEEPARstartDROPLINES{2}
  3649. % minimum number of lines left on a page to allow a \@IEEEPARstart
  3650. % Does not take into consideration rubber shrink, so it tends to
  3651. % be overly cautious
  3652. \def\@IEEEPARstartMINPAGELINES{2}
  3653. % V1.7 the height of the drop cap is adjusted to match the height of this text
  3654. % in the current font (when \IEEEPARstart is called).
  3655. \def\@IEEEPARstartHEIGHTTEXT{T}
  3656. % the depth the letter is lowered below the baseline
  3657. % the height (and size) of the letter is determined by the sum
  3658. % of this value and the height of the \@IEEEPARstartHEIGHTTEXT in the current
  3659. % font. It is a good idea to set this value in terms of the baselineskip
  3660. % so that it can respond to changes therein.
  3661. \def\@IEEEPARstartDROPDEPTH{1.1\baselineskip}
  3662. % V1.7 the font the drop cap will be rendered in,
  3663. % can take zero or one argument.
  3664. \def\@IEEEPARstartFONTSTYLE{\bfseries}
  3665. % V1.7 any additional, non-font related commands needed to modify
  3666. % the drop cap letter, can take zero or one argument.
  3667. \def\@IEEEPARstartCAPSTYLE{\MakeUppercase}
  3668. % V1.7 the font that will be used to render the rest of the word,
  3669. % can take zero or one argument.
  3670. \def\@IEEEPARstartWORDFONTSTYLE{\relax}
  3671. % V1.7 any additional, non-font related commands needed to modify
  3672. % the rest of the word, can take zero or one argument.
  3673. \def\@IEEEPARstartWORDCAPSTYLE{\MakeUppercase}
  3674. % This is the horizontal separation distance from the drop letter to the main text.
  3675. % Lengths that depend on the font (e.g., ex, em, etc.) will be referenced
  3676. % to the font that is active when \IEEEPARstart is called.
  3677. \def\@IEEEPARstartSEP{0.15em}
  3678. % V1.7 horizontal offset applied to the left of the drop cap.
  3679. \def\@IEEEPARstartHOFFSET{0em}
  3680. % V1.7 Italic correction command applied at the end of the drop cap.
  3681. \def\@IEEEPARstartITLCORRECT{\/}
  3682. % V1.7 compoc uses nonbold drop cap and small caps word style
  3683. \ifCLASSOPTIONcompsoc
  3684. \def\@IEEEPARstartFONTSTYLE{\mdseries}
  3685. \def\@IEEEPARstartWORDFONTSTYLE{\scshape}
  3686. \def\@IEEEPARstartWORDCAPSTYLE{\relax}
  3687. \fi
  3688. % definition of \IEEEPARstart
  3689. % THIS IS A CONTROLLED SPACING AREA, DO NOT ALLOW SPACES WITHIN THESE LINES
  3690. %
  3691. % The token \@IEEEPARstartfont will be globally defined after the first use
  3692. % of \IEEEPARstart and will be a font command which creates the big letter
  3693. % The first argument is the first letter of the first word and the second
  3694. % argument is the rest of the first word(s).
  3695. \def\IEEEPARstart#1#2{\par{%
  3696. % if this page does not have enough space, break it and lets start
  3697. % on a new one
  3698. \@IEEEtranneedspace{\@IEEEPARstartMINPAGELINES\baselineskip}{\relax}%
  3699. % V1.7 move this up here in case user uses \textbf for \@IEEEPARstartFONTSTYLE
  3700. % which uses command \leavevmode which causes an unwanted \indent to be issued
  3701. \noindent
  3702. % calculate the desired height of the big letter
  3703. % it extends from the top of \@IEEEPARstartHEIGHTTEXT in the current font
  3704. % down to \@IEEEPARstartDROPDEPTH below the current baseline
  3705. \settoheight{\@IEEEtrantmpdimenA}{\@IEEEPARstartHEIGHTTEXT}%
  3706. \addtolength{\@IEEEtrantmpdimenA}{\@IEEEPARstartDROPDEPTH}%
  3707. % extract the name of the current font in bold
  3708. % and place it in \@IEEEPARstartFONTNAME
  3709. \def\@IEEEPARstartGETFIRSTWORD##1 ##2\relax{##1}%
  3710. {\@IEEEPARstartFONTSTYLE{\selectfont\edef\@IEEEPARstartFONTNAMESPACE{\fontname\font\space}%
  3711. \xdef\@IEEEPARstartFONTNAME{\expandafter\@IEEEPARstartGETFIRSTWORD\@IEEEPARstartFONTNAMESPACE\relax}}}%
  3712. % define a font based on this name with a point size equal to the desired
  3713. % height of the drop letter
  3714. \font\@IEEEPARstartsubfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenA\relax%
  3715. % save this value as a counter (integer) value (sp points)
  3716. \@IEEEtrantmpcountA=\@IEEEtrantmpdimenA%
  3717. % now get the height of the actual letter produced by this font size
  3718. \settoheight{\@IEEEtrantmpdimenB}{\@IEEEPARstartsubfont\@IEEEPARstartCAPSTYLE{#1}}%
  3719. % If something bogus happens like the first argument is empty or the
  3720. % current font is strange, do not allow a zero height.
  3721. \ifdim\@IEEEtrantmpdimenB=0pt\relax%
  3722. \typeout{** WARNING: IEEEPARstart drop letter has zero height! (line \the\inputlineno)}%
  3723. \typeout{ Forcing the drop letter font size to 10pt.}%
  3724. \@IEEEtrantmpdimenB=10pt%
  3725. \fi%
  3726. % and store it as a counter
  3727. \@IEEEtrantmpcountB=\@IEEEtrantmpdimenB%
  3728. % Since a font size doesn't exactly correspond to the height of the capital
  3729. % letters in that font, the actual height of the letter, \@IEEEtrantmpcountB,
  3730. % will be less than that desired, \@IEEEtrantmpcountA
  3731. % we need to raise the font size, \@IEEEtrantmpdimenA
  3732. % by \@IEEEtrantmpcountA / \@IEEEtrantmpcountB
  3733. % But, TeX doesn't have floating point division, so we have to use integer
  3734. % division. Hence the use of the counters.
  3735. % We need to reduce the denominator so that the loss of the remainder will
  3736. % have minimal affect on the accuracy of the result
  3737. \divide\@IEEEtrantmpcountB by 200%
  3738. \divide\@IEEEtrantmpcountA by \@IEEEtrantmpcountB%
  3739. % Then reequalize things when we use TeX's ability to multiply by
  3740. % floating point values
  3741. \@IEEEtrantmpdimenB=0.005\@IEEEtrantmpdimenA%
  3742. \multiply\@IEEEtrantmpdimenB by \@IEEEtrantmpcountA%
  3743. % \@IEEEPARstartfont is globaly set to the calculated font of the big letter
  3744. % We need to carry this out of the local calculation area to to create the
  3745. % big letter.
  3746. \global\font\@IEEEPARstartfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenB%
  3747. % Now set \@IEEEtrantmpdimenA to the width of the big letter
  3748. % We need to carry this out of the local calculation area to set the
  3749. % hanging indent
  3750. \settowidth{\global\@IEEEtrantmpdimenA}{\@IEEEPARstartfont
  3751. \@IEEEPARstartCAPSTYLE{#1\@IEEEPARstartITLCORRECT}}}%
  3752. % end of the isolated calculation environment
  3753. % add in the extra clearance we want
  3754. \advance\@IEEEtrantmpdimenA by \@IEEEPARstartSEP\relax%
  3755. % add in the optional offset
  3756. \advance\@IEEEtrantmpdimenA by \@IEEEPARstartHOFFSET\relax%
  3757. % V1.7 don't allow negative offsets to produce negative hanging indents
  3758. \@IEEEtrantmpdimenB\@IEEEtrantmpdimenA
  3759. \ifnum\@IEEEtrantmpdimenB < 0 \@IEEEtrantmpdimenB 0pt\fi
  3760. % \@IEEEtrantmpdimenA has the width of the big letter plus the
  3761. % separation space and \@IEEEPARstartfont is the font we need to use
  3762. % Now, we make the letter and issue the hanging indent command
  3763. % The letter is placed in a box of zero width and height so that other
  3764. % text won't be displaced by it.
  3765. \hangindent\@IEEEtrantmpdimenB\hangafter=-\@IEEEPARstartDROPLINES%
  3766. \makebox[0pt][l]{\hspace{-\@IEEEtrantmpdimenA}%
  3767. \raisebox{-\@IEEEPARstartDROPDEPTH}[0pt][0pt]{\hspace{\@IEEEPARstartHOFFSET}%
  3768. \@IEEEPARstartfont\@IEEEPARstartCAPSTYLE{#1\@IEEEPARstartITLCORRECT}%
  3769. \hspace{\@IEEEPARstartSEP}}}%
  3770. {\@IEEEPARstartWORDFONTSTYLE{\@IEEEPARstartWORDCAPSTYLE{\selectfont#2}}}}
  3771. % determines if the space remaining on a given page is equal to or greater
  3772. % than the specified space of argument one
  3773. % if not, execute argument two (only if the remaining space is greater than zero)
  3774. % and issue a \newpage
  3775. %
  3776. % example: \@IEEEtranneedspace{2in}{\vfill}
  3777. %
  3778. % Does not take into consideration rubber shrinkage, so it tends to
  3779. % be overly cautious
  3780. % Based on an example posted by Donald Arseneau
  3781. % Note this macro uses \@IEEEtrantmpdimenB internally for calculations,
  3782. % so DO NOT PASS \@IEEEtrantmpdimenB to this routine
  3783. % if you need a dimen register, import with \@IEEEtrantmpdimenA instead
  3784. \def\@IEEEtranneedspace#1#2{\penalty-100\begingroup%shield temp variable
  3785. \@IEEEtrantmpdimenB\pagegoal\advance\@IEEEtrantmpdimenB-\pagetotal% space left
  3786. \ifdim #1>\@IEEEtrantmpdimenB\relax% not enough space left
  3787. \ifdim\@IEEEtrantmpdimenB>\z@\relax #2\fi%
  3788. \newpage%
  3789. \fi\endgroup}
  3790. % IEEEbiography ENVIRONMENT
  3791. % Allows user to enter biography leaving place for picture (adapts to font size)
  3792. % As of V1.5, a new optional argument allows you to have a real graphic!
  3793. % V1.5 and later also fixes the "colliding biographies" which could happen when a
  3794. % biography's text was shorter than the space for the photo.
  3795. % MDS 7/2001
  3796. % V1.6 prevent multiple biographies from making multiple TOC entries
  3797. \newif\if@IEEEbiographyTOCentrynotmade
  3798. \global\@IEEEbiographyTOCentrynotmadetrue
  3799. % biography counter so hyperref can jump directly to the biographies
  3800. % and not just the previous section
  3801. \newcounter{IEEEbiography}
  3802. \setcounter{IEEEbiography}{0}
  3803. % photo area size
  3804. \def\@IEEEBIOphotowidth{1.0in} % width of the biography photo area
  3805. \def\@IEEEBIOphotodepth{1.25in} % depth (height) of the biography photo area
  3806. % area cleared for photo
  3807. \def\@IEEEBIOhangwidth{1.14in} % width cleared for the biography photo area
  3808. \def\@IEEEBIOhangdepth{1.25in} % depth cleared for the biography photo area
  3809. % actual depth will be a multiple of
  3810. % \baselineskip, rounded up
  3811. \def\@IEEEBIOskipN{4\baselineskip}% nominal value of the vskip above the biography
  3812. \newenvironment{IEEEbiography}[2][]{\normalfont\@IEEEcompsoconly{\sffamily}\footnotesize%
  3813. \unitlength 1in\parskip=0pt\par\parindent 1em\interlinepenalty500%
  3814. % we need enough space to support the hanging indent
  3815. % the nominal value of the spacer
  3816. % and one extra line for good measure
  3817. \@IEEEtrantmpdimenA=\@IEEEBIOhangdepth%
  3818. \advance\@IEEEtrantmpdimenA by \@IEEEBIOskipN%
  3819. \advance\@IEEEtrantmpdimenA by 1\baselineskip%
  3820. % if this page does not have enough space, break it and lets start
  3821. % with a new one
  3822. \@IEEEtranneedspace{\@IEEEtrantmpdimenA}{\relax}%
  3823. % nominal spacer can strech, not shrink use 1fil so user can out stretch with \vfill
  3824. \vskip \@IEEEBIOskipN plus 1fil minus 0\baselineskip%
  3825. % the default box for where the photo goes
  3826. \def\@IEEEtempbiographybox{{\setlength{\fboxsep}{0pt}\framebox{%
  3827. \begin{minipage}[b][\@IEEEBIOphotodepth][c]{\@IEEEBIOphotowidth}\centering PLACE\\ PHOTO\\ HERE \end{minipage}}}}%
  3828. %
  3829. % detect if the optional argument was supplied, this requires the
  3830. % \@ifmtarg command as defined in the appendix section above
  3831. % and if so, override the default box with what they want
  3832. \@ifmtarg{#1}{\relax}{\def\@IEEEtempbiographybox{\mbox{\begin{minipage}[b][\@IEEEBIOphotodepth][c]{\@IEEEBIOphotowidth}%
  3833. \centering%
  3834. #1%
  3835. \end{minipage}}}}% end if optional argument supplied
  3836. % Make an entry into the table of contents only if we have not done so before
  3837. \if@IEEEbiographyTOCentrynotmade%
  3838. % link labels to the biography counter so hyperref will jump
  3839. % to the biography, not the previous section
  3840. \setcounter{IEEEbiography}{-1}%
  3841. \refstepcounter{IEEEbiography}%
  3842. \addcontentsline{toc}{section}{Biographies}%
  3843. \global\@IEEEbiographyTOCentrynotmadefalse%
  3844. \fi%
  3845. % one more biography
  3846. \refstepcounter{IEEEbiography}%
  3847. % Make an entry for this name into the table of contents
  3848. \addcontentsline{toc}{subsection}{#2}%
  3849. % V1.6 properly handle if a new paragraph should occur while the
  3850. % hanging indent is still active. Do this by redefining \par so
  3851. % that it will not start a new paragraph. (But it will appear to the
  3852. % user as if it did.) Also, strip any leading pars, newlines, or spaces.
  3853. \let\@IEEEBIOORGparCMD=\par% save the original \par command
  3854. \edef\par{\hfil\break\indent}% the new \par will not be a "real" \par
  3855. \settoheight{\@IEEEtrantmpdimenA}{\@IEEEtempbiographybox}% get height of biography box
  3856. \@IEEEtrantmpdimenB=\@IEEEBIOhangdepth%
  3857. \@IEEEtrantmpcountA=\@IEEEtrantmpdimenB% countA has the hang depth
  3858. \divide\@IEEEtrantmpcountA by \baselineskip% calculates lines needed to produce the hang depth
  3859. \advance\@IEEEtrantmpcountA by 1% ensure we overestimate
  3860. % set the hanging indent
  3861. \hangindent\@IEEEBIOhangwidth%
  3862. \hangafter-\@IEEEtrantmpcountA%
  3863. % reference the top of the photo area to the top of a capital T
  3864. \settoheight{\@IEEEtrantmpdimenB}{\mbox{T}}%
  3865. % set the photo box, give it zero width and height so as not to disturb anything
  3866. \noindent\makebox[0pt][l]{\hspace{-\@IEEEBIOhangwidth}\raisebox{\@IEEEtrantmpdimenB}[0pt][0pt]{%
  3867. \raisebox{-\@IEEEBIOphotodepth}[0pt][0pt]{\@IEEEtempbiographybox}}}%
  3868. % now place the author name and begin the bio text
  3869. \noindent\textbf{#2\ }\@IEEEgobbleleadPARNLSP}{\relax\let\par=\@IEEEBIOORGparCMD\par%
  3870. % 7/2001 V1.5 detect when the biography text is shorter than the photo area
  3871. % and pad the unused area - preventing a collision from the next biography entry
  3872. % MDS
  3873. \ifnum \prevgraf <\@IEEEtrantmpcountA\relax% detect when the biography text is shorter than the photo
  3874. \advance\@IEEEtrantmpcountA by -\prevgraf% calculate how many lines we need to pad
  3875. \advance\@IEEEtrantmpcountA by -1\relax% we compensate for the fact that we indented an extra line
  3876. \@IEEEtrantmpdimenA=\baselineskip% calculate the length of the padding
  3877. \multiply\@IEEEtrantmpdimenA by \@IEEEtrantmpcountA%
  3878. \noindent\rule{0pt}{\@IEEEtrantmpdimenA}% insert an invisible support strut
  3879. \fi%
  3880. \par\normalfont}
  3881. % V1.6
  3882. % added biography without a photo environment
  3883. \newenvironment{IEEEbiographynophoto}[1]{%
  3884. % Make an entry into the table of contents only if we have not done so before
  3885. \if@IEEEbiographyTOCentrynotmade%
  3886. % link labels to the biography counter so hyperref will jump
  3887. % to the biography, not the previous section
  3888. \setcounter{IEEEbiography}{-1}%
  3889. \refstepcounter{IEEEbiography}%
  3890. \addcontentsline{toc}{section}{Biographies}%
  3891. \global\@IEEEbiographyTOCentrynotmadefalse%
  3892. \fi%
  3893. % one more biography
  3894. \refstepcounter{IEEEbiography}%
  3895. % Make an entry for this name into the table of contents
  3896. \addcontentsline{toc}{subsection}{#1}%
  3897. \normalfont\@IEEEcompsoconly{\sffamily}\footnotesize\interlinepenalty500%
  3898. \vskip 4\baselineskip plus 1fil minus 0\baselineskip%
  3899. \parskip=0pt\par%
  3900. \noindent\textbf{#1\ }\@IEEEgobbleleadPARNLSP}{\relax\par\normalfont}
  3901. % provide the user with some old font commands
  3902. % got this from article.cls
  3903. \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
  3904. \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
  3905. \DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
  3906. \DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
  3907. \DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
  3908. \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
  3909. \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
  3910. \DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
  3911. \DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
  3912. % SPECIAL PAPER NOTICE COMMANDS
  3913. %
  3914. % holds the special notice text
  3915. \def\@IEEEspecialpapernotice{\relax}
  3916. % for special papers, like invited papers, the user can do:
  3917. % \IEEEspecialpapernotice{(Invited Paper)} before \maketitle
  3918. \def\IEEEspecialpapernotice#1{\ifCLASSOPTIONconference%
  3919. \def\@IEEEspecialpapernotice{{\Large#1\vspace*{1em}}}%
  3920. \else%
  3921. \def\@IEEEspecialpapernotice{{\\*[1.5ex]\sublargesize\textit{#1}}\vspace*{-2ex}}%
  3922. \fi}
  3923. % PUBLISHER ID COMMANDS
  3924. % to insert a publisher's ID footer
  3925. % V1.6 \IEEEpubid has been changed so that the change in page size and style
  3926. % occurs in \maketitle. \IEEEpubid must now be issued prior to \maketitle
  3927. % use \IEEEpubidadjcol as before - in the second column of the title page
  3928. % These changes allow \maketitle to take the reduced page height into
  3929. % consideration when dynamically setting the space between the author
  3930. % names and the maintext.
  3931. %
  3932. % the amount the main text is pulled up to make room for the
  3933. % publisher's ID footer
  3934. % IEEE uses about 1.3\baselineskip for journals,
  3935. % dynamic title spacing will clean up the fraction
  3936. \def\@IEEEpubidpullup{1.3\baselineskip}
  3937. \ifCLASSOPTIONtechnote
  3938. % for technotes it must be an integer of baselineskip as there can be no
  3939. % dynamic title spacing for two column mode technotes (the title is in the
  3940. % in first column) and we should maintain an integer number of lines in the
  3941. % second column
  3942. % There are some examples (such as older issues of "Transactions on
  3943. % Information Theory") in which IEEE really pulls the text off the ID for
  3944. % technotes - about 0.55in (or 4\baselineskip). We'll use 2\baselineskip
  3945. % and call it even.
  3946. \def\@IEEEpubidpullup{2\baselineskip}
  3947. \fi
  3948. % V1.7 compsoc does not use a pullup
  3949. \ifCLASSOPTIONcompsoc
  3950. \def\@IEEEpubidpullup{0pt}
  3951. \fi
  3952. % holds the ID text
  3953. \def\@IEEEpubid{\relax}
  3954. % flag so \maketitle can tell if \IEEEpubid was called
  3955. \newif\if@IEEEusingpubid
  3956. \global\@IEEEusingpubidfalse
  3957. % issue this command in the page to have the ID at the bottom
  3958. % V1.6 use before \maketitle
  3959. \def\IEEEpubid#1{\def\@IEEEpubid{#1}\global\@IEEEusingpubidtrue}
  3960. % command which will pull up (shorten) the column it is executed in
  3961. % to make room for the publisher ID. Place in the second column of
  3962. % the title page when using \IEEEpubid
  3963. % Is smart enough not to do anything when in single column text or
  3964. % if the user hasn't called \IEEEpubid
  3965. % currently needed in for the second column of a page with the
  3966. % publisher ID. If not needed in future releases, please provide this
  3967. % command and define it as \relax for backward compatibility
  3968. % v1.6b do not allow command to operate if the peer review option has been
  3969. % selected because \IEEEpubidadjcol will not be on the cover page.
  3970. % V1.7 do nothing if compsoc
  3971. \def\IEEEpubidadjcol{\ifCLASSOPTIONcompsoc\else\ifCLASSOPTIONpeerreview\else
  3972. \if@twocolumn\if@IEEEusingpubid\enlargethispage{-\@IEEEpubidpullup}\fi\fi\fi\fi}
  3973. % Special thanks to Peter Wilson, Daniel Luecking, and the other
  3974. % gurus at comp.text.tex, for helping me to understand how best to
  3975. % implement the IEEEpubid command in LaTeX.
  3976. %% Lockout some commands under various conditions
  3977. % general purpose bit bucket
  3978. \newsavebox{\@IEEEtranrubishbin}
  3979. % flags to prevent multiple warning messages
  3980. \newif\if@IEEEWARNthanks
  3981. \newif\if@IEEEWARNIEEEPARstart
  3982. \newif\if@IEEEWARNIEEEbiography
  3983. \newif\if@IEEEWARNIEEEbiographynophoto
  3984. \newif\if@IEEEWARNIEEEpubid
  3985. \newif\if@IEEEWARNIEEEpubidadjcol
  3986. \newif\if@IEEEWARNIEEEmembership
  3987. \newif\if@IEEEWARNIEEEaftertitletext
  3988. \@IEEEWARNthankstrue
  3989. \@IEEEWARNIEEEPARstarttrue
  3990. \@IEEEWARNIEEEbiographytrue
  3991. \@IEEEWARNIEEEbiographynophototrue
  3992. \@IEEEWARNIEEEpubidtrue
  3993. \@IEEEWARNIEEEpubidadjcoltrue
  3994. \@IEEEWARNIEEEmembershiptrue
  3995. \@IEEEWARNIEEEaftertitletexttrue
  3996. %% Lockout some commands when in various modes, but allow them to be restored if needed
  3997. %%
  3998. % save commands which might be locked out
  3999. % so that the user can later restore them if needed
  4000. \let\@IEEESAVECMDthanks\thanks
  4001. \let\@IEEESAVECMDIEEEPARstart\IEEEPARstart
  4002. \let\@IEEESAVECMDIEEEbiography\IEEEbiography
  4003. \let\@IEEESAVECMDendIEEEbiography\endIEEEbiography
  4004. \let\@IEEESAVECMDIEEEbiographynophoto\IEEEbiographynophoto
  4005. \let\@IEEESAVECMDendIEEEbiographynophoto\endIEEEbiographynophoto
  4006. \let\@IEEESAVECMDIEEEpubid\IEEEpubid
  4007. \let\@IEEESAVECMDIEEEpubidadjcol\IEEEpubidadjcol
  4008. \let\@IEEESAVECMDIEEEmembership\IEEEmembership
  4009. \let\@IEEESAVECMDIEEEaftertitletext\IEEEaftertitletext
  4010. % disable \IEEEPARstart when in draft mode
  4011. % This may have originally been done because the pre-V1.6 drop letter
  4012. % algorithm had problems with a non-unity baselinestretch
  4013. % At any rate, it seems too formal to have a drop letter in a draft
  4014. % paper.
  4015. \ifCLASSOPTIONdraftcls
  4016. \def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** ATTENTION: \noexpand\IEEEPARstart
  4017. is disabled in draft mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse}
  4018. \fi
  4019. % and for technotes
  4020. \ifCLASSOPTIONtechnote
  4021. \def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** WARNING: \noexpand\IEEEPARstart
  4022. is locked out for technotes (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse}
  4023. \fi
  4024. % lockout unneeded commands when in conference mode
  4025. \ifCLASSOPTIONconference
  4026. % when locked out, \thanks, \IEEEbiography, \IEEEbiographynophoto, \IEEEpubid,
  4027. % \IEEEmembership and \IEEEaftertitletext will all swallow their given text.
  4028. % \IEEEPARstart will output a normal character instead
  4029. % warn the user about these commands only once to prevent the console screen
  4030. % from filling up with redundant messages
  4031. \def\thanks#1{\if@IEEEWARNthanks\typeout{** WARNING: \noexpand\thanks
  4032. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNthanksfalse}
  4033. \def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** WARNING: \noexpand\IEEEPARstart
  4034. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse}
  4035. % LaTeX treats environments and commands with optional arguments differently.
  4036. % the actual ("internal") command is stored as \\commandname
  4037. % (accessed via \csname\string\commandname\endcsname )
  4038. % the "external" command \commandname is a macro with code to determine
  4039. % whether or not the optional argument is presented and to provide the
  4040. % default if it is absent. So, in order to save and restore such a command
  4041. % we would have to save and restore \\commandname as well. But, if LaTeX
  4042. % ever changes the way it names the internal names, the trick would break.
  4043. % Instead let us just define a new environment so that the internal
  4044. % name can be left undisturbed.
  4045. \newenvironment{@IEEEbogusbiography}[2][]{\if@IEEEWARNIEEEbiography\typeout{** WARNING: \noexpand\IEEEbiography
  4046. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEbiographyfalse%
  4047. \setbox\@IEEEtranrubishbin\vbox\bgroup}{\egroup\relax}
  4048. % and make biography point to our bogus biography
  4049. \let\IEEEbiography=\@IEEEbogusbiography
  4050. \let\endIEEEbiography=\end@IEEEbogusbiography
  4051. \renewenvironment{IEEEbiographynophoto}[1]{\if@IEEEWARNIEEEbiographynophoto\typeout{** WARNING: \noexpand\IEEEbiographynophoto
  4052. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEbiographynophotofalse%
  4053. \setbox\@IEEEtranrubishbin\vbox\bgroup}{\egroup\relax}
  4054. \def\IEEEpubid#1{\if@IEEEWARNIEEEpubid\typeout{** WARNING: \noexpand\IEEEpubid
  4055. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEpubidfalse}
  4056. \def\IEEEpubidadjcol{\if@IEEEWARNIEEEpubidadjcol\typeout{** WARNING: \noexpand\IEEEpubidadjcol
  4057. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEpubidadjcolfalse}
  4058. \def\IEEEmembership#1{\if@IEEEWARNIEEEmembership\typeout{** WARNING: \noexpand\IEEEmembership
  4059. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEmembershipfalse}
  4060. \def\IEEEaftertitletext#1{\if@IEEEWARNIEEEaftertitletext\typeout{** WARNING: \noexpand\IEEEaftertitletext
  4061. is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEaftertitletextfalse}
  4062. \fi
  4063. % provide a way to restore the commands that are locked out
  4064. \def\IEEEoverridecommandlockouts{%
  4065. \typeout{** ATTENTION: Overriding command lockouts (line \the\inputlineno).}%
  4066. \let\thanks\@IEEESAVECMDthanks%
  4067. \let\IEEEPARstart\@IEEESAVECMDIEEEPARstart%
  4068. \let\IEEEbiography\@IEEESAVECMDIEEEbiography%
  4069. \let\endIEEEbiography\@IEEESAVECMDendIEEEbiography%
  4070. \let\IEEEbiographynophoto\@IEEESAVECMDIEEEbiographynophoto%
  4071. \let\endIEEEbiographynophoto\@IEEESAVECMDendIEEEbiographynophoto%
  4072. \let\IEEEpubid\@IEEESAVECMDIEEEpubid%
  4073. \let\IEEEpubidadjcol\@IEEESAVECMDIEEEpubidadjcol%
  4074. \let\IEEEmembership\@IEEESAVECMDIEEEmembership%
  4075. \let\IEEEaftertitletext\@IEEESAVECMDIEEEaftertitletext}
  4076. % need a backslash character for typeout output
  4077. {\catcode`\|=0 \catcode`\\=12
  4078. |xdef|@IEEEbackslash{\}}
  4079. % hook to allow easy disabling of all legacy warnings
  4080. \def\@IEEElegacywarn#1#2{\typeout{** ATTENTION: \@IEEEbackslash #1 is deprecated (line \the\inputlineno).
  4081. Use \@IEEEbackslash #2 instead.}}
  4082. % provide for legacy commands
  4083. \def\authorblockA{\@IEEElegacywarn{authorblockA}{IEEEauthorblockA}\IEEEauthorblockA}
  4084. \def\authorblockN{\@IEEElegacywarn{authorblockN}{IEEEauthorblockN}\IEEEauthorblockN}
  4085. \def\authorrefmark{\@IEEElegacywarn{authorrefmark}{IEEEauthorrefmark}\IEEEauthorrefmark}
  4086. \def\PARstart{\@IEEElegacywarn{PARstart}{IEEEPARstart}\IEEEPARstart}
  4087. \def\pubid{\@IEEElegacywarn{pubid}{IEEEpubid}\IEEEpubid}
  4088. \def\pubidadjcol{\@IEEElegacywarn{pubidadjcol}{IEEEpubidadjcol}\IEEEpubidadjcol}
  4089. \def\QED{\@IEEElegacywarn{QED}{IEEEQED}\IEEEQED}
  4090. \def\QEDclosed{\@IEEElegacywarn{QEDclosed}{IEEEQEDclosed}\IEEEQEDclosed}
  4091. \def\QEDopen{\@IEEElegacywarn{QEDopen}{IEEEQEDopen}\IEEEQEDopen}
  4092. \def\specialpapernotice{\@IEEElegacywarn{specialpapernotice}{IEEEspecialpapernotice}\IEEEspecialpapernotice}
  4093. % provide for legacy environments
  4094. \def\biography{\@IEEElegacywarn{biography}{IEEEbiography}\IEEEbiography}
  4095. \def\biographynophoto{\@IEEElegacywarn{biographynophoto}{IEEEbiographynophoto}\IEEEbiographynophoto}
  4096. \def\keywords{\@IEEElegacywarn{keywords}{IEEEkeywords}\IEEEkeywords}
  4097. \def\endbiography{\endIEEEbiography}
  4098. \def\endbiographynophoto{\endIEEEbiographynophoto}
  4099. \def\endkeywords{\endIEEEkeywords}
  4100. % provide for legacy IED commands/lengths when possible
  4101. \let\labelindent\IEEElabelindent
  4102. \def\calcleftmargin{\@IEEElegacywarn{calcleftmargin}{IEEEcalcleftmargin}\IEEEcalcleftmargin}
  4103. \def\setlabelwidth{\@IEEElegacywarn{setlabelwidth}{IEEEsetlabelwidth}\IEEEsetlabelwidth}
  4104. \def\usemathlabelsep{\@IEEElegacywarn{usemathlabelsep}{IEEEusemathlabelsep}\IEEEusemathlabelsep}
  4105. \def\iedlabeljustifyc{\@IEEElegacywarn{iedlabeljustifyc}{IEEEiedlabeljustifyc}\IEEEiedlabeljustifyc}
  4106. \def\iedlabeljustifyl{\@IEEElegacywarn{iedlabeljustifyl}{IEEEiedlabeljustifyl}\IEEEiedlabeljustifyl}
  4107. \def\iedlabeljustifyr{\@IEEElegacywarn{iedlabeljustifyr}{IEEEiedlabeljustifyr}\IEEEiedlabeljustifyr}
  4108. % let \proof use the IEEEtran version even after amsthm is loaded
  4109. % \proof is now deprecated in favor of \IEEEproof
  4110. \AtBeginDocument{\def\proof{\@IEEElegacywarn{proof}{IEEEproof}\IEEEproof}\def\endproof{\endIEEEproof}}
  4111. % V1.7 \overrideIEEEmargins is no longer supported.
  4112. \def\overrideIEEEmargins{%
  4113. \typeout{** WARNING: \string\overrideIEEEmargins \space no longer supported (line \the\inputlineno).}%
  4114. \typeout{** Use the \string\CLASSINPUTinnersidemargin, \string\CLASSINPUToutersidemargin \space controls instead.}}
  4115. \endinput
  4116. %%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of IEEEtran.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  4117. % That's all folks!