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