annotate IEEEtran.cls @ 75:8a146c651475 tip

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