Statistiques
| Branche: | Révision :

xlcloud / papers / 2014 / reservation / IEEEtran.cls @ 848e7701

Historique | Voir | Annoter | Télécharger (202,53 ko)

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