Statistiques
| Branche: | Révision :

xlcloud / papers / 2014 / kwapi / IEEEtran.cls @ master

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

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