Commit bf531a3a730e2da8ea3d1a83ad0c13fd1aa3118c
0 parents
Added IEEE template
Showing
7 changed files
with
9588 additions
and
0 deletions
IEEEtran.cls
0 → 100644
1 | +++ a/IEEEtran.cls | |
1 | +%% | |
2 | +%% IEEEtran.cls 2015/08/26 version V1.8b | |
3 | +%% | |
4 | +%% This is the IEEEtran LaTeX class for authors of the Institute of | |
5 | +%% Electrical and Electronics Engineers (IEEE) Transactions journals and | |
6 | +%% conferences. | |
7 | +%% | |
8 | +%% Support sites: | |
9 | +%% http://www.michaelshell.org/tex/ieeetran/ | |
10 | +%% http://www.ctan.org/pkg/ieeetran | |
11 | +%% and | |
12 | +%% http://www.ieee.org/ | |
13 | +%% | |
14 | +%% Based on the original 1993 IEEEtran.cls, but with many bug fixes | |
15 | +%% and enhancements (from both JVH and MDS) over the 1996/7 version. | |
16 | +%% | |
17 | +%% | |
18 | +%% Contributors: | |
19 | +%% Gerry Murray (1993), Silvano Balemi (1993), | |
20 | +%% Jon Dixon (1996), Peter N"uchter (1996), | |
21 | +%% Juergen von Hagen (2000), and Michael Shell (2001-2014) | |
22 | +%% | |
23 | +%% | |
24 | +%% Copyright (c) 1993-2000 by Gerry Murray, Silvano Balemi, | |
25 | +%% Jon Dixon, Peter N"uchter, | |
26 | +%% Juergen von Hagen | |
27 | +%% and | |
28 | +%% Copyright (c) 2001-2015 by Michael Shell | |
29 | +%% | |
30 | +%% Current maintainer (V1.3 to V1.8b): Michael Shell | |
31 | +%% See: | |
32 | +%% http://www.michaelshell.org/ | |
33 | +%% for current contact information. | |
34 | +%% | |
35 | +%% Special thanks to Peter Wilson (CUA) and Donald Arseneau | |
36 | +%% for allowing the inclusion of the \@ifmtarg command | |
37 | +%% from their ifmtarg LaTeX package. | |
38 | +%% | |
39 | +%%************************************************************************* | |
40 | +%% Legal Notice: | |
41 | +%% This code is offered as-is without any warranty either expressed or | |
42 | +%% implied; without even the implied warranty of MERCHANTABILITY or | |
43 | +%% FITNESS FOR A PARTICULAR PURPOSE! | |
44 | +%% User assumes all risk. | |
45 | +%% In no event shall the IEEE or any contributor to this code be liable for | |
46 | +%% any damages or losses, including, but not limited to, incidental, | |
47 | +%% consequential, or any other damages, resulting from the use or misuse | |
48 | +%% of any information contained here. | |
49 | +%% | |
50 | +%% All comments are the opinions of their respective authors and are not | |
51 | +%% necessarily endorsed by the IEEE. | |
52 | +%% | |
53 | +%% This work is distributed under the LaTeX Project Public License (LPPL) | |
54 | +%% ( http://www.latex-project.org/ ) version 1.3, and may be freely used, | |
55 | +%% distributed and modified. A copy of the LPPL, version 1.3, is included | |
56 | +%% in the base LaTeX documentation of all distributions of LaTeX released | |
57 | +%% 2003/12/01 or later. | |
58 | +%% Retain all contribution notices and credits. | |
59 | +%% ** Modified files should be clearly indicated as such, including ** | |
60 | +%% ** renaming them and changing author support contact information. ** | |
61 | +%% | |
62 | +%% File list of work: IEEEtran.cls, IEEEtran_HOWTO.pdf, bare_adv.tex, | |
63 | +%% bare_conf.tex, bare_jrnl.tex, bare_conf_compsoc.tex, | |
64 | +%% bare_jrnl_compsoc.tex | |
65 | +%% | |
66 | +%% Major changes to the user interface should be indicated by an | |
67 | +%% increase in the version numbers. If a version is a beta, it will | |
68 | +%% be indicated with a BETA suffix, i.e., 1.4 BETA. | |
69 | +%% Small changes can be indicated by appending letters to the version | |
70 | +%% such as "IEEEtran_v14a.cls". | |
71 | +%% In all cases, \Providesclass, any \typeout messages to the user, | |
72 | +%% \IEEEtransversionmajor and \IEEEtransversionminor must reflect the | |
73 | +%% correct version information. | |
74 | +%% The changes should also be documented via source comments. | |
75 | +%%************************************************************************* | |
76 | +%% | |
77 | +% | |
78 | +% Available class options | |
79 | +% e.g., \documentclass[10pt,conference]{IEEEtran} | |
80 | +% | |
81 | +% *** choose only one from each category *** | |
82 | +% | |
83 | +% 9pt, 10pt, 11pt, 12pt | |
84 | +% Sets normal font size. The default is 10pt. | |
85 | +% | |
86 | +% conference, journal, technote, peerreview, peerreviewca | |
87 | +% determines format mode - conference papers, journal papers, | |
88 | +% correspondence papers (technotes), or peer review papers. The user | |
89 | +% should also select 9pt when using technote. peerreview is like | |
90 | +% journal mode, but provides for a single-column "cover" title page for | |
91 | +% anonymous peer review. The paper title (without the author names) is | |
92 | +% repeated at the top of the page after the cover page. For peer review | |
93 | +% papers, the \IEEEpeerreviewmaketitle command must be executed (will | |
94 | +% automatically be ignored for non-peerreview modes) at the place the | |
95 | +% cover page is to end, usually just after the abstract (keywords are | |
96 | +% not normally used with peer review papers). peerreviewca is like | |
97 | +% peerreview, but allows the author names to be entered and formatted | |
98 | +% as with conference mode so that author affiliation and contact | |
99 | +% information can be easily seen on the cover page. | |
100 | +% The default is journal. | |
101 | +% | |
102 | +% draft, draftcls, draftclsnofoot, final | |
103 | +% determines if paper is formatted as a widely spaced draft (for | |
104 | +% handwritten editor comments) or as a properly typeset final version. | |
105 | +% draftcls restricts draft mode to the class file while all other LaTeX | |
106 | +% packages (i.e., \usepackage{graphicx}) will behave as final - allows | |
107 | +% for a draft paper with visible figures, etc. draftclsnofoot is like | |
108 | +% draftcls, but does not display the date and the word "DRAFT" at the foot | |
109 | +% of the pages. If using one of the draft modes, the user will probably | |
110 | +% also want to select onecolumn. | |
111 | +% The default is final. | |
112 | +% | |
113 | +% letterpaper, a4paper, cspaper | |
114 | +% determines paper size: 8.5in X 11in, 210mm X 297mm or 7.875in X 10.75in. | |
115 | +% Changing the paper size in the standard journal and conference modes | |
116 | +% will not alter the typesetting of the document - only the margins will | |
117 | +% be affected. In particular, documents using the a4paper option will | |
118 | +% have reduced side margins (A4 is narrower than US letter) and a longer | |
119 | +% bottom margin (A4 is longer than US letter). For both cases, the top | |
120 | +% margins will be the same and the text will be horizontally centered. | |
121 | +% For the compsoc conference and draft modes, it is the margins that will | |
122 | +% remain constant, and thus the text area size will vary, with changes in | |
123 | +% the paper size. | |
124 | +% The cspaper option is the special ``trim'' paper size (7.875in x 10.75in) | |
125 | +% used in the actual publication of Computer Society journals. Under | |
126 | +% compsoc journal mode, this option does not alter the typesetting of the | |
127 | +% document. Authors should invoke the cspaper option only if requested to | |
128 | +% do so by the editors of the specific journal they are submitting to. | |
129 | +% For final submission to the IEEE, authors should generally use US letter | |
130 | +% (8.5 X 11in) paper unless otherwise instructed. Note that authors should | |
131 | +% ensure that all post-processing (ps, pdf, etc.) uses the same paper | |
132 | +% specificiation as the .tex document. Problems here are by far the number | |
133 | +% one reason for incorrect margins. IEEEtran will automatically set the | |
134 | +% default paper size under pdflatex (without requiring any change to | |
135 | +% pdftex.cfg), so this issue is more important to dvips users. Fix | |
136 | +% config.ps, config.pdf, or ~/.dvipsrc for dvips, or use the | |
137 | +% dvips -t papersize option instead as needed. For the cspaper option, | |
138 | +% the corresponding dvips paper name is "ieeecs". | |
139 | +% See the testflow documentation | |
140 | +% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/testflow | |
141 | +% for more details on dvips paper size configuration. | |
142 | +% The default is letterpaper. | |
143 | +% | |
144 | +% oneside, twoside | |
145 | +% determines if layout follows single sided or two sided (duplex) | |
146 | +% printing. The only notable change is with the headings at the top of | |
147 | +% the pages. | |
148 | +% The default is oneside. | |
149 | +% | |
150 | +% onecolumn, twocolumn | |
151 | +% determines if text is organized into one or two columns per page. One | |
152 | +% column mode is usually used only with draft papers. | |
153 | +% The default is twocolumn. | |
154 | +% | |
155 | +% comsoc, compsoc, transmag | |
156 | +% Use the format of the IEEE Communications Society, IEEE Computer Society | |
157 | +% or IEEE Transactions on Magnetics, respectively. | |
158 | +% | |
159 | +% romanappendices | |
160 | +% Use the "Appendix I" convention when numbering appendices. IEEEtran.cls | |
161 | +% now defaults to Alpha "Appendix A" convention - the opposite of what | |
162 | +% v1.6b and earlier did. | |
163 | +% | |
164 | +% captionsoff | |
165 | +% disables the display of the figure/table captions. Some IEEE journals | |
166 | +% request that captions be removed and figures/tables be put on pages | |
167 | +% of their own at the end of an initial paper submission. The endfloat | |
168 | +% package can be used with this class option to achieve this format. | |
169 | +% | |
170 | +% nofonttune | |
171 | +% turns off tuning of the font interword spacing. Maybe useful to those | |
172 | +% not using the standard Times fonts or for those who have already "tuned" | |
173 | +% their fonts. | |
174 | +% The default is to enable IEEEtran to tune font parameters. | |
175 | +% | |
176 | +% | |
177 | +%---------- | |
178 | +% Available CLASSINPUTs provided (all are macros unless otherwise noted): | |
179 | +% \CLASSINPUTbaselinestretch | |
180 | +% \CLASSINPUTinnersidemargin | |
181 | +% \CLASSINPUToutersidemargin | |
182 | +% \CLASSINPUTtoptextmargin | |
183 | +% \CLASSINPUTbottomtextmargin | |
184 | +% | |
185 | +% Available CLASSINFOs provided: | |
186 | +% \ifCLASSINFOpdf (TeX if conditional) | |
187 | +% \CLASSINFOpaperwidth (macro) | |
188 | +% \CLASSINFOpaperheight (macro) | |
189 | +% \CLASSINFOnormalsizebaselineskip (length) | |
190 | +% \CLASSINFOnormalsizeunitybaselineskip (length) | |
191 | +% | |
192 | +% Available CLASSOPTIONs provided: | |
193 | +% all class option flags (TeX if conditionals) unless otherwise noted, | |
194 | +% e.g., \ifCLASSOPTIONcaptionsoff | |
195 | +% point size options provided as a single macro: | |
196 | +% \CLASSOPTIONpt | |
197 | +% which will be defined as 9, 10, 11, or 12 depending on the document's | |
198 | +% normalsize point size. | |
199 | +% also, class option peerreviewca implies the use of class option peerreview | |
200 | +% and classoption draft implies the use of class option draftcls | |
201 | + | |
202 | + | |
203 | + | |
204 | + | |
205 | + | |
206 | +\ProvidesClass{IEEEtran}[2015/08/26 V1.8b by Michael Shell] | |
207 | +\typeout{-- See the "IEEEtran_HOWTO" manual for usage information.} | |
208 | +\typeout{-- http://www.michaelshell.org/tex/ieeetran/} | |
209 | +\NeedsTeXFormat{LaTeX2e} | |
210 | + | |
211 | +% IEEEtran.cls version numbers, provided as of V1.3 | |
212 | +% These values serve as a way a .tex file can | |
213 | +% determine if the new features are provided. | |
214 | +% The version number of this IEEEtrans.cls can be obtained from | |
215 | +% these values. i.e., V1.4 | |
216 | +% KEEP THESE AS INTEGERS! i.e., NO {4a} or anything like that- | |
217 | +% (no need to enumerate "a" minor changes here) | |
218 | +\def\IEEEtransversionmajor{1} | |
219 | +\def\IEEEtransversionminor{8} | |
220 | + | |
221 | + | |
222 | +% hook to allow easy changeover to IEEEtran.cls/tools.sty error reporting | |
223 | +\def\@IEEEclspkgerror{\ClassError{IEEEtran}} | |
224 | + | |
225 | + | |
226 | +% These do nothing, but provide them like in article.cls | |
227 | +\newif\if@restonecol | |
228 | +\newif\if@titlepage | |
229 | + | |
230 | + | |
231 | +% class option conditionals | |
232 | +\newif\ifCLASSOPTIONonecolumn \CLASSOPTIONonecolumnfalse | |
233 | +\newif\ifCLASSOPTIONtwocolumn \CLASSOPTIONtwocolumntrue | |
234 | + | |
235 | +\newif\ifCLASSOPTIONoneside \CLASSOPTIONonesidetrue | |
236 | +\newif\ifCLASSOPTIONtwoside \CLASSOPTIONtwosidefalse | |
237 | + | |
238 | +\newif\ifCLASSOPTIONfinal \CLASSOPTIONfinaltrue | |
239 | +\newif\ifCLASSOPTIONdraft \CLASSOPTIONdraftfalse | |
240 | +\newif\ifCLASSOPTIONdraftcls \CLASSOPTIONdraftclsfalse | |
241 | +\newif\ifCLASSOPTIONdraftclsnofoot \CLASSOPTIONdraftclsnofootfalse | |
242 | + | |
243 | +\newif\ifCLASSOPTIONpeerreview \CLASSOPTIONpeerreviewfalse | |
244 | +\newif\ifCLASSOPTIONpeerreviewca \CLASSOPTIONpeerreviewcafalse | |
245 | + | |
246 | +\newif\ifCLASSOPTIONjournal \CLASSOPTIONjournaltrue | |
247 | +\newif\ifCLASSOPTIONconference \CLASSOPTIONconferencefalse | |
248 | +\newif\ifCLASSOPTIONtechnote \CLASSOPTIONtechnotefalse | |
249 | + | |
250 | +\newif\ifCLASSOPTIONnofonttune \CLASSOPTIONnofonttunefalse | |
251 | + | |
252 | +\newif\ifCLASSOPTIONcaptionsoff \CLASSOPTIONcaptionsofffalse | |
253 | + | |
254 | +\newif\ifCLASSOPTIONcomsoc \CLASSOPTIONcomsocfalse | |
255 | +\newif\ifCLASSOPTIONcompsoc \CLASSOPTIONcompsocfalse | |
256 | +\newif\ifCLASSOPTIONtransmag \CLASSOPTIONtransmagfalse | |
257 | + | |
258 | +\newif\ifCLASSOPTIONromanappendices \CLASSOPTIONromanappendicesfalse | |
259 | + | |
260 | + | |
261 | +% class info conditionals | |
262 | + | |
263 | +% indicates if pdf (via pdflatex) output | |
264 | +\newif\ifCLASSINFOpdf \CLASSINFOpdffalse | |
265 | + | |
266 | + | |
267 | +% V1.6b internal flag to show if using a4paper | |
268 | +\newif\if@IEEEusingAfourpaper \@IEEEusingAfourpaperfalse | |
269 | +% V1.6b internal flag to show if using cspaper | |
270 | +\newif\if@IEEEusingcspaper \@IEEEusingcspaperfalse | |
271 | + | |
272 | + | |
273 | +% IEEEtran class scratch pad registers | |
274 | +% dimen | |
275 | +\newdimen\@IEEEtrantmpdimenA | |
276 | +\newdimen\@IEEEtrantmpdimenB | |
277 | +\newdimen\@IEEEtrantmpdimenC | |
278 | +% count | |
279 | +\newcount\@IEEEtrantmpcountA | |
280 | +\newcount\@IEEEtrantmpcountB | |
281 | +\newcount\@IEEEtrantmpcountC | |
282 | +% token list | |
283 | +\newtoks\@IEEEtrantmptoksA | |
284 | + | |
285 | +% we use \CLASSOPTIONpt so that we can ID the point size (even for 9pt docs) | |
286 | +% as well as LaTeX's \@ptsize to retain some compatability with some | |
287 | +% external packages | |
288 | +\def\@ptsize{0} | |
289 | +% LaTeX does not support 9pt, so we set \@ptsize to 0 - same as that of 10pt | |
290 | +\DeclareOption{9pt}{\def\CLASSOPTIONpt{9}\def\@ptsize{0}} | |
291 | +\DeclareOption{10pt}{\def\CLASSOPTIONpt{10}\def\@ptsize{0}} | |
292 | +\DeclareOption{11pt}{\def\CLASSOPTIONpt{11}\def\@ptsize{1}} | |
293 | +\DeclareOption{12pt}{\def\CLASSOPTIONpt{12}\def\@ptsize{2}} | |
294 | + | |
295 | + | |
296 | + | |
297 | +\DeclareOption{letterpaper}{\setlength{\paperwidth}{8.5in}% | |
298 | + \setlength{\paperheight}{11in}% | |
299 | + \@IEEEusingAfourpaperfalse | |
300 | + \@IEEEusingcspaperfalse | |
301 | + \def\CLASSOPTIONpaper{letter}% | |
302 | + \def\CLASSINFOpaperwidth{8.5in}% | |
303 | + \def\CLASSINFOpaperheight{11in}} | |
304 | + | |
305 | + | |
306 | +\DeclareOption{a4paper}{\setlength{\paperwidth}{210mm}% | |
307 | + \setlength{\paperheight}{297mm}% | |
308 | + \@IEEEusingAfourpapertrue | |
309 | + \@IEEEusingcspaperfalse | |
310 | + \def\CLASSOPTIONpaper{a4}% | |
311 | + \def\CLASSINFOpaperwidth{210mm}% | |
312 | + \def\CLASSINFOpaperheight{297mm}} | |
313 | + | |
314 | +% special paper option for compsoc journals | |
315 | +\DeclareOption{cspaper}{\setlength{\paperwidth}{7.875in}% | |
316 | + \setlength{\paperheight}{10.75in}% | |
317 | + \@IEEEusingcspapertrue | |
318 | + \@IEEEusingAfourpaperfalse | |
319 | + \def\CLASSOPTIONpaper{ieeecs}% | |
320 | + \def\CLASSINFOpaperwidth{7.875in}% | |
321 | + \def\CLASSINFOpaperheight{10.75in}} | |
322 | + | |
323 | +\DeclareOption{oneside}{\@twosidefalse\@mparswitchfalse | |
324 | + \CLASSOPTIONonesidetrue\CLASSOPTIONtwosidefalse} | |
325 | +\DeclareOption{twoside}{\@twosidetrue\@mparswitchtrue | |
326 | + \CLASSOPTIONtwosidetrue\CLASSOPTIONonesidefalse} | |
327 | + | |
328 | +\DeclareOption{onecolumn}{\CLASSOPTIONonecolumntrue\CLASSOPTIONtwocolumnfalse} | |
329 | +\DeclareOption{twocolumn}{\CLASSOPTIONtwocolumntrue\CLASSOPTIONonecolumnfalse} | |
330 | + | |
331 | +% If the user selects draft, then this class AND any packages | |
332 | +% will go into draft mode. | |
333 | +\DeclareOption{draft}{\CLASSOPTIONdrafttrue\CLASSOPTIONdraftclstrue | |
334 | + \CLASSOPTIONdraftclsnofootfalse} | |
335 | +% draftcls is for a draft mode which will not affect any packages | |
336 | +% used by the document. | |
337 | +\DeclareOption{draftcls}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclstrue | |
338 | + \CLASSOPTIONdraftclsnofootfalse} | |
339 | +% draftclsnofoot is like draftcls, but without the footer. | |
340 | +\DeclareOption{draftclsnofoot}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclstrue | |
341 | + \CLASSOPTIONdraftclsnofoottrue} | |
342 | +\DeclareOption{final}{\CLASSOPTIONdraftfalse\CLASSOPTIONdraftclsfalse | |
343 | + \CLASSOPTIONdraftclsnofootfalse} | |
344 | + | |
345 | +\DeclareOption{journal}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse | |
346 | + \CLASSOPTIONjournaltrue\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse} | |
347 | + | |
348 | +\DeclareOption{conference}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse | |
349 | + \CLASSOPTIONjournalfalse\CLASSOPTIONconferencetrue\CLASSOPTIONtechnotefalse} | |
350 | + | |
351 | +\DeclareOption{technote}{\CLASSOPTIONpeerreviewfalse\CLASSOPTIONpeerreviewcafalse | |
352 | + \CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotetrue} | |
353 | + | |
354 | +\DeclareOption{peerreview}{\CLASSOPTIONpeerreviewtrue\CLASSOPTIONpeerreviewcafalse | |
355 | + \CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse} | |
356 | + | |
357 | +\DeclareOption{peerreviewca}{\CLASSOPTIONpeerreviewtrue\CLASSOPTIONpeerreviewcatrue | |
358 | + \CLASSOPTIONjournalfalse\CLASSOPTIONconferencefalse\CLASSOPTIONtechnotefalse} | |
359 | + | |
360 | +\DeclareOption{nofonttune}{\CLASSOPTIONnofonttunetrue} | |
361 | + | |
362 | +\DeclareOption{captionsoff}{\CLASSOPTIONcaptionsofftrue} | |
363 | + | |
364 | +\DeclareOption{comsoc}{\CLASSOPTIONcomsoctrue\CLASSOPTIONcompsocfalse\CLASSOPTIONtransmagfalse} | |
365 | + | |
366 | +\DeclareOption{compsoc}{\CLASSOPTIONcomsocfalse\CLASSOPTIONcompsoctrue\CLASSOPTIONtransmagfalse} | |
367 | + | |
368 | +\DeclareOption{transmag}{\CLASSOPTIONtransmagtrue\CLASSOPTIONcomsocfalse\CLASSOPTIONcompsocfalse} | |
369 | + | |
370 | +\DeclareOption{romanappendices}{\CLASSOPTIONromanappendicestrue} | |
371 | + | |
372 | + | |
373 | +% default to US letter paper, 10pt, twocolumn, one sided, final, journal | |
374 | +\ExecuteOptions{letterpaper,10pt,twocolumn,oneside,final,journal} | |
375 | +% overrride these defaults per user requests | |
376 | +\ProcessOptions | |
377 | + | |
378 | + | |
379 | + | |
380 | +%% -- Command Argument Scanning Support Functions -- | |
381 | + | |
382 | +% Sets the category codes for punctuation to their normal values. | |
383 | +% For local use with argument scanning. | |
384 | +\def\IEEEnormalcatcodespunct{\catcode`\!=12 \catcode`\,=12 \catcode`\:=12 | |
385 | +\catcode`\;=12 \catcode`\`=12 \catcode`\'=12 \catcode`\"=12 \catcode`\.=12 | |
386 | +\catcode`\/=12 \catcode`\?=12 \catcode`\*=12 \catcode`\+=12 \catcode`\-=12 | |
387 | +\catcode`\<=12 \catcode`\>=12 \catcode`\(=12 \catcode`\)=12 \catcode`\[=12 | |
388 | +\catcode`\]=12 \catcode`\==12 \catcode`\|=12} | |
389 | +% Sets the category codes for numbers to their normal values. | |
390 | +% For local use with argument scanning. | |
391 | +\def\IEEEnormalcatcodesnum{\catcode`\0=12 \catcode`\1=12 \catcode`\2=12 | |
392 | +\catcode`\3=12 \catcode`\4=12 \catcode`\5=12 \catcode`\6=12 \catcode`\7=12 | |
393 | +\catcode`\8=12 \catcode`\9=12} | |
394 | +% combined action of \IEEEnormalcatcodespunct and \IEEEnormalcatcodesnum | |
395 | +\def\IEEEnormalcatcodes{\IEEEnormalcatcodespunct\IEEEnormalcatcodesnum} | |
396 | + | |
397 | + | |
398 | +% usage: \@IEEEextracttoken*{} | |
399 | +% \@IEEEextracttoken fully expands its argument (which it then stores in | |
400 | +% \@IEEEextracttokenarg) via \edef and then the meaning of the first | |
401 | +% nonbrace (but including the empty group) token found is assigned via \let | |
402 | +% to \@IEEEextractedtoken as well as stored in the macro | |
403 | +% \@IEEEextractedtokenmacro. Tokens that would otherwise be discarded during | |
404 | +% the acquisition of the first are stored in \@IEEEextractedtokensdiscarded, | |
405 | +% however their original relative brace nesting depths are not guaranteed to | |
406 | +% be preserved. | |
407 | +% If the argument is empty, or if a first nonbrace token does not exist (or | |
408 | +% is an empty group), \@IEEEextractedtoken will be \relax and | |
409 | +% \@IEEEextractedtokenmacro and \@IEEEextractedtokensdiscarded will be empty. | |
410 | +% | |
411 | +% For example: | |
412 | +% \@IEEEextracttoken{{{ab}{cd}}{{ef}g}} | |
413 | +% results in: | |
414 | +% | |
415 | +% \@IEEEextracttokenarg ==> a macro containing {{ab}{cd}}{{ef}g} | |
416 | +% \@IEEEextractedtoken ==> the letter a | |
417 | +% \@IEEEextractedtokenmacro ==> a macro containing a | |
418 | +% \@IEEEextractedtokensdiscarded ==> a macro containing bcd{ef}g | |
419 | +% | |
420 | +% the *-star form, \@IEEEextracttoken*, does not expand its argument | |
421 | +% contents during processing. | |
422 | +\def\@IEEEextracttoken{\@ifstar{\let\@IEEEextracttokendef=\def\@@IEEEextracttoken}{\let\@IEEEextracttokendef=\edef\@@IEEEextracttoken}} | |
423 | + | |
424 | +\def\@@IEEEextracttoken#1{\@IEEEextracttokendef\@IEEEextracttokenarg{#1}\relax | |
425 | +\def\@IEEEextractedtokensdiscarded{}\relax % initialize to empty | |
426 | +% if the macro is unchanged after being acquired as a single undelimited argument | |
427 | +% with anything after it being stripped off as a delimited argument | |
428 | +% we know we have one token without any enclosing braces. loop until this is true. | |
429 | +\let\@IEEEextracttokencurgroup\@IEEEextracttokenarg | |
430 | +\loop | |
431 | + % trap case of an empty argument as this would cause a problem with | |
432 | + % \@@@IEEEextracttoken's first (nondelimited) argument acquisition | |
433 | + \ifx\@IEEEextracttokencurgroup\@empty | |
434 | + \def\@IEEEextractedtokenmacro{}\relax | |
435 | + \else | |
436 | + \expandafter\@@@IEEEextracttoken\@IEEEextracttokencurgroup\@IEEEgeneralsequenceDELIMITER\relax | |
437 | + \fi | |
438 | + \ifx\@IEEEextractedtokenmacro\@IEEEextracttokencurgroup | |
439 | + \else | |
440 | + \let\@IEEEextracttokencurgroup=\@IEEEextractedtokenmacro | |
441 | +\repeat | |
442 | +% we can safely do a \let= here because there should be at most one token | |
443 | +% the relax is needed to handle the case of no token found | |
444 | +\expandafter\let\expandafter\@IEEEextractedtoken\@IEEEextractedtokenmacro\relax} | |
445 | + | |
446 | +\def\@@@IEEEextracttoken#1#2\@IEEEgeneralsequenceDELIMITER{\def\@IEEEextractedtokenmacro{#1}\relax | |
447 | +\def\@@IEEEextractedtokensdiscarded{#2}\expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter | |
448 | +\@IEEEextractedtokensdiscarded\expandafter\expandafter\expandafter | |
449 | +{\expandafter\@@IEEEextractedtokensdiscarded\@IEEEextractedtokensdiscarded}} | |
450 | +%% | |
451 | +%% -- End of Command Argument Scanning Support Functions -- | |
452 | + | |
453 | + | |
454 | + | |
455 | +% Computer Society conditional execution command | |
456 | +\long\def\@IEEEcompsoconly#1{\relax\ifCLASSOPTIONcompsoc\relax#1\relax\fi\relax} | |
457 | +% inverse | |
458 | +\long\def\@IEEEnotcompsoconly#1{\relax\ifCLASSOPTIONcompsoc\else\relax#1\relax\fi\relax} | |
459 | +% compsoc conference | |
460 | +\long\def\@IEEEcompsocconfonly#1{\relax\ifCLASSOPTIONcompsoc\ifCLASSOPTIONconference\relax#1\relax\fi\fi\relax} | |
461 | +% compsoc not conference | |
462 | +\long\def\@IEEEcompsocnotconfonly#1{\relax\ifCLASSOPTIONcompsoc\ifCLASSOPTIONconference\else\relax#1\relax\fi\fi\relax} | |
463 | + | |
464 | + | |
465 | +% comsoc verify that newtxmath, mtpro2, mt11p or mathtime has been loaded | |
466 | +\def\@IEEEcomsocverifymathfont{\typeout{-- Verifying Times compatible math font.}\relax | |
467 | + \@ifpackageloaded{newtxmath}{\typeout{-- newtxmath loaded, OK.}}{\@@IEEEcomsocverifymathfont}} | |
468 | +\def\@@IEEEcomsocverifymathfont{\@ifpackageloaded{mtpro2}{\typeout{-- mtpro2 loaded, OK.}}{\@@@IEEEcomsocverifymathfont}} | |
469 | +\def\@@@IEEEcomsocverifymathfont{\@ifpackageloaded{mt11p}{\typeout{-- mt11p2 loaded, OK.}}{\@@@@IEEEcomsocverifymathfont}} | |
470 | +\def\@@@@IEEEcomsocverifymathfont{\@ifpackageloaded{mathtime}{\typeout{-- mathtime loaded, OK.}}{\@IEEEcomsocenforcemathfont}} | |
471 | + | |
472 | +% comsoc, if a Times math font was not loaded by user, enforce it | |
473 | +\def\@IEEEcomsocenforcemathfont{\typeout{** Times compatible math font not found, forcing.}\relax | |
474 | +\IfFileExists{newtxmath.sty}{\typeout{-- Found newtxmath, loading.}\RequirePackage{newtxmath}}{\@@IEEEcomsocenforcemathfont}} | |
475 | +\def\@@IEEEcomsocenforcemathfont{\IfFileExists{mtpro2.sty}{\typeout{-- Found mtpro2, loading.}\RequirePackage{mtpro2}}{\@@@IEEEcomsocenforcemathfont}} | |
476 | +\def\@@@IEEEcomsocenforcemathfont{\IfFileExists{mt11p.sty}{\typeout{-- Found mt11p, loading.}\RequirePackage{mt11p}}{\@@@@IEEEcomsocenforcemathfont}} | |
477 | +\def\@@@@IEEEcomsocenforcemathfont{\IfFileExists{mathtime.sty}{\typeout{-- Found mathtime, loading.}\RequirePackage{mathtime}}{\@@@@@IEEEcomsocenforcemathfont}} | |
478 | +% if no acceptable Times math font package found, error with newtxmath requirement | |
479 | +\def\@@@@@IEEEcomsocenforcemathfont{\typeout{** No Times compatible math font package found. newtxmath is required.}\RequirePackage{newtxmath}} | |
480 | + | |
481 | + | |
482 | +\ifCLASSOPTIONcomsoc | |
483 | + % ensure that if newtxmath is used, the cmintegrals option is also invoked | |
484 | + \PassOptionsToPackage{cmintegrals}{newtxmath} | |
485 | + % comsoc requires a Times like math font | |
486 | + % ensure this requirement is satisfied at document start | |
487 | + \AtBeginDocument{\@IEEEcomsocverifymathfont} | |
488 | +\fi | |
489 | + | |
490 | + | |
491 | + | |
492 | +% The IEEE uses Times Roman font, so we'll default to Times. | |
493 | +% These three commands make up the entire times.sty package. | |
494 | +\renewcommand{\sfdefault}{phv} | |
495 | +\renewcommand{\rmdefault}{ptm} | |
496 | +\renewcommand{\ttdefault}{pcr} | |
497 | + | |
498 | +% V1.7 compsoc nonconference papers, use Palatino/Palladio as the main text font, | |
499 | +% not Times Roman. | |
500 | +\@IEEEcompsocnotconfonly{\renewcommand{\rmdefault}{ppl}} | |
501 | + | |
502 | +% enable the selected main text font | |
503 | +\normalfont\selectfont | |
504 | + | |
505 | + | |
506 | +\ifCLASSOPTIONcomsoc | |
507 | + \typeout{-- Using IEEE Communications Society mode.} | |
508 | +\fi | |
509 | + | |
510 | +\ifCLASSOPTIONcompsoc | |
511 | + \typeout{-- Using IEEE Computer Society mode.} | |
512 | +\fi | |
513 | + | |
514 | + | |
515 | +% V1.7 conference notice message hook | |
516 | +\def\@IEEEconsolenoticeconference{\typeout{}% | |
517 | +\typeout{** Conference Paper **}% | |
518 | +\typeout{Before submitting the final camera ready copy, remember to:}% | |
519 | +\typeout{}% | |
520 | +\typeout{ 1. Manually equalize the lengths of two columns on the last page}% | |
521 | +\typeout{ of your paper;}% | |
522 | +\typeout{}% | |
523 | +\typeout{ 2. Ensure that any PostScript and/or PDF output post-processing}% | |
524 | +\typeout{ uses only Type 1 fonts and that every step in the generation}% | |
525 | +\typeout{ process uses the appropriate paper size.}% | |
526 | +\typeout{}} | |
527 | + | |
528 | + | |
529 | +% we can send console reminder messages to the user here | |
530 | +\AtEndDocument{\ifCLASSOPTIONconference\@IEEEconsolenoticeconference\fi} | |
531 | + | |
532 | + | |
533 | +% warn about the use of single column other than for draft mode | |
534 | +\ifCLASSOPTIONtwocolumn\else% | |
535 | + \ifCLASSOPTIONdraftcls\else% | |
536 | + \typeout{** ATTENTION: Single column mode is not typically used with IEEE publications.}% | |
537 | + \fi% | |
538 | +\fi | |
539 | + | |
540 | + | |
541 | +% V1.7 improved paper size setting code. | |
542 | +% Set pdfpage and dvips paper sizes. Conditional tests are similar to that | |
543 | +% of ifpdf.sty. Retain within {} to ensure tested macros are never altered, | |
544 | +% even if only effect is to set them to \relax. | |
545 | +% if \pdfoutput is undefined or equal to relax, output a dvips special | |
546 | +{\@ifundefined{pdfoutput}{\AtBeginDvi{\special{papersize=\CLASSINFOpaperwidth,\CLASSINFOpaperheight}}}{% | |
547 | +% pdfoutput is defined and not equal to \relax | |
548 | +% check for pdfpageheight existence just in case someone sets pdfoutput | |
549 | +% under non-pdflatex. If exists, set them regardless of value of \pdfoutput. | |
550 | +\@ifundefined{pdfpageheight}{\relax}{\global\pdfpagewidth\paperwidth | |
551 | +\global\pdfpageheight\paperheight}% | |
552 | +% if using \pdfoutput=0 under pdflatex, send dvips papersize special | |
553 | +\ifcase\pdfoutput | |
554 | +\AtBeginDvi{\special{papersize=\CLASSINFOpaperwidth,\CLASSINFOpaperheight}}% | |
555 | +\else | |
556 | +% we are using pdf output, set CLASSINFOpdf flag | |
557 | +\global\CLASSINFOpdftrue | |
558 | +\fi}} | |
559 | + | |
560 | +% let the user know the selected papersize | |
561 | +\typeout{-- Using \CLASSINFOpaperwidth\space x \CLASSINFOpaperheight\space | |
562 | +(\CLASSOPTIONpaper)\space paper.} | |
563 | + | |
564 | +\ifCLASSINFOpdf | |
565 | +\typeout{-- Using PDF output.} | |
566 | +\else | |
567 | +\typeout{-- Using DVI output.} | |
568 | +\fi | |
569 | + | |
570 | + | |
571 | +% The idea hinted here is for LaTeX to generate markleft{} and markright{} | |
572 | +% automatically for you after you enter \author{}, \journal{}, | |
573 | +% \journaldate{}, journalvol{}, \journalnum{}, etc. | |
574 | +% However, there may be some backward compatibility issues here as | |
575 | +% well as some special applications for IEEEtran.cls and special issues | |
576 | +% that may require the flexible \markleft{}, \markright{} and/or \markboth{}. | |
577 | +% We'll leave this as an open future suggestion. | |
578 | +%\newcommand{\journal}[1]{\def\@journal{#1}} | |
579 | +%\def\@journal{} | |
580 | + | |
581 | + | |
582 | + | |
583 | +% pointsize values | |
584 | +% used with ifx to determine the document's normal size | |
585 | +\def\@IEEEptsizenine{9} | |
586 | +\def\@IEEEptsizeten{10} | |
587 | +\def\@IEEEptsizeeleven{11} | |
588 | +\def\@IEEEptsizetwelve{12} | |
589 | + | |
590 | + | |
591 | + | |
592 | +% FONT DEFINITIONS (No sizexx.clo file needed) | |
593 | +% V1.6 revised font sizes, displayskip values and | |
594 | +% revised normalsize baselineskip to reduce underfull vbox problems | |
595 | +% on the 58pc = 696pt = 9.5in text height we want | |
596 | +% normalsize #lines/column baselineskip (aka leading) | |
597 | +% 9pt 63 11.0476pt (truncated down) | |
598 | +% 10pt 58 12pt (exact) | |
599 | +% 11pt 52 13.3846pt (truncated down) | |
600 | +% 12pt 50 13.92pt (exact) | |
601 | +% | |
602 | + | |
603 | +% we need to store the nominal baselineskip for the given font size | |
604 | +% in case baselinestretch ever changes. | |
605 | +% this is a dimen, so it will not hold stretch or shrink | |
606 | +\newdimen\@IEEEnormalsizeunitybaselineskip | |
607 | +\@IEEEnormalsizeunitybaselineskip\baselineskip | |
608 | + | |
609 | + | |
610 | + | |
611 | +%% ******* WARNING! ******* | |
612 | +%% | |
613 | +%% Authors should not alter font sizes, baselineskip ("leading"), | |
614 | +%% margins or other spacing values in an attempt to squeeze more | |
615 | +%% material on each page. | |
616 | +%% | |
617 | +%% The IEEE's own typesetting software will restore the correct | |
618 | +%% values when re-typesetting/proofing the submitted document, | |
619 | +%% possibly resulting in unexpected article over length charges. | |
620 | +%% | |
621 | +%% ******* WARNING! ******* | |
622 | + | |
623 | + | |
624 | +% 9pt option defaults | |
625 | +\ifx\CLASSOPTIONpt\@IEEEptsizenine | |
626 | +\typeout{-- This is a 9 point document.} | |
627 | +\def\normalsize{\@setfontsize{\normalsize}{9}{11.0476pt}} | |
628 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{11.0476pt} | |
629 | +\normalsize | |
630 | +\abovedisplayskip 1.5ex plus 3pt minus 1pt | |
631 | +\belowdisplayskip \abovedisplayskip | |
632 | +\abovedisplayshortskip 0pt plus 3pt | |
633 | +\belowdisplayshortskip 1.5ex plus 3pt minus 1pt | |
634 | +\def\small{\@setfontsize{\small}{8.5}{10pt}} | |
635 | +\def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}} | |
636 | +\def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}} | |
637 | +\def\tiny{\@setfontsize{\tiny}{5}{6pt}} | |
638 | +% sublargesize is the same as large - 10pt | |
639 | +\def\sublargesize{\@setfontsize{\sublargesize}{10}{12pt}} | |
640 | +\def\large{\@setfontsize{\large}{10}{12pt}} | |
641 | +\def\Large{\@setfontsize{\Large}{12}{14pt}} | |
642 | +\def\LARGE{\@setfontsize{\LARGE}{14}{17pt}} | |
643 | +\def\huge{\@setfontsize{\huge}{17}{20pt}} | |
644 | +\def\Huge{\@setfontsize{\Huge}{20}{24pt}} | |
645 | +\fi | |
646 | +% | |
647 | +% 10pt option defaults | |
648 | +\ifx\CLASSOPTIONpt\@IEEEptsizeten | |
649 | +\typeout{-- This is a 10 point document.} | |
650 | +\def\normalsize{\@setfontsize{\normalsize}{10}{12.00pt}} | |
651 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{12pt} | |
652 | +\normalsize | |
653 | +\abovedisplayskip 1.5ex plus 4pt minus 2pt | |
654 | +\belowdisplayskip \abovedisplayskip | |
655 | +\abovedisplayshortskip 0pt plus 4pt | |
656 | +\belowdisplayshortskip 1.5ex plus 4pt minus 2pt | |
657 | +\def\small{\@setfontsize{\small}{9}{10pt}} | |
658 | +\def\footnotesize{\@setfontsize{\footnotesize}{8}{9pt}} | |
659 | +\def\scriptsize{\@setfontsize{\scriptsize}{7}{8pt}} | |
660 | +\def\tiny{\@setfontsize{\tiny}{5}{6pt}} | |
661 | +% sublargesize is a tad smaller than large - 11pt | |
662 | +\def\sublargesize{\@setfontsize{\sublargesize}{11}{13.4pt}} | |
663 | +\def\large{\@setfontsize{\large}{12}{14pt}} | |
664 | +\def\Large{\@setfontsize{\Large}{14}{17pt}} | |
665 | +\def\LARGE{\@setfontsize{\LARGE}{17}{20pt}} | |
666 | +\def\huge{\@setfontsize{\huge}{20}{24pt}} | |
667 | +\def\Huge{\@setfontsize{\Huge}{24}{28pt}} | |
668 | +\fi | |
669 | +% | |
670 | +% 11pt option defaults | |
671 | +\ifx\CLASSOPTIONpt\@IEEEptsizeeleven | |
672 | +\typeout{-- This is an 11 point document.} | |
673 | +\def\normalsize{\@setfontsize{\normalsize}{11}{13.3846pt}} | |
674 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{13.3846pt} | |
675 | +\normalsize | |
676 | +\abovedisplayskip 1.5ex plus 5pt minus 3pt | |
677 | +\belowdisplayskip \abovedisplayskip | |
678 | +\abovedisplayshortskip 0pt plus 5pt | |
679 | +\belowdisplayshortskip 1.5ex plus 5pt minus 3pt | |
680 | +\def\small{\@setfontsize{\small}{10}{12pt}} | |
681 | +\def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}} | |
682 | +\def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}} | |
683 | +\def\tiny{\@setfontsize{\tiny}{6}{7pt}} | |
684 | +% sublargesize is the same as large - 12pt | |
685 | +\def\sublargesize{\@setfontsize{\sublargesize}{12}{14pt}} | |
686 | +\def\large{\@setfontsize{\large}{12}{14pt}} | |
687 | +\def\Large{\@setfontsize{\Large}{14}{17pt}} | |
688 | +\def\LARGE{\@setfontsize{\LARGE}{17}{20pt}} | |
689 | +\def\huge{\@setfontsize{\huge}{20}{24pt}} | |
690 | +\def\Huge{\@setfontsize{\Huge}{24}{28pt}} | |
691 | +\fi | |
692 | +% | |
693 | +% 12pt option defaults | |
694 | +\ifx\CLASSOPTIONpt\@IEEEptsizetwelve | |
695 | +\typeout{-- This is a 12 point document.} | |
696 | +\def\normalsize{\@setfontsize{\normalsize}{12}{13.92pt}} | |
697 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{13.92pt} | |
698 | +\normalsize | |
699 | +\abovedisplayskip 1.5ex plus 6pt minus 4pt | |
700 | +\belowdisplayskip \abovedisplayskip | |
701 | +\abovedisplayshortskip 0pt plus 6pt | |
702 | +\belowdisplayshortskip 1.5ex plus 6pt minus 4pt | |
703 | +\def\small{\@setfontsize{\small}{10}{12pt}} | |
704 | +\def\footnotesize{\@setfontsize{\footnotesize}{9}{10.5pt}} | |
705 | +\def\scriptsize{\@setfontsize{\scriptsize}{8}{9pt}} | |
706 | +\def\tiny{\@setfontsize{\tiny}{6}{7pt}} | |
707 | +% sublargesize is the same as large - 14pt | |
708 | +\def\sublargesize{\@setfontsize{\sublargesize}{14}{17pt}} | |
709 | +\def\large{\@setfontsize{\large}{14}{17pt}} | |
710 | +\def\Large{\@setfontsize{\Large}{17}{20pt}} | |
711 | +\def\LARGE{\@setfontsize{\LARGE}{20}{24pt}} | |
712 | +\def\huge{\@setfontsize{\huge}{22}{26pt}} | |
713 | +\def\Huge{\@setfontsize{\Huge}{24}{28pt}} | |
714 | +\fi | |
715 | + | |
716 | + | |
717 | + | |
718 | +% V1.8a compsoc font sizes | |
719 | +% compsoc font sizes use bp "Postscript" point units (1/72in) | |
720 | +% rather than the traditional pt (1/72.27) | |
721 | +\ifCLASSOPTIONcompsoc | |
722 | +% -- compsoc defaults -- | |
723 | +% ** will override some of these values later ** | |
724 | +% 9pt | |
725 | +\ifx\CLASSOPTIONpt\@IEEEptsizenine | |
726 | +\def\normalsize{\@setfontsize{\normalsize}{9bp}{11bp}} | |
727 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{11bp} | |
728 | +\normalsize | |
729 | +\abovedisplayskip 1.5ex plus 3bp minus 1bp | |
730 | +\belowdisplayskip \abovedisplayskip | |
731 | +\abovedisplayshortskip 0bp plus 3bp | |
732 | +\belowdisplayshortskip 1.5ex plus 3bp minus 1bp | |
733 | +\def\small{\@setfontsize{\small}{8.5bp}{10bp}} | |
734 | +\def\footnotesize{\@setfontsize{\footnotesize}{8bp}{9bp}} | |
735 | +\def\scriptsize{\@setfontsize{\scriptsize}{7bp}{8bp}} | |
736 | +\def\tiny{\@setfontsize{\tiny}{5bp}{6bp}} | |
737 | +% sublargesize is the same as large - 10bp | |
738 | +\def\sublargesize{\@setfontsize{\sublargesize}{10bp}{12bp}} | |
739 | +\def\large{\@setfontsize{\large}{10bp}{12bp}} | |
740 | +\def\Large{\@setfontsize{\Large}{12bp}{14bp}} | |
741 | +\def\LARGE{\@setfontsize{\LARGE}{14bp}{17bp}} | |
742 | +\def\huge{\@setfontsize{\huge}{17bp}{20bp}} | |
743 | +\def\Huge{\@setfontsize{\Huge}{20bp}{24bp}} | |
744 | +\fi | |
745 | +% | |
746 | +% 10pt | |
747 | +\ifx\CLASSOPTIONpt\@IEEEptsizeten | |
748 | +\def\normalsize{\@setfontsize{\normalsize}{10bp}{12bp}} | |
749 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{12bp} | |
750 | +\normalsize | |
751 | +\abovedisplayskip 1.5ex plus 4bp minus 2bp | |
752 | +\belowdisplayskip \abovedisplayskip | |
753 | +\abovedisplayshortskip 0pt plus 4bp | |
754 | +\belowdisplayshortskip 1.5ex plus 4bp minus 2bp | |
755 | +\def\small{\@setfontsize{\small}{9bp}{10bp}} | |
756 | +\def\footnotesize{\@setfontsize{\footnotesize}{8bp}{9bp}} | |
757 | +\def\scriptsize{\@setfontsize{\scriptsize}{7bp}{8bp}} | |
758 | +\def\tiny{\@setfontsize{\tiny}{5bp}{6bp}} | |
759 | +% sublargesize is a tad smaller than large - 11bp | |
760 | +\def\sublargesize{\@setfontsize{\sublargesize}{11bp}{13.5bp}} | |
761 | +\def\large{\@setfontsize{\large}{12bp}{14bp}} | |
762 | +\def\Large{\@setfontsize{\Large}{14bp}{17bp}} | |
763 | +\def\LARGE{\@setfontsize{\LARGE}{17bp}{20bp}} | |
764 | +\def\huge{\@setfontsize{\huge}{20bp}{24bp}} | |
765 | +\def\Huge{\@setfontsize{\Huge}{24bp}{28bp}} | |
766 | +\fi | |
767 | +% | |
768 | +% 11pt | |
769 | +\ifx\CLASSOPTIONpt\@IEEEptsizeeleven | |
770 | +\def\normalsize{\@setfontsize{\normalsize}{11bp}{13.5bp}} | |
771 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{13.5bp} | |
772 | +\normalsize | |
773 | +\abovedisplayskip 1.5ex plus 5bp minus 3bp | |
774 | +\belowdisplayskip \abovedisplayskip | |
775 | +\abovedisplayshortskip 0pt plus 5bp | |
776 | +\belowdisplayshortskip 1.5ex plus 5bp minus 3bp | |
777 | +\def\small{\@setfontsize{\small}{10bp}{12bp}} | |
778 | +\def\footnotesize{\@setfontsize{\footnotesize}{9bp}{10.5bp}} | |
779 | +\def\scriptsize{\@setfontsize{\scriptsize}{8bp}{9bp}} | |
780 | +\def\tiny{\@setfontsize{\tiny}{6bp}{7bp}} | |
781 | +% sublargesize is the same as large - 12bp | |
782 | +\def\sublargesize{\@setfontsize{\sublargesize}{12bp}{14bp}} | |
783 | +\def\large{\@setfontsize{\large}{12bp}{14bp}} | |
784 | +\def\Large{\@setfontsize{\Large}{14bp}{17bp}} | |
785 | +\def\LARGE{\@setfontsize{\LARGE}{17bp}{20bp}} | |
786 | +\def\huge{\@setfontsize{\huge}{20bp}{24bp}} | |
787 | +\def\Huge{\@setfontsize{\Huge}{24bp}{28bp}} | |
788 | +\fi | |
789 | +% | |
790 | +% 12pt | |
791 | +\ifx\CLASSOPTIONpt\@IEEEptsizetwelve | |
792 | +\def\normalsize{\@setfontsize{\normalsize}{12bp}{14bp}}% | |
793 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{14bp}% | |
794 | +\normalsize | |
795 | +\abovedisplayskip 1.5ex plus 6bp minus 4bp | |
796 | +\belowdisplayskip \abovedisplayskip | |
797 | +\abovedisplayshortskip 0pt plus 6bp | |
798 | +\belowdisplayshortskip 1.5ex plus 6bp minus 4bp | |
799 | +\def\small{\@setfontsize{\small}{10bp}{12bp}} | |
800 | +\def\footnotesize{\@setfontsize{\footnotesize}{9bp}{10.5bp}} | |
801 | +\def\scriptsize{\@setfontsize{\scriptsize}{8bp}{9bp}} | |
802 | +\def\tiny{\@setfontsize{\tiny}{6bp}{7bp}} | |
803 | +% sublargesize is the same as large - 14bp | |
804 | +\def\sublargesize{\@setfontsize{\sublargesize}{14bp}{17bp}} | |
805 | +\def\large{\@setfontsize{\large}{14bp}{17bp}} | |
806 | +\def\Large{\@setfontsize{\Large}{17bp}{20bp}} | |
807 | +\def\LARGE{\@setfontsize{\LARGE}{20bp}{24bp}} | |
808 | +\def\huge{\@setfontsize{\huge}{22bp}{26bp}} | |
809 | +\def\Huge{\@setfontsize{\Huge}{24bp}{28bp}} | |
810 | +\fi | |
811 | +% | |
812 | +% -- override defaults: compsoc journals use special normalsizes -- | |
813 | +\ifCLASSOPTIONconference | |
814 | +% | |
815 | +% compsoc conferences | |
816 | +% 9pt | |
817 | +\ifx\CLASSOPTIONpt\@IEEEptsizenine | |
818 | +\def\normalsize{\@setfontsize{\normalsize}{9bp}{10.8bp}} | |
819 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{10.8bp} | |
820 | +\normalsize | |
821 | +\abovedisplayskip 1.5ex plus 3bp minus 1bp | |
822 | +\belowdisplayskip \abovedisplayskip | |
823 | +\abovedisplayshortskip 0bp plus 3bp | |
824 | +\belowdisplayshortskip 1.5ex plus 3bp minus 1bp | |
825 | +\fi | |
826 | +% 10pt | |
827 | +\ifx\CLASSOPTIONpt\@IEEEptsizeten | |
828 | +\def\normalsize{\@setfontsize{\normalsize}{10bp}{11.2bp}} | |
829 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{11.2bp} | |
830 | +\normalsize | |
831 | +\abovedisplayskip 1.5ex plus 4bp minus 2bp | |
832 | +\belowdisplayskip \abovedisplayskip | |
833 | +\abovedisplayshortskip 0pt plus 4bp | |
834 | +\belowdisplayshortskip 1.5ex plus 4bp minus 2bp | |
835 | +\fi | |
836 | +% 11pt | |
837 | +\ifx\CLASSOPTIONpt\@IEEEptsizeeleven | |
838 | +\def\normalsize{\@setfontsize{\normalsize}{11bp}{13.2bp}} | |
839 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{13.2bp} | |
840 | +\normalsize | |
841 | +\abovedisplayskip 1.5ex plus 5bp minus 3bp | |
842 | +\belowdisplayskip \abovedisplayskip | |
843 | +\abovedisplayshortskip 0pt plus 5bp | |
844 | +\belowdisplayshortskip 1.5ex plus 5bp minus 3bp | |
845 | +\fi | |
846 | +% 12pt | |
847 | +\ifx\CLASSOPTIONpt\@IEEEptsizetwelve | |
848 | +\def\normalsize{\@setfontsize{\normalsize}{12bp}{14.4bp}} | |
849 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{14.4bp} | |
850 | +\normalsize | |
851 | +\abovedisplayskip 1.5ex plus 6bp minus 4bp | |
852 | +\belowdisplayskip \abovedisplayskip | |
853 | +\abovedisplayshortskip 0pt plus 6bp | |
854 | +\belowdisplayshortskip 1.5ex plus 6bp minus 4bp | |
855 | +\fi | |
856 | +% | |
857 | +% compsoc nonconferences | |
858 | +\else | |
859 | +% 9pt | |
860 | +\ifx\CLASSOPTIONpt\@IEEEptsizenine | |
861 | +\def\normalsize{\@setfontsize{\normalsize}{9bp}{10.8bp}} | |
862 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{10.8bp} | |
863 | +\normalsize | |
864 | +\abovedisplayskip 1.5ex plus 3bp minus 1bp | |
865 | +\belowdisplayskip \abovedisplayskip | |
866 | +\abovedisplayshortskip 0bp plus 3bp | |
867 | +\belowdisplayshortskip 1.5ex plus 3bp minus 1bp | |
868 | +\fi | |
869 | +% 10pt | |
870 | +\ifx\CLASSOPTIONpt\@IEEEptsizeten | |
871 | +% the official spec is 9.5bp with 11.4bp leading for 10pt, | |
872 | +% but measurements of proofs suggest upto 11.723bp leading | |
873 | +% here we'll use 11.54bp which gives 61 lines per column | |
874 | +% with the standard compsoc margins | |
875 | +\def\normalsize{\@setfontsize{\normalsize}{9.5bp}{11.54bp}} | |
876 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{11.54bp} | |
877 | +\normalsize | |
878 | +\abovedisplayskip 1.5ex plus 4bp minus 2bp | |
879 | +\belowdisplayskip \abovedisplayskip | |
880 | +\abovedisplayshortskip 0pt plus 4bp | |
881 | +\belowdisplayshortskip 1.5ex plus 4bp minus 2bp | |
882 | +\fi | |
883 | +% 11pt | |
884 | +\ifx\CLASSOPTIONpt\@IEEEptsizeeleven | |
885 | +\def\normalsize{\@setfontsize{\normalsize}{11bp}{13.2bp}} | |
886 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{13.2bp} | |
887 | +\normalsize | |
888 | +\abovedisplayskip 1.5ex plus 5bp minus 3bp | |
889 | +\belowdisplayskip \abovedisplayskip | |
890 | +\abovedisplayshortskip 0pt plus 5bp | |
891 | +\belowdisplayshortskip 1.5ex plus 5bp minus 3bp | |
892 | +\fi | |
893 | +% 12pt | |
894 | +\ifx\CLASSOPTIONpt\@IEEEptsizetwelve | |
895 | +\def\normalsize{\@setfontsize{\normalsize}{12bp}{14.4bp}} | |
896 | +\setlength{\@IEEEnormalsizeunitybaselineskip}{14.4bp} | |
897 | +\normalsize | |
898 | +\abovedisplayskip 1.5ex plus 6bp minus 4bp | |
899 | +\belowdisplayskip \abovedisplayskip | |
900 | +\abovedisplayshortskip 0pt plus 6bp | |
901 | +\belowdisplayshortskip 1.5ex plus 6bp minus 4bp | |
902 | +\fi | |
903 | +\fi\fi | |
904 | + | |
905 | + | |
906 | + | |
907 | + | |
908 | +% V1.6 The Computer Modern Fonts will issue a substitution warning for | |
909 | +% 24pt titles (24.88pt is used instead, but the default and correct | |
910 | +% Times font will scale exactly as needed) increase the substitution | |
911 | +% tolerance to turn off this warning. | |
912 | +% | |
913 | +% V1.8a, the compsoc bp font sizes can also cause bogus font substitution | |
914 | +% warnings with footnote or scriptsize math and the $\bullet$ itemized | |
915 | +% list of \IEEEcompsocitemizethanks. So, increase this to 1.5pt or more. | |
916 | +\def\fontsubfuzz{1.7bp} | |
917 | + | |
918 | + | |
919 | +% warn the user in case they forget to use the 9pt option with | |
920 | +% technote | |
921 | +\ifCLASSOPTIONtechnote% | |
922 | + \ifx\CLASSOPTIONpt\@IEEEptsizenine\else% | |
923 | + \typeout{** ATTENTION: Technotes are normally 9pt documents.}% | |
924 | + \fi% | |
925 | +\fi | |
926 | + | |
927 | + | |
928 | +% V1.7 | |
929 | +% Improved \textunderscore to provide a much better fake _ when used with | |
930 | +% OT1 encoding. Under OT1, detect use of pcr or cmtt \ttfamily and use | |
931 | +% available true _ glyph for those two typewriter fonts. | |
932 | +\def\@IEEEstringptm{ptm} % Times Roman family | |
933 | +\def\@IEEEstringppl{ppl} % Palatino Roman family | |
934 | +\def\@IEEEstringphv{phv} % Helvetica Sans Serif family | |
935 | +\def\@IEEEstringpcr{pcr} % Courier typewriter family | |
936 | +\def\@IEEEstringcmtt{cmtt} % Computer Modern typewriter family | |
937 | +\DeclareTextCommandDefault{\textunderscore}{\leavevmode | |
938 | +\ifx\f@family\@IEEEstringpcr\string_\else | |
939 | +\ifx\f@family\@IEEEstringcmtt\string_\else | |
940 | +\ifx\f@family\@IEEEstringptm\kern 0em\vbox{\hrule\@width 0.5em\@height 0.5pt\kern -0.3ex}\else | |
941 | +\ifx\f@family\@IEEEstringppl\kern 0em\vbox{\hrule\@width 0.5em\@height 0.5pt\kern -0.3ex}\else | |
942 | +\ifx\f@family\@IEEEstringphv\kern -0.03em\vbox{\hrule\@width 0.62em\@height 0.52pt\kern -0.33ex}\kern -0.03em\else | |
943 | +\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} | |
944 | + | |
945 | + | |
946 | + | |
947 | + | |
948 | +% set the default \baselinestretch | |
949 | +\def\baselinestretch{1} | |
950 | +\ifCLASSOPTIONdraftcls | |
951 | + \def\baselinestretch{1.5}% default baselinestretch for draft modes | |
952 | +\fi | |
953 | + | |
954 | + | |
955 | +% process CLASSINPUT baselinestretch | |
956 | +\ifx\CLASSINPUTbaselinestretch\@IEEEundefined | |
957 | +\else | |
958 | + \edef\baselinestretch{\CLASSINPUTbaselinestretch} % user CLASSINPUT override | |
959 | + \typeout{** ATTENTION: Overriding \string\baselinestretch\space to | |
960 | + \baselinestretch\space via \string\CLASSINPUT.} | |
961 | +\fi | |
962 | + | |
963 | +\small\normalsize % make \baselinestretch take affect | |
964 | + | |
965 | + | |
966 | + | |
967 | + | |
968 | +% store the normalsize baselineskip | |
969 | +\newdimen\CLASSINFOnormalsizebaselineskip | |
970 | +\CLASSINFOnormalsizebaselineskip=\baselineskip\relax | |
971 | +% and the normalsize unity (baselinestretch=1) baselineskip | |
972 | +% we could save a register by giving the user access to | |
973 | +% \@IEEEnormalsizeunitybaselineskip. However, let's protect | |
974 | +% its read only internal status | |
975 | +\newdimen\CLASSINFOnormalsizeunitybaselineskip | |
976 | +\CLASSINFOnormalsizeunitybaselineskip=\@IEEEnormalsizeunitybaselineskip\relax | |
977 | +% store the nominal value of jot | |
978 | +\newdimen\IEEEnormaljot | |
979 | +\IEEEnormaljot=0.25\baselineskip\relax | |
980 | + | |
981 | +% set \jot | |
982 | +\jot=\IEEEnormaljot\relax | |
983 | + | |
984 | + | |
985 | + | |
986 | + | |
987 | +% V1.6, we are now going to fine tune the interword spacing | |
988 | +% The default interword glue for Times under TeX appears to use a | |
989 | +% nominal interword spacing of 25% (relative to the font size, i.e., 1em) | |
990 | +% a maximum of 40% and a minimum of 19%. | |
991 | +% For example, 10pt text uses an interword glue of: | |
992 | +% | |
993 | +% 2.5pt plus 1.49998pt minus 0.59998pt | |
994 | +% | |
995 | +% However, the IEEE allows for a more generous range which reduces the need | |
996 | +% for hyphenation, especially for two column text. Furthermore, the IEEE | |
997 | +% tends to use a little bit more nominal space between the words. | |
998 | +% The IEEE's interword spacing percentages appear to be: | |
999 | +% 35% nominal | |
1000 | +% 23% minimum | |
1001 | +% 50% maximum | |
1002 | +% (They may even be using a tad more for the largest fonts such as 24pt.) | |
1003 | +% | |
1004 | +% for bold text, the IEEE increases the spacing a little more: | |
1005 | +% 37.5% nominal | |
1006 | +% 23% minimum | |
1007 | +% 55% maximum | |
1008 | + | |
1009 | +% here are the interword spacing ratios we'll use | |
1010 | +% for medium (normal weight) | |
1011 | +\def\@IEEEinterspaceratioM{0.35} | |
1012 | +\def\@IEEEinterspaceMINratioM{0.23} | |
1013 | +\def\@IEEEinterspaceMAXratioM{0.50} | |
1014 | + | |
1015 | +% for bold | |
1016 | +\def\@IEEEinterspaceratioB{0.375} | |
1017 | +\def\@IEEEinterspaceMINratioB{0.23} | |
1018 | +\def\@IEEEinterspaceMAXratioB{0.55} | |
1019 | + | |
1020 | + | |
1021 | +% compsoc nonconference papers use Palatino, | |
1022 | +% tweak settings to better match the proofs | |
1023 | +\ifCLASSOPTIONcompsoc | |
1024 | +\ifCLASSOPTIONconference\else | |
1025 | +% for medium (normal weight) | |
1026 | +\def\@IEEEinterspaceratioM{0.28} | |
1027 | +\def\@IEEEinterspaceMINratioM{0.21} | |
1028 | +\def\@IEEEinterspaceMAXratioM{0.47} | |
1029 | +% for bold | |
1030 | +\def\@IEEEinterspaceratioB{0.305} | |
1031 | +\def\@IEEEinterspaceMINratioB{0.21} | |
1032 | +\def\@IEEEinterspaceMAXratioB{0.52} | |
1033 | +\fi\fi | |
1034 | + | |
1035 | + | |
1036 | +% command to revise the interword spacing for the current font under TeX: | |
1037 | +% \fontdimen2 = nominal interword space | |
1038 | +% \fontdimen3 = interword stretch | |
1039 | +% \fontdimen4 = interword shrink | |
1040 | +% since all changes to the \fontdimen are global, we can enclose these commands | |
1041 | +% in braces to confine any font attribute or length changes | |
1042 | +\def\@@@IEEEsetfontdimens#1#2#3{{% | |
1043 | +\setlength{\@IEEEtrantmpdimenB}{\f@size pt}% grab the font size in pt, could use 1em instead. | |
1044 | +\setlength{\@IEEEtrantmpdimenA}{#1\@IEEEtrantmpdimenB}% | |
1045 | +\fontdimen2\font=\@IEEEtrantmpdimenA\relax | |
1046 | +\addtolength{\@IEEEtrantmpdimenA}{-#2\@IEEEtrantmpdimenB}% | |
1047 | +\fontdimen3\font=-\@IEEEtrantmpdimenA\relax | |
1048 | +\setlength{\@IEEEtrantmpdimenA}{#1\@IEEEtrantmpdimenB}% | |
1049 | +\addtolength{\@IEEEtrantmpdimenA}{-#3\@IEEEtrantmpdimenB}% | |
1050 | +\fontdimen4\font=\@IEEEtrantmpdimenA\relax}} | |
1051 | + | |
1052 | +% revise the interword spacing for each font weight | |
1053 | +\def\@@IEEEsetfontdimens{{% | |
1054 | +\mdseries | |
1055 | +\@@@IEEEsetfontdimens{\@IEEEinterspaceratioM}{\@IEEEinterspaceMAXratioM}{\@IEEEinterspaceMINratioM}% | |
1056 | +\bfseries | |
1057 | +\@@@IEEEsetfontdimens{\@IEEEinterspaceratioB}{\@IEEEinterspaceMAXratioB}{\@IEEEinterspaceMINratioB}% | |
1058 | +}} | |
1059 | + | |
1060 | +% revise the interword spacing for each font shape | |
1061 | +% \slshape is not often used for IEEE work and is not altered here. The \scshape caps are | |
1062 | +% already a tad too large in the free LaTeX fonts (as compared to what the IEEE uses) so we | |
1063 | +% won't alter these either. | |
1064 | +\def\@IEEEsetfontdimens{{% | |
1065 | +\normalfont | |
1066 | +\@@IEEEsetfontdimens | |
1067 | +\normalfont\itshape | |
1068 | +\@@IEEEsetfontdimens | |
1069 | +}} | |
1070 | + | |
1071 | +% command to revise the interword spacing for each font size (and shape | |
1072 | +% and weight). Only the \rmfamily is done here as \ttfamily uses a | |
1073 | +% fixed spacing and \sffamily is not used as the main text of IEEE papers. | |
1074 | +\def\@IEEEtunefonts{{\selectfont\rmfamily | |
1075 | +\tiny\@IEEEsetfontdimens | |
1076 | +\scriptsize\@IEEEsetfontdimens | |
1077 | +\footnotesize\@IEEEsetfontdimens | |
1078 | +\small\@IEEEsetfontdimens | |
1079 | +\normalsize\@IEEEsetfontdimens | |
1080 | +\sublargesize\@IEEEsetfontdimens | |
1081 | +\large\@IEEEsetfontdimens | |
1082 | +\LARGE\@IEEEsetfontdimens | |
1083 | +\huge\@IEEEsetfontdimens | |
1084 | +\Huge\@IEEEsetfontdimens}} | |
1085 | + | |
1086 | +% if the nofonttune class option is not given, revise the interword spacing | |
1087 | +% now - in case IEEEtran makes any default length measurements, and make | |
1088 | +% sure all the default fonts are loaded | |
1089 | +\ifCLASSOPTIONnofonttune\else | |
1090 | +\@IEEEtunefonts | |
1091 | +\fi | |
1092 | + | |
1093 | +% and again at the start of the document in case the user loaded different fonts | |
1094 | +\AtBeginDocument{\ifCLASSOPTIONnofonttune\else\@IEEEtunefonts\fi} | |
1095 | + | |
1096 | + | |
1097 | + | |
1098 | + | |
1099 | + | |
1100 | +% -- V1.8a page setup commands -- | |
1101 | + | |
1102 | +% The default sample text for calculating margins | |
1103 | +% Note that IEEE publications use \scriptsize for headers and footers. | |
1104 | +\def\IEEEdefaultsampletext{\normalfont\normalsize gT} | |
1105 | +\def\IEEEdefaultheadersampletext{\normalfont\scriptsize T}% IEEE headers default to uppercase | |
1106 | +\def\IEEEdefaultfootersampletext{\normalfont\scriptsize gT} | |
1107 | + | |
1108 | + | |
1109 | + | |
1110 | +% usage: \IEEEsettextwidth{inner margin}{outer margin} | |
1111 | +% Sets \textwidth to allow the specified inner and outer margins | |
1112 | +% for the current \paperwidth. | |
1113 | +\def\IEEEsettextwidth#1#2{\@IEEEtrantmpdimenA\paperwidth | |
1114 | +\@IEEEtrantmpdimenB#1\relax | |
1115 | +\advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB | |
1116 | +\@IEEEtrantmpdimenB#2\relax | |
1117 | +\advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB | |
1118 | +\textwidth\@IEEEtrantmpdimenA} | |
1119 | + | |
1120 | + | |
1121 | + | |
1122 | +% usage: \IEEEsetsidemargin{mode: i, o, c, a}{margin/offset} | |
1123 | +% Sets \oddsidemargin and \evensidemargin to yield the specified margin | |
1124 | +% of the given mode. | |
1125 | +% The available modes are: | |
1126 | +% i = inner margin | |
1127 | +% o = outer margin | |
1128 | +% c = centered, with the given offset | |
1129 | +% a = adjust the margins using the given offset | |
1130 | +% For the offsets, positive values increase the inner margin. | |
1131 | +% \textwidth should be set properly for the given margins before calling this | |
1132 | +% function. | |
1133 | +\def\IEEEsetsidemargin#1#2{\@IEEEtrantmpdimenA #2\relax | |
1134 | +\@IEEEextracttoken{#1}\relax | |
1135 | +% check for mode errors | |
1136 | +\ifx\@IEEEextractedtokenmacro\@empty | |
1137 | + \@IEEEclspkgerror{Empty mode type in \string\IEEEsetsidemargin\space (line \the\inputlineno).\MessageBreak | |
1138 | + Defaulting to `i'}{Valid modes for \string\IEEEsetsidemargin\space are: i, o, c and a.}\relax | |
1139 | + \let\@IEEEextractedtoken=i\relax | |
1140 | + \def\@IEEEextractedtokenmacro{i}\relax | |
1141 | +\else | |
1142 | + \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
1143 | + \typeout{** WARNING: \string\IEEEsetsidemargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
1144 | + \fi | |
1145 | +\fi | |
1146 | +% handle each mode | |
1147 | +\if\@IEEEextractedtoken a\relax | |
1148 | + \advance\oddsidemargin by \@IEEEtrantmpdimenA\relax | |
1149 | +\else | |
1150 | +\if\@IEEEextractedtoken c\relax | |
1151 | + \oddsidemargin\paperwidth | |
1152 | + \advance\oddsidemargin by -\textwidth | |
1153 | + \divide\oddsidemargin by 2\relax | |
1154 | + \advance\oddsidemargin by -1in\relax | |
1155 | + \advance\oddsidemargin by \@IEEEtrantmpdimenA\relax | |
1156 | +\else | |
1157 | +\if\@IEEEextractedtoken o\relax | |
1158 | + \oddsidemargin\paperwidth | |
1159 | + \advance\oddsidemargin by -\textwidth | |
1160 | + \advance\oddsidemargin by -\@IEEEtrantmpdimenA | |
1161 | + \advance\oddsidemargin by -1in\relax | |
1162 | +\else | |
1163 | + \if\@IEEEextractedtoken i\relax | |
1164 | + \else | |
1165 | + \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetsidemargin\space (line \the\inputlineno).\MessageBreak | |
1166 | + Defaulting to `i'}% | |
1167 | + {Valid modes for \string\IEEEsetsidemargin\space are: i, o, c and a.}% | |
1168 | + \fi | |
1169 | + \oddsidemargin\@IEEEtrantmpdimenA | |
1170 | + \advance\oddsidemargin by -1in\relax | |
1171 | +\fi\fi\fi | |
1172 | +% odd and even side margins both mean "inner" for single sided pages | |
1173 | +\evensidemargin\oddsidemargin | |
1174 | +% but are mirrors of each other when twosided is in effect | |
1175 | +\if@twoside | |
1176 | + \evensidemargin\paperwidth | |
1177 | + \advance\evensidemargin by -\textwidth | |
1178 | + \advance\evensidemargin by -\oddsidemargin | |
1179 | + % have to compensate for both the builtin 1in LaTex offset | |
1180 | + % and the fact we already subtracted this offset from \oddsidemargin | |
1181 | + \advance\evensidemargin -2in\relax | |
1182 | +\fi} | |
1183 | + | |
1184 | + | |
1185 | + | |
1186 | +% usage: \IEEEsettextheight[sample text]{top text margin}{bottom text margin} | |
1187 | +% Sets \textheight based on the specified top margin and bottom margin. | |
1188 | +% Takes into consideration \paperheight, \topskip, and (by default) the | |
1189 | +% the actual height and depth of the \IEEEdefaultsampletext text. | |
1190 | +\def\IEEEsettextheight{\@ifnextchar [{\@IEEEsettextheight}{\@IEEEsettextheight[\IEEEdefaultsampletext]}} | |
1191 | +\def\@IEEEsettextheight[#1]#2#3{\textheight\paperheight\relax | |
1192 | + \@IEEEtrantmpdimenA #2\relax | |
1193 | + \advance \textheight by -\@IEEEtrantmpdimenA% subtract top margin | |
1194 | + \@IEEEtrantmpdimenA #3\relax | |
1195 | + \advance \textheight by -\@IEEEtrantmpdimenA% subtract bottom margin | |
1196 | + \advance \textheight by \topskip% add \topskip | |
1197 | + % subtract off everything above the top, and below the bottom, baselines | |
1198 | + \settoheight{\@IEEEtrantmpdimenA}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1199 | + \advance \textheight by -\@IEEEtrantmpdimenA | |
1200 | + \settodepth{\@IEEEtrantmpdimenA}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1201 | + \advance \textheight by -\@IEEEtrantmpdimenA} | |
1202 | + | |
1203 | + | |
1204 | + | |
1205 | +\newdimen\IEEEquantizedlength | |
1206 | +\IEEEquantizedlength 0sp\relax | |
1207 | +\newdimen\IEEEquantizedlengthdiff | |
1208 | +\IEEEquantizedlengthdiff 0sp\relax | |
1209 | +\def\IEEEquantizedlengthint{0} | |
1210 | + | |
1211 | +% usage: \IEEEquantizelength{mode: d, c, i}{base unit}{length} | |
1212 | +% Sets the length \IEEEquantizedlength to be an integer multiple of the given | |
1213 | +% (nonzero) base unit such that \IEEEquantizedlength approximates the given | |
1214 | +% length. | |
1215 | +% \IEEEquantizedlengthdiff is a length equal to the difference between the | |
1216 | +% \IEEEquantizedlength and the given length. | |
1217 | +% \IEEEquantizedlengthint is a macro containing the integer number of base units | |
1218 | +% in \IEEEquantizedlength. | |
1219 | +% i.e., \IEEEquantizedlength = \IEEEquantizedlengthint * base unit | |
1220 | +% The mode determines how \IEEEquantizedlength is quantized: | |
1221 | +% d = always decrease (always round down \IEEEquantizeint) | |
1222 | +% c = use the closest match | |
1223 | +% i = always increase (always round up \IEEEquantizeint) | |
1224 | +% In anycase, if the given length is already quantized, | |
1225 | +% \IEEEquantizedlengthdiff will be set to zero. | |
1226 | +\def\IEEEquantizelength#1#2#3{\begingroup | |
1227 | +% work in isolation so as not to externally disturb the \@IEEEtrantmp | |
1228 | +% variables | |
1229 | +% load the argument values indirectly via \IEEEquantizedlengthdiff | |
1230 | +% in case the user refers to our \@IEEEtrantmpdimenX, \IEEEquantizedlength, | |
1231 | +% etc. in the arguments. we also will work with these as counters, | |
1232 | +% i.e., in sp units | |
1233 | +% A has the base unit | |
1234 | +\IEEEquantizedlengthdiff #2\relax\relax\relax\relax | |
1235 | +\@IEEEtrantmpcountA\IEEEquantizedlengthdiff | |
1236 | +% B has the input length | |
1237 | +\IEEEquantizedlengthdiff #3\relax\relax\relax\relax | |
1238 | +\@IEEEtrantmpcountB\IEEEquantizedlengthdiff | |
1239 | +\@IEEEtrantmpdimenA\the\@IEEEtrantmpcountA sp\relax | |
1240 | +\@IEEEtrantmpdimenB\the\@IEEEtrantmpcountB sp\relax | |
1241 | +% \@IEEEtrantmpcountC will have the quantized int | |
1242 | +% \IEEEquantizedlength will have the quantized length | |
1243 | +% \@IEEEtrantmpdimenC will have the quantized diff | |
1244 | +% initialize them to zero as this is what will be | |
1245 | +% exported if an error occurs | |
1246 | +\@IEEEtrantmpcountC 0\relax | |
1247 | +\IEEEquantizedlength 0sp\relax | |
1248 | +\@IEEEtrantmpdimenC 0sp\relax | |
1249 | +% extract mode | |
1250 | +\@IEEEextracttoken{#1}\relax | |
1251 | +% check for mode errors | |
1252 | +\ifx\@IEEEextractedtokenmacro\@empty | |
1253 | + \@IEEEclspkgerror{Empty mode type in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak | |
1254 | + Defaulting to `d'}{Valid modes for \string\IEEEquantizelength\space are: d, c and i.}\relax | |
1255 | + \let\@IEEEextractedtoken=d\relax | |
1256 | + \def\@IEEEextractedtokenmacro{d}\relax | |
1257 | +\else | |
1258 | + \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
1259 | + \typeout{** WARNING: \string\IEEEquantizelength\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
1260 | + \fi | |
1261 | +\fi | |
1262 | +% check for base unit is zero error | |
1263 | +\ifnum\@IEEEtrantmpcountA=0\relax | |
1264 | +\@IEEEclspkgerror{Base unit is zero in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak | |
1265 | + \string\IEEEquantizedlength\space and \string\IEEEquantizedlengthdiff\space are set to zero}{Division by zero is not allowed.}\relax | |
1266 | +\else% base unit is nonzero | |
1267 | + % \@IEEEtrantmpcountC carries the number of integer units | |
1268 | + % in the quantized length (integer length \ base) | |
1269 | + \@IEEEtrantmpcountC\@IEEEtrantmpcountB\relax | |
1270 | + \divide\@IEEEtrantmpcountC by \@IEEEtrantmpcountA\relax | |
1271 | + % \IEEEquantizedlength has the (rounded down) quantized length | |
1272 | + % = base * int | |
1273 | + \IEEEquantizedlength\@IEEEtrantmpdimenA\relax | |
1274 | + \multiply\IEEEquantizedlength by \@IEEEtrantmpcountC\relax | |
1275 | + % \@IEEEtrantmpdimenC has the difference | |
1276 | + % = quantized length - length | |
1277 | + \@IEEEtrantmpdimenC\IEEEquantizedlength\relax | |
1278 | + \advance\@IEEEtrantmpdimenC by -\@IEEEtrantmpdimenB\relax | |
1279 | + % trap special case of length being already quantized | |
1280 | + % to avoid a roundup under i option | |
1281 | + \ifdim\@IEEEtrantmpdimenC=0sp\relax | |
1282 | + \else % length not is already quantized | |
1283 | + % set dimenA to carry the upper quantized (absolute value) difference: | |
1284 | + % quantizedlength + base - length | |
1285 | + \advance\@IEEEtrantmpdimenA by \IEEEquantizedlength\relax | |
1286 | + \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB\relax | |
1287 | + % set dimenB to carry the lower quantized (absolute value) difference: | |
1288 | + % length - quantizedlength | |
1289 | + \advance\@IEEEtrantmpdimenB by -\IEEEquantizedlength\relax | |
1290 | + % handle each mode | |
1291 | + \if\@IEEEextractedtoken c\relax | |
1292 | + % compare upper and lower amounts, select upper if lower > upper | |
1293 | + \ifdim\@IEEEtrantmpdimenB>\@IEEEtrantmpdimenA\relax | |
1294 | + % use upper | |
1295 | + \advance\IEEEquantizedlength by \the\@IEEEtrantmpcountA sp\relax | |
1296 | + \advance\@IEEEtrantmpcountC by 1\relax | |
1297 | + \@IEEEtrantmpdimenC\@IEEEtrantmpdimenA | |
1298 | + \else% <=. uselower | |
1299 | + % no need to do anything for lower, use output values already setup | |
1300 | + \fi | |
1301 | + \else% not mode c | |
1302 | + \if\@IEEEextractedtoken i\relax | |
1303 | + % always round up under i mode | |
1304 | + \advance\IEEEquantizedlength by \the\@IEEEtrantmpcountA sp\relax | |
1305 | + \advance\@IEEEtrantmpcountC by 1\relax | |
1306 | + \@IEEEtrantmpdimenC\@IEEEtrantmpdimenA | |
1307 | + \else | |
1308 | + \if\@IEEEextractedtoken d\relax | |
1309 | + \else | |
1310 | + \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEquantizelength\space (line \the\inputlineno).\MessageBreak | |
1311 | + Defaulting to `d'}% | |
1312 | + {Valid modes for \string\IEEEquantizelength\space are: d, c, and i.}\relax | |
1313 | + \fi % if d | |
1314 | + % no need to do anything for d, use output values already setup | |
1315 | + \fi\fi % if i, c | |
1316 | + \fi % if length is already quantized | |
1317 | +\fi% if base unit is zero | |
1318 | +% globally assign the results to macros we use here to escape the enclosing | |
1319 | +% group without needing to call \global on any of the \@IEEEtrantmp variables. | |
1320 | +% \@IEEEtrantmpcountC has the quantized int | |
1321 | +% \IEEEquantizedlength has the quantized length | |
1322 | +% \@IEEEtrantmpdimenC has the quantized diff | |
1323 | +\xdef\@IEEEquantizedlengthintmacro{\the\@IEEEtrantmpcountC}\relax | |
1324 | +\@IEEEtrantmpcountC\IEEEquantizedlength\relax | |
1325 | +\xdef\@IEEEquantizedlengthmacro{\the\@IEEEtrantmpcountC}\relax | |
1326 | +\@IEEEtrantmpcountC\@IEEEtrantmpdimenC\relax | |
1327 | +\xdef\@IEEEquantizedlengthdiffmacro{\the\@IEEEtrantmpcountC}\relax | |
1328 | +\endgroup | |
1329 | +% locally assign the outputs here from the macros | |
1330 | +\expandafter\IEEEquantizedlength\@IEEEquantizedlengthmacro sp\relax | |
1331 | +\expandafter\IEEEquantizedlengthdiff\@IEEEquantizedlengthdiffmacro sp\relax | |
1332 | +\edef\IEEEquantizedlengthint{\@IEEEquantizedlengthintmacro}\relax} | |
1333 | + | |
1334 | + | |
1335 | + | |
1336 | +\newdimen\IEEEquantizedtextheightdiff | |
1337 | +\IEEEquantizedtextheightdiff 0sp\relax | |
1338 | + | |
1339 | +% usage: \IEEEquantizetextheight[base unit]{mode: d, c, i} | |
1340 | +% Sets \textheight to be an integer multiple of the current \baselineskip | |
1341 | +% (or the optionally specified base unit) plus the first (\topskip) line. | |
1342 | +% \IEEEquantizedtextheightdiff is a length equal to the difference between | |
1343 | +% the new quantized and original \textheight. | |
1344 | +% \IEEEquantizedtextheightlpc is a macro containing the integer number of | |
1345 | +% lines per column under the quantized \textheight. i.e., | |
1346 | +% \textheight = \IEEEquantizedtextheightlpc * \baselineskip + \topskip | |
1347 | +% The mode determines how \textheight is quantized: | |
1348 | +% d = always decrease (always round down the number of lines per column) | |
1349 | +% c = use the closest match | |
1350 | +% i = always increase (always round up the number of lines per column) | |
1351 | +% In anycase, if \textheight is already quantized, it will remain unchanged, | |
1352 | +% and \IEEEquantizedtextheightdiff will be set to zero. | |
1353 | +% Depends on: \IEEEquantizelength | |
1354 | +\def\IEEEquantizetextheight{\@ifnextchar [{\@IEEEquantizetextheight}{\@IEEEquantizetextheight[\baselineskip]}} | |
1355 | +\def\@IEEEquantizetextheight[#1]#2{\begingroup | |
1356 | +% use our \IEEEquantizedtextheightdiff as a scratch pad | |
1357 | +% we need to subtract off \topskip before quantization | |
1358 | +\IEEEquantizedtextheightdiff\textheight | |
1359 | +\advance\IEEEquantizedtextheightdiff by -\topskip\relax | |
1360 | +\IEEEquantizelength{#2}{#1}{\IEEEquantizedtextheightdiff} | |
1361 | +% add back \topskip line | |
1362 | +\advance\IEEEquantizedlength by \topskip | |
1363 | +\@IEEEtrantmpcountC\IEEEquantizedlengthint\relax | |
1364 | +\advance\@IEEEtrantmpcountC by 1\relax | |
1365 | +% globally assign the results to macros we use here to escape the enclosing | |
1366 | +% group without needing to call \global on any of the \@IEEEtrantmp variables. | |
1367 | +\xdef\@IEEEquantizedtextheightlpcmacro{\the\@IEEEtrantmpcountC}\relax | |
1368 | +\@IEEEtrantmpcountC\IEEEquantizedlength\relax | |
1369 | +\xdef\@IEEEquantizedtextheightmacro{\the\@IEEEtrantmpcountC}\relax | |
1370 | +\@IEEEtrantmpcountC\IEEEquantizedlengthdiff\relax | |
1371 | +\xdef\@IEEEquantizedtextheightdiffmacro{\the\@IEEEtrantmpcountC}\relax | |
1372 | +\endgroup | |
1373 | +% locally assign the outputs here from the macros | |
1374 | +\textheight\@IEEEquantizedtextheightmacro sp\relax | |
1375 | +\IEEEquantizedtextheightdiff\@IEEEquantizedtextheightdiffmacro sp\relax | |
1376 | +\edef\IEEEquantizedtextheightlpc{\@IEEEquantizedtextheightlpcmacro}} | |
1377 | + | |
1378 | + | |
1379 | + | |
1380 | +% usage: \IEEEsettopmargin[sample text]{mode: t, b, c, a, q}{margin/offset} | |
1381 | +% Sets \topmargin based on the specified vertical margin. | |
1382 | +% Takes into consideration the base 1in offset, \headheight, \headsep, | |
1383 | +% \topskip, and (by default) the the actual height (or, for the bottom, depth) | |
1384 | +% of the \IEEEdefaultsampletext text. | |
1385 | +% The available modes are: | |
1386 | +% t = top margin | |
1387 | +% b = bottom margin | |
1388 | +% c = vertically centered, with the given offset | |
1389 | +% a = adjust the vertical margins using the given offset | |
1390 | +% q = adjust the margins using \IEEEquantizedtextheightdiff and the given offset | |
1391 | +% For the offsets, positive values increase the top margin. | |
1392 | +% \headheight, \headsep, \topskip and \textheight should be set properly for the | |
1393 | +% given margins before calling this function. | |
1394 | +\def\IEEEsettopmargin{\@ifnextchar [{\@IEEEsettopmargin}{\@IEEEsettopmargin[\IEEEdefaultsampletext]}} | |
1395 | +\def\@IEEEsettopmargin[#1]#2#3{\@IEEEtrantmpdimenA #3\relax | |
1396 | +\@IEEEextracttoken{#2}\relax | |
1397 | +% check for mode errors | |
1398 | +\ifx\@IEEEextractedtokenmacro\@empty | |
1399 | + \@IEEEclspkgerror{Empty mode type in \string\IEEEsettopmargin\space (line \the\inputlineno).\MessageBreak | |
1400 | + Defaulting to `t'}{Valid modes for \string\IEEEsettopmargin\space are: t, b, c, a and q.}\relax | |
1401 | + \let\@IEEEextractedtoken=t\relax | |
1402 | + \def\@IEEEextractedtokenmacro{t}\relax | |
1403 | +\else | |
1404 | + \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
1405 | + \typeout{** WARNING: \string\IEEEsettopmargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
1406 | + \fi | |
1407 | +\fi | |
1408 | +% handle each mode | |
1409 | +\if\@IEEEextractedtoken a\relax | |
1410 | + \advance\topmargin by \@IEEEtrantmpdimenA\relax | |
1411 | +\else | |
1412 | +\if\@IEEEextractedtoken q\relax | |
1413 | + % we need to adjust by half the \IEEEquantizedtextheightdiff value | |
1414 | + \@IEEEtrantmpdimenB\IEEEquantizedtextheightdiff\relax | |
1415 | + \divide\@IEEEtrantmpdimenB by 2\relax | |
1416 | + % a positive \IEEEquantizedtextheightdiff means we need to reduce \topmargin | |
1417 | + % because \textheight has been lenghtened | |
1418 | + \advance\topmargin by -\@IEEEtrantmpdimenB\relax | |
1419 | + \advance\topmargin by \@IEEEtrantmpdimenA\relax | |
1420 | +\else | |
1421 | +\if\@IEEEextractedtoken c\relax | |
1422 | + \topmargin\paperheight | |
1423 | + \advance\topmargin by -\textheight | |
1424 | + % \textheight includes \topskip, but we should not count topskip whitespace here, backout | |
1425 | + \advance \topmargin by \topskip | |
1426 | + \settoheight{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1427 | + \advance\topmargin by -\@IEEEtrantmpdimenB\relax | |
1428 | + \settodepth{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1429 | + \advance\topmargin by -\@IEEEtrantmpdimenB\relax | |
1430 | + \divide\topmargin by 2\relax | |
1431 | + \advance\topmargin by \@IEEEtrantmpdimenA\relax | |
1432 | +\else | |
1433 | +\if\@IEEEextractedtoken b\relax | |
1434 | + \topmargin\paperheight | |
1435 | + \advance\topmargin by -\textheight | |
1436 | + % \textheight includes \topskip, but we should not count topskip whitespace here, backout | |
1437 | + \advance \topmargin by \topskip | |
1438 | + \settodepth{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1439 | + \advance\topmargin by -\@IEEEtrantmpdimenB\relax | |
1440 | + \advance\topmargin by -\@IEEEtrantmpdimenA\relax | |
1441 | +\else | |
1442 | + \if\@IEEEextractedtoken t\relax | |
1443 | + \else | |
1444 | + \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsettopmargin\space (line \the\inputlineno).\MessageBreak | |
1445 | + Defaulting to `t'}% | |
1446 | + {Valid modes for \string\IEEEsettopmargin\space are: t, b, c, a and q.}\relax | |
1447 | + \fi | |
1448 | + \topmargin\@IEEEtrantmpdimenA\relax | |
1449 | + \settoheight{\@IEEEtrantmpdimenB}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1450 | + \advance\topmargin by \@IEEEtrantmpdimenB\relax | |
1451 | +\fi\fi % if t, b, c | |
1452 | +% convert desired top margin into actual \topmargin | |
1453 | +% this is not done for the q or a modes because they are only adjustments | |
1454 | +\advance \topmargin by -\topskip | |
1455 | +\advance \topmargin by -1in | |
1456 | +\advance \topmargin by -\headheight | |
1457 | +\advance \topmargin by -\headsep | |
1458 | +\fi\fi % if q, a | |
1459 | +} | |
1460 | + | |
1461 | + | |
1462 | + | |
1463 | +% usage: \IEEEsetheadermargin[header sample][text sample]{mode: t, b, c, a}{margin/offset} | |
1464 | +% Differentially adjusts \topmargin and \headsep (such that their sum is unchanged) | |
1465 | +% based on the specified header margin. | |
1466 | +% Takes into consideration the base 1in offset, \headheight, \topskip, and (by default) | |
1467 | +% the actual height (or depth) of the \IEEEdefaultheadersampletext and | |
1468 | +% \IEEEdefaultsampletext text. | |
1469 | +% The available modes are: | |
1470 | +% t = top margin (top of the header text to the top of the page) | |
1471 | +% b = bottom margin (bottom of the header text to the top of the main text) | |
1472 | +% c = vertically centered between the main text and the top of the page, | |
1473 | +% with the given offset | |
1474 | +% a = adjust the vertical position using the given offset | |
1475 | +% For the offsets, positive values move the header downward. | |
1476 | +% \headheight, \headsep, \topskip and \topmargin should be set properly before | |
1477 | +% calling this function. | |
1478 | +\def\IEEEsetheadermargin{\@ifnextchar [{\@IEEEsetheadermargin}{\@IEEEsetheadermargin[\IEEEdefaultheadersampletext]}} | |
1479 | +\def\@IEEEsetheadermargin[#1]{\@ifnextchar [{\@@IEEEsetheadermargin[#1]}{\@@IEEEsetheadermargin[#1][\IEEEdefaultsampletext]}} | |
1480 | +\def\@@IEEEsetheadermargin[#1][#2]#3#4{\@IEEEtrantmpdimenA #4\relax | |
1481 | +\@IEEEextracttoken{#3}\relax | |
1482 | +% check for mode errors | |
1483 | +\ifx\@IEEEextractedtokenmacro\@empty | |
1484 | + \@IEEEclspkgerror{Empty mode type in \string\IEEEsetheadermargin\space (line \the\inputlineno).\MessageBreak | |
1485 | + Defaulting to `t'}{Valid modes for \string\IEEEsetheadermargin\space are: t, b, c, and a.}\relax | |
1486 | + \let\@IEEEextractedtoken=t\relax | |
1487 | + \def\@IEEEextractedtokenmacro{t}\relax | |
1488 | +\else | |
1489 | + \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
1490 | + \typeout{** WARNING: \string\IEEEsetheadermargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
1491 | + \fi | |
1492 | +\fi | |
1493 | +% handle each mode | |
1494 | +\if\@IEEEextractedtoken a\relax | |
1495 | + % No need to do anything here and can pass through the adjustment | |
1496 | + % value as is. The end adjustment of \topmargin and \headsep will | |
1497 | + % do all that is needed | |
1498 | +\else | |
1499 | +\if\@IEEEextractedtoken c\relax | |
1500 | + % get the bottom margin | |
1501 | + \@IEEEtrantmpdimenB\headsep\relax | |
1502 | + \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1503 | + \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1504 | + \advance\@IEEEtrantmpdimenB by \topskip | |
1505 | + \settoheight{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax | |
1506 | + \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1507 | + % at this point \@IEEEtrantmpdimenB has the actual header bottom margin | |
1508 | + % subtract from it the top header margin | |
1509 | + \advance\@IEEEtrantmpdimenB -1in\relax % take into consideration the system 1in offset of the top margin | |
1510 | + \advance\@IEEEtrantmpdimenB by -\topmargin | |
1511 | + \advance\@IEEEtrantmpdimenB by -\headheight | |
1512 | + \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1513 | + \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC | |
1514 | + % at this point \@IEEEtrantmpdimenB has the difference between the bottom and top margins | |
1515 | + % we need to adjust by half this amount to center the header | |
1516 | + \divide\@IEEEtrantmpdimenB by 2\relax | |
1517 | + % and add to offset | |
1518 | + \advance\@IEEEtrantmpdimenA by \@IEEEtrantmpdimenB | |
1519 | +\else | |
1520 | +\if\@IEEEextractedtoken b\relax | |
1521 | + \@IEEEtrantmpdimenB\headsep\relax | |
1522 | + \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1523 | + \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1524 | + \advance\@IEEEtrantmpdimenB by \topskip | |
1525 | + \settoheight{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax | |
1526 | + \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1527 | + % at this point \@IEEEtrantmpdimenB has the actual header bottom margin | |
1528 | + % get the difference between the actual and the desired | |
1529 | + \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenA | |
1530 | + \@IEEEtrantmpdimenA\@IEEEtrantmpdimenB | |
1531 | +\else | |
1532 | + \if\@IEEEextractedtoken t\relax | |
1533 | + \else | |
1534 | + \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetheadermargin\space (line \the\inputlineno).\MessageBreak | |
1535 | + Defaulting to `t'}% | |
1536 | + {Valid modes for \string\IEEEsetheadermargin\space are: t, b, c and a.}\relax | |
1537 | + \fi | |
1538 | + \@IEEEtrantmpdimenB 1in\relax % take into consideration the system 1in offset of the top margin | |
1539 | + \advance\@IEEEtrantmpdimenB by \topmargin | |
1540 | + \advance\@IEEEtrantmpdimenB by \headheight | |
1541 | + \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1542 | + \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1543 | + % at this point \@IEEEtrantmpdimenB has the actual header top margin | |
1544 | + % get the difference between the desired and the actual | |
1545 | + \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB | |
1546 | +\fi\fi % if t, b, c | |
1547 | +\fi % if a | |
1548 | +% advance \topmargin by the needed amount and reduce \headsep by the same | |
1549 | +% so as not to disturb the location of the main text | |
1550 | +\advance\topmargin by \@IEEEtrantmpdimenA\relax | |
1551 | +\advance\headsep by -\@IEEEtrantmpdimenA\relax | |
1552 | +} | |
1553 | + | |
1554 | + | |
1555 | + | |
1556 | +% usage: \IEEEsetfootermargin[footer sample][text sample]{mode: t, b, c, a}{margin/offset} | |
1557 | +% Adjusts \footskip based on the specified footer margin. | |
1558 | +% Takes into consideration the base 1in offset, \paperheight, \headheight, | |
1559 | +% \headsep, \textheight and (by default) the actual height (or depth) of the | |
1560 | +% \IEEEdefaultfootersampletext and \IEEEdefaultsampletext text. | |
1561 | +% The available modes are: | |
1562 | +% t = top margin (top of the footer text to the bottom of the main text) | |
1563 | +% b = bottom margin (bottom of the footer text to the bottom of page) | |
1564 | +% c = vertically centered between the main text and the bottom of the page, | |
1565 | +% with the given offset | |
1566 | +% a = adjust the vertical position using the given offset | |
1567 | +% For the offsets, positive values move the footer downward. | |
1568 | +% \headheight, \headsep, \topskip, \topmargin, and \textheight should be set | |
1569 | +% properly before calling this function. | |
1570 | +\def\IEEEsetfootermargin{\@ifnextchar [{\@IEEEsetfootermargin}{\@IEEEsetfootermargin[\IEEEdefaultfootersampletext]}} | |
1571 | +\def\@IEEEsetfootermargin[#1]{\@ifnextchar [{\@@IEEEsetfootermargin[#1]}{\@@IEEEsetfootermargin[#1][\IEEEdefaultsampletext]}} | |
1572 | +\def\@@IEEEsetfootermargin[#1][#2]#3#4{\@IEEEtrantmpdimenA #4\relax | |
1573 | +\@IEEEextracttoken{#3}\relax | |
1574 | +% check for mode errors | |
1575 | +\ifx\@IEEEextractedtokenmacro\@empty | |
1576 | + \@IEEEclspkgerror{Empty mode type in \string\IEEEsetfootermargin\space (line \the\inputlineno).\MessageBreak | |
1577 | + Defaulting to `t'}{Valid modes for \string\IEEEsetfootermargin\space are: t, b, c, and a.}\relax | |
1578 | + \let\@IEEEextractedtoken=t\relax | |
1579 | + \def\@IEEEextractedtokenmacro{t}\relax | |
1580 | +\else | |
1581 | + \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
1582 | + \typeout{** WARNING: \string\IEEEsetfootermargin\space mode specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
1583 | + \fi | |
1584 | +\fi | |
1585 | +% handle each mode | |
1586 | +\if\@IEEEextractedtoken a\relax | |
1587 | + % No need to do anything here and can pass through the adjustment | |
1588 | + % value as is. The end adjustment of \footskip will do all that | |
1589 | + % is needed | |
1590 | +\else | |
1591 | +\if\@IEEEextractedtoken c\relax | |
1592 | + % calculate the bottom margin | |
1593 | + \@IEEEtrantmpdimenB 1in\relax % system 1in offset | |
1594 | + \advance\@IEEEtrantmpdimenB\topmargin\relax | |
1595 | + \advance\@IEEEtrantmpdimenB\headheight\relax | |
1596 | + \advance\@IEEEtrantmpdimenB\headsep\relax | |
1597 | + \advance\@IEEEtrantmpdimenB\textheight\relax | |
1598 | + \advance\@IEEEtrantmpdimenB\footskip\relax | |
1599 | + \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1600 | + \advance\@IEEEtrantmpdimenC by \@IEEEtrantmpdimenB | |
1601 | + \@IEEEtrantmpdimenB\paperheight | |
1602 | + \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1603 | + % at this point \@IEEEtrantmpdimenB has the actual footer bottom margin | |
1604 | + % now subtract off the footer top margin | |
1605 | + \advance\@IEEEtrantmpdimenB -\footskip\relax | |
1606 | + \settodepth{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax | |
1607 | + \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC | |
1608 | + \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1609 | + \advance\@IEEEtrantmpdimenB by \@IEEEtrantmpdimenC | |
1610 | + % at this point \@IEEEtrantmpdimenB has the difference between the bottom | |
1611 | + % and top footer margins | |
1612 | + % our adjustment must be half this value to center the footer | |
1613 | + \divide\@IEEEtrantmpdimenB by 2\relax | |
1614 | + % add to the offset | |
1615 | + \advance\@IEEEtrantmpdimenA by \@IEEEtrantmpdimenB | |
1616 | +\else | |
1617 | +\if\@IEEEextractedtoken b\relax | |
1618 | + % calculate the bottom margin | |
1619 | + \@IEEEtrantmpdimenB 1in\relax % system 1in offset | |
1620 | + \advance\@IEEEtrantmpdimenB\topmargin\relax | |
1621 | + \advance\@IEEEtrantmpdimenB\headheight\relax | |
1622 | + \advance\@IEEEtrantmpdimenB\headsep\relax | |
1623 | + \advance\@IEEEtrantmpdimenB\textheight\relax | |
1624 | + \advance\@IEEEtrantmpdimenB\footskip\relax | |
1625 | + \settodepth{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1626 | + \advance\@IEEEtrantmpdimenC by \@IEEEtrantmpdimenB | |
1627 | + \@IEEEtrantmpdimenB\paperheight | |
1628 | + \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1629 | + % at this point \@IEEEtrantmpdimenB has the actual footer bottom margin | |
1630 | + % get the difference between the actual and the desired | |
1631 | + \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenA | |
1632 | + \@IEEEtrantmpdimenA\@IEEEtrantmpdimenB | |
1633 | +\else | |
1634 | + \if\@IEEEextractedtoken t\relax | |
1635 | + \else | |
1636 | + \@IEEEclspkgerror{Unknown mode type `\@IEEEextractedtokenmacro' in \string\IEEEsetfootermargin\space (line \the\inputlineno).\MessageBreak | |
1637 | + Defaulting to `t'}% | |
1638 | + {Valid modes for \string\IEEEsetfootermargin\space are: t, b, c and a.}\relax | |
1639 | + \fi | |
1640 | + \@IEEEtrantmpdimenB\footskip\relax | |
1641 | + \settodepth{\@IEEEtrantmpdimenC}{\begingroup #2\relax\relax\relax\endgroup}\relax | |
1642 | + \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1643 | + \settoheight{\@IEEEtrantmpdimenC}{\begingroup #1\relax\relax\relax\endgroup}\relax | |
1644 | + \advance\@IEEEtrantmpdimenB by -\@IEEEtrantmpdimenC | |
1645 | + % at this point \@IEEEtrantmpdimenB has the actual footer top margin | |
1646 | + % get the difference between the desired and the actual | |
1647 | + \advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpdimenB | |
1648 | +\fi\fi % if t, b, c | |
1649 | +\fi % if a | |
1650 | +% advance \footskip by the needed amount | |
1651 | +\advance\footskip by \@IEEEtrantmpdimenA\relax | |
1652 | +} | |
1653 | + | |
1654 | +% -- End V1.8a page setup commands -- | |
1655 | + | |
1656 | + | |
1657 | + | |
1658 | + | |
1659 | + | |
1660 | +% V1.6 | |
1661 | +% LaTeX is a little to quick to use hyphenations | |
1662 | +% So, we increase the penalty for their use and raise | |
1663 | +% the badness level that triggers an underfull hbox | |
1664 | +% warning. The author may still have to tweak things, | |
1665 | +% but the appearance will be much better "right out | |
1666 | +% of the box" than that under V1.5 and prior. | |
1667 | +% TeX default is 50 | |
1668 | +\hyphenpenalty=750 | |
1669 | +\ifCLASSOPTIONcompsoc | |
1670 | +\hyphenpenalty 500 | |
1671 | +\fi | |
1672 | +% If we didn't adjust the interword spacing, 2200 might be better. | |
1673 | +% The TeX default is 1000 | |
1674 | +\hbadness=1350 | |
1675 | +% The IEEE does not use extra spacing after punctuation | |
1676 | +\frenchspacing | |
1677 | + | |
1678 | +% V1.7 increase this a tad to discourage equation breaks | |
1679 | +\binoppenalty=1000 % default 700 | |
1680 | +\relpenalty=800 % default 500 | |
1681 | + | |
1682 | +% v1.8a increase these to discourage widows and orphans | |
1683 | +\clubpenalty=1000 % default 150 | |
1684 | +\widowpenalty=1000 % default 150 | |
1685 | +\displaywidowpenalty=1000 % default 50 | |
1686 | + | |
1687 | + | |
1688 | +% margin note stuff | |
1689 | +\marginparsep 10pt | |
1690 | +\marginparwidth 20pt | |
1691 | +\marginparpush 25pt | |
1692 | + | |
1693 | + | |
1694 | +% if things get too close, go ahead and let them touch | |
1695 | +\lineskip 0pt | |
1696 | +\normallineskip 0pt | |
1697 | +\lineskiplimit 0pt | |
1698 | +\normallineskiplimit 0pt | |
1699 | + | |
1700 | +% The distance from the lower edge of the text body to the | |
1701 | +% footline | |
1702 | +\footskip 0.4in | |
1703 | + | |
1704 | +% normally zero, should be relative to font height. | |
1705 | +% put in a little rubber to help stop some bad breaks (underfull vboxes) | |
1706 | +\parskip 0ex plus 0.2ex minus 0.1ex | |
1707 | + | |
1708 | +\parindent 1.0em | |
1709 | +\ifCLASSOPTIONcompsoc | |
1710 | + \parindent 1.5em | |
1711 | +\fi | |
1712 | + | |
1713 | +\headheight 12pt | |
1714 | +\headsep 18pt | |
1715 | +% use the normal font baselineskip | |
1716 | +% so that \topskip is unaffected by changes in \baselinestretch | |
1717 | +\topskip=\@IEEEnormalsizeunitybaselineskip | |
1718 | + | |
1719 | + | |
1720 | +% V1.8 \maxdepth defaults to 4pt, but should be font size dependent | |
1721 | +\maxdepth=0.5\@IEEEnormalsizeunitybaselineskip | |
1722 | +\textheight 58pc % 9.63in, 696pt | |
1723 | + | |
1724 | +% set the default top margin to 58pt | |
1725 | +% which results in a \topmargin of -49.59pt for 10pt documents | |
1726 | +\IEEEsettopmargin{t}{58pt} | |
1727 | +% tweak textheight to a perfect integer number of lines/column. | |
1728 | +% standard is: 9pt/63 lpc; 10pt/58 lpc; 11pt/52 lpc; 12pt/50 lpc | |
1729 | +\IEEEquantizetextheight{c} | |
1730 | +% tweak top margin so that the error is shared equally at the top and bottom | |
1731 | +\IEEEsettopmargin{q}{0sp} | |
1732 | + | |
1733 | + | |
1734 | +\columnsep 1pc | |
1735 | +\textwidth 43pc % 2 x 21pc + 1pc = 43pc | |
1736 | + | |
1737 | +% set the default side margins to center the text | |
1738 | +\IEEEsetsidemargin{c}{0pt} | |
1739 | + | |
1740 | + | |
1741 | +% adjust margins for default conference mode | |
1742 | +\ifCLASSOPTIONconference | |
1743 | + \textheight 9.25in % The standard for conferences (668.4975pt) | |
1744 | + \IEEEsettopmargin{t}{0.75in} | |
1745 | + % tweak textheight to a perfect integer number of lines/page. | |
1746 | + % standard is: 9pt/61 lpc; 10pt/56 lpc; 11pt/50 lpc; 12pt/48 lpc | |
1747 | + \IEEEquantizetextheight{c} | |
1748 | + % tweak top margin so that the error is shared equally at the top and bottom | |
1749 | + \IEEEsettopmargin{q}{0sp} | |
1750 | +\fi | |
1751 | + | |
1752 | + | |
1753 | +% compsoc text sizes, margins and spacings | |
1754 | +\ifCLASSOPTIONcompsoc | |
1755 | + \columnsep 12bp | |
1756 | + % CS specs for \textwdith are 6.875in | |
1757 | + % \textwidth 6.875in | |
1758 | + % however, measurements from proofs show they are using 3.5in columns | |
1759 | + \textwidth 7in | |
1760 | + \advance\textwidth by \columnsep | |
1761 | + % set the side margins to center the text | |
1762 | + \IEEEsetsidemargin{c}{0pt} | |
1763 | + % top/bottom margins to center | |
1764 | + % could just set \textheight to 9.75in for all the different paper sizes | |
1765 | + % and then quantize, but we'll do it the long way here to allow for easy | |
1766 | + % future per-paper size adjustments | |
1767 | + \IEEEsettextheight{0.625in}{0.625in}% 11in - 2 * 0.625in = 9.75in is the standard text height for compsoc journals | |
1768 | + \IEEEsettopmargin{t}{0.625in} | |
1769 | + \if@IEEEusingcspaper | |
1770 | + \IEEEsettextheight{0.5in}{0.5in}% 10.75in - 2 * 0.5in = 9.75in | |
1771 | + \IEEEsettopmargin{t}{0.5in} | |
1772 | + \fi | |
1773 | + \if@IEEEusingAfourpaper | |
1774 | + \IEEEsettextheight{24.675mm}{24.675mm}% 297mm - 2 * 24.675mm = 247.650mm (9.75in) | |
1775 | + \IEEEsettopmargin{t}{24.675mm} | |
1776 | + \fi | |
1777 | + % tweak textheight to a perfect integer number of lines/page. | |
1778 | + % standard is: 9pt/65 lpc; 10pt/61 lpc; 11pt/53 lpc; 12pt/49 lpc | |
1779 | + \IEEEquantizetextheight{c} | |
1780 | + % tweak top margin so that the error is shared equally at the top and bottom | |
1781 | + \IEEEsettopmargin{q}{0sp} | |
1782 | + | |
1783 | +% compsoc conference | |
1784 | + \ifCLASSOPTIONconference | |
1785 | + % compsoc conference use a larger value for columnsep | |
1786 | + \columnsep 0.25in | |
1787 | + \IEEEsettextwidth{0.75in}{0.75in} | |
1788 | + % set the side margins to center the text (0.75in for letterpaper) | |
1789 | + \IEEEsetsidemargin{c}{0pt} | |
1790 | + % compsoc conferences want 1in top and bottom margin | |
1791 | + \IEEEsettextheight{1in}{1in} | |
1792 | + \IEEEsettopmargin{t}{1in} | |
1793 | + % tweak textheight to a perfect integer number of lines/page. | |
1794 | + % standard is: 9pt/58 lpc; 10pt/53 lpc; 11pt/48 lpc; 12pt/46 lpc | |
1795 | + \IEEEquantizetextheight{c} | |
1796 | + % tweak top margin so that the error is shared equally at the top and bottom | |
1797 | + \IEEEsettopmargin{q}{0sp} | |
1798 | + \fi | |
1799 | +\fi | |
1800 | + | |
1801 | + | |
1802 | + | |
1803 | +% draft mode settings override that of all other modes | |
1804 | +% provides a nice 1in margin all around the paper and extra | |
1805 | +% space between the lines for editor's comments | |
1806 | +\ifCLASSOPTIONdraftcls | |
1807 | + % we want 1in side margins regardless of paper type | |
1808 | + \IEEEsettextwidth{1in}{1in} | |
1809 | + \IEEEsetsidemargin{c}{0pt} | |
1810 | + % want 1in top and bottom margins | |
1811 | + \IEEEsettextheight{1in}{1in} | |
1812 | + \IEEEsettopmargin{t}{1in} | |
1813 | + % digitize textheight to be an integer number of lines. | |
1814 | + % this may cause the top and bottom margins to be off a tad | |
1815 | + \IEEEquantizetextheight{c} | |
1816 | + % tweak top margin so that the error is shared equally at the top and bottom | |
1817 | + \IEEEsettopmargin{q}{0sp} | |
1818 | +\fi | |
1819 | + | |
1820 | + | |
1821 | + | |
1822 | +% process CLASSINPUT inner/outer margin | |
1823 | +% if inner margin defined, but outer margin not, set outer to inner. | |
1824 | +\ifx\CLASSINPUTinnersidemargin\@IEEEundefined | |
1825 | +\else | |
1826 | + \ifx\CLASSINPUToutersidemargin\@IEEEundefined | |
1827 | + \edef\CLASSINPUToutersidemargin{\CLASSINPUTinnersidemargin} | |
1828 | + \fi | |
1829 | +\fi | |
1830 | + | |
1831 | +\ifx\CLASSINPUToutersidemargin\@IEEEundefined | |
1832 | +\else | |
1833 | + % if outer margin defined, but inner margin not, set inner to outer. | |
1834 | + \ifx\CLASSINPUTinnersidemargin\@IEEEundefined | |
1835 | + \edef\CLASSINPUTinnersidemargin{\CLASSINPUToutersidemargin} | |
1836 | + \fi | |
1837 | + \IEEEsettextwidth{\CLASSINPUTinnersidemargin}{\CLASSINPUToutersidemargin} | |
1838 | + \IEEEsetsidemargin{i}{\CLASSINPUTinnersidemargin} | |
1839 | + \typeout{** ATTENTION: Overriding inner side margin to \CLASSINPUTinnersidemargin\space and | |
1840 | + outer side margin to \CLASSINPUToutersidemargin\space via \string\CLASSINPUT.} | |
1841 | +\fi | |
1842 | + | |
1843 | + | |
1844 | + | |
1845 | +% process CLASSINPUT top/bottom text margin | |
1846 | +% if toptext margin defined, but bottomtext margin not, set bottomtext to toptext margin | |
1847 | +\ifx\CLASSINPUTtoptextmargin\@IEEEundefined | |
1848 | +\else | |
1849 | + \ifx\CLASSINPUTbottomtextmargin\@IEEEundefined | |
1850 | + \edef\CLASSINPUTbottomtextmargin{\CLASSINPUTtoptextmargin} | |
1851 | + \fi | |
1852 | +\fi | |
1853 | + | |
1854 | +\ifx\CLASSINPUTbottomtextmargin\@IEEEundefined | |
1855 | +\else | |
1856 | + % if bottomtext margin defined, but toptext margin not, set toptext to bottomtext margin | |
1857 | + \ifx\CLASSINPUTtoptextmargin\@IEEEundefined | |
1858 | + \edef\CLASSINPUTtoptextmargin{\CLASSINPUTbottomtextmargin} | |
1859 | + \fi | |
1860 | + \IEEEsettextheight{\CLASSINPUTtoptextmargin}{\CLASSINPUTbottomtextmargin} | |
1861 | + \IEEEsettopmargin{t}{\CLASSINPUTtoptextmargin} | |
1862 | + \typeout{** ATTENTION: Overriding top text margin to \CLASSINPUTtoptextmargin\space and | |
1863 | + bottom text margin to \CLASSINPUTbottomtextmargin\space via \string\CLASSINPUT.} | |
1864 | +\fi | |
1865 | + | |
1866 | + | |
1867 | + | |
1868 | +% default to center header and footer text in the margins | |
1869 | +\IEEEsetheadermargin{c}{0pt} | |
1870 | +\IEEEsetfootermargin{c}{0pt} | |
1871 | + | |
1872 | +% adjust header and footer positions for compsoc journals | |
1873 | +\ifCLASSOPTIONcompsoc | |
1874 | + \ifCLASSOPTIONjournal | |
1875 | + \IEEEsetheadermargin{b}{\@IEEEnormalsizeunitybaselineskip} | |
1876 | + \IEEEsetfootermargin{t}{\@IEEEnormalsizeunitybaselineskip} | |
1877 | + \fi | |
1878 | +\fi | |
1879 | + | |
1880 | + | |
1881 | +% V1.8a display lines per column info message on user's console | |
1882 | +\def\IEEEdisplayinfolinespercolumn{\@IEEEtrantmpdimenA=\textheight | |
1883 | +% topskip represents only one line even if > baselineskip | |
1884 | +\advance\@IEEEtrantmpdimenA by -1\topskip | |
1885 | +\@IEEEtrantmpcountA=\@IEEEtrantmpdimenA | |
1886 | +\@IEEEtrantmpcountB=\@IEEEtrantmpdimenA | |
1887 | +\divide\@IEEEtrantmpcountB by \baselineskip | |
1888 | +% need to add one line to include topskip (first) line | |
1889 | +\advance\@IEEEtrantmpcountB by 1 | |
1890 | +% save lines per column value as text | |
1891 | +\edef\@IEEEnumlinespercolumninfotxt{\the\@IEEEtrantmpcountB} | |
1892 | +% backout topskip advance to allow direct \@IEEEtrantmpcountA comparison | |
1893 | +\advance\@IEEEtrantmpcountB by -1 | |
1894 | +% restore value as text height (without topskip) rather than just as number of lines | |
1895 | +\multiply\@IEEEtrantmpcountB by \baselineskip | |
1896 | +% is the column height an integer number of lines per column? | |
1897 | +\ifnum\@IEEEtrantmpcountA=\@IEEEtrantmpcountB | |
1898 | +\edef\@IEEEnumlinespercolumnexactinfotxt{exact} | |
1899 | +\else | |
1900 | +\@IEEEtrantmpdimenA\@IEEEtrantmpcountA sp\relax | |
1901 | +\advance\@IEEEtrantmpdimenA by -\@IEEEtrantmpcountB sp\relax | |
1902 | +\edef\@IEEEnumlinespercolumnexactinfotxt{approximate, difference = \the\@IEEEtrantmpdimenA} | |
1903 | +\fi | |
1904 | +\typeout{-- Lines per column: \@IEEEnumlinespercolumninfotxt\space (\@IEEEnumlinespercolumnexactinfotxt).}} | |
1905 | +% delay execution till start of document to allow for user changes | |
1906 | +\AtBeginDocument{\IEEEdisplayinfolinespercolumn} | |
1907 | + | |
1908 | + | |
1909 | + | |
1910 | +% LIST SPACING CONTROLS | |
1911 | + | |
1912 | +% Controls the amount of EXTRA spacing | |
1913 | +% above and below \trivlist | |
1914 | +% Both \list and IED lists override this. | |
1915 | +% However, \trivlist will use this as will most | |
1916 | +% things built from \trivlist like the \center | |
1917 | +% environment. | |
1918 | +\topsep 0.5\baselineskip | |
1919 | + | |
1920 | +% Controls the additional spacing around lists preceded | |
1921 | +% or followed by blank lines. the IEEE does not increase | |
1922 | +% spacing before or after paragraphs so it is set to zero. | |
1923 | +% \z@ is the same as zero, but faster. | |
1924 | +\partopsep \z@ | |
1925 | + | |
1926 | +% Controls the spacing between paragraphs in lists. | |
1927 | +% The IEEE does not increase spacing before or after paragraphs | |
1928 | +% so this is also zero. | |
1929 | +% With IEEEtran.cls, global changes to | |
1930 | +% this value DO affect lists (but not IED lists). | |
1931 | +\parsep \z@ | |
1932 | + | |
1933 | +% Controls the extra spacing between list items. | |
1934 | +% The IEEE does not put extra spacing between items. | |
1935 | +% With IEEEtran.cls, global changes to this value DO affect | |
1936 | +% lists (but not IED lists). | |
1937 | +\itemsep \z@ | |
1938 | + | |
1939 | +% \itemindent is the amount to indent the FIRST line of a list | |
1940 | +% item. It is auto set to zero within the \list environment. To alter | |
1941 | +% it, you have to do so when you call the \list. | |
1942 | +% However, the IEEE uses this for the theorem environment | |
1943 | +% There is an alternative value for this near \leftmargini below | |
1944 | +\itemindent -1em | |
1945 | + | |
1946 | +% \leftmargin, the spacing from the left margin of the main text to | |
1947 | +% the left of the main body of a list item is set by \list. | |
1948 | +% Hence this statement does nothing for lists. | |
1949 | +% But, quote and verse do use it for indention. | |
1950 | +\leftmargin 2em | |
1951 | + | |
1952 | +% we retain this stuff from the older IEEEtran.cls so that \list | |
1953 | +% will work the same way as before. However, itemize, enumerate and | |
1954 | +% description (IED) could care less about what these are as they | |
1955 | +% all are overridden. | |
1956 | +\leftmargini 2em | |
1957 | +%\itemindent 2em % Alternative values: sometimes used. | |
1958 | +%\leftmargini 0em | |
1959 | +\leftmarginii 1em | |
1960 | +\leftmarginiii 1.5em | |
1961 | +\leftmarginiv 1.5em | |
1962 | +\leftmarginv 1.0em | |
1963 | +\leftmarginvi 1.0em | |
1964 | +\labelsep 0.5em | |
1965 | +\labelwidth \z@ | |
1966 | + | |
1967 | + | |
1968 | +% The old IEEEtran.cls behavior of \list is retained. | |
1969 | +% However, the new V1.3 IED list environments override all the | |
1970 | +% @list stuff (\@listX is called within \list for the | |
1971 | +% appropriate level just before the user's list_decl is called). | |
1972 | +% \topsep is now 2pt as the IEEE puts a little extra space around | |
1973 | +% lists - used by those non-IED macros that depend on \list. | |
1974 | +% Note that \parsep and \itemsep are not redefined as in | |
1975 | +% the sizexx.clo \@listX (which article.cls uses) so global changes | |
1976 | +% of these values DO affect \list | |
1977 | +% | |
1978 | +\def\@listi{\leftmargin\leftmargini \topsep 2pt plus 1pt minus 1pt} | |
1979 | +\let\@listI\@listi | |
1980 | +\def\@listii{\leftmargin\leftmarginii\labelwidth\leftmarginii% | |
1981 | + \advance\labelwidth-\labelsep \topsep 2pt} | |
1982 | +\def\@listiii{\leftmargin\leftmarginiii\labelwidth\leftmarginiii% | |
1983 | + \advance\labelwidth-\labelsep \topsep 2pt} | |
1984 | +\def\@listiv{\leftmargin\leftmarginiv\labelwidth\leftmarginiv% | |
1985 | + \advance\labelwidth-\labelsep \topsep 2pt} | |
1986 | +\def\@listv{\leftmargin\leftmarginv\labelwidth\leftmarginv% | |
1987 | + \advance\labelwidth-\labelsep \topsep 2pt} | |
1988 | +\def\@listvi{\leftmargin\leftmarginvi\labelwidth\leftmarginvi% | |
1989 | + \advance\labelwidth-\labelsep \topsep 2pt} | |
1990 | + | |
1991 | + | |
1992 | +% The IEEE uses 5) not 5. | |
1993 | +\def\labelenumi{\theenumi)} \def\theenumi{\arabic{enumi}} | |
1994 | + | |
1995 | +% The IEEE uses a) not (a) | |
1996 | +\def\labelenumii{\theenumii)} \def\theenumii{\alph{enumii}} | |
1997 | + | |
1998 | +% The IEEE uses iii) not iii. | |
1999 | +\def\labelenumiii{\theenumiii)} \def\theenumiii{\roman{enumiii}} | |
2000 | + | |
2001 | +% The IEEE uses A) not A. | |
2002 | +\def\labelenumiv{\theenumiv)} \def\theenumiv{\Alph{enumiv}} | |
2003 | + | |
2004 | +% exactly the same as in article.cls | |
2005 | +\def\p@enumii{\theenumi} | |
2006 | +\def\p@enumiii{\theenumi(\theenumii)} | |
2007 | +\def\p@enumiv{\p@enumiii\theenumiii} | |
2008 | + | |
2009 | +% itemized list label styles | |
2010 | +\def\labelitemi{$\scriptstyle\bullet$} | |
2011 | +\def\labelitemii{\textbf{--}} | |
2012 | +\def\labelitemiii{$\ast$} | |
2013 | +\def\labelitemiv{$\cdot$} | |
2014 | + | |
2015 | + | |
2016 | + | |
2017 | +% **** V1.3 ENHANCEMENTS **** | |
2018 | +% Itemize, Enumerate and Description (IED) List Controls | |
2019 | +% *************************** | |
2020 | +% | |
2021 | +% | |
2022 | +% The IEEE seems to use at least two different values by | |
2023 | +% which ITEMIZED list labels are indented to the right | |
2024 | +% For The Journal of Lightwave Technology (JLT) and The Journal | |
2025 | +% on Selected Areas in Communications (JSAC), they tend to use | |
2026 | +% an indention equal to \parindent. For Transactions on Communications | |
2027 | +% they tend to indent ITEMIZED lists a little more--- 1.3\parindent. | |
2028 | +% We'll provide both values here for you so that you can choose | |
2029 | +% which one you like in your document using a command such as: | |
2030 | +% setlength{\IEEEilabelindent}{\IEEEilabelindentB} | |
2031 | +\newdimen\IEEEilabelindentA | |
2032 | +\IEEEilabelindentA \parindent | |
2033 | + | |
2034 | +\newdimen\IEEEilabelindentB | |
2035 | +\IEEEilabelindentB 1.3\parindent | |
2036 | +% However, we'll default to using \parindent | |
2037 | +% which makes more sense to me | |
2038 | +\newdimen\IEEEilabelindent | |
2039 | +\IEEEilabelindent \IEEEilabelindentA | |
2040 | + | |
2041 | + | |
2042 | +% This controls the default amount the enumerated list labels | |
2043 | +% are indented to the right. | |
2044 | +% Normally, this is the same as the paragraph indention | |
2045 | +\newdimen\IEEEelabelindent | |
2046 | +\IEEEelabelindent \parindent | |
2047 | + | |
2048 | +% This controls the default amount the description list labels | |
2049 | +% are indented to the right. | |
2050 | +% Normally, this is the same as the paragraph indention | |
2051 | +\newdimen\IEEEdlabelindent | |
2052 | +\IEEEdlabelindent \parindent | |
2053 | + | |
2054 | +% This is the value actually used within the IED lists. | |
2055 | +% The IED environments automatically set its value to | |
2056 | +% one of the three values above, so global changes do | |
2057 | +% not have any effect | |
2058 | +\newdimen\IEEElabelindent | |
2059 | +\IEEElabelindent \parindent | |
2060 | + | |
2061 | +% The actual amount labels will be indented is | |
2062 | +% \IEEElabelindent multiplied by the factor below | |
2063 | +% corresponding to the level of nesting depth | |
2064 | +% This provides a means by which the user can | |
2065 | +% alter the effective \IEEElabelindent for deeper | |
2066 | +% levels | |
2067 | +% There may not be such a thing as correct "standard IEEE" | |
2068 | +% values. What the IEEE actually does may depend on the specific | |
2069 | +% circumstances. | |
2070 | +% The first list level almost always has full indention. | |
2071 | +% The second levels I've seen have only 75% of the normal indentation | |
2072 | +% Three level or greater nestings are very rare. I am guessing | |
2073 | +% that they don't use any indentation. | |
2074 | +\def\IEEElabelindentfactori{1.0} % almost always one | |
2075 | +\def\IEEElabelindentfactorii{0.75} % 0.0 or 1.0 may be used in some cases | |
2076 | +\def\IEEElabelindentfactoriii{0.0} % 0.75? 0.5? 0.0? | |
2077 | +\def\IEEElabelindentfactoriv{0.0} | |
2078 | +\def\IEEElabelindentfactorv{0.0} | |
2079 | +\def\IEEElabelindentfactorvi{0.0} | |
2080 | + | |
2081 | +% value actually used within IED lists, it is auto | |
2082 | +% set to one of the 6 values above | |
2083 | +% global changes here have no effect | |
2084 | +\def\IEEElabelindentfactor{1.0} | |
2085 | + | |
2086 | +% This controls the default spacing between the end of the IED | |
2087 | +% list labels and the list text, when normal text is used for | |
2088 | +% the labels. | |
2089 | +% compsoc uses a larger value here, but we'll set that later | |
2090 | +% in the class so that this code block area can be extracted | |
2091 | +% as-is for IEEEtrantools.sty | |
2092 | +\newdimen\IEEEiednormlabelsep | |
2093 | +\IEEEiednormlabelsep 0.6em | |
2094 | + | |
2095 | +% This controls the default spacing between the end of the IED | |
2096 | +% list labels and the list text, when math symbols are used for | |
2097 | +% the labels (nomenclature lists). The IEEE usually increases the | |
2098 | +% spacing in these cases | |
2099 | +\newdimen\IEEEiedmathlabelsep | |
2100 | +\IEEEiedmathlabelsep 1.2em | |
2101 | + | |
2102 | +% This controls the extra vertical separation put above and | |
2103 | +% below each IED list. the IEEE usually puts a little extra spacing | |
2104 | +% around each list. However, this spacing is barely noticeable. | |
2105 | +% compsoc uses a larger value here, but we'll set that later | |
2106 | +% in the class so that this code block area can be extracted | |
2107 | +% as-is for IEEEtrantools.sty | |
2108 | +\newskip\IEEEiedtopsep | |
2109 | +\IEEEiedtopsep 2pt plus 1pt minus 1pt | |
2110 | + | |
2111 | + | |
2112 | +% This command is executed within each IED list environment | |
2113 | +% at the beginning of the list. You can use this to set the | |
2114 | +% parameters for some/all your IED list(s) without disturbing | |
2115 | +% global parameters that affect things other than lists. | |
2116 | +% i.e., renewcommand{\IEEEiedlistdecl}{\setlength{\labelsep}{5em}} | |
2117 | +% will alter the \labelsep for the next list(s) until | |
2118 | +% \IEEEiedlistdecl is redefined. | |
2119 | +\def\IEEEiedlistdecl{\relax} | |
2120 | + | |
2121 | +% This command provides an easy way to set \leftmargin based | |
2122 | +% on the \labelwidth, \labelsep and the argument \IEEElabelindent | |
2123 | +% Usage: \IEEEcalcleftmargin{width-to-indent-the-label} | |
2124 | +% output is in the \leftmargin variable, i.e., effectively: | |
2125 | +% \leftmargin = argument + \labelwidth + \labelsep | |
2126 | +% Note controlled spacing here, shield end of lines with % | |
2127 | +\def\IEEEcalcleftmargin#1{\setlength{\leftmargin}{#1}% | |
2128 | +\addtolength{\leftmargin}{\labelwidth}% | |
2129 | +\addtolength{\leftmargin}{\labelsep}} | |
2130 | + | |
2131 | +% This command provides an easy way to set \labelwidth to the | |
2132 | +% width of the given text. It is the same as | |
2133 | +% \settowidth{\labelwidth}{label-text} | |
2134 | +% and useful as a shorter alternative. | |
2135 | +% Typically used to set \labelwidth to be the width | |
2136 | +% of the longest label in the list | |
2137 | +\def\IEEEsetlabelwidth#1{\settowidth{\labelwidth}{#1}} | |
2138 | + | |
2139 | +% When this command is executed, IED lists will use the | |
2140 | +% IEEEiedmathlabelsep label separation rather than the normal | |
2141 | +% spacing. To have an effect, this command must be executed via | |
2142 | +% the \IEEEiedlistdecl or within the option of the IED list | |
2143 | +% environments. | |
2144 | +\def\IEEEusemathlabelsep{\setlength{\labelsep}{\IEEEiedmathlabelsep}} | |
2145 | + | |
2146 | +% A flag which controls whether the IED lists automatically | |
2147 | +% calculate \leftmargin from \IEEElabelindent, \labelwidth and \labelsep | |
2148 | +% Useful if you want to specify your own \leftmargin | |
2149 | +% This flag must be set (\IEEEnocalcleftmargintrue or \IEEEnocalcleftmarginfalse) | |
2150 | +% via the \IEEEiedlistdecl or within the option of the IED list | |
2151 | +% environments to have an effect. | |
2152 | +\newif\ifIEEEnocalcleftmargin | |
2153 | +\IEEEnocalcleftmarginfalse | |
2154 | + | |
2155 | +% A flag which controls whether \IEEElabelindent is multiplied by | |
2156 | +% the \IEEElabelindentfactor for each list level. | |
2157 | +% This flag must be set via the \IEEEiedlistdecl or within the option | |
2158 | +% of the IED list environments to have an effect. | |
2159 | +\newif\ifIEEEnolabelindentfactor | |
2160 | +\IEEEnolabelindentfactorfalse | |
2161 | + | |
2162 | + | |
2163 | +% internal variable to indicate type of IED label | |
2164 | +% justification | |
2165 | +% 0 - left; 1 - center; 2 - right | |
2166 | +\def\@IEEEiedjustify{0} | |
2167 | + | |
2168 | + | |
2169 | +% commands to allow the user to control IED | |
2170 | +% label justifications. Use these commands within | |
2171 | +% the IED environment option or in the \IEEEiedlistdecl | |
2172 | +% Note that changing the normal list justifications | |
2173 | +% is nonstandard and the IEEE may not like it if you do so! | |
2174 | +% I include these commands as they may be helpful to | |
2175 | +% those who are using these enhanced list controls for | |
2176 | +% other non-IEEE related LaTeX work. | |
2177 | +% itemize and enumerate automatically default to right | |
2178 | +% justification, description defaults to left. | |
2179 | +\def\IEEEiedlabeljustifyl{\def\@IEEEiedjustify{0}}%left | |
2180 | +\def\IEEEiedlabeljustifyc{\def\@IEEEiedjustify{1}}%center | |
2181 | +\def\IEEEiedlabeljustifyr{\def\@IEEEiedjustify{2}}%right | |
2182 | + | |
2183 | + | |
2184 | + | |
2185 | + | |
2186 | +% commands to save to and restore from the list parameter copies | |
2187 | +% this allows us to set all the list parameters within | |
2188 | +% the list_decl and prevent \list (and its \@list) | |
2189 | +% from overriding any of our parameters | |
2190 | +% V1.6 use \edefs instead of dimen's to conserve dimen registers | |
2191 | +% Note controlled spacing here, shield end of lines with % | |
2192 | +\def\@IEEEsavelistparams{\edef\@IEEEiedtopsep{\the\topsep}% | |
2193 | +\edef\@IEEEiedlabelwidth{\the\labelwidth}% | |
2194 | +\edef\@IEEEiedlabelsep{\the\labelsep}% | |
2195 | +\edef\@IEEEiedleftmargin{\the\leftmargin}% | |
2196 | +\edef\@IEEEiedpartopsep{\the\partopsep}% | |
2197 | +\edef\@IEEEiedparsep{\the\parsep}% | |
2198 | +\edef\@IEEEieditemsep{\the\itemsep}% | |
2199 | +\edef\@IEEEiedrightmargin{\the\rightmargin}% | |
2200 | +\edef\@IEEEiedlistparindent{\the\listparindent}% | |
2201 | +\edef\@IEEEieditemindent{\the\itemindent}} | |
2202 | + | |
2203 | +% Note controlled spacing here | |
2204 | +\def\@IEEErestorelistparams{\topsep\@IEEEiedtopsep\relax% | |
2205 | +\labelwidth\@IEEEiedlabelwidth\relax% | |
2206 | +\labelsep\@IEEEiedlabelsep\relax% | |
2207 | +\leftmargin\@IEEEiedleftmargin\relax% | |
2208 | +\partopsep\@IEEEiedpartopsep\relax% | |
2209 | +\parsep\@IEEEiedparsep\relax% | |
2210 | +\itemsep\@IEEEieditemsep\relax% | |
2211 | +\rightmargin\@IEEEiedrightmargin\relax% | |
2212 | +\listparindent\@IEEEiedlistparindent\relax% | |
2213 | +\itemindent\@IEEEieditemindent\relax} | |
2214 | + | |
2215 | + | |
2216 | +% v1.6b provide original LaTeX IED list environments | |
2217 | +% note that latex.ltx defines \itemize and \enumerate, but not \description | |
2218 | +% which must be created by the base classes | |
2219 | +% save original LaTeX itemize and enumerate | |
2220 | +\let\LaTeXitemize\itemize | |
2221 | +\let\endLaTeXitemize\enditemize | |
2222 | +\let\LaTeXenumerate\enumerate | |
2223 | +\let\endLaTeXenumerate\endenumerate | |
2224 | + | |
2225 | +% provide original LaTeX description environment from article.cls | |
2226 | +\newenvironment{LaTeXdescription} | |
2227 | + {\list{}{\labelwidth\z@ \itemindent-\leftmargin | |
2228 | + \let\makelabel\descriptionlabel}} | |
2229 | + {\endlist} | |
2230 | +\newcommand*\descriptionlabel[1]{\hspace\labelsep | |
2231 | + \normalfont\bfseries #1} | |
2232 | + | |
2233 | + | |
2234 | +% override LaTeX's default IED lists | |
2235 | +\def\itemize{\@IEEEitemize} | |
2236 | +\def\enditemize{\@endIEEEitemize} | |
2237 | +\def\enumerate{\@IEEEenumerate} | |
2238 | +\def\endenumerate{\@endIEEEenumerate} | |
2239 | +\def\description{\@IEEEdescription} | |
2240 | +\def\enddescription{\@endIEEEdescription} | |
2241 | + | |
2242 | +% provide the user with aliases - may help those using packages that | |
2243 | +% override itemize, enumerate, or description | |
2244 | +\def\IEEEitemize{\@IEEEitemize} | |
2245 | +\def\endIEEEitemize{\@endIEEEitemize} | |
2246 | +\def\IEEEenumerate{\@IEEEenumerate} | |
2247 | +\def\endIEEEenumerate{\@endIEEEenumerate} | |
2248 | +\def\IEEEdescription{\@IEEEdescription} | |
2249 | +\def\endIEEEdescription{\@endIEEEdescription} | |
2250 | + | |
2251 | + | |
2252 | +% V1.6 we want to keep the IEEEtran IED list definitions as our own internal | |
2253 | +% commands so they are protected against redefinition | |
2254 | +\def\@IEEEitemize{\@ifnextchar[{\@@IEEEitemize}{\@@IEEEitemize[\relax]}} | |
2255 | +\def\@IEEEenumerate{\@ifnextchar[{\@@IEEEenumerate}{\@@IEEEenumerate[\relax]}} | |
2256 | +\def\@IEEEdescription{\@ifnextchar[{\@@IEEEdescription}{\@@IEEEdescription[\relax]}} | |
2257 | +\def\@endIEEEitemize{\endlist} | |
2258 | +\def\@endIEEEenumerate{\endlist} | |
2259 | +\def\@endIEEEdescription{\endlist} | |
2260 | + | |
2261 | + | |
2262 | +% DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS | |
2263 | +% AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS | |
2264 | +% IEEEtran itemized list MDS 1/2001 | |
2265 | +% Note controlled spacing here, shield end of lines with % | |
2266 | +\def\@@IEEEitemize[#1]{% | |
2267 | + \ifnum\@itemdepth>3\relax\@toodeep\else% | |
2268 | + \ifnum\@listdepth>5\relax\@toodeep\else% | |
2269 | + \advance\@itemdepth\@ne% | |
2270 | + \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}% | |
2271 | + % get the IEEElabelindentfactor for this level | |
2272 | + \advance\@listdepth\@ne% we need to know what the level WILL be | |
2273 | + \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}% | |
2274 | + \advance\@listdepth-\@ne% undo our increment | |
2275 | + \def\@IEEEiedjustify{2}% right justified labels are default | |
2276 | + % set other defaults | |
2277 | + \IEEEnocalcleftmarginfalse% | |
2278 | + \IEEEnolabelindentfactorfalse% | |
2279 | + \topsep\IEEEiedtopsep% | |
2280 | + \IEEElabelindent\IEEEilabelindent% | |
2281 | + \labelsep\IEEEiednormlabelsep% | |
2282 | + \partopsep 0ex% | |
2283 | + \parsep 0ex% | |
2284 | + \itemsep 0ex% | |
2285 | + \rightmargin 0em% | |
2286 | + \listparindent 0em% | |
2287 | + \itemindent 0em% | |
2288 | + % calculate the label width | |
2289 | + % the user can override this later if | |
2290 | + % they specified a \labelwidth | |
2291 | + \settowidth{\labelwidth}{\csname labelitem\romannumeral\the\@itemdepth\endcsname}% | |
2292 | + \@IEEEsavelistparams% save our list parameters | |
2293 | + \list{\csname\@itemitem\endcsname}{% | |
2294 | + \@IEEErestorelistparams% override any list{} changes | |
2295 | + % to our globals | |
2296 | + \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel | |
2297 | + \IEEEiedlistdecl% let user alter parameters | |
2298 | + #1\relax% | |
2299 | + % If the user has requested not to use the | |
2300 | + % IEEElabelindent factor, don't revise \IEEElabelindent | |
2301 | + \ifIEEEnolabelindentfactor\relax% | |
2302 | + \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent% | |
2303 | + \fi% | |
2304 | + % Unless the user has requested otherwise, | |
2305 | + % calculate our left margin based | |
2306 | + % on \IEEElabelindent, \labelwidth and | |
2307 | + % \labelsep | |
2308 | + \ifIEEEnocalcleftmargin\relax% | |
2309 | + \else\IEEEcalcleftmargin{\IEEElabelindent}% | |
2310 | + \fi}\fi\fi}% | |
2311 | + | |
2312 | + | |
2313 | +% DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS | |
2314 | +% AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS | |
2315 | +% IEEEtran enumerate list MDS 1/2001 | |
2316 | +% Note controlled spacing here, shield end of lines with % | |
2317 | +\def\@@IEEEenumerate[#1]{% | |
2318 | + \ifnum\@enumdepth>3\relax\@toodeep\else% | |
2319 | + \ifnum\@listdepth>5\relax\@toodeep\else% | |
2320 | + \advance\@enumdepth\@ne% | |
2321 | + \edef\@enumctr{enum\romannumeral\the\@enumdepth}% | |
2322 | + % get the IEEElabelindentfactor for this level | |
2323 | + \advance\@listdepth\@ne% we need to know what the level WILL be | |
2324 | + \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}% | |
2325 | + \advance\@listdepth-\@ne% undo our increment | |
2326 | + \def\@IEEEiedjustify{2}% right justified labels are default | |
2327 | + % set other defaults | |
2328 | + \IEEEnocalcleftmarginfalse% | |
2329 | + \IEEEnolabelindentfactorfalse% | |
2330 | + \topsep\IEEEiedtopsep% | |
2331 | + \IEEElabelindent\IEEEelabelindent% | |
2332 | + \labelsep\IEEEiednormlabelsep% | |
2333 | + \partopsep 0ex% | |
2334 | + \parsep 0ex% | |
2335 | + \itemsep 0ex% | |
2336 | + \rightmargin 0em% | |
2337 | + \listparindent 0em% | |
2338 | + \itemindent 0em% | |
2339 | + % calculate the label width | |
2340 | + % We'll set it to the width suitable for all labels using | |
2341 | + % normalfont 1) to 9) | |
2342 | + % The user can override this later | |
2343 | + \settowidth{\labelwidth}{9)}% | |
2344 | + \@IEEEsavelistparams% save our list parameters | |
2345 | + \list{\csname label\@enumctr\endcsname}{\usecounter{\@enumctr}% | |
2346 | + \@IEEErestorelistparams% override any list{} changes | |
2347 | + % to our globals | |
2348 | + \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel | |
2349 | + \IEEEiedlistdecl% let user alter parameters | |
2350 | + #1\relax% | |
2351 | + % If the user has requested not to use the | |
2352 | + % IEEElabelindent factor, don't revise \IEEElabelindent | |
2353 | + \ifIEEEnolabelindentfactor\relax% | |
2354 | + \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent% | |
2355 | + \fi% | |
2356 | + % Unless the user has requested otherwise, | |
2357 | + % calculate our left margin based | |
2358 | + % on \IEEElabelindent, \labelwidth and | |
2359 | + % \labelsep | |
2360 | + \ifIEEEnocalcleftmargin\relax% | |
2361 | + \else\IEEEcalcleftmargin{\IEEElabelindent}% | |
2362 | + \fi}\fi\fi}% | |
2363 | + | |
2364 | + | |
2365 | +% DO NOT ALLOW BLANK LINES TO BE IN THESE IED ENVIRONMENTS | |
2366 | +% AS THIS WILL FORCE NEW PARAGRAPHS AFTER THE IED LISTS | |
2367 | +% IEEEtran description list MDS 1/2001 | |
2368 | +% Note controlled spacing here, shield end of lines with % | |
2369 | +\def\@@IEEEdescription[#1]{% | |
2370 | + \ifnum\@listdepth>5\relax\@toodeep\else% | |
2371 | + % get the IEEElabelindentfactor for this level | |
2372 | + \advance\@listdepth\@ne% we need to know what the level WILL be | |
2373 | + \edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}% | |
2374 | + \advance\@listdepth-\@ne% undo our increment | |
2375 | + \def\@IEEEiedjustify{0}% left justified labels are default | |
2376 | + % set other defaults | |
2377 | + \IEEEnocalcleftmarginfalse% | |
2378 | + \IEEEnolabelindentfactorfalse% | |
2379 | + \topsep\IEEEiedtopsep% | |
2380 | + \IEEElabelindent\IEEEdlabelindent% | |
2381 | + % assume normal labelsep | |
2382 | + \labelsep\IEEEiednormlabelsep% | |
2383 | + \partopsep 0ex% | |
2384 | + \parsep 0ex% | |
2385 | + \itemsep 0ex% | |
2386 | + \rightmargin 0em% | |
2387 | + \listparindent 0em% | |
2388 | + \itemindent 0em% | |
2389 | + % Bogus label width in case the user forgets | |
2390 | + % to set it. | |
2391 | + % TIP: If you want to see what a variable's width is you | |
2392 | + % can use the TeX command \showthe\width-variable to | |
2393 | + % display it on the screen during compilation | |
2394 | + % (This might be helpful to know when you need to find out | |
2395 | + % which label is the widest) | |
2396 | + \settowidth{\labelwidth}{Hello}% | |
2397 | + \@IEEEsavelistparams% save our list parameters | |
2398 | + \list{}{\@IEEErestorelistparams% override any list{} changes | |
2399 | + % to our globals | |
2400 | + \let\makelabel\@IEEEiedmakelabel% v1.6b setup \makelabel | |
2401 | + \IEEEiedlistdecl% let user alter parameters | |
2402 | + #1\relax% | |
2403 | + % If the user has requested not to use the | |
2404 | + % labelindent factor, don't revise \IEEElabelindent | |
2405 | + \ifIEEEnolabelindentfactor\relax% | |
2406 | + \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent% | |
2407 | + \fi% | |
2408 | + % Unless the user has requested otherwise, | |
2409 | + % calculate our left margin based | |
2410 | + % on \IEEElabelindent, \labelwidth and | |
2411 | + % \labelsep | |
2412 | + \ifIEEEnocalcleftmargin\relax% | |
2413 | + \else\IEEEcalcleftmargin{\IEEElabelindent}\relax% | |
2414 | + \fi}\fi} | |
2415 | + | |
2416 | +% v1.6b we use one makelabel that does justification as needed. | |
2417 | +\def\@IEEEiedmakelabel#1{\relax\if\@IEEEiedjustify 0\relax | |
2418 | +\makebox[\labelwidth][l]{\normalfont #1}\else | |
2419 | +\if\@IEEEiedjustify 1\relax | |
2420 | +\makebox[\labelwidth][c]{\normalfont #1}\else | |
2421 | +\makebox[\labelwidth][r]{\normalfont #1}\fi\fi} | |
2422 | + | |
2423 | + | |
2424 | +% compsoc uses a larger value for the normal labelsep | |
2425 | +% and also extra spacing above and below each list | |
2426 | +\ifCLASSOPTIONcompsoc | |
2427 | + \IEEEiednormlabelsep 1.2em | |
2428 | + \IEEEiedtopsep 6pt plus 3pt minus 3pt | |
2429 | +\fi | |
2430 | + | |
2431 | + | |
2432 | +% VERSE and QUOTE | |
2433 | +% V1.7 define environments with newenvironment | |
2434 | +\newenvironment{verse}{\let\\=\@centercr | |
2435 | + \list{}{\itemsep\z@ \itemindent -1.5em \listparindent \itemindent | |
2436 | + \rightmargin\leftmargin\advance\leftmargin 1.5em}\item\relax} | |
2437 | + {\endlist} | |
2438 | +\newenvironment{quotation}{\list{}{\listparindent 1.5em \itemindent\listparindent | |
2439 | + \rightmargin\leftmargin \parsep 0pt plus 1pt}\item\relax} | |
2440 | + {\endlist} | |
2441 | +\newenvironment{quote}{\list{}{\rightmargin\leftmargin}\item\relax} | |
2442 | + {\endlist} | |
2443 | + | |
2444 | + | |
2445 | +% \titlepage | |
2446 | +% provided only for backward compatibility. \maketitle is the correct | |
2447 | +% way to create the title page. | |
2448 | +\def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn | |
2449 | + \else \newpage \fi \thispagestyle{empty}\c@page\z@} | |
2450 | +\def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi} | |
2451 | + | |
2452 | +% standard values from article.cls | |
2453 | +\arraycolsep 5pt | |
2454 | +\arrayrulewidth .4pt | |
2455 | +\doublerulesep 2pt | |
2456 | + | |
2457 | +\tabcolsep 6pt | |
2458 | +\tabbingsep 0.5em | |
2459 | + | |
2460 | + | |
2461 | +%% FOOTNOTES | |
2462 | +% | |
2463 | +%\skip\footins 10pt plus 4pt minus 2pt | |
2464 | +% V1.6 respond to changes in font size | |
2465 | +% space added above the footnotes (if present) | |
2466 | +\skip\footins 0.9\baselineskip plus 0.4\baselineskip minus 0.2\baselineskip | |
2467 | + | |
2468 | +% V1.6, we need to make \footnotesep responsive to changes | |
2469 | +% in \baselineskip or strange spacings will result when in | |
2470 | +% draft mode. Here is a little LaTeX secret - \footnotesep | |
2471 | +% determines the height of an invisible strut that is placed | |
2472 | +% *above* the baseline of footnotes after the first. Since | |
2473 | +% LaTeX considers the space for characters to be 0.7\baselineskip | |
2474 | +% above the baseline and 0.3\baselineskip below it, we need to | |
2475 | +% use 0.7\baselineskip as a \footnotesep to maintain equal spacing | |
2476 | +% between all the lines of the footnotes. The IEEE often uses a tad | |
2477 | +% more, so use 0.8\baselineskip. This slightly larger value also helps | |
2478 | +% the text to clear the footnote marks. Note that \thanks in IEEEtran | |
2479 | +% uses its own value of \footnotesep which is set in \maketitle. | |
2480 | +{\footnotesize | |
2481 | +\global\footnotesep 0.8\baselineskip} | |
2482 | + | |
2483 | + | |
2484 | +\skip\@mpfootins = \skip\footins | |
2485 | +\fboxsep = 3pt | |
2486 | +\fboxrule = .4pt | |
2487 | +% V1.6 use 1em, then use LaTeX2e's \@makefnmark | |
2488 | +% Note that the IEEE normally *left* aligns the footnote marks, so we don't need | |
2489 | +% box resizing tricks here. | |
2490 | +\long\def\@makefntext#1{\parindent 1em\indent\hbox{\@makefnmark}#1}% V1.6 use 1em | |
2491 | +% V1.7 compsoc does not use superscipts for footnote marks | |
2492 | +\ifCLASSOPTIONcompsoc | |
2493 | +\def\@IEEEcompsocmakefnmark{\hbox{\normalfont\@thefnmark.\ }} | |
2494 | +\long\def\@makefntext#1{\parindent 1em\indent\hbox{\@IEEEcompsocmakefnmark}#1} | |
2495 | +\fi | |
2496 | + | |
2497 | +% The IEEE does not use footnote rules | |
2498 | +\def\footnoterule{} | |
2499 | + | |
2500 | +% V1.7 for compsoc, the IEEE uses a footnote rule only for \thanks. We devise a "one-shot" | |
2501 | +% system to implement this. | |
2502 | +\newif\if@IEEEenableoneshotfootnoterule | |
2503 | +\@IEEEenableoneshotfootnoterulefalse | |
2504 | +\ifCLASSOPTIONcompsoc | |
2505 | +\def\footnoterule{\relax\if@IEEEenableoneshotfootnoterule | |
2506 | +\kern-5pt | |
2507 | +\hbox to \columnwidth{\hfill\vrule width 0.5\columnwidth height 0.4pt\hfill} | |
2508 | +\kern4.6pt | |
2509 | +\global\@IEEEenableoneshotfootnoterulefalse | |
2510 | +\else | |
2511 | +\relax | |
2512 | +\fi} | |
2513 | +\fi | |
2514 | + | |
2515 | +% V1.6 do not allow LaTeX to break a footnote across multiple pages | |
2516 | +\interfootnotelinepenalty=10000 | |
2517 | + | |
2518 | +% V1.6 discourage breaks within equations | |
2519 | +% Note that amsmath normally sets this to 10000, | |
2520 | +% but LaTeX2e normally uses 100. | |
2521 | +\interdisplaylinepenalty=2500 | |
2522 | + | |
2523 | +% default allows section depth up to /paragraph | |
2524 | +\setcounter{secnumdepth}{4} | |
2525 | + | |
2526 | +% technotes do not allow /paragraph | |
2527 | +\ifCLASSOPTIONtechnote | |
2528 | + \setcounter{secnumdepth}{3} | |
2529 | +\fi | |
2530 | +% neither do compsoc conferences | |
2531 | +\@IEEEcompsocconfonly{\setcounter{secnumdepth}{3}} | |
2532 | + | |
2533 | + | |
2534 | +\newcounter{section} | |
2535 | +\newcounter{subsection}[section] | |
2536 | +\newcounter{subsubsection}[subsection] | |
2537 | +\newcounter{paragraph}[subsubsection] | |
2538 | + | |
2539 | +% used only by IEEEtran's IEEEeqnarray as other packages may | |
2540 | +% have their own, different, implementations | |
2541 | +\newcounter{IEEEsubequation}[equation] | |
2542 | + | |
2543 | +% as shown when called by user from \ref, \label and in table of contents | |
2544 | +\def\theequation{\arabic{equation}} % 1 | |
2545 | +\def\theIEEEsubequation{\theequation\alph{IEEEsubequation}} % 1a (used only by IEEEtran's IEEEeqnarray) | |
2546 | +\ifCLASSOPTIONcompsoc | |
2547 | +% compsoc is all arabic | |
2548 | +\def\thesection{\arabic{section}} | |
2549 | +\def\thesubsection{\thesection.\arabic{subsection}} | |
2550 | +\def\thesubsubsection{\thesubsection.\arabic{subsubsection}} | |
2551 | +\def\theparagraph{\thesubsubsection.\arabic{paragraph}} | |
2552 | +\else | |
2553 | +\def\thesection{\Roman{section}} % I | |
2554 | +% V1.7, \mbox prevents breaks around - | |
2555 | +\def\thesubsection{\mbox{\thesection-\Alph{subsection}}} % I-A | |
2556 | +% V1.7 use I-A1 format used by the IEEE rather than I-A.1 | |
2557 | +\def\thesubsubsection{\thesubsection\arabic{subsubsection}} % I-A1 | |
2558 | +\def\theparagraph{\thesubsubsection\alph{paragraph}} % I-A1a | |
2559 | +\fi | |
2560 | + | |
2561 | +% From Heiko Oberdiek. Because of the \mbox in \thesubsection, we need to | |
2562 | +% tell hyperref to disable the \mbox command when making PDF bookmarks. | |
2563 | +% This done already with hyperref.sty version 6.74o and later, but | |
2564 | +% it will not hurt to do it here again for users of older versions. | |
2565 | +\@ifundefined{pdfstringdefPreHook}{\let\pdfstringdefPreHook\@empty}{}% | |
2566 | +\g@addto@macro\pdfstringdefPreHook{\let\mbox\relax} | |
2567 | + | |
2568 | + | |
2569 | +% Main text forms (how shown in main text headings) | |
2570 | +% V1.6, using \thesection in \thesectiondis allows changes | |
2571 | +% in the former to automatically appear in the latter | |
2572 | +\ifCLASSOPTIONcompsoc | |
2573 | + \ifCLASSOPTIONconference% compsoc conference | |
2574 | + \def\thesectiondis{\thesection.} | |
2575 | + \def\thesubsectiondis{\thesectiondis\arabic{subsection}.} | |
2576 | + \def\thesubsubsectiondis{\thesubsectiondis\arabic{subsubsection}.} | |
2577 | + \def\theparagraphdis{\thesubsubsectiondis\arabic{paragraph}.} | |
2578 | + \else% compsoc not conferencs | |
2579 | + \def\thesectiondis{\thesection} | |
2580 | + \def\thesubsectiondis{\thesectiondis.\arabic{subsection}} | |
2581 | + \def\thesubsubsectiondis{\thesubsectiondis.\arabic{subsubsection}} | |
2582 | + \def\theparagraphdis{\thesubsubsectiondis.\arabic{paragraph}} | |
2583 | + \fi | |
2584 | +\else% not compsoc | |
2585 | + \def\thesectiondis{\thesection.} % I. | |
2586 | + \def\thesubsectiondis{\Alph{subsection}.} % B. | |
2587 | + \def\thesubsubsectiondis{\arabic{subsubsection})} % 3) | |
2588 | + \def\theparagraphdis{\alph{paragraph})} % d) | |
2589 | +\fi | |
2590 | + | |
2591 | +% just like LaTeX2e's \@eqnnum | |
2592 | +\def\theequationdis{{\normalfont \normalcolor (\theequation)}}% (1) | |
2593 | +% IEEEsubequation used only by IEEEtran's IEEEeqnarray | |
2594 | +\def\theIEEEsubequationdis{{\normalfont \normalcolor (\theIEEEsubequation)}}% (1a) | |
2595 | +% redirect LaTeX2e's equation number display and all that depend on | |
2596 | +% it, through IEEEtran's \theequationdis | |
2597 | +\def\@eqnnum{\theequationdis} | |
2598 | + | |
2599 | + | |
2600 | + | |
2601 | +% V1.7 provide string macros as article.cls does | |
2602 | +\def\contentsname{Contents} | |
2603 | +\def\listfigurename{List of Figures} | |
2604 | +\def\listtablename{List of Tables} | |
2605 | +\def\refname{References} | |
2606 | +\def\indexname{Index} | |
2607 | +\def\figurename{Fig.} | |
2608 | +\def\tablename{TABLE} | |
2609 | +\@IEEEcompsocconfonly{\def\figurename{Figure}} | |
2610 | +\def\partname{Part} | |
2611 | +\def\appendixname{Appendix} | |
2612 | +\def\abstractname{Abstract} | |
2613 | +% IEEE specific names | |
2614 | +\def\IEEEkeywordsname{Index Terms} | |
2615 | +\def\IEEEproofname{Proof} | |
2616 | + | |
2617 | + | |
2618 | +% LIST OF FIGURES AND TABLES AND TABLE OF CONTENTS | |
2619 | +% | |
2620 | +\def\@pnumwidth{1.55em} | |
2621 | +\def\@tocrmarg{2.55em} | |
2622 | +\def\@dotsep{4.5} | |
2623 | +\setcounter{tocdepth}{3} | |
2624 | + | |
2625 | +% adjusted some spacings here so that section numbers will not easily | |
2626 | +% collide with the section titles. | |
2627 | +% VIII; VIII-A; and VIII-A.1 are usually the worst offenders. | |
2628 | +% MDS 1/2001 | |
2629 | +\def\tableofcontents{\section*{\contentsname}\@starttoc{toc}} | |
2630 | +\def\l@section#1#2{\addpenalty{\@secpenalty}\addvspace{1.0em plus 1pt}% | |
2631 | + \@tempdima 2.75em \begingroup \parindent \z@ \rightskip \@pnumwidth% | |
2632 | + \parfillskip-\@pnumwidth {\bfseries\leavevmode #1}\hfil\hbox to\@pnumwidth{\hss #2}\par% | |
2633 | + \endgroup} | |
2634 | +% argument format #1:level, #2:labelindent,#3:labelsep | |
2635 | +\def\l@subsection{\@dottedtocline{2}{2.75em}{3.75em}} | |
2636 | +\def\l@subsubsection{\@dottedtocline{3}{6.5em}{4.5em}} | |
2637 | +% must provide \l@ defs for ALL sublevels EVEN if tocdepth | |
2638 | +% is such as they will not appear in the table of contents | |
2639 | +% these defs are how TOC knows what level these things are! | |
2640 | +\def\l@paragraph{\@dottedtocline{4}{6.5em}{5.5em}} | |
2641 | +\def\l@subparagraph{\@dottedtocline{5}{6.5em}{6.5em}} | |
2642 | +\def\listoffigures{\section*{\listfigurename}\@starttoc{lof}} | |
2643 | +\def\l@figure{\@dottedtocline{1}{0em}{2.75em}} | |
2644 | +\def\listoftables{\section*{\listtablename}\@starttoc{lot}} | |
2645 | +\let\l@table\l@figure | |
2646 | + | |
2647 | + | |
2648 | +% Definitions for floats | |
2649 | +% | |
2650 | +% Normal Floats | |
2651 | +% V1.8 floatsep et al. revised down by 0.15\baselineskip | |
2652 | +% to account for the sideeffects of \topskip compensation | |
2653 | +\floatsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip | |
2654 | +\textfloatsep 1.55\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip | |
2655 | +\@fptop 0pt plus 1fil | |
2656 | +\@fpsep 0.75\baselineskip plus 2fil | |
2657 | +\@fpbot 0pt plus 1fil | |
2658 | +\def\topfraction{0.9} | |
2659 | +\def\bottomfraction{0.4} | |
2660 | +\def\floatpagefraction{0.8} | |
2661 | +% V1.7, let top floats approach 90% of page | |
2662 | +\def\textfraction{0.1} | |
2663 | + | |
2664 | +% Double Column Floats | |
2665 | +\dblfloatsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip | |
2666 | + | |
2667 | +\dbltextfloatsep 1.55\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip | |
2668 | +% Note that it would be nice if the rubber here actually worked in LaTeX2e. | |
2669 | +% There is a long standing limitation in LaTeX, first discovered (to the best | |
2670 | +% of my knowledge) by Alan Jeffrey in 1992. LaTeX ignores the stretchable | |
2671 | +% portion of \dbltextfloatsep, and as a result, double column figures can and | |
2672 | +% do result in an non-integer number of lines in the main text columns with | |
2673 | +% underfull vbox errors as a consequence. A post to comp.text.tex | |
2674 | +% by Donald Arseneau confirms that this had not yet been fixed in 1998. | |
2675 | +% IEEEtran V1.6 will fix this problem for you in the titles, but it doesn't | |
2676 | +% protect you from other double floats. Happy vspace'ing. | |
2677 | + | |
2678 | +\@dblfptop 0pt plus 1fil | |
2679 | +\@dblfpsep 0.75\baselineskip plus 2fil | |
2680 | +\@dblfpbot 0pt plus 1fil | |
2681 | +\def\dbltopfraction{0.8} | |
2682 | +\def\dblfloatpagefraction{0.8} | |
2683 | +\setcounter{dbltopnumber}{4} | |
2684 | + | |
2685 | +\intextsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip | |
2686 | +\setcounter{topnumber}{2} | |
2687 | +\setcounter{bottomnumber}{2} | |
2688 | +\setcounter{totalnumber}{4} | |
2689 | + | |
2690 | + | |
2691 | + | |
2692 | +% article class provides these, we should too. | |
2693 | +\newlength\abovecaptionskip | |
2694 | +\newlength\belowcaptionskip | |
2695 | +% but only \abovecaptionskip is used above figure captions and *below* table | |
2696 | +% captions | |
2697 | +\setlength\abovecaptionskip{0.5\baselineskip} | |
2698 | +% compsoc journals are a little more generous | |
2699 | +\ifCLASSOPTIONcompsoc\ifCLASSOPTIONjournal | |
2700 | + \setlength\abovecaptionskip{0.75\baselineskip} | |
2701 | +\fi\fi | |
2702 | +\setlength\belowcaptionskip{0pt} | |
2703 | +% V1.6 create hooks in case the caption spacing ever needs to be | |
2704 | +% overridden by a user | |
2705 | +\def\@IEEEfigurecaptionsepspace{\vskip\abovecaptionskip\relax}% | |
2706 | +\def\@IEEEtablecaptionsepspace{\vskip\abovecaptionskip\relax}% | |
2707 | + | |
2708 | + | |
2709 | +% 1.6b revise caption system so that \@makecaption uses two arguments | |
2710 | +% as with LaTeX2e. Otherwise, there will be problems when using hyperref. | |
2711 | +\def\@IEEEtablestring{table} | |
2712 | + | |
2713 | + | |
2714 | +% V1.8 compensate for \topskip so top of top figures align with tops of the first lines of main text | |
2715 | +% here we calculate a space equal to the amount \topskip exceeds the main text height | |
2716 | +% we hook in at \@floatboxreset | |
2717 | +\def\@IEEEfiguretopskipspace{\ifdim\prevdepth=-1000pt\relax | |
2718 | +\setlength{\@IEEEtrantmpdimenA}{1\topskip}\relax | |
2719 | +\addtolength{\@IEEEtrantmpdimenA}{-0.7\@IEEEnormalsizeunitybaselineskip}\relax | |
2720 | +\vspace*{\@IEEEtrantmpdimenA}\fi} | |
2721 | +% V1.8 compensate for \topskip at the top of top tables so caption text is on main text baseline | |
2722 | +% use a strut set on the caption baseline within \@makecaption | |
2723 | +\def\@IEEEtabletopskipstrut{\ifdim\prevdepth=-1000pt\rule{0pt}{\topskip}\fi} | |
2724 | +% the \ifdim\prevdepth checks are always expected to be true for IEEE style float caption ordering | |
2725 | +% because top of figure content and top of captions in tables is the first thing on the vertical | |
2726 | +% list of these floats | |
2727 | +% thanks to Donald Arseneau for his 2000/11/11 post "Re: caption hacking" with info on this topic. | |
2728 | + | |
2729 | + | |
2730 | +\ifCLASSOPTIONcompsoc | |
2731 | +% V1.7 compsoc \@makecaption | |
2732 | +\ifCLASSOPTIONconference% compsoc conference | |
2733 | +\long\def\@makecaption#1#2{% | |
2734 | +% test if is a for a figure or table | |
2735 | +\ifx\@captype\@IEEEtablestring% | |
2736 | +% if a table, do table caption | |
2737 | +\footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\footnotesize {#1.}\nobreakspace\scshape #2}\par\addvspace{0.5\baselineskip}\egroup% | |
2738 | +\@IEEEtablecaptionsepspace | |
2739 | +% if not a table, format it as a figure | |
2740 | +\else | |
2741 | +\@IEEEfigurecaptionsepspace | |
2742 | +\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace #2}% | |
2743 | +\ifdim \wd\@tempboxa >\hsize% | |
2744 | +% if caption is longer than a line, let it wrap around | |
2745 | +\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace}% | |
2746 | +\parbox[t]{\hsize}{\normalfont\footnotesize \noindent\unhbox\@tempboxa#2}% | |
2747 | +% if caption is shorter than a line, center | |
2748 | +\else% | |
2749 | +\hbox to\hsize{\normalfont\footnotesize\hfil\box\@tempboxa\hfil}% | |
2750 | +\fi\fi} | |
2751 | +% | |
2752 | +\else% nonconference compsoc | |
2753 | +\long\def\@makecaption#1#2{% | |
2754 | +% test if is a for a figure or table | |
2755 | +\ifx\@captype\@IEEEtablestring% | |
2756 | +% if a table, do table caption | |
2757 | +\footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\sffamily\footnotesize #1}\\{\normalfont\sffamily\footnotesize #2}\par\addvspace{0.5\baselineskip}\egroup% | |
2758 | +\@IEEEtablecaptionsepspace | |
2759 | +% if not a table, format it as a figure | |
2760 | +\else | |
2761 | +\@IEEEfigurecaptionsepspace | |
2762 | +\setbox\@tempboxa\hbox{\normalfont\sffamily\footnotesize {#1.}\nobreakspace #2}% | |
2763 | +\ifdim \wd\@tempboxa >\hsize% | |
2764 | +% if caption is longer than a line, let it wrap around | |
2765 | +\setbox\@tempboxa\hbox{\normalfont\sffamily\footnotesize {#1.}\nobreakspace}% | |
2766 | +\parbox[t]{\hsize}{\normalfont\sffamily\footnotesize \noindent\unhbox\@tempboxa#2}% | |
2767 | +% if caption is shorter than a line, left justify | |
2768 | +\else% | |
2769 | +\hbox to\hsize{\normalfont\sffamily\footnotesize\box\@tempboxa\hfil}% | |
2770 | +\fi\fi} | |
2771 | +\fi | |
2772 | +% | |
2773 | +\else% traditional noncompsoc \@makecaption | |
2774 | +\long\def\@makecaption#1#2{% | |
2775 | +% test if is a for a figure or table | |
2776 | +\ifx\@captype\@IEEEtablestring% | |
2777 | +% if a table, do table caption | |
2778 | +\footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\footnotesize #1}\\{\normalfont\footnotesize\scshape #2}\par\addvspace{0.5\baselineskip}\egroup% | |
2779 | +\@IEEEtablecaptionsepspace | |
2780 | +% if not a table, format it as a figure | |
2781 | +\else | |
2782 | +\@IEEEfigurecaptionsepspace | |
2783 | +% 3/2001 use footnotesize, not small; use two nonbreaking spaces, not one | |
2784 | +\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace\nobreakspace #2}% | |
2785 | +\ifdim \wd\@tempboxa >\hsize% | |
2786 | +% if caption is longer than a line, let it wrap around | |
2787 | +\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace\nobreakspace}% | |
2788 | +\parbox[t]{\hsize}{\normalfont\footnotesize\noindent\unhbox\@tempboxa#2}% | |
2789 | +% if caption is shorter than a line, center if conference, left justify otherwise | |
2790 | +\else% | |
2791 | +\ifCLASSOPTIONconference \hbox to\hsize{\normalfont\footnotesize\hfil\box\@tempboxa\hfil}% | |
2792 | +\else \hbox to\hsize{\normalfont\footnotesize\box\@tempboxa\hfil}% | |
2793 | +\fi\fi\fi} | |
2794 | +\fi | |
2795 | + | |
2796 | + | |
2797 | + | |
2798 | +% V1.7 disable captions class option, do so in a way that retains operation of \label | |
2799 | +% within \caption | |
2800 | +\ifCLASSOPTIONcaptionsoff | |
2801 | +\long\def\@makecaption#1#2{\vspace*{2em}\footnotesize\bgroup\par\addvspace{0.5\baselineskip}\centering{\footnotesize #1}\par\addvspace{0.5\baselineskip}\egroup% | |
2802 | +\let\@IEEEtemporiglabeldefsave\label | |
2803 | +\let\@IEEEtemplabelargsave\relax | |
2804 | +\def\label##1{\gdef\@IEEEtemplabelargsave{##1}}% | |
2805 | +\setbox\@tempboxa\hbox{#2}% | |
2806 | +\let\label\@IEEEtemporiglabeldefsave | |
2807 | +\ifx\@IEEEtemplabelargsave\relax\else\label{\@IEEEtemplabelargsave}\fi} | |
2808 | +\fi | |
2809 | + | |
2810 | + | |
2811 | +% V1.7 define end environments with \def not \let so as to work OK with | |
2812 | +% preview-latex | |
2813 | +\newcounter{figure} | |
2814 | +\def\thefigure{\@arabic\c@figure} | |
2815 | +\def\fps@figure{tbp} | |
2816 | +\def\ftype@figure{1} | |
2817 | +\def\ext@figure{lof} | |
2818 | +\def\fnum@figure{\figurename\nobreakspace\thefigure} | |
2819 | +% V1.8 within figures add \@IEEEfiguretopskipspace compensation to LaTeX2e's \@floatboxreset | |
2820 | +\def\figure{\def\@floatboxreset{\reset@font\normalsize\@setminipage\@IEEEfiguretopskipspace}\@float{figure}} | |
2821 | +\def\endfigure{\end@float} | |
2822 | +% V1.8 also add \@IEEEfiguretopskipspace compensation to \figure* | |
2823 | +\@namedef{figure*}{\def\@floatboxreset{\reset@font\normalsize\@setminipage\@IEEEfiguretopskipspace}\@dblfloat{figure}} | |
2824 | +\@namedef{endfigure*}{\end@dblfloat} | |
2825 | + | |
2826 | +\newcounter{table} | |
2827 | +\ifCLASSOPTIONcompsoc | |
2828 | +\def\thetable{\arabic{table}} | |
2829 | +\else | |
2830 | +\def\thetable{\@Roman\c@table} | |
2831 | +\fi | |
2832 | +\def\fps@table{tbp} | |
2833 | +\def\ftype@table{2} | |
2834 | +\def\ext@table{lot} | |
2835 | +\def\fnum@table{\tablename\nobreakspace\thetable} | |
2836 | +% V1.6 The IEEE uses 8pt text for tables | |
2837 | +% within tables alter LaTeX2e's \@floatboxreset to use \footnotesize | |
2838 | +\def\table{\def\@floatboxreset{\reset@font\footnotesize\@setminipage}\@float{table}} | |
2839 | +\def\endtable{\end@float} | |
2840 | +% v1.6b double column tables need to default to footnotesize as well. | |
2841 | +\@namedef{table*}{\def\@floatboxreset{\reset@font\footnotesize\@setminipage}\@dblfloat{table}} | |
2842 | +\@namedef{endtable*}{\end@dblfloat} | |
2843 | + | |
2844 | + | |
2845 | + | |
2846 | + | |
2847 | +%% -- Command Argument Scanning Support Functions -- | |
2848 | +%% V1.8a | |
2849 | + | |
2850 | +% usage: \@IEEEstripouterbraces*{} | |
2851 | +% \@IEEEstripouterbraces fully expands its argument (which it then stores | |
2852 | +% in \@IEEEstripouterbracesarg) via \edef, then removes any outer enclosing | |
2853 | +% braces, and finally stores the result in the macro | |
2854 | +% \@IEEEstrippedouterbraces. | |
2855 | +% | |
2856 | +% For example: | |
2857 | +% \@IEEEstripouterbraces{{{{ab}c}}} | |
2858 | +% results in: | |
2859 | +% | |
2860 | +% \@IEEEstripouterbracesarg ==> a macro containing {{{ab}c}} | |
2861 | +% \@IEEEstrippedouterbraces ==> a macro containing {ab}c | |
2862 | +% | |
2863 | +% the *-star form,\@IEEEstripouterbraces*, does not expand the argument | |
2864 | +% contents during processing | |
2865 | +\def\@IEEEstripouterbraces{\@ifstar{\let\@IEEEstripouterbracesdef=\def\@@IEEEstripouterbraces}{\let\@IEEEstripouterbracesdef=\edef\@@IEEEstripouterbraces}} | |
2866 | + | |
2867 | +\def\@@IEEEstripouterbraces#1{\@IEEEstripouterbracesdef\@IEEEstripouterbracesarg{#1}\relax | |
2868 | +% If the macro is unchanged after being acquired as a single delimited | |
2869 | +% argument, we know we have one sequence of tokens without any enclosing | |
2870 | +% braces. Loop until this is true. | |
2871 | +\loop | |
2872 | + \expandafter\@@@IEEEstripouterbraces\@IEEEstripouterbracesarg\@IEEEgeneralsequenceDELIMITER | |
2873 | +\ifx\@IEEEstrippedouterbraces\@IEEEstripouterbracesarg | |
2874 | +\else | |
2875 | + \let\@IEEEstripouterbracesarg\@IEEEstrippedouterbraces | |
2876 | +\repeat} | |
2877 | + | |
2878 | +\def\@@@IEEEstripouterbraces#1\@IEEEgeneralsequenceDELIMITER{\def\@IEEEstrippedouterbraces{#1}} | |
2879 | + | |
2880 | + | |
2881 | + | |
2882 | +% usage: \@IEEEextractgroup*{} | |
2883 | +% \@IEEEextractgroup fully expands its argument (which it then stores in | |
2884 | +% \@IEEEextractgrouparg) via \edef and then assigns the first "brace group" | |
2885 | +% of tokens to the macro \@IEEEextractedgroup. | |
2886 | +% The remaining groups, if any, are stored in the macro | |
2887 | +% \@IEEEextractedgroupremain. If the argument does not contain the requisite | |
2888 | +% groups, the respective macros will be defined to be empty. | |
2889 | +% There is an asymmetry in that \@IEEEextractedgroup is stripped of its first | |
2890 | +% outer grouping while \@IEEEextractedgroupremain retains even the outer | |
2891 | +% grouping (if present) that originally identified it as a group. | |
2892 | +% | |
2893 | +% For example: | |
2894 | +% \@IEEEextractgroup{{{ab}}{c{de}}} | |
2895 | +% results in: | |
2896 | +% | |
2897 | +% \@IEEEextractgrouparg ==> a macro containing {{ab}}{c{de}} | |
2898 | +% \@IEEEextractedgroup ==> a macro containing {ab} | |
2899 | +% \@IEEEextractedgroupremain ==> a macro containing {c{de}} | |
2900 | +% | |
2901 | +% The *-star form, \@IEEEextractgroup*, does not expand its argument | |
2902 | +% contents during processing. | |
2903 | +\def\@IEEEextractgroup{\@ifstar{\let\@IEEEextractgroupdef=\def\@@IEEEextractgroup}{\let\@IEEEextractgroupdef=\edef\@@IEEEextractgroup}} | |
2904 | + | |
2905 | +\def\@@IEEEextractgroup#1{\@IEEEextractgroupdef\@IEEEextractgrouparg{#1}\relax | |
2906 | +% trap the case of an empty extracted group as this would cause problems with | |
2907 | +% \@IEEEextractgroupremain's argument acquisition | |
2908 | +\ifx\@IEEEextractgrouparg\@empty | |
2909 | + \def\@IEEEextractedgroup{}\relax | |
2910 | + \def\@IEEEextractedgroupremain{}\relax | |
2911 | +\else | |
2912 | + % We have to use some dirty tricks here. We want to insert {} around | |
2913 | + % whatever remains after the first group so that TeX's argument scanner | |
2914 | + % will preserve any originally enclosing braces as well as provide an | |
2915 | + % empty argument to acquire even if there isn't a second group. | |
2916 | + % In this first of two dirty tricks, we put a } at the end of the structure | |
2917 | + % we are going to extract from. The \ifnum0=`{\fi keeps TeX happy to allow | |
2918 | + % what would otherwise be an unbalanced macro definition for | |
2919 | + % \@@IEEEextractgroup to be acceptable to it. | |
2920 | + \ifnum0=`{\fi\expandafter\@IEEEextractgroupremain\@IEEEextractgrouparg}\relax | |
2921 | +\fi} | |
2922 | + | |
2923 | +% In the second part of the dirty tricks, we insert a leading { right after | |
2924 | +% the first group is acquired, but before the remainder is. Again, the | |
2925 | +% \ifnum0=`}\fi keeps TeX happy during definition time, but will disappear | |
2926 | +% during run time. | |
2927 | +\def\@IEEEextractgroupremain#1{\def\@IEEEextractedgroup{#1}\expandafter\@@IEEEextractgroupremain\expandafter{\ifnum0=`}\fi} | |
2928 | + | |
2929 | +\def\@@IEEEextractgroupremain#1{\def\@IEEEextractedgroupremain{#1}} | |
2930 | + | |
2931 | + | |
2932 | + | |
2933 | +% \@IEEEextracttoken relocated at top because margin setting commands rely on it | |
2934 | + | |
2935 | + | |
2936 | + | |
2937 | +% usage: \@IEEEextracttokengroups*{} | |
2938 | +% \@IEEEextracttokengroups fully expands its argument (which it then stores | |
2939 | +% in \@IEEEextracttokengroupsarg) and then assigns the first "brace group" of | |
2940 | +% tokens (with the outermost braces removed) to the macro | |
2941 | +% \@IEEEextractedfirstgroup. | |
2942 | +% The meaning of the first nonbrace (but including the empty group) token | |
2943 | +% within this first group is assigned via \let to \@IEEEextractedfirsttoken | |
2944 | +% as well as stored in the macro \@IEEEextractedfirsttokenmacro. If a first | |
2945 | +% nonbrace token does not exist (or is an empty group), these will be \relax | |
2946 | +% and empty, respectively. Tokens that would otherwise be discarded during | |
2947 | +% the acquisition of the first token in the first group are stored in | |
2948 | +% \@IEEEextractedfirsttokensdiscarded, however their original relative brace | |
2949 | +% nesting depths are not guaranteed to be preserved. | |
2950 | +% The first group within this first group is stored in the macro | |
2951 | +% \@IEEEextractedfirstfirstgroup. | |
2952 | +% Likewise for the next group after the first: \@IEEEextractednextgroup, | |
2953 | +% \@IEEEextractednextfirstgroup, \@IEEEextractednextgroupfirsttoken, | |
2954 | +% \@IEEEextractednextgroupfirsttokenmacro, and | |
2955 | +% \@IEEEextractednextfirsttokensdiscarded. | |
2956 | +% All tokens/groups after the first group, including any enclosing braces, | |
2957 | +% are stored in the macro \@IEEEextractedafterfirstgroupremain which will | |
2958 | +% be empty if none exist. | |
2959 | +% | |
2960 | +% For example: | |
2961 | +% \@IEEEextracttokengroups{{{ab}{cd}}{{ef}g}} | |
2962 | +% will result in: | |
2963 | +% | |
2964 | +% \@IEEEextracttokengroupsarg ==> a macro containing {{ab}{cd}}{{ef}g} | |
2965 | +% \@IEEEextractedfirstgroup ==> a macro containing {ab}{cd} | |
2966 | +% \@IEEEextractedafterfirstgroupremain ==> a macro containing {{ef}g} | |
2967 | +% \@IEEEextractedfirsttoken ==> the letter a | |
2968 | +% \@IEEEextractedfirsttokenmacro ==> a macro containing a | |
2969 | +% \@IEEEextractedfirsttokensdiscarded ==> a macro containing bcd | |
2970 | +% \@IEEEextractedfirstfirstgroup ==> a macro containing ab | |
2971 | +% \@IEEEextractednextgroup ==> a macro containing {ef}g | |
2972 | +% \@IEEEextractednextfirsttoken ==> the letter e | |
2973 | +% \@IEEEextractednextfirsttokenmacro ==> a macro containing e | |
2974 | +% \@IEEEextractednextfirsttokensdiscarded ==> a macro containing fg | |
2975 | +% \@IEEEextractednextfirstgroup ==> a macro containing ef | |
2976 | +% | |
2977 | +% If given an empty argument, \@IEEEextractedfirsttoken and | |
2978 | +% \@IEEEextractednextfirsttoken will be set to \relax | |
2979 | +% and all the macros will be empty. | |
2980 | +% the *-star form, \@IEEEextracttokengroups*, does not expand its argument | |
2981 | +% contents during processing. | |
2982 | +% | |
2983 | +% Depends on: \@IEEEextractgroup, \@IEEEextracttoken | |
2984 | +\def\@IEEEextracttokengroups{\@ifstar{\let\@IEEEextracttokengroupsdef=\def\@@IEEEextracttokengroups}{\let\@IEEEextracttokengroupsdef=\edef\@@IEEEextracttokengroups}} | |
2985 | +\def\@@IEEEextracttokengroups#1{\@IEEEextracttokengroupsdef\@IEEEextracttokengroupsarg{#1}\relax | |
2986 | +% begin extraction, these functions are safe with empty arguments | |
2987 | +% first group | |
2988 | +\expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextracttokengroupsarg}\relax | |
2989 | +\let\@IEEEextractedfirstgroup\@IEEEextractedgroup | |
2990 | +\let\@IEEEextractedafterfirstgroupremain\@IEEEextractedgroupremain | |
2991 | +\expandafter\@IEEEextracttoken\expandafter*\expandafter{\@IEEEextractedfirstgroup}\relax | |
2992 | +\let\@IEEEextractedfirsttoken\@IEEEextractedtoken | |
2993 | +\let\@IEEEextractedfirsttokenmacro\@IEEEextractedtokenmacro | |
2994 | +\let\@IEEEextractedfirsttokensdiscarded\@IEEEextractedtokensdiscarded | |
2995 | +% first first group | |
2996 | +\expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractedfirstgroup}\relax | |
2997 | +\let\@IEEEextractedfirstfirstgroup\@IEEEextractedgroup | |
2998 | +% next group | |
2999 | +\expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractedafterfirstgroupremain}\relax | |
3000 | +\let\@IEEEextractednextgroup\@IEEEextractedgroup | |
3001 | +\expandafter\@IEEEextracttoken\expandafter*\expandafter{\@IEEEextractednextgroup}\relax | |
3002 | +\let\@IEEEextractednextfirsttoken\@IEEEextractedtoken | |
3003 | +\let\@IEEEextractednextfirsttokenmacro\@IEEEextractedtokenmacro | |
3004 | +\let\@IEEEextractednextfirsttokensdiscarded\@IEEEextractedtokensdiscarded | |
3005 | +% next first group | |
3006 | +\expandafter\@IEEEextractgroup\expandafter*\expandafter{\@IEEEextractednextgroup}\relax | |
3007 | +\let\@IEEEextractednextfirstgroup\@IEEEextractedgroup} | |
3008 | + | |
3009 | + | |
3010 | +%% -- End of Command Argument Scanning Support Functions -- | |
3011 | + | |
3012 | + | |
3013 | + | |
3014 | + | |
3015 | +%% | |
3016 | +%% START OF IEEEeqnarray DEFINITIONS | |
3017 | +%% | |
3018 | +%% Inspired by the concepts, examples, and previous works of LaTeX | |
3019 | +%% coders and developers such as Donald Arseneau, Fred Bartlett, | |
3020 | +%% David Carlisle, Tony Liu, Frank Mittelbach, Piet van Oostrum, | |
3021 | +%% Roland Winkler and Mark Wooding. | |
3022 | +%% I don't make the claim that my work here is even near their calibre. ;) | |
3023 | + | |
3024 | + | |
3025 | +\newif\if@IEEEeqnarrayboxnojot% flag to indicate if the environment was called as the star form | |
3026 | +\@IEEEeqnarrayboxnojotfalse | |
3027 | + | |
3028 | +\newif\if@advanceIEEEeqncolcnt% tracks if the environment should advance the col counter | |
3029 | +% allows a way to make an \IEEEeqnarraybox that can be used within an \IEEEeqnarray | |
3030 | +% used by IEEEeqnarraymulticol so that it can work properly in both | |
3031 | +\@advanceIEEEeqncolcnttrue | |
3032 | + | |
3033 | +\newcount\@IEEEeqnnumcols % tracks how many IEEEeqnarray cols are defined | |
3034 | +\newcount\@IEEEeqncolcnt % tracks how many IEEEeqnarray cols the user actually used | |
3035 | + | |
3036 | + | |
3037 | +% The default math style used by the columns | |
3038 | +\def\IEEEeqnarraymathstyle{\displaystyle} | |
3039 | +% The default text style used by the columns | |
3040 | +% default to using the current font | |
3041 | +\def\IEEEeqnarraytextstyle{\relax} | |
3042 | + | |
3043 | +% like the iedlistdecl but for \IEEEeqnarray | |
3044 | +\def\IEEEeqnarraydecl{\relax} | |
3045 | +\def\IEEEeqnarrayboxdecl{\relax} | |
3046 | + | |
3047 | + | |
3048 | + | |
3049 | +% V1.8 flags to indicate that equation numbering is to persist | |
3050 | +\newif\if@IEEEeqnumpersist% | |
3051 | +\@IEEEeqnumpersistfalse | |
3052 | +\newif\if@IEEEsubeqnumpersist% | |
3053 | +\@IEEEsubeqnumpersistfalse | |
3054 | +% | |
3055 | +% V1.8 flags to indicate if (sub)equation number of last line was preadvanced | |
3056 | +\newif\if@IEEEeqnumpreadv% | |
3057 | +\@IEEEeqnumpreadvfalse | |
3058 | +\newif\if@IEEEsubeqnumpreadv% | |
3059 | +\@IEEEsubeqnumpreadvfalse | |
3060 | + | |
3061 | +\newcount\@IEEEsubeqnnumrollback% saves previous value of IEEEsubequation number in case we need to restore it | |
3062 | + | |
3063 | +% \yesnumber is the opposite of \nonumber | |
3064 | +% a novel concept with the same def as the equationarray package | |
3065 | +% However, we give IEEE versions too since some LaTeX packages such as | |
3066 | +% the MDWtools mathenv.sty redefine \nonumber to something else. | |
3067 | +% This command is intended for use in non-IEEEeqnarray math environments | |
3068 | +\providecommand{\yesnumber}{\global\@eqnswtrue} | |
3069 | + | |
3070 | + | |
3071 | +% IEEEyes/nonumber | |
3072 | +% V1.8 add persistant * forms | |
3073 | +% These commands can alter the type of equation an IEEEeqnarray line is. | |
3074 | +\def\IEEEyesnumber{\@ifstar{\global\@IEEEeqnumpersisttrue\global\@IEEEsubeqnumpersistfalse\@IEEEyesnumber}{\@IEEEyesnumber}} | |
3075 | + | |
3076 | +\def\@IEEEyesnumber{\global\@eqnswtrue | |
3077 | +\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray | |
3078 | +\ifnum\c@IEEEsubequation>0\relax | |
3079 | + \stepcounter{equation}\setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax | |
3080 | + \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label | |
3081 | +\fi | |
3082 | +% even if we reached this eqn num via a preadv, it is legit now | |
3083 | +\global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse | |
3084 | +\fi} | |
3085 | + | |
3086 | +\def\IEEEnonumber{\@ifstar{\global\@IEEEeqnumpersistfalse\global\@IEEEsubeqnumpersistfalse\global\@eqnswfalse}{\global\@eqnswfalse}} | |
3087 | + | |
3088 | + | |
3089 | +\def\IEEEyessubnumber{\@ifstar{\global\@IEEEsubeqnumpersisttrue\@IEEEyessubnumber}{\@IEEEyessubnumber}} | |
3090 | +% | |
3091 | +\def\@IEEEyessubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray | |
3092 | + \ifnum\c@IEEEsubequation>0\relax% if it already is a subequation, we are good to go as-is | |
3093 | + \else% if we are a regular equation we have to watch out for two cases | |
3094 | + \if@IEEEeqnumpreadv% if this equation is the result of a preadvance, backout and bump the sub eqnnum | |
3095 | + \global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\addtocounter{IEEEsubequation}{1}\relax | |
3096 | + \else% non-preadvanced equations just need initialization of their sub eqnnum | |
3097 | + \setcounter{IEEEsubequation}{1}\relax | |
3098 | + \fi | |
3099 | + \fi% fi already is subequation | |
3100 | + \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax | |
3101 | + \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label | |
3102 | + \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore | |
3103 | + \global\@eqnswtrue | |
3104 | +\fi} | |
3105 | + | |
3106 | + | |
3107 | +\def\IEEEnosubnumber{\@ifstar{\global\@IEEEsubeqnumpersistfalse\@IEEEnosubnumber}{\@IEEEnosubnumber}} | |
3108 | +% | |
3109 | +\def\@IEEEnosubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray | |
3110 | + \if@eqnsw % we do nothing unless we know we will display because we play with the counters here | |
3111 | + % if it currently is a subequation, bump up to the next equation number and turn off the subequation | |
3112 | + \ifnum\c@IEEEsubequation>0\relax\addtocounter{equation}{1}\setcounter{IEEEsubequation}{0}\relax | |
3113 | + \fi | |
3114 | + \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore | |
3115 | + \gdef\@currentlabel{\p@equation\theequation}\relax | |
3116 | + \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label | |
3117 | + \fi | |
3118 | +\fi} | |
3119 | + | |
3120 | + | |
3121 | + | |
3122 | +% allows users to "push away" equations that get too close to the equation numbers | |
3123 | +\def\IEEEeqnarraynumspace{\hphantom{\ifnum\c@IEEEsubequation>0\relax\theIEEEsubequationdis\else\theequationdis\fi}} | |
3124 | + | |
3125 | +% provides a way to span multiple columns within IEEEeqnarray environments | |
3126 | +% will consider \if@advanceIEEEeqncolcnt before globally advancing the | |
3127 | +% column counter - so as to work within \IEEEeqnarraybox | |
3128 | +% usage: \IEEEeqnarraymulticol{number cols. to span}{col type}{cell text} | |
3129 | +\long\def\IEEEeqnarraymulticol#1#2#3{\multispan{#1}\relax | |
3130 | +% check if column is defined for the precolumn definition | |
3131 | +% We have to be careful here because TeX scans for & even within an \iffalse | |
3132 | +% where it does not expand macros. So, if we used only one \ifx and a #3 | |
3133 | +% appeared in the false branch and the user inserted another alignment | |
3134 | +% structure that uses & in the \IEEEeqnarraymulticol{}, TeX will not see that | |
3135 | +% there is an inner alignment in the false branch yet still will see any & | |
3136 | +% there and will think that they apply to the outer alignment resulting in an | |
3137 | +% incomplete \ifx error. | |
3138 | +% So, here we use separate checks for the pre and post parts in order to keep | |
3139 | +% the #3 outside of all conditionals. | |
3140 | +\relax\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax | |
3141 | +\csname @IEEEeqnarraycolPRE#2\endcsname | |
3142 | +\else% if not, error and use default type | |
3143 | +\@IEEEclspkgerror{Invalid column type "#2" in \string\IEEEeqnarraymulticol.\MessageBreak | |
3144 | +Using a default centering column instead}% | |
3145 | +{You must define IEEEeqnarray column types before use.}% | |
3146 | +\csname @IEEEeqnarraycolPRE@IEEEdefault\endcsname | |
3147 | +\fi | |
3148 | +% The ten \relax are to help prevent misleading error messages in case a user | |
3149 | +% accidently inserted a macro that tries to acquire additional arguments. | |
3150 | +#3\relax\relax\relax\relax\relax\relax\relax\relax\relax\relax | |
3151 | +% check if column is defined for the postcolumn definition | |
3152 | +\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax | |
3153 | +\csname @IEEEeqnarraycolPOST#2\endcsname | |
3154 | +\else% if not, use the default type | |
3155 | +\csname @IEEEeqnarraycolPOST@IEEEdefault\endcsname | |
3156 | +\fi | |
3157 | +% advance column counter only if the IEEEeqnarray environment wants it | |
3158 | +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by #1\relax\fi} | |
3159 | + | |
3160 | +% like \omit, but maintains track of the column counter for \IEEEeqnarray | |
3161 | +\def\IEEEeqnarrayomit{\omit\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by 1\relax\fi} | |
3162 | + | |
3163 | + | |
3164 | +% provides a way to define a letter referenced column type | |
3165 | +% usage: \IEEEeqnarraydefcol{col. type letter/name}{pre insertion text}{post insertion text} | |
3166 | +\def\IEEEeqnarraydefcol#1#2#3{\expandafter\def\csname @IEEEeqnarraycolPRE#1\endcsname{#2}% | |
3167 | +\expandafter\def\csname @IEEEeqnarraycolPOST#1\endcsname{#3}% | |
3168 | +\expandafter\def\csname @IEEEeqnarraycolDEF#1\endcsname{1}} | |
3169 | + | |
3170 | + | |
3171 | +% provides a way to define a numerically referenced inter-column glue types | |
3172 | +% usage: \IEEEeqnarraydefcolsep{col. glue number}{glue definition} | |
3173 | +\def\IEEEeqnarraydefcolsep#1#2{\expandafter\def\csname @IEEEeqnarraycolSEP\romannumeral #1\endcsname{#2}% | |
3174 | +\expandafter\def\csname @IEEEeqnarraycolSEPDEF\romannumeral #1\endcsname{1}} | |
3175 | + | |
3176 | + | |
3177 | +\def\@IEEEeqnarraycolisdefined{1}% just a macro for 1, used for checking undefined column types | |
3178 | + | |
3179 | + | |
3180 | +% expands and appends the given argument to the \@IEEEtrantmptoksA token list | |
3181 | +% used to build up the \halign preamble | |
3182 | +\def\@IEEEappendtoksA#1{\edef\@@IEEEappendtoksA{\@IEEEtrantmptoksA={\the\@IEEEtrantmptoksA #1}}% | |
3183 | +\@@IEEEappendtoksA} | |
3184 | + | |
3185 | +% also appends to \@IEEEtrantmptoksA, but does not expand the argument | |
3186 | +% uses \toks8 as a scratchpad register | |
3187 | +\def\@IEEEappendNOEXPANDtoksA#1{\toks8={#1}% | |
3188 | +\edef\@@IEEEappendNOEXPANDtoksA{\@IEEEtrantmptoksA={\the\@IEEEtrantmptoksA\the\toks8}}% | |
3189 | +\@@IEEEappendNOEXPANDtoksA} | |
3190 | + | |
3191 | +% define some common column types for the user | |
3192 | +% math | |
3193 | +\IEEEeqnarraydefcol{l}{$\IEEEeqnarraymathstyle}{$\hfil} | |
3194 | +\IEEEeqnarraydefcol{c}{\hfil$\IEEEeqnarraymathstyle}{$\hfil} | |
3195 | +\IEEEeqnarraydefcol{r}{\hfil$\IEEEeqnarraymathstyle}{$} | |
3196 | +\IEEEeqnarraydefcol{L}{$\IEEEeqnarraymathstyle{}}{{}$\hfil} | |
3197 | +\IEEEeqnarraydefcol{C}{\hfil$\IEEEeqnarraymathstyle{}}{{}$\hfil} | |
3198 | +\IEEEeqnarraydefcol{R}{\hfil$\IEEEeqnarraymathstyle{}}{{}$} | |
3199 | +% text | |
3200 | +\IEEEeqnarraydefcol{s}{\IEEEeqnarraytextstyle}{\hfil} | |
3201 | +\IEEEeqnarraydefcol{t}{\hfil\IEEEeqnarraytextstyle}{\hfil} | |
3202 | +\IEEEeqnarraydefcol{u}{\hfil\IEEEeqnarraytextstyle}{} | |
3203 | + | |
3204 | +% vertical rules | |
3205 | +\IEEEeqnarraydefcol{v}{}{\vrule width\arrayrulewidth} | |
3206 | +\IEEEeqnarraydefcol{vv}{\vrule width\arrayrulewidth\hfil}{\hfil\vrule width\arrayrulewidth} | |
3207 | +\IEEEeqnarraydefcol{V}{}{\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth} | |
3208 | +\IEEEeqnarraydefcol{VV}{\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth\hfil}% | |
3209 | +{\hfil\vrule width\arrayrulewidth\hskip\doublerulesep\vrule width\arrayrulewidth} | |
3210 | + | |
3211 | +% horizontal rules | |
3212 | +\IEEEeqnarraydefcol{h}{}{\leaders\hrule height\arrayrulewidth\hfil} | |
3213 | +\IEEEeqnarraydefcol{H}{}{\leaders\vbox{\hrule width\arrayrulewidth\vskip\doublerulesep\hrule width\arrayrulewidth}\hfil} | |
3214 | + | |
3215 | +% plain | |
3216 | +\IEEEeqnarraydefcol{x}{}{} | |
3217 | +\IEEEeqnarraydefcol{X}{$}{$} | |
3218 | + | |
3219 | +% the default column type to use in the event a column type is not defined | |
3220 | +\IEEEeqnarraydefcol{@IEEEdefault}{\hfil$\IEEEeqnarraymathstyle}{$\hfil} | |
3221 | + | |
3222 | + | |
3223 | +% a zero tabskip (used for "-" col types) | |
3224 | +\def\@IEEEeqnarraycolSEPzero{0pt plus 0pt minus 0pt} | |
3225 | +% a centering tabskip (used for "+" col types) | |
3226 | +\def\@IEEEeqnarraycolSEPcenter{1000pt plus 0pt minus 1000pt} | |
3227 | + | |
3228 | +% top level default tabskip glues for the start, end, and inter-column | |
3229 | +% may be reset within environments not always at the top level, e.g., \IEEEeqnarraybox | |
3230 | +\edef\@IEEEeqnarraycolSEPdefaultstart{\@IEEEeqnarraycolSEPcenter}% default start glue | |
3231 | +\edef\@IEEEeqnarraycolSEPdefaultend{\@IEEEeqnarraycolSEPcenter}% default end glue | |
3232 | +\edef\@IEEEeqnarraycolSEPdefaultmid{\@IEEEeqnarraycolSEPzero}% default inter-column glue | |
3233 | + | |
3234 | + | |
3235 | + | |
3236 | +% creates a vertical rule that extends from the bottom to the top a a cell | |
3237 | +% Provided in case other packages redefine \vline some other way. | |
3238 | +% usage: \IEEEeqnarrayvrule[rule thickness] | |
3239 | +% If no argument is provided, \arrayrulewidth will be used for the rule thickness. | |
3240 | +\newcommand\IEEEeqnarrayvrule[1][\arrayrulewidth]{\vrule\@width#1\relax} | |
3241 | + | |
3242 | +% creates a blank separator row | |
3243 | +% usage: \IEEEeqnarrayseprow[separation length][font size commands] | |
3244 | +% default is \IEEEeqnarrayseprow[0.25\normalbaselineskip][\relax] | |
3245 | +% blank arguments inherit the default values | |
3246 | +% uses \skip5 as a scratch register - calls \@IEEEeqnarraystrutsize which uses more scratch registers | |
3247 | +\def\IEEEeqnarrayseprow{\relax\@ifnextchar[{\@IEEEeqnarrayseprow}{\@IEEEeqnarrayseprow[0.25\normalbaselineskip]}} | |
3248 | +\def\@IEEEeqnarrayseprow[#1]{\relax\@ifnextchar[{\@@IEEEeqnarrayseprow[#1]}{\@@IEEEeqnarrayseprow[#1][\relax]}} | |
3249 | +\def\@@IEEEeqnarrayseprow[#1][#2]{\def\@IEEEeqnarrayseprowARGONE{#1}% | |
3250 | +\ifx\@IEEEeqnarrayseprowARGONE\@empty% | |
3251 | +% get the skip value, based on the font commands | |
3252 | +% use skip5 because \IEEEeqnarraystrutsize uses \skip0, \skip2, \skip3 | |
3253 | +% assign within a bogus box to confine the font changes | |
3254 | +{\setbox0=\hbox{#2\relax\global\skip5=0.25\normalbaselineskip}}% | |
3255 | +\else% | |
3256 | +{\setbox0=\hbox{#2\relax\global\skip5=#1}}% | |
3257 | +\fi% | |
3258 | +\@IEEEeqnarrayhoptolastcolumn\IEEEeqnarraystrutsize{\skip5}{0pt}[\relax]\relax} | |
3259 | + | |
3260 | +% creates a blank separator row, but omits all the column templates | |
3261 | +% usage: \IEEEeqnarrayseprowcut[separation length][font size commands] | |
3262 | +% default is \IEEEeqnarrayseprowcut[0.25\normalbaselineskip][\relax] | |
3263 | +% blank arguments inherit the default values | |
3264 | +% uses \skip5 as a scratch register - calls \@IEEEeqnarraystrutsize which uses more scratch registers | |
3265 | +\def\IEEEeqnarrayseprowcut{\multispan{\@IEEEeqnnumcols}\relax% span all the cols | |
3266 | +% advance column counter only if the IEEEeqnarray environment wants it | |
3267 | +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3268 | +\@ifnextchar[{\@IEEEeqnarrayseprowcut}{\@IEEEeqnarrayseprowcut[0.25\normalbaselineskip]}} | |
3269 | +\def\@IEEEeqnarrayseprowcut[#1]{\relax\@ifnextchar[{\@@IEEEeqnarrayseprowcut[#1]}{\@@IEEEeqnarrayseprowcut[#1][\relax]}} | |
3270 | +\def\@@IEEEeqnarrayseprowcut[#1][#2]{\def\@IEEEeqnarrayseprowARGONE{#1}% | |
3271 | +\ifx\@IEEEeqnarrayseprowARGONE\@empty% | |
3272 | +% get the skip value, based on the font commands | |
3273 | +% use skip5 because \IEEEeqnarraystrutsize uses \skip0, \skip2, \skip3 | |
3274 | +% assign within a bogus box to confine the font changes | |
3275 | +{\setbox0=\hbox{#2\relax\global\skip5=0.25\normalbaselineskip}}% | |
3276 | +\else% | |
3277 | +{\setbox0=\hbox{#2\relax\global\skip5=#1}}% | |
3278 | +\fi% | |
3279 | +\IEEEeqnarraystrutsize{\skip5}{0pt}[\relax]\relax} | |
3280 | + | |
3281 | + | |
3282 | + | |
3283 | +% draws a single rule across all the columns optional | |
3284 | +% argument determines the rule width, \arrayrulewidth is the default | |
3285 | +% updates column counter as needed and turns off struts | |
3286 | +% usage: \IEEEeqnarrayrulerow[rule line thickness] | |
3287 | +\def\IEEEeqnarrayrulerow{\multispan{\@IEEEeqnnumcols}\relax% span all the cols | |
3288 | +% advance column counter only if the IEEEeqnarray environment wants it | |
3289 | +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3290 | +\@ifnextchar[{\@IEEEeqnarrayrulerow}{\@IEEEeqnarrayrulerow[\arrayrulewidth]}} | |
3291 | +\def\@IEEEeqnarrayrulerow[#1]{\leaders\hrule height#1\hfil\relax% put in our rule | |
3292 | +% turn off any struts | |
3293 | +\IEEEeqnarraystrutsize{0pt}{0pt}[\relax]\relax} | |
3294 | + | |
3295 | + | |
3296 | +% draws a double rule by using a single rule row, a separator row, and then | |
3297 | +% another single rule row | |
3298 | +% first optional argument determines the rule thicknesses, \arrayrulewidth is the default | |
3299 | +% second optional argument determines the rule spacing, \doublerulesep is the default | |
3300 | +% usage: \IEEEeqnarraydblrulerow[rule line thickness][rule spacing] | |
3301 | +\def\IEEEeqnarraydblrulerow{\multispan{\@IEEEeqnnumcols}\relax% span all the cols | |
3302 | +% advance column counter only if the IEEEeqnarray environment wants it | |
3303 | +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3304 | +\@ifnextchar[{\@IEEEeqnarraydblrulerow}{\@IEEEeqnarraydblrulerow[\arrayrulewidth]}} | |
3305 | +\def\@IEEEeqnarraydblrulerow[#1]{\relax\@ifnextchar[{\@@IEEEeqnarraydblrulerow[#1]}% | |
3306 | +{\@@IEEEeqnarraydblrulerow[#1][\doublerulesep]}} | |
3307 | +\def\@@IEEEeqnarraydblrulerow[#1][#2]{\def\@IEEEeqnarraydblrulerowARG{#1}% | |
3308 | +% we allow the user to say \IEEEeqnarraydblrulerow[][] | |
3309 | +\ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3310 | +\@IEEEeqnarrayrulerow[\arrayrulewidth]% | |
3311 | +\else% | |
3312 | +\@IEEEeqnarrayrulerow[#1]\relax% | |
3313 | +\fi% | |
3314 | +\def\@IEEEeqnarraydblrulerowARG{#2}% | |
3315 | +\ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3316 | +\\\IEEEeqnarrayseprow[\doublerulesep][\relax]% | |
3317 | +\else% | |
3318 | +\\\IEEEeqnarrayseprow[#2][\relax]% | |
3319 | +\fi% | |
3320 | +\\\multispan{\@IEEEeqnnumcols}% | |
3321 | +% advance column counter only if the IEEEeqnarray environment wants it | |
3322 | +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3323 | +\def\@IEEEeqnarraydblrulerowARG{#1}% | |
3324 | +\ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3325 | +\@IEEEeqnarrayrulerow[\arrayrulewidth]% | |
3326 | +\else% | |
3327 | +\@IEEEeqnarrayrulerow[#1]% | |
3328 | +\fi% | |
3329 | +} | |
3330 | + | |
3331 | +% draws a double rule by using a single rule row, a separator (cutting) row, and then | |
3332 | +% another single rule row | |
3333 | +% first optional argument determines the rule thicknesses, \arrayrulewidth is the default | |
3334 | +% second optional argument determines the rule spacing, \doublerulesep is the default | |
3335 | +% usage: \IEEEeqnarraydblrulerow[rule line thickness][rule spacing] | |
3336 | +\def\IEEEeqnarraydblrulerowcut{\multispan{\@IEEEeqnnumcols}\relax% span all the cols | |
3337 | +% advance column counter only if the IEEEeqnarray environment wants it | |
3338 | +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3339 | +\@ifnextchar[{\@IEEEeqnarraydblrulerowcut}{\@IEEEeqnarraydblrulerowcut[\arrayrulewidth]}} | |
3340 | +\def\@IEEEeqnarraydblrulerowcut[#1]{\relax\@ifnextchar[{\@@IEEEeqnarraydblrulerowcut[#1]}% | |
3341 | +{\@@IEEEeqnarraydblrulerowcut[#1][\doublerulesep]}} | |
3342 | +\def\@@IEEEeqnarraydblrulerowcut[#1][#2]{\def\@IEEEeqnarraydblrulerowARG{#1}% | |
3343 | +% we allow the user to say \IEEEeqnarraydblrulerow[][] | |
3344 | +\ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3345 | +\@IEEEeqnarrayrulerow[\arrayrulewidth]% | |
3346 | +\else% | |
3347 | +\@IEEEeqnarrayrulerow[#1]% | |
3348 | +\fi% | |
3349 | +\def\@IEEEeqnarraydblrulerowARG{#2}% | |
3350 | +\ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3351 | +\\\IEEEeqnarrayseprowcut[\doublerulesep][\relax]% | |
3352 | +\else% | |
3353 | +\\\IEEEeqnarrayseprowcut[#2][\relax]% | |
3354 | +\fi% | |
3355 | +\\\multispan{\@IEEEeqnnumcols}% | |
3356 | +% advance column counter only if the IEEEeqnarray environment wants it | |
3357 | +\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by \@IEEEeqnnumcols\relax\fi% | |
3358 | +\def\@IEEEeqnarraydblrulerowARG{#1}% | |
3359 | +\ifx\@IEEEeqnarraydblrulerowARG\@empty% | |
3360 | +\@IEEEeqnarrayrulerow[\arrayrulewidth]% | |
3361 | +\else% | |
3362 | +\@IEEEeqnarrayrulerow[#1]% | |
3363 | +\fi% | |
3364 | +} | |
3365 | + | |
3366 | + | |
3367 | + | |
3368 | +% inserts a full row's worth of &'s | |
3369 | +% relies on \@IEEEeqnnumcols to provide the correct number of columns | |
3370 | +% uses \@IEEEtrantmptoksA, \count0 as scratch registers | |
3371 | +\def\@IEEEeqnarrayhoptolastcolumn{\@IEEEtrantmptoksA={}\count0=1\relax% | |
3372 | +\loop% add cols if the user did not use them all | |
3373 | +\ifnum\count0<\@IEEEeqnnumcols\relax% | |
3374 | +\@IEEEappendtoksA{&}% | |
3375 | +\advance\count0 by 1\relax% update the col count | |
3376 | +\repeat% | |
3377 | +\the\@IEEEtrantmptoksA%execute the &'s | |
3378 | +} | |
3379 | + | |
3380 | + | |
3381 | + | |
3382 | +\newif\if@IEEEeqnarrayISinner % flag to indicate if we are within the lines | |
3383 | +\@IEEEeqnarrayISinnerfalse % of an IEEEeqnarray - after the IEEEeqnarraydecl | |
3384 | + | |
3385 | +\edef\@IEEEeqnarrayTHEstrutheight{0pt} % height and depth of IEEEeqnarray struts | |
3386 | +\edef\@IEEEeqnarrayTHEstrutdepth{0pt} | |
3387 | + | |
3388 | +\edef\@IEEEeqnarrayTHEmasterstrutheight{0pt} % default height and depth of | |
3389 | +\edef\@IEEEeqnarrayTHEmasterstrutdepth{0pt} % struts within an IEEEeqnarray | |
3390 | + | |
3391 | +\edef\@IEEEeqnarrayTHEmasterstrutHSAVE{0pt} % saved master strut height | |
3392 | +\edef\@IEEEeqnarrayTHEmasterstrutDSAVE{0pt} % and depth | |
3393 | + | |
3394 | +\newif\if@IEEEeqnarrayusemasterstrut % flag to indicate that the master strut value | |
3395 | +\@IEEEeqnarrayusemasterstruttrue % is to be used | |
3396 | + | |
3397 | + | |
3398 | + | |
3399 | +% saves the strut height and depth of the master strut | |
3400 | +\def\@IEEEeqnarraymasterstrutsave{\relax% | |
3401 | +\expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% | |
3402 | +\expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% | |
3403 | +% remove stretchability | |
3404 | +\dimen0\skip0\relax% | |
3405 | +\dimen2\skip2\relax% | |
3406 | +% save values | |
3407 | +\edef\@IEEEeqnarrayTHEmasterstrutHSAVE{\the\dimen0}% | |
3408 | +\edef\@IEEEeqnarrayTHEmasterstrutDSAVE{\the\dimen2}} | |
3409 | + | |
3410 | +% restores the strut height and depth of the master strut | |
3411 | +\def\@IEEEeqnarraymasterstrutrestore{\relax% | |
3412 | +\expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutHSAVE\relax% | |
3413 | +\expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutDSAVE\relax% | |
3414 | +% remove stretchability | |
3415 | +\dimen0\skip0\relax% | |
3416 | +\dimen2\skip2\relax% | |
3417 | +% restore values | |
3418 | +\edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}% | |
3419 | +\edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}} | |
3420 | + | |
3421 | + | |
3422 | +% globally restores the strut height and depth to the | |
3423 | +% master values and sets the master strut flag to true | |
3424 | +\def\@IEEEeqnarraystrutreset{\relax% | |
3425 | +\expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% | |
3426 | +\expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% | |
3427 | +% remove stretchability | |
3428 | +\dimen0\skip0\relax% | |
3429 | +\dimen2\skip2\relax% | |
3430 | +% restore values | |
3431 | +\xdef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% | |
3432 | +\xdef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% | |
3433 | +\global\@IEEEeqnarrayusemasterstruttrue} | |
3434 | + | |
3435 | + | |
3436 | +% if the master strut is not to be used, make the current | |
3437 | +% values of \@IEEEeqnarrayTHEstrutheight, \@IEEEeqnarrayTHEstrutdepth | |
3438 | +% and the use master strut flag, global | |
3439 | +% this allows user strut commands issued in the last column to be carried | |
3440 | +% into the isolation/strut column | |
3441 | +\def\@IEEEeqnarrayglobalizestrutstatus{\relax% | |
3442 | +\if@IEEEeqnarrayusemasterstrut\else% | |
3443 | +\xdef\@IEEEeqnarrayTHEstrutheight{\@IEEEeqnarrayTHEstrutheight}% | |
3444 | +\xdef\@IEEEeqnarrayTHEstrutdepth{\@IEEEeqnarrayTHEstrutdepth}% | |
3445 | +\global\@IEEEeqnarrayusemasterstrutfalse% | |
3446 | +\fi} | |
3447 | + | |
3448 | + | |
3449 | + | |
3450 | +% usage: \IEEEeqnarraystrutsize{height}{depth}[font size commands] | |
3451 | +% If called outside the lines of an IEEEeqnarray, sets the height | |
3452 | +% and depth of both the master and local struts. If called inside | |
3453 | +% an IEEEeqnarray line, sets the height and depth of the local strut | |
3454 | +% only and sets the flag to indicate the use of the local strut | |
3455 | +% values. If the height or depth is left blank, 0.7\normalbaselineskip | |
3456 | +% and 0.3\normalbaselineskip will be used, respectively. | |
3457 | +% The optional argument can be used to evaluate the lengths under | |
3458 | +% a different font size and styles. If none is specified, the current | |
3459 | +% font is used. | |
3460 | +% uses scratch registers \skip0, \skip2, \skip3, \dimen0, \dimen2 | |
3461 | +\def\IEEEeqnarraystrutsize#1#2{\relax\@ifnextchar[{\@IEEEeqnarraystrutsize{#1}{#2}}{\@IEEEeqnarraystrutsize{#1}{#2}[\relax]}} | |
3462 | +\def\@IEEEeqnarraystrutsize#1#2[#3]{\def\@IEEEeqnarraystrutsizeARG{#1}% | |
3463 | +\ifx\@IEEEeqnarraystrutsizeARG\@empty% | |
3464 | +{\setbox0=\hbox{#3\relax\global\skip3=0.7\normalbaselineskip}}% | |
3465 | +\skip0=\skip3\relax% | |
3466 | +\else% arg one present | |
3467 | +{\setbox0=\hbox{#3\relax\global\skip3=#1\relax}}% | |
3468 | +\skip0=\skip3\relax% | |
3469 | +\fi% if null arg | |
3470 | +\def\@IEEEeqnarraystrutsizeARG{#2}% | |
3471 | +\ifx\@IEEEeqnarraystrutsizeARG\@empty% | |
3472 | +{\setbox0=\hbox{#3\relax\global\skip3=0.3\normalbaselineskip}}% | |
3473 | +\skip2=\skip3\relax% | |
3474 | +\else% arg two present | |
3475 | +{\setbox0=\hbox{#3\relax\global\skip3=#2\relax}}% | |
3476 | +\skip2=\skip3\relax% | |
3477 | +\fi% if null arg | |
3478 | +% remove stretchability, just to be safe | |
3479 | +\dimen0\skip0\relax% | |
3480 | +\dimen2\skip2\relax% | |
3481 | +% dimen0 = height, dimen2 = depth | |
3482 | +\if@IEEEeqnarrayISinner% inner does not touch master strut size | |
3483 | +\edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% | |
3484 | +\edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% | |
3485 | +\@IEEEeqnarrayusemasterstrutfalse% do not use master | |
3486 | +\else% outer, have to set master strut too | |
3487 | +\edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}% | |
3488 | +\edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}% | |
3489 | +\edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% | |
3490 | +\edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% | |
3491 | +\@IEEEeqnarrayusemasterstruttrue% use master strut | |
3492 | +\fi} | |
3493 | + | |
3494 | + | |
3495 | +% usage: \IEEEeqnarraystrutsizeadd{added height}{added depth}[font size commands] | |
3496 | +% If called outside the lines of an IEEEeqnarray, adds the given height | |
3497 | +% and depth to both the master and local struts. | |
3498 | +% If called inside an IEEEeqnarray line, adds the given height and depth | |
3499 | +% to the local strut only and sets the flag to indicate the use | |
3500 | +% of the local strut values. | |
3501 | +% In both cases, if a height or depth is left blank, 0pt is used instead. | |
3502 | +% The optional argument can be used to evaluate the lengths under | |
3503 | +% a different font size and styles. If none is specified, the current | |
3504 | +% font is used. | |
3505 | +% uses scratch registers \skip0, \skip2, \skip3, \dimen0, \dimen2 | |
3506 | +\def\IEEEeqnarraystrutsizeadd#1#2{\relax\@ifnextchar[{\@IEEEeqnarraystrutsizeadd{#1}{#2}}{\@IEEEeqnarraystrutsizeadd{#1}{#2}[\relax]}} | |
3507 | +\def\@IEEEeqnarraystrutsizeadd#1#2[#3]{\def\@IEEEeqnarraystrutsizearg{#1}% | |
3508 | +\ifx\@IEEEeqnarraystrutsizearg\@empty% | |
3509 | +\skip0=0pt\relax% | |
3510 | +\else% arg one present | |
3511 | +{\setbox0=\hbox{#3\relax\global\skip3=#1}}% | |
3512 | +\skip0=\skip3\relax% | |
3513 | +\fi% if null arg | |
3514 | +\def\@IEEEeqnarraystrutsizearg{#2}% | |
3515 | +\ifx\@IEEEeqnarraystrutsizearg\@empty% | |
3516 | +\skip2=0pt\relax% | |
3517 | +\else% arg two present | |
3518 | +{\setbox0=\hbox{#3\relax\global\skip3=#2}}% | |
3519 | +\skip2=\skip3\relax% | |
3520 | +\fi% if null arg | |
3521 | +% remove stretchability, just to be safe | |
3522 | +\dimen0\skip0\relax% | |
3523 | +\dimen2\skip2\relax% | |
3524 | +% dimen0 = height, dimen2 = depth | |
3525 | +\if@IEEEeqnarrayISinner% inner does not touch master strut size | |
3526 | +% get local strut size | |
3527 | +\expandafter\skip0=\@IEEEeqnarrayTHEstrutheight\relax% | |
3528 | +\expandafter\skip2=\@IEEEeqnarrayTHEstrutdepth\relax% | |
3529 | +% add it to the user supplied values | |
3530 | +\advance\dimen0 by \skip0\relax% | |
3531 | +\advance\dimen2 by \skip2\relax% | |
3532 | +% update the local strut size | |
3533 | +\edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% | |
3534 | +\edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% | |
3535 | +\@IEEEeqnarrayusemasterstrutfalse% do not use master | |
3536 | +\else% outer, have to set master strut too | |
3537 | +% get master strut size | |
3538 | +\expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% | |
3539 | +\expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% | |
3540 | +% add it to the user supplied values | |
3541 | +\advance\dimen0 by \skip0\relax% | |
3542 | +\advance\dimen2 by \skip2\relax% | |
3543 | +% update the local and master strut sizes | |
3544 | +\edef\@IEEEeqnarrayTHEmasterstrutheight{\the\dimen0}% | |
3545 | +\edef\@IEEEeqnarrayTHEmasterstrutdepth{\the\dimen2}% | |
3546 | +\edef\@IEEEeqnarrayTHEstrutheight{\the\dimen0}% | |
3547 | +\edef\@IEEEeqnarrayTHEstrutdepth{\the\dimen2}% | |
3548 | +\@IEEEeqnarrayusemasterstruttrue% use master strut | |
3549 | +\fi} | |
3550 | + | |
3551 | + | |
3552 | +% allow user a way to see the struts | |
3553 | +\newif\ifIEEEvisiblestruts | |
3554 | +\IEEEvisiblestrutsfalse | |
3555 | + | |
3556 | +% inserts an invisible strut using the master or local strut values | |
3557 | +% uses scratch registers \skip0, \skip2, \dimen0, \dimen2 | |
3558 | +\def\@IEEEeqnarrayinsertstrut{\relax% | |
3559 | +\if@IEEEeqnarrayusemasterstrut | |
3560 | +% get master strut size | |
3561 | +\expandafter\skip0=\@IEEEeqnarrayTHEmasterstrutheight\relax% | |
3562 | +\expandafter\skip2=\@IEEEeqnarrayTHEmasterstrutdepth\relax% | |
3563 | +\else% | |
3564 | +% get local strut size | |
3565 | +\expandafter\skip0=\@IEEEeqnarrayTHEstrutheight\relax% | |
3566 | +\expandafter\skip2=\@IEEEeqnarrayTHEstrutdepth\relax% | |
3567 | +\fi% | |
3568 | +% remove stretchability, probably not needed | |
3569 | +\dimen0\skip0\relax% | |
3570 | +\dimen2\skip2\relax% | |
3571 | +% dimen0 = height, dimen2 = depth | |
3572 | +% allow user to see struts if desired | |
3573 | +\ifIEEEvisiblestruts% | |
3574 | +\vrule width0.2pt height\dimen0 depth\dimen2\relax% | |
3575 | +\else% | |
3576 | +\vrule width0pt height\dimen0 depth\dimen2\relax\fi} | |
3577 | + | |
3578 | + | |
3579 | +% creates an invisible strut, useable even outside \IEEEeqnarray | |
3580 | +% if \IEEEvisiblestrutstrue, the strut will be visible and 0.2pt wide. | |
3581 | +% usage: \IEEEstrut[height][depth][font size commands] | |
3582 | +% default is \IEEEstrut[0.7\normalbaselineskip][0.3\normalbaselineskip][\relax] | |
3583 | +% blank arguments inherit the default values | |
3584 | +% uses \dimen0, \dimen2, \skip0, \skip2 | |
3585 | +\def\IEEEstrut{\relax\@ifnextchar[{\@IEEEstrut}{\@IEEEstrut[0.7\normalbaselineskip]}} | |
3586 | +\def\@IEEEstrut[#1]{\relax\@ifnextchar[{\@@IEEEstrut[#1]}{\@@IEEEstrut[#1][0.3\normalbaselineskip]}} | |
3587 | +\def\@@IEEEstrut[#1][#2]{\relax\@ifnextchar[{\@@@IEEEstrut[#1][#2]}{\@@@IEEEstrut[#1][#2][\relax]}} | |
3588 | +\def\@@@IEEEstrut[#1][#2][#3]{\mbox{#3\relax% | |
3589 | +\def\@IEEEstrutARG{#1}% | |
3590 | +\ifx\@IEEEstrutARG\@empty% | |
3591 | +\skip0=0.7\normalbaselineskip\relax% | |
3592 | +\else% | |
3593 | +\skip0=#1\relax% | |
3594 | +\fi% | |
3595 | +\def\@IEEEstrutARG{#2}% | |
3596 | +\ifx\@IEEEstrutARG\@empty% | |
3597 | +\skip2=0.3\normalbaselineskip\relax% | |
3598 | +\else% | |
3599 | +\skip2=#2\relax% | |
3600 | +\fi% | |
3601 | +% remove stretchability, probably not needed | |
3602 | +\dimen0\skip0\relax% | |
3603 | +\dimen2\skip2\relax% | |
3604 | +\ifIEEEvisiblestruts% | |
3605 | +\vrule width0.2pt height\dimen0 depth\dimen2\relax% | |
3606 | +\else% | |
3607 | +\vrule width0.0pt height\dimen0 depth\dimen2\relax\fi}} | |
3608 | + | |
3609 | + | |
3610 | +% enables strut mode by setting a default strut size and then zeroing the | |
3611 | +% \baselineskip, \lineskip, \lineskiplimit and \jot | |
3612 | +\def\IEEEeqnarraystrutmode{\IEEEeqnarraystrutsize{0.7\normalbaselineskip}{0.3\normalbaselineskip}[\relax]% | |
3613 | +\baselineskip=0pt\lineskip=0pt\lineskiplimit=0pt\jot=0pt} | |
3614 | + | |
3615 | + | |
3616 | +% equation and subequation forms to use to setup hyperref's \@currentHref | |
3617 | +\def\@IEEEtheHrefequation{equation.\theHequation} | |
3618 | +\def\@IEEEtheHrefsubequation{equation.\theHequation\alph{IEEEsubequation}} | |
3619 | + | |
3620 | + | |
3621 | +\def\IEEEeqnarray{\@IEEEeqnumpersisttrue\@IEEEsubeqnumpersistfalse\@IEEEeqnarray} | |
3622 | +\def\endIEEEeqnarray{\end@IEEEeqnarray} | |
3623 | + | |
3624 | +\@namedef{IEEEeqnarray*}{\@IEEEeqnumpersistfalse\@IEEEsubeqnumpersistfalse\@IEEEeqnarray} | |
3625 | +\@namedef{endIEEEeqnarray*}{\end@IEEEeqnarray} | |
3626 | + | |
3627 | + | |
3628 | +% \IEEEeqnarray is an enhanced \eqnarray. | |
3629 | +% The star form defaults to not putting equation numbers at the end of each row. | |
3630 | +% usage: \IEEEeqnarray[decl]{cols} | |
3631 | +\def\@IEEEeqnarray{\relax\@ifnextchar[{\@@IEEEeqnarray}{\@@IEEEeqnarray[\relax]}} | |
3632 | +% We have to be careful here to normalize catcodes just before acquiring the | |
3633 | +% cols as that specification may contain punctuation which could be subject | |
3634 | +% to document catcode changes. | |
3635 | +\def\@@IEEEeqnarray[#1]{\begingroup\IEEEnormalcatcodes\@@@IEEEeqnarray[#1]} | |
3636 | +\def\@@@IEEEeqnarray[#1]#2{\endgroup | |
3637 | + % default to showing the equation number or not based on whether or not | |
3638 | + % the star form was involked | |
3639 | + \if@IEEEeqnumpersist\global\@eqnswtrue | |
3640 | + \else% not the star form | |
3641 | + \global\@eqnswfalse | |
3642 | + \fi% if star form | |
3643 | + % provide a basic hyperref \theHequation if this has not already been setup (hyperref not loaded, or no section counter) | |
3644 | + \@ifundefined{theHequation}{\def\theHequation{\arabic{equation}}}{}\relax | |
3645 | + % provide dummy hyperref commands in case hyperref is not loaded | |
3646 | + \providecommand{\Hy@raisedlink}[1]{}\relax | |
3647 | + \providecommand{\hyper@anchorstart}[1]{}\relax | |
3648 | + \providecommand{\hyper@anchorend}{}\relax | |
3649 | + \providecommand{\@currentHref}{}\relax | |
3650 | + \@IEEEeqnumpreadvfalse% reset eqnpreadv flag | |
3651 | + \@IEEEsubeqnumpreadvfalse% reset subeqnpreadv flag | |
3652 | + \@IEEEeqnarrayISinnerfalse% not yet within the lines of the halign | |
3653 | + \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default | |
3654 | + \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise | |
3655 | + \IEEEvisiblestrutsfalse% diagnostic mode defaults to off | |
3656 | + % no extra space unless the user specifically requests it | |
3657 | + \lineskip=0pt\relax | |
3658 | + \lineskiplimit=0pt\relax | |
3659 | + \baselineskip=\normalbaselineskip\relax% | |
3660 | + \jot=\IEEEnormaljot\relax% | |
3661 | + \mathsurround\z@\relax% no extra spacing around math | |
3662 | + \@advanceIEEEeqncolcnttrue% advance the col counter for each col the user uses, | |
3663 | + % used in \IEEEeqnarraymulticol and in the preamble build | |
3664 | + %V1.8 Here we preadvance to the next equation number. | |
3665 | + % If the user later wants a continued subequation, we can roll back. | |
3666 | + \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation% | |
3667 | + \stepcounter{equation}\@IEEEeqnumpreadvtrue% advance equation counter before first line | |
3668 | + \setcounter{IEEEsubequation}{0}% no subequation yet | |
3669 | + \let\@IEEEcurrentlabelsave\@currentlabel% save current label as we later change it globally | |
3670 | + \let\@IEEEcurrentHrefsave\@currentHref% save current href label as we later change it globally | |
3671 | + \def\@currentlabel{\p@equation\theequation}% redefine the ref label | |
3672 | + \def\@currentHref{\@IEEEtheHrefequation}% setup hyperref label | |
3673 | + \IEEEeqnarraydecl\relax% allow a way for the user to make global overrides | |
3674 | + #1\relax% allow user to override defaults | |
3675 | + \let\\\@IEEEeqnarraycr% replace newline with one that can put in eqn. numbers | |
3676 | + \global\@IEEEeqncolcnt\z@% col. count = 0 for first line | |
3677 | + \@IEEEbuildpreamble{#2}\relax% build the preamble and put it into \@IEEEtrantmptoksA | |
3678 | + % put in the column for the equation number | |
3679 | + \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first | |
3680 | + \toks0={##}% | |
3681 | + % advance the \@IEEEeqncolcnt for the isolation col, this helps with error checking | |
3682 | + \@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}% | |
3683 | + % add the isolation column | |
3684 | + \@IEEEappendtoksA{\tabskip\z@skip\bgroup\the\toks0\egroup}% | |
3685 | + % advance the \@IEEEeqncolcnt for the equation number col, this helps with error checking | |
3686 | + \@IEEEappendtoksA{&\global\advance\@IEEEeqncolcnt by 1\relax}% | |
3687 | + % add the equation number col to the preamble | |
3688 | + \@IEEEappendtoksA{\tabskip\z@skip\hb@xt@\z@\bgroup\hss\the\toks0\egroup}% | |
3689 | + % note \@IEEEeqnnumcols does not count the equation col or isolation col | |
3690 | + % set the starting tabskip glue as determined by the preamble build | |
3691 | + \tabskip=\@IEEEBPstartglue\relax | |
3692 | + % begin the display alignment | |
3693 | + \@IEEEeqnarrayISinnertrue% commands are now within the lines | |
3694 | + $$\everycr{}\halign to\displaywidth\bgroup | |
3695 | + % "exspand" the preamble | |
3696 | + \span\the\@IEEEtrantmptoksA\cr} | |
3697 | + | |
3698 | +% enter isolation/strut column (or the next column if the user did not use | |
3699 | +% every column), record the strut status, complete the columns, do the strut if needed, | |
3700 | +% restore counters (to backout any equation setup for a next line that was never used) | |
3701 | +% to their correct values and exit | |
3702 | +\def\end@IEEEeqnarray{\@IEEEeqnarrayglobalizestrutstatus&\@@IEEEeqnarraycr\egroup | |
3703 | +\if@IEEEsubeqnumpreadv\global\advance\c@IEEEsubequation\m@ne\fi | |
3704 | +\if@IEEEeqnumpreadv\global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\fi | |
3705 | +\global\let\@currentlabel\@IEEEcurrentlabelsave% restore current label | |
3706 | +\global\let\@currentHref\@IEEEcurrentHrefsave% restore current href label | |
3707 | +$$\@ignoretrue} | |
3708 | + | |
3709 | + | |
3710 | +% IEEEeqnarray uses a modifed \\ instead of the plain \cr to | |
3711 | +% end rows. This allows for things like \\*[vskip amount] | |
3712 | +% These "cr" macros are modified versions of those for LaTeX2e's eqnarray | |
3713 | +% the {\ifnum0=`} braces must be kept away from the last column to avoid | |
3714 | +% altering spacing of its math, so we use & to advance to the next column | |
3715 | +% as there is an isolation/strut column after the user's columns | |
3716 | +\def\@IEEEeqnarraycr{\@IEEEeqnarrayglobalizestrutstatus&% save strut status and advance to next column | |
3717 | + {\ifnum0=`}\fi | |
3718 | + \@ifstar{% | |
3719 | + \global\@eqpen\@M\@IEEEeqnarrayYCR | |
3720 | + }{% | |
3721 | + \global\@eqpen\interdisplaylinepenalty \@IEEEeqnarrayYCR | |
3722 | + }% | |
3723 | +} | |
3724 | + | |
3725 | +\def\@IEEEeqnarrayYCR{\@testopt\@IEEEeqnarrayXCR\z@skip} | |
3726 | + | |
3727 | +\def\@IEEEeqnarrayXCR[#1]{% | |
3728 | + \ifnum0=`{\fi}% | |
3729 | + \@@IEEEeqnarraycr | |
3730 | + \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}}% | |
3731 | + | |
3732 | +\def\@@IEEEeqnarraycr{\@IEEEtrantmptoksA={}% clear token register | |
3733 | + \advance\@IEEEeqncolcnt by -1\relax% adjust col count because of the isolation column | |
3734 | + \ifnum\@IEEEeqncolcnt>\@IEEEeqnnumcols\relax | |
3735 | + \@IEEEclspkgerror{Too many columns within the IEEEeqnarray\MessageBreak | |
3736 | + environment}% | |
3737 | + {Use fewer \string &'s or put more columns in the IEEEeqnarray column\MessageBreak | |
3738 | + specifications.}\relax% | |
3739 | + \else | |
3740 | + \loop% add cols if the user did not use them all | |
3741 | + \ifnum\@IEEEeqncolcnt<\@IEEEeqnnumcols\relax | |
3742 | + \@IEEEappendtoksA{&}% | |
3743 | + \advance\@IEEEeqncolcnt by 1\relax% update the col count | |
3744 | + \repeat | |
3745 | + % this number of &'s will take us the the isolation column | |
3746 | + \fi | |
3747 | + % execute the &'s | |
3748 | + \the\@IEEEtrantmptoksA% | |
3749 | + % handle the strut/isolation column | |
3750 | + \@IEEEeqnarrayinsertstrut% do the strut if needed | |
3751 | + \@IEEEeqnarraystrutreset% reset the strut system for next line or IEEEeqnarray | |
3752 | + &% and enter the equation number column | |
3753 | + \if@eqnsw% only if we display something | |
3754 | + \Hy@raisedlink{\hyper@anchorstart{\@currentHref}}% start a hyperref anchor | |
3755 | + \global\@IEEEeqnumpreadvfalse\relax% displaying an equation number means | |
3756 | + \global\@IEEEsubeqnumpreadvfalse\relax% the equation counters point to valid equations | |
3757 | + % V1.8 Here we setup the counters, currentlabel and status for what would be the *next* | |
3758 | + % equation line as would be the case under the current settings. However, there are two problems. | |
3759 | + % One problem is that there might not ever be a next line. The second problem is that the user | |
3760 | + % may later alter the meaning of a line with commands such as \IEEEyessubnumber. So, to handle | |
3761 | + % these cases we have to record the current values of the (sub)equation counters and revert back | |
3762 | + % to them if the next line is changed or never comes. The \if@IEEEeqnumpreadv, \if@IEEEsubeqnumpreadv | |
3763 | + % and \@IEEEsubeqnnumrollback stuff tracks this. | |
3764 | + % The logic to handle all this is surprisingly complex, but a nice feature of the approach here is | |
3765 | + % that the equation counters and labels remain valid for what the line would be unless a | |
3766 | + % \IEEEyessubnumber et al. later changes it. So, any hyperref links are always correct. | |
3767 | + \ifnum\c@IEEEsubequation>0\relax% handle subequation | |
3768 | + \theIEEEsubequationdis\relax | |
3769 | + \if@IEEEsubeqnumpersist% setup for default type of next line | |
3770 | + \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax | |
3771 | + \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax | |
3772 | + \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label | |
3773 | + \else | |
3774 | + % if no subeqnum persist, go ahead and setup for a new equation number | |
3775 | + \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation | |
3776 | + \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax | |
3777 | + \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax | |
3778 | + \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label | |
3779 | + \fi | |
3780 | + \else% display a standard equation number | |
3781 | + \theequationdis\relax | |
3782 | + \setcounter{IEEEsubequation}{0}\relax% not really needed | |
3783 | + \if@IEEEsubeqnumpersist% setup for default type of next line | |
3784 | + % subequations that follow plain equations carry the same equation number e.g, 5, 5a rather than 5, 6a | |
3785 | + \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax | |
3786 | + \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax | |
3787 | + \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label | |
3788 | + \else | |
3789 | + % if no subeqnum persist, go ahead and setup for a new equation number | |
3790 | + \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation | |
3791 | + \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax | |
3792 | + \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax | |
3793 | + \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label | |
3794 | + \fi | |
3795 | + \fi% | |
3796 | + \Hy@raisedlink{\hyper@anchorend}% end hyperref anchor | |
3797 | + \fi% fi only if we display something | |
3798 | + % reset the flags to indicate the default preferences of the display of equation numbers | |
3799 | + \if@IEEEeqnumpersist\global\@eqnswtrue\else\global\@eqnswfalse\fi | |
3800 | + \if@IEEEsubeqnumpersist\global\@eqnswtrue\fi% ditto for the subequation flag | |
3801 | + % reset the number of columns the user actually used | |
3802 | + \global\@IEEEeqncolcnt\z@\relax | |
3803 | + % the real end of the line | |
3804 | + \cr} | |
3805 | + | |
3806 | + | |
3807 | + | |
3808 | + | |
3809 | + | |
3810 | +% \IEEEeqnarraybox is like \IEEEeqnarray except the box form puts everything | |
3811 | +% inside a vtop, vbox, or vcenter box depending on the letter in the second | |
3812 | +% optional argument (t,b,c). Vbox is the default. Unlike \IEEEeqnarray, | |
3813 | +% equation numbers are not displayed and \IEEEeqnarraybox can be nested. | |
3814 | +% \IEEEeqnarrayboxm is for math mode (like \array) and does not put the vbox | |
3815 | +% within an hbox. | |
3816 | +% \IEEEeqnarrayboxt is for text mode (like \tabular) and puts the vbox within | |
3817 | +% a \hbox{$ $} construct. | |
3818 | +% \IEEEeqnarraybox will auto detect whether to use \IEEEeqnarrayboxm or | |
3819 | +% \IEEEeqnarrayboxt depending on the math mode. | |
3820 | +% The third optional argument specifies the width this box is to be set to - | |
3821 | +% natural width is the default. | |
3822 | +% The * forms do not add \jot line spacing | |
3823 | +% usage: \IEEEeqnarraybox[decl][pos][width]{cols} | |
3824 | +\def\IEEEeqnarrayboxm{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox} | |
3825 | +\def\endIEEEeqnarrayboxm{\end@IEEEeqnarraybox} | |
3826 | +\@namedef{IEEEeqnarrayboxm*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox} | |
3827 | +\@namedef{endIEEEeqnarrayboxm*}{\end@IEEEeqnarraybox} | |
3828 | + | |
3829 | +\def\IEEEeqnarrayboxt{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox} | |
3830 | +\def\endIEEEeqnarrayboxt{\end@IEEEeqnarraybox} | |
3831 | +\@namedef{IEEEeqnarrayboxt*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox} | |
3832 | +\@namedef{endIEEEeqnarrayboxt*}{\end@IEEEeqnarraybox} | |
3833 | + | |
3834 | +\def\IEEEeqnarraybox{\@IEEEeqnarrayboxnojotfalse\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi% | |
3835 | +\@IEEEeqnarraybox} | |
3836 | +\def\endIEEEeqnarraybox{\end@IEEEeqnarraybox} | |
3837 | + | |
3838 | +\@namedef{IEEEeqnarraybox*}{\@IEEEeqnarrayboxnojottrue\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi% | |
3839 | +\@IEEEeqnarraybox} | |
3840 | +\@namedef{endIEEEeqnarraybox*}{\end@IEEEeqnarraybox} | |
3841 | + | |
3842 | +% flag to indicate if the \IEEEeqnarraybox needs to put things into an hbox{$ $} | |
3843 | +% for \vcenter in non-math mode | |
3844 | +\newif\if@IEEEeqnarrayboxHBOXSW% | |
3845 | +\@IEEEeqnarrayboxHBOXSWfalse | |
3846 | + | |
3847 | +\def\@IEEEeqnarraybox{\relax\@ifnextchar[{\@@IEEEeqnarraybox}{\@@IEEEeqnarraybox[\relax]}} | |
3848 | +% We have to be careful here to normalize catcodes just before acquiring the | |
3849 | +% cols as that specification may contain punctuation which could be subject | |
3850 | +% to document catcode changes. | |
3851 | +\def\@@IEEEeqnarraybox[#1]{\relax\begingroup\IEEEnormalcatcodes\@ifnextchar[{\@@@IEEEeqnarraybox[#1]}{\@@@IEEEeqnarraybox[#1][b]}} | |
3852 | +\def\@@@IEEEeqnarraybox[#1][#2]{\relax\@ifnextchar[{\@@@@IEEEeqnarraybox[#1][#2]}{\@@@@IEEEeqnarraybox[#1][#2][\relax]}} | |
3853 | + | |
3854 | +% #1 = decl; #2 = t,b,c; #3 = width, #4 = col specs | |
3855 | +\def\@@@@IEEEeqnarraybox[#1][#2][#3]#4{\endgroup\@IEEEeqnarrayISinnerfalse % not yet within the lines of the halign | |
3856 | + \@IEEEeqnarraymasterstrutsave% save current master strut values | |
3857 | + \@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default | |
3858 | + \@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise | |
3859 | + \IEEEvisiblestrutsfalse% diagnostic mode defaults to off | |
3860 | + % no extra space unless the user specifically requests it | |
3861 | + \lineskip=0pt\relax% | |
3862 | + \lineskiplimit=0pt\relax% | |
3863 | + \baselineskip=\normalbaselineskip\relax% | |
3864 | + \jot=\IEEEnormaljot\relax% | |
3865 | + \mathsurround\z@\relax% no extra spacing around math | |
3866 | + % the default end glues are zero for an \IEEEeqnarraybox | |
3867 | + \edef\@IEEEeqnarraycolSEPdefaultstart{\@IEEEeqnarraycolSEPzero}% default start glue | |
3868 | + \edef\@IEEEeqnarraycolSEPdefaultend{\@IEEEeqnarraycolSEPzero}% default end glue | |
3869 | + \edef\@IEEEeqnarraycolSEPdefaultmid{\@IEEEeqnarraycolSEPzero}% default inter-column glue | |
3870 | + \@advanceIEEEeqncolcntfalse% do not advance the col counter for each col the user uses, | |
3871 | + % used in \IEEEeqnarraymulticol and in the preamble build | |
3872 | + \IEEEeqnarrayboxdecl\relax% allow a way for the user to make global overrides | |
3873 | + #1\relax% allow user to override defaults | |
3874 | + \let\\\@IEEEeqnarrayboxcr% replace newline with one that allows optional spacing | |
3875 | + \@IEEEbuildpreamble{#4}\relax% build the preamble and put it into \@IEEEtrantmptoksA | |
3876 | + % add an isolation column to the preamble to stop \\'s {} from getting into the last col | |
3877 | + \ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi% col separator for those after the first | |
3878 | + \toks0={##}% | |
3879 | + % add the isolation column to the preamble | |
3880 | + \@IEEEappendtoksA{\tabskip\z@skip\bgroup\the\toks0\egroup}% | |
3881 | + % set the starting tabskip glue as determined by the preamble build | |
3882 | + \tabskip=\@IEEEBPstartglue\relax | |
3883 | + % begin the alignment | |
3884 | + \everycr{}% | |
3885 | + % use only the very first token to determine the positioning | |
3886 | + \@IEEEextracttoken{#2}\relax | |
3887 | + \ifx\@IEEEextractedtokensdiscarded\@empty\else | |
3888 | + \typeout{** WARNING: IEEEeqnarraybox position specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
3889 | + \fi | |
3890 | + % \@IEEEextractedtoken has the first token, the rest are ignored | |
3891 | + % if we need to put things into and hbox and go into math mode, do so now | |
3892 | + \if@IEEEeqnarrayboxHBOXSW \leavevmode \hbox \bgroup $\fi% | |
3893 | + % use the appropriate vbox type | |
3894 | + \if\@IEEEextractedtoken t\relax\vtop\else\if\@IEEEextractedtoken c\relax% | |
3895 | + \vcenter\else\vbox\fi\fi\bgroup% | |
3896 | + \@IEEEeqnarrayISinnertrue% commands are now within the lines | |
3897 | + \ifx#3\relax\halign\else\halign to #3\relax\fi% | |
3898 | + \bgroup | |
3899 | + % "exspand" the preamble | |
3900 | + \span\the\@IEEEtrantmptoksA\cr} | |
3901 | + | |
3902 | +% carry strut status and enter the isolation/strut column, | |
3903 | +% exit from math mode if needed, and exit | |
3904 | +\def\end@IEEEeqnarraybox{\@IEEEeqnarrayglobalizestrutstatus% carry strut status | |
3905 | +&% enter isolation/strut column | |
3906 | +\@IEEEeqnarrayinsertstrut% do strut if needed | |
3907 | +\@IEEEeqnarraymasterstrutrestore% restore the previous master strut values | |
3908 | +% reset the strut system for next IEEEeqnarray | |
3909 | +% (sets local strut values back to previous master strut values) | |
3910 | +\@IEEEeqnarraystrutreset% | |
3911 | +% ensure last line, exit from halign, close vbox | |
3912 | +\crcr\egroup\egroup% | |
3913 | +% exit from math mode and close hbox if needed | |
3914 | +\if@IEEEeqnarrayboxHBOXSW $\egroup\fi} | |
3915 | + | |
3916 | + | |
3917 | + | |
3918 | +% IEEEeqnarraybox uses a modifed \\ instead of the plain \cr to | |
3919 | +% end rows. This allows for things like \\[vskip amount] | |
3920 | +% This "cr" macros are modified versions those for LaTeX2e's eqnarray | |
3921 | +% For IEEEeqnarraybox, \\* is the same as \\ | |
3922 | +% the {\ifnum0=`} braces must be kept away from the last column to avoid | |
3923 | +% altering spacing of its math, so we use & to advance to the isolation/strut column | |
3924 | +% carry strut status into isolation/strut column | |
3925 | +\def\@IEEEeqnarrayboxcr{\@IEEEeqnarrayglobalizestrutstatus% carry strut status | |
3926 | +&% enter isolation/strut column | |
3927 | +\@IEEEeqnarrayinsertstrut% do strut if needed | |
3928 | +% reset the strut system for next line or IEEEeqnarray | |
3929 | +\@IEEEeqnarraystrutreset% | |
3930 | +{\ifnum0=`}\fi% | |
3931 | +\@ifstar{\@IEEEeqnarrayboxYCR}{\@IEEEeqnarrayboxYCR}} | |
3932 | + | |
3933 | +% test and setup the optional argument to \\[] | |
3934 | +\def\@IEEEeqnarrayboxYCR{\@testopt\@IEEEeqnarrayboxXCR\z@skip} | |
3935 | + | |
3936 | +% IEEEeqnarraybox does not automatically increase line spacing by \jot | |
3937 | +\def\@IEEEeqnarrayboxXCR[#1]{\ifnum0=`{\fi}% | |
3938 | +\cr\noalign{\if@IEEEeqnarrayboxnojot\else\vskip\jot\fi\vskip#1\relax}} | |
3939 | + | |
3940 | + | |
3941 | + | |
3942 | +% usage: \@IEEEbuildpreamble{column specifiers} | |
3943 | +% starts the halign preamble build | |
3944 | +% the assembled preamble is put in \@IEEEtrantmptoksA | |
3945 | +\def\@IEEEbuildpreamble#1{\@IEEEtrantmptoksA={}% clear token register | |
3946 | +\let\@IEEEBPcurtype=u%current column type is not yet known | |
3947 | +\let\@IEEEBPprevtype=s%the previous column type was the start | |
3948 | +\let\@IEEEBPnexttype=u%next column type is not yet known | |
3949 | +% ensure these are valid | |
3950 | +\def\@IEEEBPcurglue={0pt plus 0pt minus 0pt}% | |
3951 | +\def\@IEEEBPcurcolname{@IEEEdefault}% name of current column definition | |
3952 | +% currently acquired numerically referenced glue | |
3953 | +% use a name that is easier to remember | |
3954 | +\let\@IEEEBPcurnum=\@IEEEtrantmpcountA% | |
3955 | +\@IEEEBPcurnum=0% | |
3956 | +% tracks number of columns in the preamble | |
3957 | +\@IEEEeqnnumcols=0% | |
3958 | +% record the default end glues | |
3959 | +\edef\@IEEEBPstartglue{\@IEEEeqnarraycolSEPdefaultstart}% | |
3960 | +\edef\@IEEEBPendglue{\@IEEEeqnarraycolSEPdefaultend}% | |
3961 | +\edef\@IEEEedefMACRO{#1}\relax% fully expand the preamble to support macro containers | |
3962 | +% now parse the user's column specifications | |
3963 | +% \ignorespaces is used as a delimiter, need at least one trailing \relax because | |
3964 | +% \@@IEEEbuildpreamble looks into the future | |
3965 | +\expandafter\@@IEEEbuildpreamble\@IEEEedefMACRO\ignorespaces\relax\relax} | |
3966 | + | |
3967 | + | |
3968 | +% usage: \@@IEEEbuildpreamble{current column}{next column} | |
3969 | +% parses and builds the halign preamble | |
3970 | +\def\@@IEEEbuildpreamble#1#2{\let\@@nextIEEEbuildpreamble=\@@IEEEbuildpreamble% | |
3971 | +% use only the very first token to check the end | |
3972 | +\@IEEEextracttokengroups{#1}\relax | |
3973 | +\ifx\@IEEEextractedfirsttoken\ignorespaces\let\@@nextIEEEbuildpreamble=\@@IEEEfinishpreamble\else% | |
3974 | +% identify current and next token type | |
3975 | +\@IEEEgetcoltype{#1}{\@IEEEBPcurtype}{1}% current, error on invalid | |
3976 | +\@IEEEgetcoltype{#2}{\@IEEEBPnexttype}{0}% next, no error on invalid next | |
3977 | +% if curtype is a glue, get the glue def | |
3978 | +\if\@IEEEBPcurtype g\@IEEEgetcurglue{#1}{\@IEEEBPcurglue}\fi% | |
3979 | +% if curtype is a column, get the column def and set the current column name | |
3980 | +\if\@IEEEBPcurtype c\@IEEEgetcurcol{#1}\fi% | |
3981 | +% if curtype is a numeral, acquire the user defined glue | |
3982 | +\if\@IEEEBPcurtype n\@IEEEprocessNcol{#1}\fi% | |
3983 | +% process the acquired glue | |
3984 | +\if\@IEEEBPcurtype g\@IEEEprocessGcol\fi% | |
3985 | +% process the acquired col | |
3986 | +\if\@IEEEBPcurtype c\@IEEEprocessCcol\fi% | |
3987 | +% ready prevtype for next col spec. | |
3988 | +\let\@IEEEBPprevtype=\@IEEEBPcurtype% | |
3989 | +% be sure and put back the future token(s) as a group | |
3990 | +\fi\@@nextIEEEbuildpreamble{#2}} | |
3991 | + | |
3992 | + | |
3993 | +% usage: \@@IEEEfinishpreamble{discarded} | |
3994 | +% executed just after preamble build is completed | |
3995 | +% warn about zero cols, and if prevtype type = u, put in end tabskip glue | |
3996 | +% argument is not used | |
3997 | +\def\@@IEEEfinishpreamble#1{\ifnum\@IEEEeqnnumcols<1\relax | |
3998 | +\@IEEEclspkgerror{No column specifiers declared for IEEEeqnarray}% | |
3999 | +{At least one column type must be declared for each IEEEeqnarray.}% | |
4000 | +\fi%num cols less than 1 | |
4001 | +%if last type undefined, set default end tabskip glue | |
4002 | +\if\@IEEEBPprevtype u\@IEEEappendtoksA{\tabskip=\@IEEEBPendglue}\fi} | |
4003 | + | |
4004 | + | |
4005 | +% usage: \@IEEEgetcoltype{col specifier}{\output}{error more} | |
4006 | +% Identify and return the column specifier's type code in the given | |
4007 | +% \output macro: | |
4008 | +% n = number | |
4009 | +% g = glue (any other char in catagory 12) | |
4010 | +% c = letter | |
4011 | +% e = \ignorespaces (end of sequence) | |
4012 | +% u = undefined | |
4013 | +% error mode: 0 = no error message, 1 = error on invalid char | |
4014 | +\def\@IEEEgetcoltype#1#2#3{% | |
4015 | +% use only the very first token to determine the type | |
4016 | +\@IEEEextracttoken{#1}\relax | |
4017 | +% \@IEEEextractedtoken has the first token, the rest are discarded | |
4018 | +\let#2=u\relax% assume invalid until know otherwise | |
4019 | +\ifx\@IEEEextractedtoken\ignorespaces\let#2=e\else | |
4020 | +\ifcat\@IEEEextractedtoken\relax\else% screen out control sequences | |
4021 | +\if0\@IEEEextractedtoken\let#2=n\else | |
4022 | +\if1\@IEEEextractedtoken\let#2=n\else | |
4023 | +\if2\@IEEEextractedtoken\let#2=n\else | |
4024 | +\if3\@IEEEextractedtoken\let#2=n\else | |
4025 | +\if4\@IEEEextractedtoken\let#2=n\else | |
4026 | +\if5\@IEEEextractedtoken\let#2=n\else | |
4027 | +\if6\@IEEEextractedtoken\let#2=n\else | |
4028 | +\if7\@IEEEextractedtoken\let#2=n\else | |
4029 | +\if8\@IEEEextractedtoken\let#2=n\else | |
4030 | +\if9\@IEEEextractedtoken\let#2=n\else | |
4031 | +\ifcat,\@IEEEextractedtoken\let#2=g\relax | |
4032 | +\else\ifcat a\@IEEEextractedtoken\let#2=c\relax\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi | |
4033 | +\if#2u\relax | |
4034 | +\if0\noexpand#3\relax\else\@IEEEclspkgerror{Invalid character in column specifications}% | |
4035 | +{Only letters, numerals and certain other symbols are allowed \MessageBreak | |
4036 | +as IEEEeqnarray column specifiers.}\fi\fi} | |
4037 | + | |
4038 | + | |
4039 | +% usage: \@IEEEgetcurcol{col specifier} | |
4040 | +% verify the letter referenced column exists | |
4041 | +% and return its name in \@IEEEBPcurcolname | |
4042 | +% if column specifier is invalid, use the default column @IEEEdefault | |
4043 | +\def\@IEEEgetcurcol#1{\expandafter\ifx\csname @IEEEeqnarraycolDEF#1\endcsname\@IEEEeqnarraycolisdefined% | |
4044 | +\def\@IEEEBPcurcolname{#1}\else% invalid column name | |
4045 | +\@IEEEclspkgerror{Invalid column type "#1" in column specifications.\MessageBreak | |
4046 | +Using a default centering column instead}% | |
4047 | +{You must define IEEEeqnarray column types before use.}% | |
4048 | +\def\@IEEEBPcurcolname{@IEEEdefault}\fi} | |
4049 | + | |
4050 | + | |
4051 | +% usage: \@IEEEgetcurglue{glue specifier}{\output} | |
4052 | +% identify the predefined (punctuation) glue value | |
4053 | +% and return it in the given output macro | |
4054 | +\def\@IEEEgetcurglue#1#2{% | |
4055 | +% ! = \! (neg small) -0.16667em (-3/18 em) | |
4056 | +% , = \, (small) 0.16667em ( 3/18 em) | |
4057 | +% : = \: (med) 0.22222em ( 4/18 em) | |
4058 | +% ; = \; (large) 0.27778em ( 5/18 em) | |
4059 | +% ' = \quad 1em | |
4060 | +% " = \qquad 2em | |
4061 | +% . = 0.5\arraycolsep | |
4062 | +% / = \arraycolsep | |
4063 | +% ? = 2\arraycolsep | |
4064 | +% * = 1fil | |
4065 | +% + = \@IEEEeqnarraycolSEPcenter | |
4066 | +% - = \@IEEEeqnarraycolSEPzero | |
4067 | +% Note that all em values are referenced to the math font (textfont2) fontdimen6 | |
4068 | +% value for 1em. | |
4069 | +% | |
4070 | +% use only the very first token to determine the type | |
4071 | +\@IEEEextracttoken{#1}\relax | |
4072 | +\ifx\@IEEEextractedtokensdiscarded\@empty\else | |
4073 | + \typeout{** WARNING: IEEEeqnarray predefined inter-column glue type specifiers after the first in `\@IEEEextracttokenarg' ignored (line \the\inputlineno).}\relax | |
4074 | +\fi | |
4075 | +% get the math font 1em value | |
4076 | +% LaTeX2e's NFSS2 does not preload the fonts, but \IEEEeqnarray needs | |
4077 | +% to gain access to the math (\textfont2) font's spacing parameters. | |
4078 | +% So we create a bogus box here that uses the math font to ensure | |
4079 | +% that \textfont2 is loaded and ready. If this is not done, | |
4080 | +% the \textfont2 stuff here may not work. | |
4081 | +% Thanks to Bernd Raichle for his 1997 post on this topic. | |
4082 | +{\setbox0=\hbox{$\displaystyle\relax$}}% | |
4083 | +% fontdimen6 has the width of 1em (a quad). | |
4084 | +\@IEEEtrantmpdimenA=\fontdimen6\textfont2\relax% | |
4085 | +% identify the glue value based on the first token | |
4086 | +% we discard anything after the first | |
4087 | +\if!\@IEEEextractedtoken\@IEEEtrantmpdimenA=-0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4088 | +\if,\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.16667\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4089 | +\if:\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.22222\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4090 | +\if;\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.27778\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4091 | +\if'\@IEEEextractedtoken\@IEEEtrantmpdimenA=1\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4092 | +\if"\@IEEEextractedtoken\@IEEEtrantmpdimenA=2\@IEEEtrantmpdimenA\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4093 | +\if.\@IEEEextractedtoken\@IEEEtrantmpdimenA=0.5\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4094 | +\if/\@IEEEextractedtoken\edef#2{\the\arraycolsep}\else | |
4095 | +\if?\@IEEEextractedtoken\@IEEEtrantmpdimenA=2\arraycolsep\edef#2{\the\@IEEEtrantmpdimenA}\else | |
4096 | +\if *\@IEEEextractedtoken\edef#2{0pt plus 1fil minus 0pt}\else | |
4097 | +\if+\@IEEEextractedtoken\edef#2{\@IEEEeqnarraycolSEPcenter}\else | |
4098 | +\if-\@IEEEextractedtoken\edef#2{\@IEEEeqnarraycolSEPzero}\else | |
4099 | +\edef#2{\@IEEEeqnarraycolSEPzero}% | |
4100 | +\@IEEEclspkgerror{Invalid predefined inter-column glue type "#1" in\MessageBreak | |
4101 | +column specifications. Using a default value of\MessageBreak | |
4102 | +0pt instead}% | |
4103 | +{Only !,:;'"./?*+ and - are valid predefined glue types in the\MessageBreak | |
4104 | +IEEEeqnarray column specifications.}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} | |
4105 | + | |
4106 | + | |
4107 | +% usage: \@IEEEprocessNcol{digit} | |
4108 | +% process a numerical digit from the column specification | |
4109 | +% and look up the corresponding user defined glue value | |
4110 | +% can transform current type from n to g or a as the user defined glue is acquired | |
4111 | +\def\@IEEEprocessNcol#1{\if\@IEEEBPprevtype g% | |
4112 | +\@IEEEclspkgerror{Back-to-back inter-column glue specifiers in column\MessageBreak | |
4113 | +specifications. Ignoring consecutive glue specifiers\MessageBreak | |
4114 | +after the first}% | |
4115 | +{You cannot have two or more glue types next to each other\MessageBreak | |
4116 | +in the IEEEeqnarray column specifications.}% | |
4117 | +\let\@IEEEBPcurtype=a% abort this glue, future digits will be discarded | |
4118 | +\@IEEEBPcurnum=0\relax% | |
4119 | +\else% if we previously aborted a glue | |
4120 | +\if\@IEEEBPprevtype a\@IEEEBPcurnum=0\let\@IEEEBPcurtype=a%maintain digit abortion | |
4121 | +\else%acquire this number | |
4122 | +% save the previous type before the numerical digits started | |
4123 | +\if\@IEEEBPprevtype n\else\let\@IEEEBPprevsavedtype=\@IEEEBPprevtype\fi% | |
4124 | +\multiply\@IEEEBPcurnum by 10\relax% | |
4125 | +\advance\@IEEEBPcurnum by #1\relax% add in number, \relax is needed to stop TeX's number scan | |
4126 | +\if\@IEEEBPnexttype n\else%close acquisition | |
4127 | +\expandafter\ifx\csname @IEEEeqnarraycolSEPDEF\expandafter\romannumeral\number\@IEEEBPcurnum\endcsname\@IEEEeqnarraycolisdefined% | |
4128 | +\edef\@IEEEBPcurglue{\csname @IEEEeqnarraycolSEP\expandafter\romannumeral\number\@IEEEBPcurnum\endcsname}% | |
4129 | +\else%user glue not defined | |
4130 | +\@IEEEclspkgerror{Invalid user defined inter-column glue type "\number\@IEEEBPcurnum" in\MessageBreak | |
4131 | +column specifications. Using a default value of\MessageBreak | |
4132 | +0pt instead}% | |
4133 | +{You must define all IEEEeqnarray numerical inter-column glue types via\MessageBreak | |
4134 | +\string\IEEEeqnarraydefcolsep \space before they are used in column specifications.}% | |
4135 | +\edef\@IEEEBPcurglue{\@IEEEeqnarraycolSEPzero}% | |
4136 | +\fi% glue defined or not | |
4137 | +\let\@IEEEBPcurtype=g% change the type to reflect the acquired glue | |
4138 | +\let\@IEEEBPprevtype=\@IEEEBPprevsavedtype% restore the prev type before this number glue | |
4139 | +\@IEEEBPcurnum=0\relax%ready for next acquisition | |
4140 | +\fi%close acquisition, get glue | |
4141 | +\fi%discard or acquire number | |
4142 | +\fi%prevtype glue or not | |
4143 | +} | |
4144 | + | |
4145 | + | |
4146 | +% process an acquired glue | |
4147 | +% add any acquired column/glue pair to the preamble | |
4148 | +\def\@IEEEprocessGcol{\if\@IEEEBPprevtype a\let\@IEEEBPcurtype=a%maintain previous glue abortions | |
4149 | +\else | |
4150 | +% if this is the start glue, save it, but do nothing else | |
4151 | +% as this is not used in the preamble, but before | |
4152 | +\if\@IEEEBPprevtype s\edef\@IEEEBPstartglue{\@IEEEBPcurglue}% | |
4153 | +\else%not the start glue | |
4154 | +\if\@IEEEBPprevtype g%ignore if back to back glues | |
4155 | +\@IEEEclspkgerror{Back-to-back inter-column glue specifiers in column\MessageBreak | |
4156 | +specifications. Ignoring consecutive glue specifiers\MessageBreak | |
4157 | +after the first}% | |
4158 | +{You cannot have two or more glue types next to each other\MessageBreak | |
4159 | +in the IEEEeqnarray column specifications.}% | |
4160 | +\let\@IEEEBPcurtype=a% abort this glue | |
4161 | +\else% not a back to back glue | |
4162 | +\if\@IEEEBPprevtype c\relax% if the previoustype was a col, add column/glue pair to preamble | |
4163 | +\ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi | |
4164 | +\toks0={##}% | |
4165 | +% make preamble advance col counter if this environment needs this | |
4166 | +\if@advanceIEEEeqncolcnt\@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}\fi | |
4167 | +% insert the column defintion into the preamble, being careful not to expand | |
4168 | +% the column definition | |
4169 | +\@IEEEappendtoksA{\tabskip=\@IEEEBPcurglue}% | |
4170 | +\@IEEEappendNOEXPANDtoksA{\begingroup\csname @IEEEeqnarraycolPRE}% | |
4171 | +\@IEEEappendtoksA{\@IEEEBPcurcolname}% | |
4172 | +\@IEEEappendNOEXPANDtoksA{\endcsname}% | |
4173 | +\@IEEEappendtoksA{\the\toks0}% | |
4174 | +\@IEEEappendNOEXPANDtoksA{\relax\relax\relax\relax\relax% | |
4175 | +\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST}% | |
4176 | +\@IEEEappendtoksA{\@IEEEBPcurcolname}% | |
4177 | +\@IEEEappendNOEXPANDtoksA{\endcsname\relax\relax\relax\relax\relax% | |
4178 | +\relax\relax\relax\relax\relax\endgroup}% | |
4179 | +\advance\@IEEEeqnnumcols by 1\relax%one more column in the preamble | |
4180 | +\else% error: non-start glue with no pending column | |
4181 | +\@IEEEclspkgerror{Inter-column glue specifier without a prior column\MessageBreak | |
4182 | +type in the column specifications. Ignoring this glue\MessageBreak | |
4183 | +specifier}% | |
4184 | +{Except for the first and last positions, glue can be placed only\MessageBreak | |
4185 | +between column types.}% | |
4186 | +\let\@IEEEBPcurtype=a% abort this glue | |
4187 | +\fi% previous was a column | |
4188 | +\fi% back-to-back glues | |
4189 | +\fi% is start column glue | |
4190 | +\fi% prev type not a | |
4191 | +} | |
4192 | + | |
4193 | + | |
4194 | +% process an acquired letter referenced column and, if necessary, add it to the preamble | |
4195 | +\def\@IEEEprocessCcol{\if\@IEEEBPnexttype g\else | |
4196 | +\if\@IEEEBPnexttype n\else | |
4197 | +% we have a column followed by something other than a glue (or numeral glue) | |
4198 | +% so we must add this column to the preamble now | |
4199 | +\ifnum\@IEEEeqnnumcols>0\relax\@IEEEappendtoksA{&}\fi%col separator for those after the first | |
4200 | +\if\@IEEEBPnexttype e\@IEEEappendtoksA{\tabskip=\@IEEEBPendglue\relax}\else%put in end glue | |
4201 | +\@IEEEappendtoksA{\tabskip=\@IEEEeqnarraycolSEPdefaultmid\relax}\fi% or default mid glue | |
4202 | +\toks0={##}% | |
4203 | +% make preamble advance col counter if this environment needs this | |
4204 | +\if@advanceIEEEeqncolcnt\@IEEEappendtoksA{\global\advance\@IEEEeqncolcnt by 1\relax}\fi | |
4205 | +% insert the column definition into the preamble, being careful not to expand | |
4206 | +% the column definition | |
4207 | +\@IEEEappendNOEXPANDtoksA{\begingroup\csname @IEEEeqnarraycolPRE}% | |
4208 | +\@IEEEappendtoksA{\@IEEEBPcurcolname}% | |
4209 | +\@IEEEappendNOEXPANDtoksA{\endcsname}% | |
4210 | +\@IEEEappendtoksA{\the\toks0}% | |
4211 | +\@IEEEappendNOEXPANDtoksA{\relax\relax\relax\relax\relax% | |
4212 | +\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST}% | |
4213 | +\@IEEEappendtoksA{\@IEEEBPcurcolname}% | |
4214 | +\@IEEEappendNOEXPANDtoksA{\endcsname\relax\relax\relax\relax\relax% | |
4215 | +\relax\relax\relax\relax\relax\endgroup}% | |
4216 | +\advance\@IEEEeqnnumcols by 1\relax%one more column in the preamble | |
4217 | +\fi%next type not numeral | |
4218 | +\fi%next type not glue | |
4219 | +} | |
4220 | + | |
4221 | + | |
4222 | +%% | |
4223 | +%% END OF IEEEeqnarray DEFINITIONS | |
4224 | +%% | |
4225 | + | |
4226 | + | |
4227 | + | |
4228 | + | |
4229 | + | |
4230 | +% set up the running headers and footers | |
4231 | +% | |
4232 | +% header and footer font and size specifications | |
4233 | +\def\@IEEEheaderstyle{\normalfont\scriptsize} | |
4234 | +\def\@IEEEfooterstyle{\normalfont\scriptsize} | |
4235 | +% | |
4236 | +% compsoc uses sans-serif headers and footers | |
4237 | +\ifCLASSOPTIONcompsoc | |
4238 | + \def\@IEEEheaderstyle{\normalfont\sffamily\scriptsize} | |
4239 | + \def\@IEEEfooterstyle{\normalfont\sffamily\scriptsize} | |
4240 | +\fi | |
4241 | + | |
4242 | + | |
4243 | +% standard page style, ps@headings | |
4244 | +\def\ps@headings{% default to standard twoside headers, no footers | |
4245 | +% will change later if the mode requires otherwise | |
4246 | +\def\@oddhead{\hbox{}\@IEEEheaderstyle\rightmark\hfil\thepage}\relax | |
4247 | +\def\@evenhead{\@IEEEheaderstyle\thepage\hfil\leftmark\hbox{}}\relax | |
4248 | +\let\@oddfoot\@empty | |
4249 | +\let\@evenfoot\@empty | |
4250 | +\ifCLASSOPTIONtechnote | |
4251 | + % technote twoside | |
4252 | + \def\@oddhead{\hbox{}\@IEEEheaderstyle\leftmark\hfil\thepage}\relax | |
4253 | + \def\@evenhead{\@IEEEheaderstyle\thepage\hfil\leftmark\hbox{}}\relax | |
4254 | +\fi | |
4255 | +\ifCLASSOPTIONdraftcls | |
4256 | + % draft footers | |
4257 | + \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax | |
4258 | + \def\@evenfoot{\@IEEEfooterstyle DRAFT\hfil\@date}\relax | |
4259 | +\fi | |
4260 | +% oneside | |
4261 | +\if@twoside\else | |
4262 | + % standard one side headers | |
4263 | + \def\@oddhead{\hbox{}\@IEEEheaderstyle\leftmark\hfil\thepage}\relax | |
4264 | + \let\@evenhead\@empty | |
4265 | + \ifCLASSOPTIONdraftcls | |
4266 | + % oneside draft footers | |
4267 | + \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax | |
4268 | + \let\@evenfoot\@empty | |
4269 | + \fi | |
4270 | +\fi | |
4271 | +% turn off headers for conferences | |
4272 | +\ifCLASSOPTIONconference | |
4273 | + \let\@oddhead\@empty | |
4274 | + \let\@evenhead\@empty | |
4275 | +\fi | |
4276 | +% turn off footers for draftclsnofoot | |
4277 | +\ifCLASSOPTIONdraftclsnofoot | |
4278 | + \let\@oddfoot\@empty | |
4279 | + \let\@evenfoot\@empty | |
4280 | +\fi} | |
4281 | + | |
4282 | + | |
4283 | +% title page style, ps@IEEEtitlepagestyle | |
4284 | +\def\ps@IEEEtitlepagestyle{% default title page headers, no footers | |
4285 | +\def\@oddhead{\hbox{}\@IEEEheaderstyle\leftmark\hfil\thepage}\relax | |
4286 | +\def\@evenhead{\@IEEEheaderstyle\thepage\hfil\leftmark\hbox{}}\relax | |
4287 | +\let\@oddfoot\@empty | |
4288 | +\let\@evenfoot\@empty | |
4289 | +% will change later if the mode requires otherwise | |
4290 | +\ifCLASSOPTIONdraftcls | |
4291 | + % draft footers | |
4292 | + \ifCLASSOPTIONdraftclsnofoot\else | |
4293 | + % but only if not draftclsnofoot | |
4294 | + \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax | |
4295 | + \def\@evenfoot{\@IEEEfooterstyle DRAFT\hfil\@date}\relax | |
4296 | + \fi | |
4297 | +\else | |
4298 | + % all nondraft mode footers | |
4299 | + \if@IEEEusingpubid | |
4300 | + % for title pages that are using a pubid | |
4301 | + % do not repeat pubid on the title page if using a peer review cover page | |
4302 | + \ifCLASSOPTIONpeerreview\else | |
4303 | + % for noncompsoc papers, the pubid uses footnotesize and | |
4304 | + % is at the same vertical position as where the last baseline would normally be | |
4305 | + \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax | |
4306 | + \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax | |
4307 | + \ifCLASSOPTIONcompsoc | |
4308 | + % for compsoc papers, the pubid is at the same vertical position as the normal footer | |
4309 | + \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax | |
4310 | + \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax | |
4311 | + \fi | |
4312 | + \fi | |
4313 | + \fi | |
4314 | +\fi | |
4315 | +% turn off headers for conferences | |
4316 | +\ifCLASSOPTIONconference | |
4317 | + \let\@oddhead\@empty | |
4318 | + \let\@evenhead\@empty | |
4319 | +\fi} | |
4320 | + | |
4321 | + | |
4322 | +% peer review cover page style, ps@IEEEpeerreviewcoverpagestyle | |
4323 | +\def\ps@IEEEpeerreviewcoverpagestyle{% default peer review cover no headers, no footers | |
4324 | +\let\@oddhead\@empty | |
4325 | +\let\@evenhead\@empty | |
4326 | +\let\@oddfoot\@empty | |
4327 | +\let\@evenfoot\@empty | |
4328 | +% will change later if the mode requires otherwise | |
4329 | +\ifCLASSOPTIONdraftcls | |
4330 | + % draft footers | |
4331 | + \ifCLASSOPTIONdraftclsnofoot\else | |
4332 | + % but only if not draftclsnofoot | |
4333 | + \def\@oddfoot{\@IEEEfooterstyle\@date\hfil DRAFT}\relax | |
4334 | + \def\@evenfoot{\@IEEEfooterstyle DRAFT\hfil\@date}\relax | |
4335 | + \fi | |
4336 | +\else | |
4337 | + % all nondraft mode footers | |
4338 | + \if@IEEEusingpubid | |
4339 | + % for peer review cover pages that are using a pubid | |
4340 | + % for noncompsoc papers, the pubid uses footnotesize and | |
4341 | + % is at the same vertical position as where the last baseline would normally be | |
4342 | + \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax | |
4343 | + \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\footnotesize\raisebox{\footskip}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax | |
4344 | + \ifCLASSOPTIONcompsoc | |
4345 | + % for compsoc papers, the pubid is at the same vertical position as the normal footer | |
4346 | + \def\@oddfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax | |
4347 | + \def\@evenfoot{\hbox{}\hss\@IEEEfooterstyle\raisebox{0pt}[0pt][0pt]{\@IEEEpubid}\hss\hbox{}}\relax | |
4348 | + \fi | |
4349 | + \fi | |
4350 | +\fi} | |
4351 | + | |
4352 | + | |
4353 | + | |
4354 | +%% Defines the command for putting the header. | |
4355 | +%% Note that all the text is forced into uppercase, if you have some text | |
4356 | +%% that needs to be in lower case, for instance et. al., then either manually | |
4357 | +%% set \leftmark and \rightmark or use \MakeLowercase{et. al.} within the | |
4358 | +%% arguments to \markboth. | |
4359 | +%% V1.7b add \protect to work with Babel | |
4360 | +\def\markboth#1#2{\def\leftmark{\MakeUppercase{\protect#1}}% | |
4361 | +\def\rightmark{\MakeUppercase{\protect#2}}} | |
4362 | + | |
4363 | +\def\today{\ifcase\month\or | |
4364 | + January\or February\or March\or April\or May\or June\or | |
4365 | + July\or August\or September\or October\or November\or December\fi | |
4366 | + \space\number\day, \number\year} | |
4367 | + | |
4368 | + | |
4369 | + | |
4370 | + | |
4371 | +%% CITATION AND BIBLIOGRAPHY COMMANDS | |
4372 | +%% | |
4373 | +%% V1.6 no longer supports the older, nonstandard \shortcite and \citename setup stuff | |
4374 | +% | |
4375 | +% | |
4376 | +% Modify Latex2e \@citex to separate citations with "], [" | |
4377 | +\def\@citex[#1]#2{% | |
4378 | + \let\@citea\@empty | |
4379 | + \@cite{\@for\@citeb:=#2\do | |
4380 | + {\@citea\def\@citea{], [}% | |
4381 | + \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}% | |
4382 | + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi | |
4383 | + \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}% | |
4384 | + \G@refundefinedtrue | |
4385 | + \@latex@warning | |
4386 | + {Citation `\@citeb' on page \thepage \space undefined}}% | |
4387 | + {\hbox{\csname b@\@citeb\endcsname}}}}{#1}} | |
4388 | + | |
4389 | +% V1.6 we create hooks for the optional use of Donald Arseneau's | |
4390 | +% cite.sty package. cite.sty is "smart" and will notice that the | |
4391 | +% following format controls are already defined and will not | |
4392 | +% redefine them. The result will be the proper sorting of the | |
4393 | +% citation numbers and auto detection of 3 or more entry "ranges" - | |
4394 | +% all in IEEE style: [1], [2], [5]--[7], [12] | |
4395 | +% This also allows for an optional note, i.e., \cite[mynote]{..}. | |
4396 | +% If the \cite with note has more than one reference, the note will | |
4397 | +% be applied to the last of the listed references. It is generally | |
4398 | +% desired that if a note is given, only one reference is listed in | |
4399 | +% that \cite. | |
4400 | +% Thanks to Mr. Arseneau for providing the required format arguments | |
4401 | +% to produce the IEEE style. | |
4402 | +\def\citepunct{], [} | |
4403 | +\def\citedash{]--[} | |
4404 | + | |
4405 | +% V1.7 default to using same font for urls made by url.sty | |
4406 | +\AtBeginDocument{\csname url@samestyle\endcsname} | |
4407 | + | |
4408 | +% V1.6 class files should always provide these | |
4409 | +\def\newblock{\hskip .11em\@plus.33em\@minus.07em} | |
4410 | +\let\@openbib@code\@empty | |
4411 | +% V1.8b article.cls is now providing these too | |
4412 | +% we do not use \@mkboth, nor alter the page style | |
4413 | +\newenvironment{theindex} | |
4414 | + {\if@twocolumn | |
4415 | + \@restonecolfalse | |
4416 | + \else | |
4417 | + \@restonecoltrue | |
4418 | + \fi | |
4419 | + \twocolumn[\section*{\indexname}]% | |
4420 | + \parindent\z@ | |
4421 | + \parskip\z@ \@plus .3\p@\relax | |
4422 | + \columnseprule \z@ | |
4423 | + \columnsep 35\p@ | |
4424 | + \let\item\@idxitem} | |
4425 | + {\if@restonecol\onecolumn\else\clearpage\fi} | |
4426 | +\newcommand\@idxitem{\par\hangindent 40\p@} | |
4427 | +\newcommand\subitem{\@idxitem \hspace*{20\p@}} | |
4428 | +\newcommand\subsubitem{\@idxitem \hspace*{30\p@}} | |
4429 | +\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} | |
4430 | + | |
4431 | + | |
4432 | + | |
4433 | +% Provide support for the control entries of IEEEtran.bst V1.00 and later. | |
4434 | +% V1.7 optional argument allows for a different aux file to be specified in | |
4435 | +% order to handle multiple bibliographies. For example, with multibib.sty: | |
4436 | +% \newcites{sec}{Secondary Literature} | |
4437 | +% \bstctlcite[@auxoutsec]{BSTcontrolhak} | |
4438 | +\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}} | |
4439 | +\def\@bstctlcite[#1]#2{\@bsphack | |
4440 | + \@for\@citeb:=#2\do{% | |
4441 | + \edef\@citeb{\expandafter\@firstofone\@citeb}% | |
4442 | + \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}% | |
4443 | + \@esphack} | |
4444 | + | |
4445 | +% \IEEEnoauxwrite{} allows for citations that do not add to or affect | |
4446 | +% the order of the existing citation list. Can be useful for \cite | |
4447 | +% within \thanks{}. | |
4448 | +\DeclareRobustCommand{\IEEEnoauxwrite}[1]{\relax | |
4449 | +\if@filesw | |
4450 | +\@fileswfalse | |
4451 | +#1\relax\relax\relax\relax\relax | |
4452 | +\@fileswtrue | |
4453 | +\else | |
4454 | +#1\relax\relax\relax\relax\relax | |
4455 | +\fi} | |
4456 | + | |
4457 | +% V1.6 provide a way for a user to execute a command just before | |
4458 | +% a given reference number - used to insert a \newpage to balance | |
4459 | +% the columns on the last page | |
4460 | +\edef\@IEEEtriggerrefnum{0} % the default of zero means that | |
4461 | + % the command is not executed | |
4462 | +\def\@IEEEtriggercmd{\newpage} | |
4463 | + | |
4464 | +% allow the user to alter the triggered command | |
4465 | +\long\def\IEEEtriggercmd#1{\long\def\@IEEEtriggercmd{#1}} | |
4466 | + | |
4467 | +% allow user a way to specify the reference number just before the | |
4468 | +% command is executed | |
4469 | +\def\IEEEtriggeratref#1{\@IEEEtrantmpcountA=#1% | |
4470 | +\edef\@IEEEtriggerrefnum{\the\@IEEEtrantmpcountA}}% | |
4471 | + | |
4472 | +% trigger command at the given reference | |
4473 | +\def\@IEEEbibitemprefix{\@IEEEtrantmpcountA=\@IEEEtriggerrefnum\relax% | |
4474 | +\advance\@IEEEtrantmpcountA by -1\relax% | |
4475 | +\ifnum\c@enumiv=\@IEEEtrantmpcountA\relax\@IEEEtriggercmd\relax\fi} | |
4476 | + | |
4477 | + | |
4478 | +\def\@biblabel#1{[#1]} | |
4479 | + | |
4480 | +% compsoc journals and conferences left align the reference numbers | |
4481 | +\@IEEEcompsoconly{\def\@biblabel#1{[#1]\hfill}} | |
4482 | + | |
4483 | +% controls bib item spacing | |
4484 | +\def\IEEEbibitemsep{0pt plus .5pt} | |
4485 | + | |
4486 | +\@IEEEcompsocconfonly{\def\IEEEbibitemsep{0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}} | |
4487 | + | |
4488 | + | |
4489 | +\def\thebibliography#1{\section*{\refname}% | |
4490 | + \addcontentsline{toc}{section}{\refname}% | |
4491 | + % V1.6 add some rubber space here and provide a command trigger | |
4492 | + \footnotesize\vskip 0.3\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip% | |
4493 | + \list{\@biblabel{\@arabic\c@enumiv}}% | |
4494 | + {\settowidth\labelwidth{\@biblabel{#1}}% | |
4495 | + \leftmargin\labelwidth | |
4496 | + \advance\leftmargin\labelsep\relax | |
4497 | + \itemsep \IEEEbibitemsep\relax | |
4498 | + \usecounter{enumiv}% | |
4499 | + \let\p@enumiv\@empty | |
4500 | + \renewcommand\theenumiv{\@arabic\c@enumiv}}% | |
4501 | + \let\@IEEElatexbibitem\bibitem% | |
4502 | + \def\bibitem{\@IEEEbibitemprefix\@IEEElatexbibitem}% | |
4503 | +\def\newblock{\hskip .11em plus .33em minus .07em}% | |
4504 | +% originally: | |
4505 | +% \sloppy\clubpenalty4000\widowpenalty4000% | |
4506 | +% by adding the \interlinepenalty here, we make it more | |
4507 | +% difficult, but not impossible, for LaTeX to break within a reference. | |
4508 | +% The IEEE almost never breaks a reference (but they do it more often with | |
4509 | +% technotes). You may get an underfull vbox warning around the bibliography, | |
4510 | +% but the final result will be much more like what the IEEE will publish. | |
4511 | +% MDS 11/2000 | |
4512 | +\ifCLASSOPTIONtechnote\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty100% | |
4513 | +\else\sloppy\clubpenalty4000\widowpenalty4000\interlinepenalty500\fi% | |
4514 | + \sfcode`\.=1000\relax} | |
4515 | +\let\endthebibliography=\endlist | |
4516 | + | |
4517 | + | |
4518 | + | |
4519 | + | |
4520 | +% TITLE PAGE COMMANDS | |
4521 | +% | |
4522 | +% | |
4523 | +% \IEEEmembership is used to produce the sublargesize italic font used to indicate author | |
4524 | +% IEEE membership. compsoc uses a large size sans slant font | |
4525 | +\def\IEEEmembership#1{{\@IEEEnotcompsoconly{\sublargesize}\normalfont\@IEEEcompsoconly{\sffamily}\textit{#1}}} | |
4526 | + | |
4527 | + | |
4528 | +% \IEEEauthorrefmark{} produces a footnote type symbol to indicate author affiliation. | |
4529 | +% When given an argument of 1 to 9, \IEEEauthorrefmark{} follows the standard LaTeX footnote | |
4530 | +% symbol sequence convention. However, for arguments 10 and above, \IEEEauthorrefmark{} | |
4531 | +% reverts to using lower case roman numerals, so it cannot overflow. Do note that you | |
4532 | +% cannot use \footnotemark[] in place of \IEEEauthorrefmark{} within \author as the footnote | |
4533 | +% symbols will have been turned off to prevent \thanks from creating footnote marks. | |
4534 | +% \IEEEauthorrefmark{} produces a symbol that appears to LaTeX as having zero vertical | |
4535 | +% height - this allows for a more compact line packing, but the user must ensure that | |
4536 | +% the interline spacing is large enough to prevent \IEEEauthorrefmark{} from colliding | |
4537 | +% with the text above. | |
4538 | +% V1.7 make this a robust command | |
4539 | +% V1.8 transmag uses an arabic author affiliation symbol | |
4540 | +\ifCLASSOPTIONtransmag | |
4541 | +\DeclareRobustCommand*{\IEEEauthorrefmark}[1]{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize #1}}} | |
4542 | +\else | |
4543 | +\DeclareRobustCommand*{\IEEEauthorrefmark}[1]{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or% | |
4544 | + \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger% | |
4545 | + \or \ddagger\ddagger \else\textsuperscript{\expandafter\romannumeral#1}\fi}}}} | |
4546 | +\fi | |
4547 | + | |
4548 | + | |
4549 | +% FONT CONTROLS AND SPACINGS FOR CONFERENCE MODE AUTHOR NAME AND AFFILIATION BLOCKS | |
4550 | +% | |
4551 | +% The default font styles for the author name and affiliation blocks (confmode) | |
4552 | +\def\@IEEEauthorblockNstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\sublargesize} | |
4553 | +\def\@IEEEauthorblockAstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\@IEEEcompsocconfonly{\itshape}\normalsize} | |
4554 | +% The default if the user does not use an author block | |
4555 | +\def\@IEEEauthordefaulttextstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\sublargesize} | |
4556 | + | |
4557 | +% adjustment spacing from title (or special paper notice) to author name blocks (confmode) | |
4558 | +% can be negative | |
4559 | +\def\@IEEEauthorblockconfadjspace{-0.25em} | |
4560 | +% compsoc conferences need more space here | |
4561 | +\@IEEEcompsocconfonly{\def\@IEEEauthorblockconfadjspace{0.75\@IEEEnormalsizeunitybaselineskip}} | |
4562 | + | |
4563 | +% spacing between name and affiliation blocks (confmode) | |
4564 | +% This can be negative. | |
4565 | +% The IEEE doesn't want any added spacing here, but I will leave these | |
4566 | +% controls in place in case they ever change their mind. | |
4567 | +% Personally, I like 0.75ex. | |
4568 | +%\def\@IEEEauthorblockNtopspace{0.75ex} | |
4569 | +%\def\@IEEEauthorblockAtopspace{0.75ex} | |
4570 | +\def\@IEEEauthorblockNtopspace{0.0ex} | |
4571 | +\def\@IEEEauthorblockAtopspace{0.0ex} | |
4572 | +\ifCLASSOPTIONtransmag | |
4573 | +% transmag uses one line of space above first affiliation block | |
4574 | +\def\@IEEEauthorblockAtopspace{1\@IEEEnormalsizeunitybaselineskip} | |
4575 | +\fi | |
4576 | + | |
4577 | +% baseline spacing within name and affiliation blocks (confmode) | |
4578 | +% must be positive, spacings below certain values will make | |
4579 | +% the position of line of text sensitive to the contents of the | |
4580 | +% line above it i.e., whether or not the prior line has descenders, | |
4581 | +% subscripts, etc. For this reason it is a good idea to keep | |
4582 | +% these above 2.6ex | |
4583 | +\def\@IEEEauthorblockNinterlinespace{2.6ex} | |
4584 | +\def\@IEEEauthorblockAinterlinespace{2.75ex} | |
4585 | + | |
4586 | +% This tracks the required strut size. | |
4587 | +% See the \@IEEEauthorhalign command for the actual default value used. | |
4588 | +\def\@IEEEauthorblockXinterlinespace{2.7ex} | |
4589 | + | |
4590 | +% variables to retain font size and style across groups | |
4591 | +% values given here have no effect as they will be overwritten later | |
4592 | +\gdef\@IEEESAVESTATEfontsize{10} | |
4593 | +\gdef\@IEEESAVESTATEfontbaselineskip{12} | |
4594 | +\gdef\@IEEESAVESTATEfontencoding{OT1} | |
4595 | +\gdef\@IEEESAVESTATEfontfamily{ptm} | |
4596 | +\gdef\@IEEESAVESTATEfontseries{m} | |
4597 | +\gdef\@IEEESAVESTATEfontshape{n} | |
4598 | + | |
4599 | +% saves the current font attributes | |
4600 | +\def\@IEEEcurfontSAVE{\global\let\@IEEESAVESTATEfontsize\f@size% | |
4601 | +\global\let\@IEEESAVESTATEfontbaselineskip\f@baselineskip% | |
4602 | +\global\let\@IEEESAVESTATEfontencoding\f@encoding% | |
4603 | +\global\let\@IEEESAVESTATEfontfamily\f@family% | |
4604 | +\global\let\@IEEESAVESTATEfontseries\f@series% | |
4605 | +\global\let\@IEEESAVESTATEfontshape\f@shape} | |
4606 | + | |
4607 | +% restores the saved font attributes | |
4608 | +\def\@IEEEcurfontRESTORE{\fontsize{\@IEEESAVESTATEfontsize}{\@IEEESAVESTATEfontbaselineskip}% | |
4609 | +\fontencoding{\@IEEESAVESTATEfontencoding}% | |
4610 | +\fontfamily{\@IEEESAVESTATEfontfamily}% | |
4611 | +\fontseries{\@IEEESAVESTATEfontseries}% | |
4612 | +\fontshape{\@IEEESAVESTATEfontshape}% | |
4613 | +\selectfont} | |
4614 | + | |
4615 | + | |
4616 | +% variable to indicate if the current block is the first block in the column | |
4617 | +\newif\if@IEEEprevauthorblockincol \@IEEEprevauthorblockincolfalse | |
4618 | + | |
4619 | + | |
4620 | +% the command places a strut with height and depth = \@IEEEauthorblockXinterlinespace | |
4621 | +% we use this technique to have complete manual control over the spacing of the lines | |
4622 | +% within the halign environment. | |
4623 | +% We set the below baseline portion at 30%, the above | |
4624 | +% baseline portion at 70% of the total length. | |
4625 | +% Responds to changes in the document's \baselinestretch | |
4626 | +\def\@IEEEauthorstrutrule{\@IEEEtrantmpdimenA\@IEEEauthorblockXinterlinespace% | |
4627 | +\@IEEEtrantmpdimenA=\baselinestretch\@IEEEtrantmpdimenA% | |
4628 | +\rule[-0.3\@IEEEtrantmpdimenA]{0pt}{\@IEEEtrantmpdimenA}} | |
4629 | + | |
4630 | + | |
4631 | +% blocks to hold the authors' names and affilations. | |
4632 | +% Makes formatting easy for conferences | |
4633 | +% | |
4634 | +% use real definitions in conference mode | |
4635 | +% name block | |
4636 | +\def\IEEEauthorblockN#1{\relax\@IEEEauthorblockNstyle% set the default text style | |
4637 | +\gdef\@IEEEauthorblockXinterlinespace{0pt}% disable strut for spacer row | |
4638 | +% the \expandafter hides the \cr in conditional tex, see the array.sty docs | |
4639 | +% for details, probably not needed here as the \cr is in a macro | |
4640 | +% do a spacer row if needed | |
4641 | +\if@IEEEprevauthorblockincol\expandafter\@IEEEauthorblockNtopspaceline\fi | |
4642 | +\global\@IEEEprevauthorblockincoltrue% we now have a block in this column | |
4643 | +%restore the correct strut value | |
4644 | +\gdef\@IEEEauthorblockXinterlinespace{\@IEEEauthorblockNinterlinespace}% | |
4645 | +% input the author names | |
4646 | +#1% | |
4647 | +% end the row if the user did not already | |
4648 | +\crcr} | |
4649 | +% spacer row for names | |
4650 | +\def\@IEEEauthorblockNtopspaceline{\cr\noalign{\vskip\@IEEEauthorblockNtopspace}} | |
4651 | +% | |
4652 | +% affiliation block | |
4653 | +\def\IEEEauthorblockA#1{\relax\@IEEEauthorblockAstyle% set the default text style | |
4654 | +\gdef\@IEEEauthorblockXinterlinespace{0pt}%disable strut for spacer row | |
4655 | +% the \expandafter hides the \cr in conditional tex, see the array.sty docs | |
4656 | +% for details, probably not needed here as the \cr is in a macro | |
4657 | +% do a spacer row if needed | |
4658 | +\if@IEEEprevauthorblockincol\expandafter\@IEEEauthorblockAtopspaceline\fi | |
4659 | +\global\@IEEEprevauthorblockincoltrue% we now have a block in this column | |
4660 | +%restore the correct strut value | |
4661 | +\gdef\@IEEEauthorblockXinterlinespace{\@IEEEauthorblockAinterlinespace}% | |
4662 | +% input the author affiliations | |
4663 | +#1% | |
4664 | +% end the row if the user did not already | |
4665 | +\crcr | |
4666 | +% V1.8 transmag does not use any additional affiliation spacing after the first author | |
4667 | +\ifCLASSOPTIONtransmag\gdef\@IEEEauthorblockAtopspace{0pt}\fi} | |
4668 | + | |
4669 | +% spacer row for affiliations | |
4670 | +\def\@IEEEauthorblockAtopspaceline{\cr\noalign{\vskip\@IEEEauthorblockAtopspace}} | |
4671 | + | |
4672 | + | |
4673 | +% allow papers to compile even if author blocks are used in modes other | |
4674 | +% than conference or peerreviewca. For such cases, we provide dummy blocks. | |
4675 | +\ifCLASSOPTIONconference | |
4676 | +\else | |
4677 | + \ifCLASSOPTIONpeerreviewca\else | |
4678 | + % not conference, peerreviewca or transmag mode | |
4679 | + \ifCLASSOPTIONtransmag\else | |
4680 | + \def\IEEEauthorblockN#1{#1}% | |
4681 | + \def\IEEEauthorblockA#1{#1}% | |
4682 | + \fi | |
4683 | + \fi | |
4684 | +\fi | |
4685 | + | |
4686 | + | |
4687 | + | |
4688 | +% we provide our own halign so as not to have to depend on tabular | |
4689 | +\def\@IEEEauthorhalign{\@IEEEauthordefaulttextstyle% default text style | |
4690 | + \lineskip=0pt\relax% disable line spacing | |
4691 | + \lineskiplimit=0pt\relax% | |
4692 | + \baselineskip=0pt\relax% | |
4693 | + \@IEEEcurfontSAVE% save the current font | |
4694 | + \mathsurround\z@\relax% no extra spacing around math | |
4695 | + \let\\\@IEEEauthorhaligncr% replace newline with halign friendly one | |
4696 | + \tabskip=0pt\relax% no column spacing | |
4697 | + \everycr{}% ensure no problems here | |
4698 | + \@IEEEprevauthorblockincolfalse% no author blocks yet | |
4699 | + \def\@IEEEauthorblockXinterlinespace{2.7ex}% default interline space | |
4700 | + \vtop\bgroup%vtop box | |
4701 | + \halign\bgroup&\relax\hfil\@IEEEcurfontRESTORE\relax ##\relax | |
4702 | + \hfil\@IEEEcurfontSAVE\@IEEEauthorstrutrule\cr} | |
4703 | + | |
4704 | +% ensure last line, exit from halign, close vbox | |
4705 | +\def\end@IEEEauthorhalign{\crcr\egroup\egroup} | |
4706 | + | |
4707 | +% handle bogus star form | |
4708 | +\def\@IEEEauthorhaligncr{{\ifnum0=`}\fi\@ifstar{\@@IEEEauthorhaligncr}{\@@IEEEauthorhaligncr}} | |
4709 | + | |
4710 | +% test and setup the optional argument to \\[] | |
4711 | +\def\@@IEEEauthorhaligncr{\@testopt\@@@IEEEauthorhaligncr\z@skip} | |
4712 | + | |
4713 | +% end the line and do the optional spacer | |
4714 | +\def\@@@IEEEauthorhaligncr[#1]{\ifnum0=`{\fi}\cr\noalign{\vskip#1\relax}} | |
4715 | + | |
4716 | + | |
4717 | + | |
4718 | +% flag to prevent multiple \and warning messages | |
4719 | +\newif\if@IEEEWARNand | |
4720 | +\@IEEEWARNandtrue | |
4721 | + | |
4722 | +% if in conference or peerreviewca modes, we support the use of \and as \author is a | |
4723 | +% tabular environment, otherwise we warn the user that \and is invalid | |
4724 | +% outside of conference or peerreviewca modes. | |
4725 | +\def\and{\relax} % provide a bogus \and that we will then override | |
4726 | + | |
4727 | +\renewcommand{\and}[1][\relax]{\if@IEEEWARNand\typeout{** WARNING: \noexpand\and is valid only | |
4728 | + when in conference or peerreviewca}\typeout{modes (line \the\inputlineno).}\fi\global\@IEEEWARNandfalse} | |
4729 | + | |
4730 | +\ifCLASSOPTIONconference% | |
4731 | +\renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}% | |
4732 | +\fi | |
4733 | +\ifCLASSOPTIONpeerreviewca | |
4734 | +\renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}% | |
4735 | +\fi | |
4736 | +% V1.8 transmag uses conference author format | |
4737 | +\ifCLASSOPTIONtransmag | |
4738 | +\renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}% | |
4739 | +\fi | |
4740 | + | |
4741 | +% page clearing command | |
4742 | +% based on LaTeX2e's \cleardoublepage, but allows different page styles | |
4743 | +% for the inserted blank pages | |
4744 | +\def\@IEEEcleardoublepage#1{\clearpage\if@twoside\ifodd\c@page\else | |
4745 | +\hbox{}\thispagestyle{#1}\newpage\if@twocolumn\hbox{}\thispagestyle{#1}\newpage\fi\fi\fi} | |
4746 | + | |
4747 | +% V1.8b hooks to allow adjustment of space above title | |
4748 | +\def\IEEEtitletopspace{0.5\baselineskip} | |
4749 | +% an added extra amount to allow for adjustment/offset | |
4750 | +\def\IEEEtitletopspaceextra{0pt} | |
4751 | + | |
4752 | +% user command to invoke the title page | |
4753 | +\def\maketitle{\par% | |
4754 | + \begingroup% | |
4755 | + \normalfont% | |
4756 | + \def\thefootnote{}% the \thanks{} mark type is empty | |
4757 | + \def\footnotemark{}% and kill space from \thanks within author | |
4758 | + \let\@makefnmark\relax% V1.7, must *really* kill footnotemark to remove all \textsuperscript spacing as well. | |
4759 | + \footnotesize% equal spacing between thanks lines | |
4760 | + \footnotesep 0.7\baselineskip%see global setting of \footnotesep for more info | |
4761 | + % V1.7 disable \thanks note indention for compsoc | |
4762 | + \@IEEEcompsoconly{\long\def\@makefntext##1{\parindent 1em\noindent\hbox{\@makefnmark}##1}}% | |
4763 | + \normalsize% | |
4764 | + \ifCLASSOPTIONpeerreview | |
4765 | + \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext% | |
4766 | + \thispagestyle{IEEEpeerreviewcoverpagestyle}\@thanks% | |
4767 | + \else | |
4768 | + \if@twocolumn% | |
4769 | + \ifCLASSOPTIONtechnote% | |
4770 | + \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext% | |
4771 | + \else | |
4772 | + \twocolumn[{\IEEEquantizevspace{\@maketitle}[\IEEEquantizedisabletitlecmds]{0pt}[-\topskip]{\baselineskip}{\@IEEENORMtitlevspace}{\@IEEEMINtitlevspace}\@IEEEaftertitletext}]% | |
4773 | + \fi | |
4774 | + \else | |
4775 | + \newpage\global\@topnum\z@ \@maketitle\@IEEEstatictitlevskip\@IEEEaftertitletext% | |
4776 | + \fi | |
4777 | + \thispagestyle{IEEEtitlepagestyle}\@thanks% | |
4778 | + \fi | |
4779 | + % pullup page for pubid if used. | |
4780 | + \if@IEEEusingpubid | |
4781 | + \enlargethispage{-\@IEEEpubidpullup}% | |
4782 | + \fi | |
4783 | + \endgroup | |
4784 | + \setcounter{footnote}{0}\let\maketitle\relax\let\@maketitle\relax | |
4785 | + \gdef\@thanks{}% | |
4786 | + % v1.6b do not clear these as we will need the title again for peer review papers | |
4787 | + % \gdef\@author{}\gdef\@title{}% | |
4788 | + \let\thanks\relax} | |
4789 | + | |
4790 | + | |
4791 | +% V1.8 parbox to format \@IEEEtitleabstractindextext | |
4792 | +\long\def\@IEEEtitleabstractindextextbox#1{\parbox{1\textwidth}{#1}} | |
4793 | +% V1.8 compsoc is partial width | |
4794 | +\ifCLASSOPTIONcompsoc | |
4795 | +% comparison with proofs suggests it's in the range of 92.1-92.3% | |
4796 | +\long\def\@IEEEtitleabstractindextextbox#1{\parbox{0.922\textwidth}{\@IEEEcompsocnotconfonly{\rightskip\@flushglue\leftskip\z@skip}#1}} | |
4797 | +\fi | |
4798 | + | |
4799 | +% formats the Title, authors names, affiliations and special paper notice | |
4800 | +% THIS IS A CONTROLLED SPACING COMMAND! Do not allow blank lines or unintentional | |
4801 | +% spaces to enter the definition - use % at the end of each line | |
4802 | +\def\@maketitle{\newpage | |
4803 | +\bgroup\par\vskip\IEEEtitletopspace\vskip\IEEEtitletopspaceextra\centering% | |
4804 | +\ifCLASSOPTIONtechnote% technotes, V1.8a abstract and index terms are not treated differently for compsoc technotes | |
4805 | + {\bfseries\large\@IEEEcompsoconly{\Large\sffamily}\@title\par}\vskip 1.3em{\lineskip .5em\@IEEEcompsoconly{\large\sffamily}\@author | |
4806 | + \@IEEEspecialpapernotice\par}\relax | |
4807 | +\else% not a technote | |
4808 | + \vskip0.2em{\Huge\ifCLASSOPTIONtransmag\bfseries\LARGE\fi\@IEEEcompsoconly{\sffamily}\@IEEEcompsocconfonly{\normalfont\normalsize\vskip 2\@IEEEnormalsizeunitybaselineskip | |
4809 | + \bfseries\Large}\@IEEEcompsocnotconfonly{\vskip 0.75\@IEEEnormalsizeunitybaselineskip}\@title\par}\relax | |
4810 | + \@IEEEcompsocnotconfonly{\vskip 0.5\@IEEEnormalsizeunitybaselineskip}\vskip1.0em\par% | |
4811 | + % V1.6 handle \author differently if in conference mode | |
4812 | + \ifCLASSOPTIONconference% | |
4813 | + {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace% | |
4814 | + \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par}\relax | |
4815 | + \else% peerreviewca, peerreview or journal | |
4816 | + \ifCLASSOPTIONpeerreviewca | |
4817 | + % peerreviewca handles author names just like conference mode | |
4818 | + {\@IEEEcompsoconly{\sffamily}\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace% | |
4819 | + \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par | |
4820 | + {\@IEEEcompsoconly{\vskip 1.5em\relax | |
4821 | + \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\noindent\hfill | |
4822 | + \IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax | |
4823 | + \else% journal, peerreview or transmag | |
4824 | + \ifCLASSOPTIONtransmag | |
4825 | + % transmag also handles author names just like conference mode | |
4826 | + % it also uses \@IEEEtitleabstractindextex, but with one line less | |
4827 | + % space above, and one more below | |
4828 | + {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace% | |
4829 | + \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par | |
4830 | + {\vspace{0.5\baselineskip}\relax\@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\vspace{-1\baselineskip}\par}}\relax | |
4831 | + \else% journal or peerreview | |
4832 | + {\lineskip.5em\@IEEEcompsoconly{\sffamily}\sublargesize\@author\@IEEEspecialpapernotice\par | |
4833 | + {\@IEEEcompsoconly{\vskip 1.5em\relax | |
4834 | + \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\noindent\hfill | |
4835 | + \IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax | |
4836 | + \fi | |
4837 | + \fi | |
4838 | + \fi | |
4839 | +\fi\par\addvspace{0.5\baselineskip}\egroup} | |
4840 | + | |
4841 | + | |
4842 | +% V1.7 Computer Society "diamond line" which follows index terms for nonconference papers | |
4843 | +% V1.8a full width diamond line for single column use | |
4844 | +\def\@IEEEcompsocdiamondlinei{\vrule depth 0pt height 0.5pt width 4cm\nobreak\hspace{7.5pt}\nobreak | |
4845 | +\raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak | |
4846 | +\hspace{7.5pt}\nobreak\vrule depth 0pt height 0.5pt width 4cm\relax} | |
4847 | +% V1.8a narrower width diamond line for double column use | |
4848 | +\def\@IEEEcompsocdiamondlineii{\vrule depth 0pt height 0.5pt width 2.5cm\nobreak\hspace{7.5pt}\nobreak | |
4849 | +\raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak | |
4850 | +\hspace{7.5pt}\nobreak\vrule depth 0pt height 0.5pt width 2.5cm\relax} | |
4851 | +% V1.8a bare core without rules to base a last resort on for very narrow linewidths | |
4852 | +\def\@IEEEcompsocdiamondlineiii{\mbox{}\nobreak\hspace{7.5pt}\nobreak | |
4853 | +\raisebox{-3.5pt}{\fontfamily{pzd}\fontencoding{U}\fontseries{m}\fontshape{n}\fontsize{11}{12}\selectfont\char70}\nobreak | |
4854 | +\hspace{7.5pt}\nobreak\mbox{}\relax} | |
4855 | + | |
4856 | +% V1.8a allow \IEEEcompsocdiamondline to adjust for different linewidths. | |
4857 | +% Use \@IEEEcompsocdiamondlinei if its width is less than 0.66\linewidth (0.487 nominal for single column) | |
4858 | +% if not, fall back to \@IEEEcompsocdiamondlineii if its width is less than 0.75\linewidth (0.659 nominal for double column) | |
4859 | +% if all else fails, try to make a custom diamondline based on the abnormally narrow linewidth | |
4860 | +\def\IEEEcompsocdiamondline{\settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlinei}\relax | |
4861 | +\ifdim\@IEEEtrantmpdimenA<0.66\linewidth\relax\@IEEEcompsocdiamondlinei\relax | |
4862 | +\else | |
4863 | +\settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlineii}\relax | |
4864 | +\ifdim\@IEEEtrantmpdimenA<0.75\linewidth\relax\@IEEEcompsocdiamondlineii\relax | |
4865 | +\else | |
4866 | +\settowidth{\@IEEEtrantmpdimenA}{\@IEEEcompsocdiamondlineiii}\relax | |
4867 | +\@IEEEtrantmpdimenB=\linewidth\relax | |
4868 | +\addtolength{\@IEEEtrantmpdimenB}{-1\@IEEEtrantmpdimenA}\relax | |
4869 | +\vrule depth 0pt height 0.5pt width 0.33\@IEEEtrantmpdimenB\@IEEEcompsocdiamondlineiii\vrule depth 0pt height 0.5pt width 0.33\@IEEEtrantmpdimenB\relax | |
4870 | +\fi\fi} | |
4871 | + | |
4872 | + | |
4873 | +% V1.7 standard LateX2e \thanks, but with \itshape under compsoc. Also make it a \long\def | |
4874 | +% We also need to trigger the one-shot footnote rule | |
4875 | +\def\@IEEEtriggeroneshotfootnoterule{\global\@IEEEenableoneshotfootnoteruletrue} | |
4876 | + | |
4877 | + | |
4878 | +\long\def\thanks#1{\footnotemark | |
4879 | + \protected@xdef\@thanks{\@thanks | |
4880 | + \protect\footnotetext[\the\c@footnote]{\@IEEEcompsoconly{\itshape | |
4881 | + \protect\@IEEEtriggeroneshotfootnoterule\relax}\ignorespaces#1}}} | |
4882 | +\let\@thanks\@empty | |
4883 | + | |
4884 | + | |
4885 | +% V1.7 allow \author to contain \par's. This is needed to allow \thanks to contain \par. | |
4886 | +\long\def\author#1{\gdef\@author{#1}} | |
4887 | + | |
4888 | + | |
4889 | +% in addition to setting up IEEEitemize, we need to remove a baselineskip space above and | |
4890 | +% below it because \list's \pars introduce blank lines because of the footnote struts. | |
4891 | +\def\@IEEEsetupcompsocitemizelist{\def\labelitemi{$\bullet$}% | |
4892 | +\setlength{\IEEElabelindent}{0pt}\setlength{\labelsep}{1.2em}\setlength{\parskip}{0pt}% | |
4893 | +\setlength{\partopsep}{0pt}\setlength{\topsep}{0.5\baselineskip}\vspace{-1\baselineskip}\relax} | |
4894 | + | |
4895 | + | |
4896 | +% flag for fake non-compsoc \IEEEcompsocthanksitem - prevents line break on very first item | |
4897 | +\newif\if@IEEEbreakcompsocthanksitem \@IEEEbreakcompsocthanksitemfalse | |
4898 | + | |
4899 | +\ifCLASSOPTIONcompsoc | |
4900 | +% V1.7 compsoc bullet item \thanks | |
4901 | +% also, we need to redefine this to destroy the argument in \IEEEquantizevspace | |
4902 | +\long\def\IEEEcompsocitemizethanks#1{\relax\@IEEEbreakcompsocthanksitemfalse\footnotemark | |
4903 | + \protected@xdef\@thanks{\@thanks | |
4904 | + \protect\footnotetext[\the\c@footnote]{\itshape\protect\@IEEEtriggeroneshotfootnoterule | |
4905 | + {\let\IEEEiedlistdecl\relax\protect\begin{IEEEitemize}[\protect\@IEEEsetupcompsocitemizelist]\ignorespaces#1\relax | |
4906 | + \protect\end{IEEEitemize}}\protect\vspace{-1\baselineskip}}}} | |
4907 | +\DeclareRobustCommand*{\IEEEcompsocthanksitem}{\item} | |
4908 | +\else | |
4909 | +% non-compsoc, allow for dual compilation via rerouting to normal \thanks | |
4910 | +\long\def\IEEEcompsocitemizethanks#1{\thanks{#1}} | |
4911 | +% redirect to "pseudo-par" \hfil\break\indent after swallowing [] from \IEEEcompsocthanksitem[] | |
4912 | +\DeclareRobustCommand{\IEEEcompsocthanksitem}{\@ifnextchar [{\@IEEEthanksswallowoptionalarg}% | |
4913 | +{\@IEEEthanksswallowoptionalarg[\relax]}} | |
4914 | +% be sure and break only after first item, be sure and ignore spaces after optional argument | |
4915 | +\def\@IEEEthanksswallowoptionalarg[#1]{\relax\if@IEEEbreakcompsocthanksitem\hfil\break | |
4916 | +\indent\fi\@IEEEbreakcompsocthanksitemtrue\ignorespaces} | |
4917 | +\fi | |
4918 | + | |
4919 | + | |
4920 | +% V1.6b define the \IEEEpeerreviewmaketitle as needed | |
4921 | +\ifCLASSOPTIONpeerreview | |
4922 | +\def\IEEEpeerreviewmaketitle{\@IEEEcleardoublepage{empty}% | |
4923 | +\ifCLASSOPTIONtwocolumn | |
4924 | +\twocolumn[{\IEEEquantizevspace{\@IEEEpeerreviewmaketitle}[\IEEEquantizedisabletitlecmds]{0pt}[-\topskip]{\baselineskip}{\@IEEENORMtitlevspace}{\@IEEEMINtitlevspace}}] | |
4925 | +\else | |
4926 | +\newpage\@IEEEpeerreviewmaketitle\@IEEEstatictitlevskip | |
4927 | +\fi | |
4928 | +\thispagestyle{IEEEtitlepagestyle}} | |
4929 | +\else | |
4930 | +% \IEEEpeerreviewmaketitle does nothing if peer review option has not been selected | |
4931 | +\def\IEEEpeerreviewmaketitle{\relax} | |
4932 | +\fi | |
4933 | + | |
4934 | +% peerreview formats the repeated title like the title in journal papers. | |
4935 | +\def\@IEEEpeerreviewmaketitle{\bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEcompsoconly{\sffamily}% | |
4936 | +\normalfont\normalsize\vskip0.2em{\Huge\@title\par}\vskip1.0em\par | |
4937 | +\par\addvspace{0.5\baselineskip}\egroup} | |
4938 | + | |
4939 | + | |
4940 | + | |
4941 | +% V1.6 | |
4942 | +% this is a static rubber spacer between the title/authors and the main text | |
4943 | +% used for single column text, or when the title appears in the first column | |
4944 | +% of two column text (technotes). | |
4945 | +\def\@IEEEstatictitlevskip{{\normalfont\normalsize | |
4946 | +% adjust spacing to next text | |
4947 | +% v1.6b handle peer review papers | |
4948 | +\ifCLASSOPTIONpeerreview | |
4949 | +% for peer review papers, the same value is used for both title pages | |
4950 | +% regardless of the other paper modes | |
4951 | + \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip | |
4952 | +\else | |
4953 | + \ifCLASSOPTIONconference% conference | |
4954 | + \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip% | |
4955 | + \else% | |
4956 | + \ifCLASSOPTIONtechnote% technote | |
4957 | + \vskip 1\baselineskip plus 0.375\baselineskip minus 0.1875\baselineskip% | |
4958 | + \else% journal uses more space | |
4959 | + \vskip 2.5\baselineskip plus 0.75\baselineskip minus 0.375\baselineskip% | |
4960 | + \fi | |
4961 | + \fi | |
4962 | +\fi}} | |
4963 | + | |
4964 | + | |
4965 | +% set the nominal and minimum values for the quantized title spacer | |
4966 | +% the quantization algorithm will not allow the spacer size to | |
4967 | +% become less than \@IEEEMINtitlevspace - instead it will be lengthened | |
4968 | +% default to journal values | |
4969 | +\def\@IEEENORMtitlevspace{2.5\baselineskip} | |
4970 | +\def\@IEEEMINtitlevspace{2\baselineskip} | |
4971 | +% conferences and technotes need tighter spacing | |
4972 | +\ifCLASSOPTIONconference% conference | |
4973 | + \def\@IEEENORMtitlevspace{1\baselineskip} | |
4974 | + \def\@IEEEMINtitlevspace{0.75\baselineskip} | |
4975 | +\fi | |
4976 | +\ifCLASSOPTIONtechnote% technote | |
4977 | + \def\@IEEENORMtitlevspace{1\baselineskip} | |
4978 | + \def\@IEEEMINtitlevspace{0.75\baselineskip} | |
4979 | +\fi | |
4980 | + | |
4981 | + | |
4982 | +% V1.8a | |
4983 | +\def\IEEEquantizevspace{\begingroup\@ifstar{\@IEEEquantizevspacestarformtrue\@IEEEquantizevspace}{\@IEEEquantizevspacestarformfalse\@IEEEquantizevspace}} | |
4984 | +% \IEEEquantizevspace[output dimen register]{object}[object decl] | |
4985 | +% {top baselineskip} | |
4986 | +% [offset][prevdepth][lineskip limit][lineskip] | |
4987 | +% {unit height}{nominal vspace}{minimum vspace} | |
4988 | +% | |
4989 | +% Calculates and creates the vspace needed to make the combined height with | |
4990 | +% the given object an integer multiple of the given unit height. This command | |
4991 | +% is more general than the older \@IEEEdynamictitlevspace it replaces. | |
4992 | +% | |
4993 | +% The star form has no effect at present, but is reserved for future use. | |
4994 | +% | |
4995 | +% If the optional argument [output dimen register] is given, the calculated | |
4996 | +% vspace height is stored in the given output dimen (or skip) register | |
4997 | +% and no other action is taken, otherwise the object followed by a vspace* | |
4998 | +% of the appropriate height is evaluated/output. | |
4999 | +% | |
5000 | +% The optional object decl (declarations) is code that is evaluated just | |
5001 | +% before the object's height is evaluated. Its intented purpose is to allow | |
5002 | +% for the alteration or disabling of code within the object during internal | |
5003 | +% height evaluation (e.g., \long\def\thanks#1{\relax} ). | |
5004 | +% This special code is not invoked if/when the object is rendered at the end. | |
5005 | +% | |
5006 | +% The nominal vspace is the target value of the added vspace and the minimum | |
5007 | +% vspace is the lower allowed limit. The vspacer will be the value that achieves | |
5008 | +% integral overall height, in terms of the given unit height, that is closest | |
5009 | +% to the nominal vspace and that is not less than the specified minimum vspace. | |
5010 | +% | |
5011 | +% The line spacing algorithm of TeX is somewhat involved and requires special | |
5012 | +% care with regard to the first line of a vertical list (which is indicated | |
5013 | +% when \prevdepth is -1000pt or less). top baselineskip specifies the | |
5014 | +% baselineskip or topskip used prior to the object. If the height of the | |
5015 | +% first line of the object is greater than the given top baselineskip, then | |
5016 | +% the top baselineskip is subtracted from the height of the first line and | |
5017 | +% that difference is considered along with the rest of the object height | |
5018 | +% (because the object will be shifted down by an amount = | |
5019 | +% top line height - top baselineskip). Otherwise, the height of the first line | |
5020 | +% of the object is ignored as far as the calculations are concerned. | |
5021 | +% This algorithm is adequate for objects that appear at the top of a page | |
5022 | +% (e.g., titles) where \topskip spacing is used. | |
5023 | +% | |
5024 | +% However, as explained on page 78 of the TeXbook, interline spacing is more | |
5025 | +% complex when \baselineskip is being used (indicated by \prevdepth > | |
5026 | +% -1000pt). The four optional parameters offset, prevdepth, lineskip limit and | |
5027 | +% lineskip are assumed to be equal to be 0pt, \prevdepth, \lineskiplimit and | |
5028 | +% \lineskip, respectively, if they are omitted. | |
5029 | +% | |
5030 | +% The prevdepth is the depth of the line before the object, the lineskip limit | |
5031 | +% specifies how close the top of the object can come to the bottom of the | |
5032 | +% previous line before \baselineskip is ignored and \lineskip is inserted | |
5033 | +% between the object and the line above it. Lineskip does not come into | |
5034 | +% play unless the first line of the object is high enough to "get too close" | |
5035 | +% (as specified by lineskiplimit) to the line before it. The the prevdepth, | |
5036 | +% lineskip limit, and lineskip optional parameters are not needed for the | |
5037 | +% first object/line on a page (i.e., prevdepth <= -1000pt) where the simplier | |
5038 | +% \topskip spacing rules are in effect. | |
5039 | +% | |
5040 | +% Offset is a manual adjustment that is added to the height calculations of | |
5041 | +% object irrespective of the value of \prevdepth. It is useful when the top | |
5042 | +% baselineskip will result in a noninteger unit height object placement even | |
5043 | +% if the object itself has integral height. e.g., a footnotesize baselineskip | |
5044 | +% is used before the object, thus an offset of, say -3pt, can be given as a | |
5045 | +% correction. | |
5046 | + | |
5047 | +% Common combinations of these parameters include: | |
5048 | +% | |
5049 | +% top baselineskip: (and default values for offset, prevdepth, etc.) | |
5050 | +% \topskip % for objects that appear at the top of a page | |
5051 | +% \maxdimen % always ignore the height of the top line | |
5052 | +% 0pt % always consider any positive height of the top line | |
5053 | +% | |
5054 | +% for objects to appear inline in normal text: | |
5055 | +% top baselineskip = \baselineskip | |
5056 | +% | |
5057 | +% set prevdepth = -1000pt and top baselineskip = 0pt to consider the | |
5058 | +% overall height of the object without any other external skip | |
5059 | +% consideration | |
5060 | + | |
5061 | +\newif\if@IEEEquantizevspacestarform % flag to indicate star form | |
5062 | +\newif\if@IEEEquantizevspaceuseoutdimenreg % flag to indicate output dimen register is to be used | |
5063 | +% Use our own private registers because the object could contain a | |
5064 | +% structure that uses the existing tmp scratch pad registers | |
5065 | +\newdimen\@IEEEquantizeheightA | |
5066 | +\newdimen\@IEEEquantizeheightB | |
5067 | +\newdimen\@IEEEquantizeheightC | |
5068 | +\newdimen\@IEEEquantizeprevdepth % need to save this early as can change | |
5069 | +\newcount\@IEEEquantizemultiple | |
5070 | +\newbox\@IEEEquantizeboxA | |
5071 | + | |
5072 | + | |
5073 | +\def\@IEEEquantizevspace{\@ifnextchar [{\@IEEEquantizevspaceuseoutdimenregtrue\@@IEEEquantizevspace}{\@IEEEquantizevspaceuseoutdimenregfalse\@@IEEEquantizevspace[]}} | |
5074 | + | |
5075 | + | |
5076 | +\long\def\@@IEEEquantizevspace[#1]#2{\relax | |
5077 | +% acquire and store | |
5078 | +% #1 optional output dimen register | |
5079 | +% #2 object | |
5080 | +\edef\@IEEEquantizeoutdimenreg{#1}\relax | |
5081 | +% allow for object specifications that contain parameters | |
5082 | +\@IEEEtrantmptoksA={#2}\relax | |
5083 | +\long\edef\@IEEEquantizeobject{\the\@IEEEtrantmptoksA}\relax | |
5084 | +\@ifnextchar [{\@@@IEEEquantizevspace}{\@@@IEEEquantizevspace[\relax]}} | |
5085 | + | |
5086 | +\long\def\@@@IEEEquantizevspace[#1]#2{\relax | |
5087 | +% acquire and store | |
5088 | +% [#1] optional object decl, is \relax if not given by user | |
5089 | +% #2 top baselineskip | |
5090 | +% allow for object decl specifications that have parameters | |
5091 | +\@IEEEtrantmptoksA={#1}\relax | |
5092 | +\long\edef\@IEEEquantizeobjectdecl{\the\@IEEEtrantmptoksA}\relax | |
5093 | +\edef\@IEEEquantizetopbaselineskip{#2}\ivIEEEquantizevspace} | |
5094 | + | |
5095 | +% acquire optional argument set and store | |
5096 | +% [offset][prevdepth][lineskip limit][lineskip] | |
5097 | +\def\ivIEEEquantizevspace{\@ifnextchar [{\@vIEEEquantizevspace}{\@vIEEEquantizevspace[0pt]}} | |
5098 | +\def\@vIEEEquantizevspace[#1]{\edef\@IEEEquantizeoffset{#1}\@ifnextchar [{\@viIEEEquantizevspace}{\@viIEEEquantizevspace[\prevdepth]}} | |
5099 | +\def\@viIEEEquantizevspace[#1]{\@IEEEquantizeprevdepth=#1\relax\@ifnextchar [{\@viiIEEEquantizevspace}{\@viiIEEEquantizevspace[\lineskiplimit]}} | |
5100 | +\def\@viiIEEEquantizevspace[#1]{\edef\@IEEEquantizelineskiplimit{#1}\@ifnextchar [{\@viiiIEEEquantizevspace}{\@viiiIEEEquantizevspace[\lineskip]}} | |
5101 | +\def\@viiiIEEEquantizevspace[#1]{\edef\@IEEEquantizelineskip{#1}\@ixIEEEquantizevspace} | |
5102 | + | |
5103 | +% main routine | |
5104 | +\def\@ixIEEEquantizevspace#1#2#3{\relax | |
5105 | +\edef\@IEEEquantizeunitheight{#1}\relax | |
5106 | +\edef\@IEEEquantizenomvspace{#2}\relax | |
5107 | +\edef\@IEEEquantizeminvspace{#3}\relax | |
5108 | +% \@IEEEquantizeoutdimenreg | |
5109 | +% \@IEEEquantizeobject | |
5110 | +% \@IEEEquantizeobjectdecl | |
5111 | +% \@IEEEquantizetopbaselineskip | |
5112 | +% \@IEEEquantizeoffset | |
5113 | +% \@IEEEquantizeprevdepth | |
5114 | +% \@IEEEquantizelineskiplimit | |
5115 | +% \@IEEEquantizelineskip | |
5116 | +% \@IEEEquantizeunitheight | |
5117 | +% \@IEEEquantizenomvspace | |
5118 | +% \@IEEEquantizeminvspace | |
5119 | +% get overall height of object | |
5120 | +\setbox\@IEEEquantizeboxA\vbox{\begingroup\@IEEEquantizeobjectdecl\@IEEEquantizeobject\relax\endgroup}\relax | |
5121 | +\@IEEEquantizeheightA\ht\@IEEEquantizeboxA\relax | |
5122 | +% get height of first line of object | |
5123 | +\setbox\@IEEEquantizeboxA\vtop{\begingroup\@IEEEquantizeobjectdecl\@IEEEquantizeobject\relax\endgroup}\relax | |
5124 | +\@IEEEquantizeheightB\ht\@IEEEquantizeboxA\relax | |
5125 | +\ifdim\@IEEEquantizeprevdepth>-1000pt\relax % prevdepth > -1000pf means full baselineskip\lineskip rules in effect | |
5126 | +% lineskip spacing rule takes effect if height of top line > baselineskip - prevdepth - lineskiplimit, | |
5127 | +% otherwise the baselineskip rule is in effect and the height of the first line does not matter at all. | |
5128 | +\@IEEEquantizeheightC=\@IEEEquantizetopbaselineskip\relax | |
5129 | +\advance\@IEEEquantizeheightC-\@IEEEquantizeprevdepth\relax | |
5130 | +\advance\@IEEEquantizeheightC-\@IEEEquantizelineskiplimit\relax % this works even though \@IEEEquantizelineskiplimit is a macro because TeX allows --10pt notation | |
5131 | +\ifdim\@IEEEquantizeheightB>\@IEEEquantizeheightC\relax | |
5132 | +% lineskip spacing rule is in effect i.e., the object is going to be shifted down relative to the | |
5133 | +% baselineskip set position by its top line height (already a part of the total height) + prevdepth + lineskip - baselineskip | |
5134 | +\advance\@IEEEquantizeheightA\@IEEEquantizeprevdepth\relax | |
5135 | +\advance\@IEEEquantizeheightA\@IEEEquantizelineskip\relax | |
5136 | +\advance\@IEEEquantizeheightA-\@IEEEquantizetopbaselineskip\relax | |
5137 | +\else | |
5138 | +% height of first line <= \@IEEEquantizetopbaselineskip - \@IEEEquantizeprevdepth - \@IEEEquantizelineskiplimit | |
5139 | +% standard baselineskip rules are in effect, so don't consider height of first line | |
5140 | +\advance\@IEEEquantizeheightA-\@IEEEquantizeheightB\relax | |
5141 | +\fi | |
5142 | +% | |
5143 | +\else % prevdepth <= -1000pt, simplier \topskip type rules in effect | |
5144 | +\ifdim\@IEEEquantizeheightB>\@IEEEquantizetopbaselineskip | |
5145 | +% height of top line (already included in the total height) in excess of | |
5146 | +% baselineskip is the amount it will be downshifted | |
5147 | +\advance\@IEEEquantizeheightA-\@IEEEquantizetopbaselineskip\relax | |
5148 | +\else | |
5149 | +% height of first line is irrelevant, remove it | |
5150 | +\advance\@IEEEquantizeheightA-\@IEEEquantizeheightB\relax | |
5151 | +\fi | |
5152 | +\fi % prevdepth <= -1000pt | |
5153 | +% | |
5154 | +% adjust height for any manual offset | |
5155 | +\advance\@IEEEquantizeheightA\@IEEEquantizeoffset\relax | |
5156 | +% add in nominal spacer | |
5157 | +\advance\@IEEEquantizeheightA\@IEEEquantizenomvspace\relax | |
5158 | +% check for nonzero unitheight | |
5159 | +\@IEEEquantizeheightB=\@IEEEquantizeunitheight\relax | |
5160 | +\ifnum\@IEEEquantizeheightB=0\relax | |
5161 | +\@IEEEclspkgerror{IEEEquantizevspace unit height cannot be zero. Assuming 10pt.}% | |
5162 | +{Division by zero is not allowed.} | |
5163 | +\@IEEEquantizeheightB=10pt\relax | |
5164 | +\fi | |
5165 | +% get integer number of lines | |
5166 | +\@IEEEquantizemultiple=\@IEEEquantizeheightA\relax | |
5167 | +\divide\@IEEEquantizemultiple\@IEEEquantizeheightB\relax | |
5168 | +% set A to contain the excess height over the \@IEEEquantizemultiple of lines | |
5169 | +% A = height - multiple*unitheight | |
5170 | +\@IEEEquantizeheightC\@IEEEquantizeheightB\relax | |
5171 | +\multiply\@IEEEquantizeheightC\@IEEEquantizemultiple\relax | |
5172 | +\advance\@IEEEquantizeheightA-\@IEEEquantizeheightC\relax | |
5173 | +% set B to contain the height short of \@IEEEquantizemultiple+1 of lines | |
5174 | +% B = unitheight - A | |
5175 | +\advance\@IEEEquantizeheightB-\@IEEEquantizeheightA\relax | |
5176 | +% choose A or B based on which is closer | |
5177 | +\@IEEEquantizeheightC\@IEEEquantizenomvspace\relax | |
5178 | +\ifdim\@IEEEquantizeheightA<\@IEEEquantizeheightB\relax | |
5179 | +% C = nomvspace - A, go with lower | |
5180 | +\advance\@IEEEquantizeheightC-\@IEEEquantizeheightA\relax | |
5181 | +\else | |
5182 | +% C = nomvspace + B, go with upper | |
5183 | +\advance\@IEEEquantizeheightC\@IEEEquantizeheightB\relax | |
5184 | +\fi | |
5185 | +% if violate lower bound, use next integer bound | |
5186 | +\ifdim\@IEEEquantizeheightC<\@IEEEquantizeminvspace\relax | |
5187 | +% A + B = unitheight | |
5188 | +\advance\@IEEEquantizeheightC\@IEEEquantizeheightA\relax | |
5189 | +\advance\@IEEEquantizeheightC\@IEEEquantizeheightB\relax | |
5190 | +\fi | |
5191 | +% export object and spacer outside of group | |
5192 | +\global\let\@IEEEquantizeobjectout\@IEEEquantizeobject\relax | |
5193 | +\global\@IEEEquantizeheightC\@IEEEquantizeheightC\relax | |
5194 | +\endgroup | |
5195 | +\if@IEEEquantizevspaceuseoutdimenreg | |
5196 | +\@IEEEquantizeoutdimenreg=\@IEEEquantizeheightC\relax | |
5197 | +\else | |
5198 | +\@IEEEquantizeobjectout\relax | |
5199 | +\vskip\@IEEEquantizeheightC\relax | |
5200 | +\fi} | |
5201 | + | |
5202 | + | |
5203 | +% user command to disable all global assignments, possible use within object decl | |
5204 | +\def\IEEEquantizedisableglobal{\let\global\relax | |
5205 | +\let\gdef\def | |
5206 | +\let\xdef\edef} | |
5207 | +% user command to allow for the disabling of \thanks and other commands, possible use within object decl | |
5208 | +\def\IEEEquantizedisabletitlecmds{\long\def\thanks##1{\relax}\relax | |
5209 | +\long\def\IEEEcompsocitemizethanks##1{\relax}\def\newpage{\relax}} | |
5210 | + | |
5211 | + | |
5212 | + | |
5213 | + | |
5214 | + | |
5215 | +% V1.6 | |
5216 | +% we allow the user access to the last part of the title area | |
5217 | +% useful in emergencies such as when a different spacing is needed | |
5218 | +% This text is NOT compensated for in the dynamic sizer. | |
5219 | +\let\@IEEEaftertitletext=\relax | |
5220 | +\long\def\IEEEaftertitletext#1{\def\@IEEEaftertitletext{#1}} | |
5221 | + | |
5222 | + | |
5223 | +% V1.7 provide a way for users to enter abstract and keywords | |
5224 | +% into the onecolumn title are. This text is compensated for | |
5225 | +% in the dynamic sizer. | |
5226 | +\let\@IEEEtitleabstractindextext=\relax | |
5227 | +\long\def\IEEEtitleabstractindextext#1{\def\@IEEEtitleabstractindextext{#1}} | |
5228 | + | |
5229 | +% V1.7 provide a way for users to get the \@IEEEtitleabstractindextext if | |
5230 | +% not in compsoc or transmag journal mode - this way abstract and keywords | |
5231 | +% can still be placed in their conventional position if not in those modes. | |
5232 | +\def\IEEEdisplaynontitleabstractindextext{% | |
5233 | +% display for all conference formats | |
5234 | +\ifCLASSOPTIONconference\@IEEEtitleabstractindextext\relax | |
5235 | +\else% non-conferences | |
5236 | + % V1.8a display for all technotes | |
5237 | + \ifCLASSOPTIONtechnote\@IEEEtitleabstractindextext\relax | |
5238 | + % V1.8a add diamond line after abstract and index terms for compsoc technotes | |
5239 | + \@IEEEcompsoconly{\noindent\hfill\IEEEcompsocdiamondline\hfill\hbox{}\par}\relax | |
5240 | + \else % non-conferences and non-technotes | |
5241 | + \ifCLASSOPTIONcompsoc% display if not compsoc and not transmag | |
5242 | + \else | |
5243 | + \ifCLASSOPTIONtransmag | |
5244 | + \else% not compsoc journal nor transmag journal | |
5245 | + \@IEEEtitleabstractindextext\relax | |
5246 | + \fi | |
5247 | + \fi | |
5248 | + \fi | |
5249 | +\fi} | |
5250 | + | |
5251 | + | |
5252 | +% command to allow alteration of baselinestretch, but only if the current | |
5253 | +% baselineskip is unity. Used to tweak the compsoc abstract and keywords line spacing. | |
5254 | +\def\@IEEEtweakunitybaselinestretch#1{{\def\baselinestretch{1}\selectfont | |
5255 | +\global\@tempskipa\baselineskip}\ifnum\@tempskipa=\baselineskip% | |
5256 | +\def\baselinestretch{#1}\selectfont\fi\relax} | |
5257 | + | |
5258 | + | |
5259 | +% abstract and keywords are in \small, except | |
5260 | +% for 9pt docs in which they are in \footnotesize | |
5261 | +% Because 9pt docs use an 8pt footnotesize, \small | |
5262 | +% becomes a rather awkward 8.5pt | |
5263 | +\def\@IEEEabskeysecsize{\small} | |
5264 | +\ifx\CLASSOPTIONpt\@IEEEptsizenine | |
5265 | + \def\@IEEEabskeysecsize{\footnotesize} | |
5266 | +\fi | |
5267 | + | |
5268 | +% compsoc journals use \footnotesize, compsoc conferences use normalsize | |
5269 | +\@IEEEcompsoconly{\def\@IEEEabskeysecsize{\footnotesize}} | |
5270 | +\@IEEEcompsocconfonly{\def\@IEEEabskeysecsize{\small}} | |
5271 | + | |
5272 | + | |
5273 | +% V1.6 have abstract and keywords strip leading spaces, pars and newlines | |
5274 | +% so that spacing is more tightly controlled. | |
5275 | +\def\abstract{\normalfont | |
5276 | + \if@twocolumn | |
5277 | + \@IEEEabskeysecsize\bfseries\textit{\abstractname}---\relax | |
5278 | + \else | |
5279 | + \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize | |
5280 | + \fi\@IEEEgobbleleadPARNLSP} | |
5281 | +% V1.6 The IEEE wants only 1 pica from end of abstract to introduction heading when in | |
5282 | +% conference mode (the heading already has this much above it) | |
5283 | +\def\endabstract{\relax\ifCLASSOPTIONconference\vspace{0ex}\else\vspace{1.34ex}\fi\par\if@twocolumn\else\endquotation\fi | |
5284 | + \normalfont\normalsize} | |
5285 | + | |
5286 | +\def\IEEEkeywords{\normalfont | |
5287 | + \if@twocolumn | |
5288 | + \@IEEEabskeysecsize\bfseries\textit{\IEEEkeywordsname}---\relax | |
5289 | + \else | |
5290 | + \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize | |
5291 | + \fi\@IEEEgobbleleadPARNLSP} | |
5292 | +\def\endIEEEkeywords{\relax\ifCLASSOPTIONtechnote\vspace{1.34ex}\else\vspace{0.67ex}\fi | |
5293 | + \par\if@twocolumn\else\endquotation\fi% | |
5294 | + \normalfont\normalsize} | |
5295 | + | |
5296 | +% V1.7 compsoc keywords index terms | |
5297 | +\ifCLASSOPTIONcompsoc | |
5298 | + \ifCLASSOPTIONconference% compsoc conference | |
5299 | +\def\abstract{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\bfseries | |
5300 | + \if@twocolumn | |
5301 | + \@IEEEabskeysecsize\noindent\textit{\abstractname}---\relax | |
5302 | + \else | |
5303 | + \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize% | |
5304 | + \fi\@IEEEgobbleleadPARNLSP} | |
5305 | +\def\IEEEkeywords{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\bfseries | |
5306 | + \if@twocolumn | |
5307 | + \@IEEEabskeysecsize\vskip 0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip\noindent | |
5308 | + \textit{\IEEEkeywordsname}---\relax | |
5309 | + \else | |
5310 | + \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize% | |
5311 | + \fi\@IEEEgobbleleadPARNLSP} | |
5312 | + \else% compsoc not conference | |
5313 | +\def\abstract{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\sffamily | |
5314 | + \if@twocolumn | |
5315 | + \@IEEEabskeysecsize\noindent\textbf{\abstractname}---\relax | |
5316 | + \else | |
5317 | + \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize% | |
5318 | + \fi\@IEEEgobbleleadPARNLSP} | |
5319 | +\def\IEEEkeywords{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\sffamily | |
5320 | + \if@twocolumn | |
5321 | + \@IEEEabskeysecsize\vskip 0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip\noindent | |
5322 | + \textbf{\IEEEkeywordsname}---\relax | |
5323 | + \else | |
5324 | + \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize% | |
5325 | + \fi\@IEEEgobbleleadPARNLSP} | |
5326 | + \fi | |
5327 | +\fi | |
5328 | + | |
5329 | +% V1.8 transmag keywords index terms | |
5330 | +% no abstract name, use indentation | |
5331 | +\ifCLASSOPTIONtransmag | |
5332 | +\def\abstract{\normalfont\parindent 1em\relax | |
5333 | + \if@twocolumn | |
5334 | + \@IEEEabskeysecsize\bfseries\indent | |
5335 | + \else | |
5336 | + \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize | |
5337 | + \textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize | |
5338 | + \fi\@IEEEgobbleleadPARNLSP} | |
5339 | + | |
5340 | +\def\IEEEkeywords{\normalfont\parindent 1em\relax | |
5341 | + \if@twocolumn | |
5342 | + \@IEEEabskeysecsize\vspace{1\baselineskip}\bfseries\indent\textit{\IEEEkeywordsname}---\relax | |
5343 | + \else | |
5344 | + \bgroup\par\vspace{1\baselineskip}\centering\@IEEEabskeysecsize | |
5345 | + \textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize | |
5346 | + \fi\@IEEEgobbleleadPARNLSP} | |
5347 | +\fi | |
5348 | + | |
5349 | + | |
5350 | + | |
5351 | +% gobbles all leading \, \\ and \par, upon finding first token that | |
5352 | +% is not a \ , \\ or a \par, it ceases and returns that token | |
5353 | +% | |
5354 | +% used to strip leading \, \\ and \par from the input | |
5355 | +% so that such things in the beginning of an environment will not | |
5356 | +% affect the formatting of the text | |
5357 | +\long\def\@IEEEgobbleleadPARNLSP#1{\let\@IEEEswallowthistoken=0% | |
5358 | +\let\@IEEEgobbleleadPARNLSPtoken#1% | |
5359 | +\let\@IEEEgobbleleadPARtoken=\par% | |
5360 | +\let\@IEEEgobbleleadNLtoken=\\% | |
5361 | +\let\@IEEEgobbleleadSPtoken=\ % | |
5362 | +\def\@IEEEgobbleleadSPMACRO{\ }% | |
5363 | +\ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadPARtoken% | |
5364 | +\let\@IEEEswallowthistoken=1% | |
5365 | +\fi% | |
5366 | +\ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadNLtoken% | |
5367 | +\let\@IEEEswallowthistoken=1% | |
5368 | +\fi% | |
5369 | +\ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadSPtoken% | |
5370 | +\let\@IEEEswallowthistoken=1% | |
5371 | +\fi% | |
5372 | +% a control space will come in as a macro | |
5373 | +% when it is the last one on a line | |
5374 | +\ifx\@IEEEgobbleleadPARNLSPtoken\@IEEEgobbleleadSPMACRO% | |
5375 | +\let\@IEEEswallowthistoken=1% | |
5376 | +\fi% | |
5377 | +% if we have to swallow this token, do so and taste the next one | |
5378 | +% else spit it out and stop gobbling | |
5379 | +\ifx\@IEEEswallowthistoken 1\let\@IEEEnextgobbleleadPARNLSP=\@IEEEgobbleleadPARNLSP\else% | |
5380 | +\let\@IEEEnextgobbleleadPARNLSP=#1\fi% | |
5381 | +\@IEEEnextgobbleleadPARNLSP}% | |
5382 | + | |
5383 | + | |
5384 | + | |
5385 | + | |
5386 | +% TITLING OF SECTIONS | |
5387 | +\def\@IEEEsectpunct{:\ \,} % Punctuation after run-in section heading (headings which are | |
5388 | + % part of the paragraphs), need little bit more than a single space | |
5389 | + % spacing from section number to title | |
5390 | +% compsoc conferences use regular period/space punctuation | |
5391 | +\ifCLASSOPTIONcompsoc | |
5392 | +\ifCLASSOPTIONconference | |
5393 | +\def\@IEEEsectpunct{.\ } | |
5394 | +\fi\fi | |
5395 | + | |
5396 | + | |
5397 | +\def\@seccntformat#1{\csname the#1dis\endcsname\hskip 0.5em\relax} | |
5398 | + | |
5399 | +\ifCLASSOPTIONcompsoc | |
5400 | +% compsoc journals need extra spacing | |
5401 | +\ifCLASSOPTIONconference\else | |
5402 | +\def\@seccntformat#1{\csname the#1dis\endcsname\hskip 1em\relax} | |
5403 | +\fi\fi | |
5404 | + | |
5405 | +%v1.7 put {} after #6 to allow for some types of user font control | |
5406 | +%and use \@@par rather than \par | |
5407 | +\def\@sect#1#2#3#4#5#6[#7]#8{% | |
5408 | + \ifnum #2>\c@secnumdepth | |
5409 | + \let\@svsec\@empty | |
5410 | + \else | |
5411 | + \refstepcounter{#1}% | |
5412 | + % load section label and spacer into \@svsec | |
5413 | + \protected@edef\@svsec{\@seccntformat{#1}\relax}% | |
5414 | + \fi% | |
5415 | + \@tempskipa #5\relax | |
5416 | + \ifdim \@tempskipa>\z@% tempskipa determines whether is treated as a high | |
5417 | + \begingroup #6{\relax% or low level heading | |
5418 | + \noindent % subsections are NOT indented | |
5419 | + % print top level headings. \@svsec is label, #8 is heading title | |
5420 | + % The IEEE does not block indent the section title text, it flows like normal | |
5421 | + {\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\@@par}}% | |
5422 | + \endgroup | |
5423 | + \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth\relax\else | |
5424 | + \protect\numberline{\csname the#1\endcsname}\fi#7}% | |
5425 | + \else % printout low level headings | |
5426 | + % svsechd seems to swallow the trailing space, protect it with \mbox{} | |
5427 | + % got rid of sectionmark stuff | |
5428 | + \def\@svsechd{#6{\hskip #3\relax\@svsec #8\@IEEEsectpunct\mbox{}}% | |
5429 | + \addcontentsline{toc}{#1}{\ifnum #2>\c@secnumdepth\relax\else | |
5430 | + \protect\numberline{\csname the#1\endcsname}\fi#7}}% | |
5431 | + \fi%skip down | |
5432 | + \@xsect{#5}} | |
5433 | + | |
5434 | + | |
5435 | +% section* handler | |
5436 | +%v1.7 put {} after #4 to allow for some types of user font control | |
5437 | +%and use \@@par rather than \par | |
5438 | +\def\@ssect#1#2#3#4#5{\@tempskipa #3\relax | |
5439 | + \ifdim \@tempskipa>\z@ | |
5440 | + %\begingroup #4\@hangfrom{\hskip #1}{\interlinepenalty \@M #5\par}\endgroup | |
5441 | + % The IEEE does not block indent the section title text, it flows like normal | |
5442 | + \begingroup \noindent #4{\relax{\hskip #1}{\interlinepenalty \@M #5\@@par}}\endgroup | |
5443 | + % svsechd swallows the trailing space, protect it with \mbox{} | |
5444 | + \else \def\@svsechd{#4{\hskip #1\relax #5\@IEEEsectpunct\mbox{}}}\fi | |
5445 | + \@xsect{#3}} | |
5446 | + | |
5447 | + | |
5448 | +%% SECTION heading spacing and font | |
5449 | +%% | |
5450 | +% arguments are: #1 - sectiontype name | |
5451 | +% (for \@sect) #2 - section level | |
5452 | +% #3 - section heading indent | |
5453 | +% #4 - top separation (absolute value used, neg indicates not to indent main text) | |
5454 | +% If negative, make stretch parts negative too! | |
5455 | +% #5 - (absolute value used) positive: bottom separation after heading, | |
5456 | +% negative: amount to indent main text after heading | |
5457 | +% Both #4 and #5 negative means to indent main text and use negative top separation | |
5458 | +% #6 - font control | |
5459 | +% You've got to have \normalfont\normalsize in the font specs below to prevent | |
5460 | +% trouble when you do something like: | |
5461 | +% \section{Note}{\ttfamily TT-TEXT} is known to ... | |
5462 | +% The IEEE sometimes REALLY stretches the area before a section | |
5463 | +% heading by up to about 0.5in. However, it may not be a good | |
5464 | +% idea to let LaTeX have quite this much rubber. | |
5465 | +\ifCLASSOPTIONconference% | |
5466 | +% The IEEE wants section heading spacing to decrease for conference mode | |
5467 | +\def\section{\@startsection{section}{1}{\z@}{1.5ex plus 1.5ex minus 0.5ex}% | |
5468 | +{0.7ex plus 1ex minus 0ex}{\normalfont\normalsize\centering\scshape}}% | |
5469 | +\def\subsection{\@startsection{subsection}{2}{\z@}{1.5ex plus 1.5ex minus 0.5ex}% | |
5470 | +{0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}% | |
5471 | +\else % for journals | |
5472 | +\def\section{\@startsection{section}{1}{\z@}{3.0ex plus 1.5ex minus 1.5ex}% V1.6 3.0ex from 3.5ex | |
5473 | +{0.7ex plus 1ex minus 0ex}{\normalfont\normalsize\centering\scshape}}% | |
5474 | +\def\subsection{\@startsection{subsection}{2}{\z@}{3.5ex plus 1.5ex minus 1.5ex}% | |
5475 | +{0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}% | |
5476 | +\fi | |
5477 | + | |
5478 | +% for both journals and conferences | |
5479 | +% decided to put in a little rubber above the section, might help somebody | |
5480 | +\def\subsubsection{\@startsection{subsubsection}{3}{\parindent}{0ex plus 0.1ex minus 0.1ex}% | |
5481 | +{0ex}{\normalfont\normalsize\itshape}}% | |
5482 | +\def\paragraph{\@startsection{paragraph}{4}{2\parindent}{0ex plus 0.1ex minus 0.1ex}% | |
5483 | +{0ex}{\normalfont\normalsize\itshape}}% | |
5484 | + | |
5485 | + | |
5486 | +% compsoc | |
5487 | +\ifCLASSOPTIONcompsoc | |
5488 | +\ifCLASSOPTIONconference | |
5489 | +% compsoc conference | |
5490 | +\def\section{\@startsection{section}{1}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}% | |
5491 | +{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}{\normalfont\large\bfseries}}% | |
5492 | +\def\subsection{\@startsection{subsection}{2}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}% | |
5493 | +{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}{\normalfont\sublargesize\bfseries}}% | |
5494 | +\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{1\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip}% | |
5495 | +{0ex}{\normalfont\normalsize\bfseries}}% | |
5496 | +\def\paragraph{\@startsection{paragraph}{4}{2\parindent}{0ex plus 0.1ex minus 0.1ex}% | |
5497 | +{0ex}{\normalfont\normalsize}}% | |
5498 | +\else% compsoc journals | |
5499 | +% use negative top separation as compsoc journals do not indent paragraphs after section titles | |
5500 | +\def\section{\@startsection{section}{1}{\z@}{-3.5ex plus -2ex minus -1.5ex}% | |
5501 | +{0.7ex plus 1ex minus 0ex}{\normalfont\sublargesize\sffamily\bfseries\scshape}}% | |
5502 | +% Note that subsection and smaller may not be correct for the Computer Society, | |
5503 | +% I have to look up an example. | |
5504 | +\def\subsection{\@startsection{subsection}{2}{\z@}{-3.5ex plus -1.5ex minus -1.5ex}% | |
5505 | +{0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\sffamily\bfseries}}% | |
5506 | +\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-2.5ex plus -1ex minus -1ex}% | |
5507 | +{0.5ex plus 0.5ex minus 0ex}{\normalfont\normalsize\sffamily\itshape}}% | |
5508 | +\def\paragraph{\@startsection{paragraph}{4}{2\parindent}{-0ex plus -0.1ex minus -0.1ex}% | |
5509 | +{0ex}{\normalfont\normalsize}}% | |
5510 | +\fi\fi | |
5511 | + | |
5512 | +% transmag | |
5513 | +\ifCLASSOPTIONtransmag | |
5514 | +\def\subsection{\@startsection{subsection}{2}{0.75\parindent}{3.5ex plus 1.5ex minus 1.5ex}% | |
5515 | +{0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}% | |
5516 | +\def\subsubsection{\@startsection{subsubsection}{3}{1.25\parindent}{0.1ex plus 0.1ex minus 0.1ex}% | |
5517 | +{0.1ex}{\normalfont\normalsize\itshape}}% | |
5518 | +\fi | |
5519 | + | |
5520 | + | |
5521 | +% V1.8a provide for a raised line Introduction section for use with Computer | |
5522 | +% Society papers. We have to remove any spacing glue after the section | |
5523 | +% heading and then remove the blank line for the new paragraph after it. | |
5524 | +% LaTeX's section handler alters \everypar and we need to propogate those | |
5525 | +% changes outside of the \parbox lest there be spacing problems at the top | |
5526 | +% of the next section. | |
5527 | +\def\IEEEraisesectionheading#1{\noindent\raisebox{1.5\baselineskip}[0pt][0pt]{\parbox[b]{\columnwidth}{#1\unskip\global\everypar=\everypar}}\vspace{-1\baselineskip}\vspace{-\parskip}\par} | |
5528 | + | |
5529 | + | |
5530 | + | |
5531 | +%% ENVIRONMENTS | |
5532 | +% "box" symbols at end of proofs | |
5533 | +\def\IEEEQEDclosed{\mbox{\rule[0pt]{1.3ex}{1.3ex}}} % for a filled box | |
5534 | +% V1.6 some journals use an open box instead that will just fit around a closed one | |
5535 | +\def\IEEEQEDopen{{\setlength{\fboxsep}{0pt}\setlength{\fboxrule}{0.2pt}\fbox{\rule[0pt]{0pt}{1.3ex}\rule[0pt]{1.3ex}{0pt}}}} | |
5536 | +\ifCLASSOPTIONcompsoc | |
5537 | +\def\IEEEQED{\IEEEQEDopen} % default to open for compsoc | |
5538 | +\else | |
5539 | +\def\IEEEQED{\IEEEQEDclosed} % otherwise default to closed | |
5540 | +\fi | |
5541 | + | |
5542 | +%V1.8 flag to indicate if QED symbol is to be shown | |
5543 | +\newif\if@IEEEQEDshow \@IEEEQEDshowtrue | |
5544 | +\def\IEEEproofindentspace{2\parindent}% V1.8 allow user to change indentation amount if desired | |
5545 | +% v1.7 name change to avoid namespace collision with amsthm. Also add support | |
5546 | +% for an optional argument. | |
5547 | +\def\IEEEproof{\@ifnextchar[{\@IEEEproof}{\@IEEEproof[\IEEEproofname]}} | |
5548 | +\def\@IEEEproof[#1]{\@IEEEQEDshowtrue\par\noindent\hspace{\IEEEproofindentspace}{\itshape #1: }} | |
5549 | +\def\endIEEEproof{\if@IEEEQEDshow\hspace*{\fill}\nobreakspace\IEEEQED\fi\par} | |
5550 | +% qedhere for equation environments, similar to AMS \qedhere | |
5551 | +\def\IEEEQEDhereeqn{\global\@IEEEQEDshowfalse\eqno\let\eqno\relax\let\leqno\relax | |
5552 | + \let\veqno\relax\hbox{\IEEEQED}} | |
5553 | +% IEEE style qedhere for IEEEeqnarray and other environments | |
5554 | +\def\IEEEQEDhere{\global\@IEEEQEDshowfalse\IEEEQED} | |
5555 | +% command to disable QED at end of IEEEproof | |
5556 | +\def\IEEEQEDoff{\global\@IEEEQEDshowfalse} | |
5557 | + | |
5558 | + | |
5559 | +%\itemindent is set to \z@ by list, so define new temporary variable | |
5560 | +\newdimen\@IEEEtmpitemindent | |
5561 | + | |
5562 | +\ifCLASSOPTIONcompsoc | |
5563 | +% V1.8a compsoc uses bold theorem titles, a period instead of a colon, vertical spacing, and hanging indentation | |
5564 | +% V1.8 allow long theorem names to break across lines. | |
5565 | +% Thanks to Miquel Payaro for reporting this. | |
5566 | +\def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\relax | |
5567 | + \topsep 0.2\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip | |
5568 | + \rmfamily\trivlist\hangindent\parindent% | |
5569 | + \item[]\textit{\bfseries\noindent #1\ #2.} \itemindent\@IEEEtmpitemindent\relax} | |
5570 | +\def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\relax | |
5571 | +\topsep 0.2\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip | |
5572 | +\rmfamily\trivlist\hangindent\parindent% | |
5573 | +% V1.6 The IEEE is back to using () around theorem names which are also in italics | |
5574 | +% Thanks to Christian Peel for reporting this. | |
5575 | + \item[]\textit{\bfseries\noindent #1\ #2\ (#3).} \itemindent\@IEEEtmpitemindent\relax} | |
5576 | +% V1.7 remove bogus \unskip that caused equations in theorems to collide with | |
5577 | +% lines below. | |
5578 | +\def\@endtheorem{\endtrivlist\vskip 0.25\@IEEEnormalsizeunitybaselineskip plus 0.26\@IEEEnormalsizeunitybaselineskip minus 0.05\@IEEEnormalsizeunitybaselineskip} | |
5579 | +\else | |
5580 | +% | |
5581 | +% noncompsoc | |
5582 | +% | |
5583 | +% V1.8 allow long theorem names to break across lines. | |
5584 | +% Thanks to Miquel Payaro for reporting this. | |
5585 | +\def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\relax\topsep 0pt\rmfamily\trivlist% | |
5586 | + \item[]\textit{\indent #1\ #2:} \itemindent\@IEEEtmpitemindent\relax} | |
5587 | +\def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\relax\topsep 0pt\rmfamily \trivlist% | |
5588 | +% V1.6 The IEEE is back to using () around theorem names which are also in italics | |
5589 | +% Thanks to Christian Peel for reporting this. | |
5590 | + \item[]\textit{\indent #1\ #2\ (#3):} \itemindent\@IEEEtmpitemindent\relax} | |
5591 | +% V1.7 remove bogus \unskip that caused equations in theorems to collide with | |
5592 | +% lines below. | |
5593 | +\def\@endtheorem{\endtrivlist} | |
5594 | +\fi | |
5595 | + | |
5596 | + | |
5597 | + | |
5598 | +% V1.6 | |
5599 | +% display command for the section the theorem is in - so that \thesection | |
5600 | +% is not used as this will be in Roman numerals when we want arabic. | |
5601 | +% LaTeX2e uses \def\@thmcounter#1{\noexpand\arabic{#1}} for the theorem number | |
5602 | +% (second part) display and \def\@thmcountersep{.} as a separator. | |
5603 | +% V1.7 intercept calls to the section counter and reroute to \@IEEEthmcounterinsection | |
5604 | +% to allow \appendix(ices} to override as needed. | |
5605 | +% | |
5606 | +% special handler for sections, allows appendix(ices) to override | |
5607 | +\gdef\@IEEEthmcounterinsection#1{\arabic{#1}} | |
5608 | +% string macro | |
5609 | +\edef\@IEEEstringsection{section} | |
5610 | + | |
5611 | +% redefine the #1#2[#3] form of newtheorem to use a hook to \@IEEEthmcounterinsection | |
5612 | +% if section in_counter is used | |
5613 | +\def\@xnthm#1#2[#3]{% | |
5614 | + \expandafter\@ifdefinable\csname #1\endcsname | |
5615 | + {\@definecounter{#1}\@newctr{#1}[#3]% | |
5616 | + \edef\@IEEEstringtmp{#3} | |
5617 | + \ifx\@IEEEstringtmp\@IEEEstringsection | |
5618 | + \expandafter\xdef\csname the#1\endcsname{% | |
5619 | + \noexpand\@IEEEthmcounterinsection{#3}\@thmcountersep | |
5620 | + \@thmcounter{#1}}% | |
5621 | + \else | |
5622 | + \expandafter\xdef\csname the#1\endcsname{% | |
5623 | + \expandafter\noexpand\csname the#3\endcsname \@thmcountersep | |
5624 | + \@thmcounter{#1}}% | |
5625 | + \fi | |
5626 | + \global\@namedef{#1}{\@thm{#1}{#2}}% | |
5627 | + \global\@namedef{end#1}{\@endtheorem}}} | |
5628 | + | |
5629 | + | |
5630 | + | |
5631 | +%% SET UP THE DEFAULT PAGESTYLE | |
5632 | +\pagestyle{headings} | |
5633 | +\pagenumbering{arabic} | |
5634 | + | |
5635 | +% normally the page counter starts at 1 | |
5636 | +\setcounter{page}{1} | |
5637 | +% however, for peerreview the cover sheet is page 0 or page -1 | |
5638 | +% (for duplex printing) | |
5639 | +\ifCLASSOPTIONpeerreview | |
5640 | + \if@twoside | |
5641 | + \setcounter{page}{-1} | |
5642 | + \else | |
5643 | + \setcounter{page}{0} | |
5644 | + \fi | |
5645 | +\fi | |
5646 | + | |
5647 | +% standard book class behavior - let bottom line float up and down as | |
5648 | +% needed when single sided | |
5649 | +\ifCLASSOPTIONtwoside\else\raggedbottom\fi | |
5650 | +% if two column - turn on twocolumn, allow word spacings to stretch more and | |
5651 | +% enforce a rigid position for the last lines | |
5652 | +\ifCLASSOPTIONtwocolumn | |
5653 | +% the peer review option delays invoking twocolumn | |
5654 | + \ifCLASSOPTIONpeerreview\else | |
5655 | + \twocolumn | |
5656 | + \fi | |
5657 | +\sloppy | |
5658 | +\flushbottom | |
5659 | +\fi | |
5660 | + | |
5661 | + | |
5662 | + | |
5663 | + | |
5664 | +% \APPENDIX and \APPENDICES definitions | |
5665 | + | |
5666 | +% This is the \@ifmtarg command from the LaTeX ifmtarg package | |
5667 | +% by Peter Wilson (CUA) and Donald Arseneau | |
5668 | +% \@ifmtarg is used to determine if an argument to a command | |
5669 | +% is present or not. | |
5670 | +% For instance: | |
5671 | +% \@ifmtarg{#1}{\typeout{empty}}{\typeout{has something}} | |
5672 | +% \@ifmtarg is used with our redefined \section command if | |
5673 | +% \appendices is invoked. | |
5674 | +% The command \section will behave slightly differently depending | |
5675 | +% on whether the user specifies a title: | |
5676 | +% \section{My appendix title} | |
5677 | +% or not: | |
5678 | +% \section{} | |
5679 | +% This way, we can eliminate the blank lines where the title | |
5680 | +% would be, and the unneeded : after Appendix in the table of | |
5681 | +% contents | |
5682 | +\begingroup | |
5683 | +\catcode`\Q=3 | |
5684 | +\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil} | |
5685 | +\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4} | |
5686 | +\endgroup | |
5687 | +% end of \@ifmtarg defs | |
5688 | + | |
5689 | + | |
5690 | +% V1.7 | |
5691 | +% command that allows the one time saving of the original definition | |
5692 | +% of section to \@IEEEappendixsavesection for \appendix or \appendices | |
5693 | +% we don't save \section here as it may be redefined later by other | |
5694 | +% packages (hyperref.sty, etc.) | |
5695 | +\def\@IEEEsaveoriginalsectiononce{\let\@IEEEappendixsavesection\section | |
5696 | +\let\@IEEEsaveoriginalsectiononce\relax} | |
5697 | + | |
5698 | +% neat trick to grab and process the argument from \section{argument} | |
5699 | +% we process differently if the user invoked \section{} with no | |
5700 | +% argument (title) | |
5701 | +% note we reroute the call to the old \section* | |
5702 | +\def\@IEEEprocessthesectionargument#1{% | |
5703 | +\@ifmtarg{#1}{% | |
5704 | +\@IEEEappendixsavesection*{\appendixname\nobreakspace\thesectiondis}% | |
5705 | +\addcontentsline{toc}{section}{\appendixname\nobreakspace\thesection}}{% | |
5706 | +\@IEEEappendixsavesection*{\appendixname\nobreakspace\thesectiondis\\* #1}% | |
5707 | +\addcontentsline{toc}{section}{\appendixname\nobreakspace\thesection: #1}}} | |
5708 | + | |
5709 | +% we use this if the user calls \section{} after | |
5710 | +% \appendix-- which has no meaning. So, we ignore the | |
5711 | +% command and its argument. Then, warn the user. | |
5712 | +\def\@IEEEdestroythesectionargument#1{\typeout{** WARNING: Ignoring useless | |
5713 | +\protect\section\space in Appendix (line \the\inputlineno).}} | |
5714 | + | |
5715 | + | |
5716 | +% remember \thesection forms will be displayed in \ref calls | |
5717 | +% and in the Table of Contents. | |
5718 | +% The \sectiondis form is used in the actual heading itself | |
5719 | + | |
5720 | +% appendix command for one single appendix | |
5721 | +% normally has no heading. However, if you want a | |
5722 | +% heading, you can do so via the optional argument: | |
5723 | +% \appendix[Optional Heading] | |
5724 | +\def\appendix{\relax} | |
5725 | +\renewcommand{\appendix}[1][]{\@IEEEsaveoriginalsectiononce\par | |
5726 | + % v1.6 keep hyperref's identifiers unique | |
5727 | + \gdef\theHsection{Appendix.A}% | |
5728 | + % v1.6 adjust hyperref's string name for the section | |
5729 | + \xdef\Hy@chapapp{appendix}% | |
5730 | + \setcounter{section}{0}% | |
5731 | + \setcounter{subsection}{0}% | |
5732 | + \setcounter{subsubsection}{0}% | |
5733 | + \setcounter{paragraph}{0}% | |
5734 | + \gdef\thesection{A}% | |
5735 | + \gdef\thesectiondis{}% | |
5736 | + \gdef\thesubsection{\Alph{subsection}}% | |
5737 | + \gdef\@IEEEthmcounterinsection##1{A} | |
5738 | + \refstepcounter{section}% update the \ref counter | |
5739 | + \@ifmtarg{#1}{\@IEEEappendixsavesection*{\appendixname}% | |
5740 | + \addcontentsline{toc}{section}{\appendixname}}{% | |
5741 | + \@IEEEappendixsavesection*{\appendixname\nobreakspace\\* #1}% | |
5742 | + \addcontentsline{toc}{section}{\appendixname: #1}}% | |
5743 | + % redefine \section command for appendix | |
5744 | + % leave \section* as is | |
5745 | + \def\section{\@ifstar{\@IEEEappendixsavesection*}{% | |
5746 | + \@IEEEdestroythesectionargument}}% throw out the argument | |
5747 | + % of the normal form | |
5748 | +} | |
5749 | + | |
5750 | + | |
5751 | + | |
5752 | +% appendices command for multiple appendices | |
5753 | +% user then calls \section with an argument (possibly empty) to | |
5754 | +% declare the individual appendices | |
5755 | +\def\appendices{\@IEEEsaveoriginalsectiononce\par | |
5756 | + % v1.6 keep hyperref's identifiers unique | |
5757 | + \gdef\theHsection{Appendix.\Alph{section}}% | |
5758 | + % v1.6 adjust hyperref's string name for the section | |
5759 | + \xdef\Hy@chapapp{appendix}% | |
5760 | + \setcounter{section}{-1}% we want \refstepcounter to use section 0 | |
5761 | + \setcounter{subsection}{0}% | |
5762 | + \setcounter{subsubsection}{0}% | |
5763 | + \setcounter{paragraph}{0}% | |
5764 | + \ifCLASSOPTIONromanappendices% | |
5765 | + \gdef\thesection{\Roman{section}}% | |
5766 | + \gdef\thesectiondis{\Roman{section}}% | |
5767 | + \@IEEEcompsocconfonly{\gdef\thesectiondis{\Roman{section}.}}% | |
5768 | + \gdef\@IEEEthmcounterinsection##1{A\arabic{##1}} | |
5769 | + \else% | |
5770 | + \gdef\thesection{\Alph{section}}% | |
5771 | + \gdef\thesectiondis{\Alph{section}}% | |
5772 | + \@IEEEcompsocconfonly{\gdef\thesectiondis{\Alph{section}.}}% | |
5773 | + \gdef\@IEEEthmcounterinsection##1{\Alph{##1}} | |
5774 | + \fi% | |
5775 | + \refstepcounter{section}% update the \ref counter | |
5776 | + \setcounter{section}{0}% NEXT \section will be the FIRST appendix | |
5777 | + % redefine \section command for appendices | |
5778 | + % leave \section* as is | |
5779 | + \def\section{\@ifstar{\@IEEEappendixsavesection*}{% process the *-form | |
5780 | + \refstepcounter{section}% or is a new section so, | |
5781 | + \@IEEEprocessthesectionargument}}% process the argument | |
5782 | + % of the normal form | |
5783 | +} | |
5784 | + | |
5785 | + | |
5786 | + | |
5787 | +% V1.7 compoc uses nonbold drop cap and small caps word style | |
5788 | +\ifCLASSOPTIONcompsoc | |
5789 | + \def\IEEEPARstartFONTSTYLE{\mdseries} | |
5790 | + \def\IEEEPARstartWORDFONTSTYLE{\scshape} | |
5791 | + \def\IEEEPARstartWORDCAPSTYLE{\relax} | |
5792 | +\fi | |
5793 | +% | |
5794 | +% | |
5795 | +% \IEEEPARstart | |
5796 | +% Definition for the big two line drop cap letter at the beginning of the | |
5797 | +% first paragraph of journal papers. The first argument is the first letter | |
5798 | +% of the first word, the second argument is the remaining letters of the | |
5799 | +% first word which will be rendered in upper case. | |
5800 | +% In V1.6 this has been completely rewritten to: | |
5801 | +% | |
5802 | +% 1. no longer have problems when the user begins an environment | |
5803 | +% within the paragraph that uses \IEEEPARstart. | |
5804 | +% 2. auto-detect and use the current font family | |
5805 | +% 3. revise handling of the space at the end of the first word so that | |
5806 | +% interword glue will now work as normal. | |
5807 | +% 4. produce correctly aligned edges for the (two) indented lines. | |
5808 | +% | |
5809 | +% We generalize things via control macros - playing with these is fun too. | |
5810 | +% | |
5811 | +% V1.7 added more control macros to make it easy for IEEEtrantools.sty users | |
5812 | +% to change the font style. | |
5813 | +% | |
5814 | +% the number of lines that are indented to clear it | |
5815 | +% may need to increase if using decenders | |
5816 | +\providecommand{\IEEEPARstartDROPLINES}{2} | |
5817 | +% minimum number of lines left on a page to allow a \@IEEEPARstart | |
5818 | +% Does not take into consideration rubber shrink, so it tends to | |
5819 | +% be overly cautious | |
5820 | +\providecommand{\IEEEPARstartMINPAGELINES}{2} | |
5821 | +% V1.7 the height of the drop cap is adjusted to match the height of this text | |
5822 | +% in the current font (when \IEEEPARstart is called). | |
5823 | +\providecommand{\IEEEPARstartHEIGHTTEXT}{T} | |
5824 | +% the depth the letter is lowered below the baseline | |
5825 | +% the height (and size) of the letter is determined by the sum | |
5826 | +% of this value and the height of the \IEEEPARstartHEIGHTTEXT in the current | |
5827 | +% font. It is a good idea to set this value in terms of the baselineskip | |
5828 | +% so that it can respond to changes therein. | |
5829 | +\providecommand{\IEEEPARstartDROPDEPTH}{1.1\baselineskip} | |
5830 | +% V1.7 the font the drop cap will be rendered in, | |
5831 | +% can take zero or one argument. | |
5832 | +\providecommand{\IEEEPARstartFONTSTYLE}{\bfseries} | |
5833 | +% V1.7 any additional, non-font related commands needed to modify | |
5834 | +% the drop cap letter, can take zero or one argument. | |
5835 | +\providecommand{\IEEEPARstartCAPSTYLE}{\MakeUppercase} | |
5836 | +% V1.7 the font that will be used to render the rest of the word, | |
5837 | +% can take zero or one argument. | |
5838 | +\providecommand{\IEEEPARstartWORDFONTSTYLE}{\relax} | |
5839 | +% V1.7 any additional, non-font related commands needed to modify | |
5840 | +% the rest of the word, can take zero or one argument. | |
5841 | +\providecommand{\IEEEPARstartWORDCAPSTYLE}{\MakeUppercase} | |
5842 | +% This is the horizontal separation distance from the drop letter to the main text. | |
5843 | +% Lengths that depend on the font (e.g., ex, em, etc.) will be referenced | |
5844 | +% to the font that is active when \IEEEPARstart is called. | |
5845 | +\providecommand{\IEEEPARstartSEP}{0.15em} | |
5846 | +% V1.7 horizontal offset applied to the left of the drop cap. | |
5847 | +\providecommand{\IEEEPARstartHOFFSET}{0em} | |
5848 | +% V1.7 Italic correction command applied at the end of the drop cap. | |
5849 | +\providecommand{\IEEEPARstartITLCORRECT}{\/} | |
5850 | + | |
5851 | +% width of the letter output, set globally. Can be used in \IEEEPARstartSEP | |
5852 | +% or \IEEEPARstartHOFFSET, but not the height lengths. | |
5853 | +\newdimen\IEEEPARstartletwidth | |
5854 | +\IEEEPARstartletwidth 0pt\relax | |
5855 | + | |
5856 | +% definition of \IEEEPARstart | |
5857 | +% THIS IS A CONTROLLED SPACING AREA, DO NOT ALLOW SPACES WITHIN THESE LINES | |
5858 | +% | |
5859 | +% The token \@IEEEPARstartfont will be globally defined after the first use | |
5860 | +% of \IEEEPARstart and will be a font command which creates the big letter | |
5861 | +% The first argument is the first letter of the first word and the second | |
5862 | +% argument is the rest of the first word(s). | |
5863 | +\def\IEEEPARstart#1#2{\par{% | |
5864 | +% if this page does not have enough space, break it and lets start | |
5865 | +% on a new one | |
5866 | +\@IEEEtranneedspace{\IEEEPARstartMINPAGELINES\baselineskip}{\relax}% | |
5867 | +% V1.7 move this up here in case user uses \textbf for \IEEEPARstartFONTSTYLE | |
5868 | +% which uses command \leavevmode which causes an unwanted \indent to be issued | |
5869 | +\noindent | |
5870 | +% calculate the desired height of the big letter | |
5871 | +% it extends from the top of \IEEEPARstartHEIGHTTEXT in the current font | |
5872 | +% down to \IEEEPARstartDROPDEPTH below the current baseline | |
5873 | +\settoheight{\@IEEEtrantmpdimenA}{\IEEEPARstartHEIGHTTEXT}% | |
5874 | +\addtolength{\@IEEEtrantmpdimenA}{\IEEEPARstartDROPDEPTH}% | |
5875 | +% extract the name of the current font in bold | |
5876 | +% and place it in \@IEEEPARstartFONTNAME | |
5877 | +\def\@IEEEPARstartGETFIRSTWORD##1 ##2\relax{##1}% | |
5878 | +{\IEEEPARstartFONTSTYLE{\selectfont\edef\@IEEEPARstartFONTNAMESPACE{\fontname\font\space}% | |
5879 | +\xdef\@IEEEPARstartFONTNAME{\expandafter\@IEEEPARstartGETFIRSTWORD\@IEEEPARstartFONTNAMESPACE\relax}}}% | |
5880 | +% define a font based on this name with a point size equal to the desired | |
5881 | +% height of the drop letter | |
5882 | +\font\@IEEEPARstartsubfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenA\relax% | |
5883 | +% save this value as a counter (integer) value (sp points) | |
5884 | +\@IEEEtrantmpcountA=\@IEEEtrantmpdimenA% | |
5885 | +% now get the height of the actual letter produced by this font size | |
5886 | +\settoheight{\@IEEEtrantmpdimenB}{\@IEEEPARstartsubfont\IEEEPARstartCAPSTYLE{#1}}% | |
5887 | +% If something bogus happens like the first argument is empty or the | |
5888 | +% current font is strange, do not allow a zero height. | |
5889 | +\ifdim\@IEEEtrantmpdimenB=0pt\relax% | |
5890 | +\typeout{** WARNING: IEEEPARstart drop letter has zero height! (line \the\inputlineno)}% | |
5891 | +\typeout{ Forcing the drop letter font size to 10pt.}% | |
5892 | +\@IEEEtrantmpdimenB=10pt% | |
5893 | +\fi% | |
5894 | +% and store it as a counter | |
5895 | +\@IEEEtrantmpcountB=\@IEEEtrantmpdimenB% | |
5896 | +% Since a font size doesn't exactly correspond to the height of the capital | |
5897 | +% letters in that font, the actual height of the letter, \@IEEEtrantmpcountB, | |
5898 | +% will be less than that desired, \@IEEEtrantmpcountA | |
5899 | +% we need to raise the font size, \@IEEEtrantmpdimenA | |
5900 | +% by \@IEEEtrantmpcountA / \@IEEEtrantmpcountB | |
5901 | +% But, TeX doesn't have floating point division, so we have to use integer | |
5902 | +% division. Hence the use of the counters. | |
5903 | +% We need to reduce the denominator so that the loss of the remainder will | |
5904 | +% have minimal affect on the accuracy of the result | |
5905 | +\divide\@IEEEtrantmpcountB by 200% | |
5906 | +\divide\@IEEEtrantmpcountA by \@IEEEtrantmpcountB% | |
5907 | +% Then reequalize things when we use TeX's ability to multiply by | |
5908 | +% floating point values | |
5909 | +\@IEEEtrantmpdimenB=0.005\@IEEEtrantmpdimenA% | |
5910 | +\multiply\@IEEEtrantmpdimenB by \@IEEEtrantmpcountA% | |
5911 | +% \@IEEEPARstartfont is globaly set to the calculated font of the big letter | |
5912 | +% We need to carry this out of the local calculation area to to create the | |
5913 | +% big letter. | |
5914 | +\global\font\@IEEEPARstartfont\@IEEEPARstartFONTNAME\space at \@IEEEtrantmpdimenB% | |
5915 | +% Now set \@IEEEtrantmpdimenA to the width of the big letter | |
5916 | +% We need to carry this out of the local calculation area to set the | |
5917 | +% hanging indent | |
5918 | +\settowidth{\global\@IEEEtrantmpdimenA}{\@IEEEPARstartfont | |
5919 | +\IEEEPARstartCAPSTYLE{#1\IEEEPARstartITLCORRECT}}}% | |
5920 | +% end of the isolated calculation environment | |
5921 | +\global\IEEEPARstartletwidth\@IEEEtrantmpdimenA\relax% | |
5922 | +% add in the extra clearance we want | |
5923 | +\advance\@IEEEtrantmpdimenA by \IEEEPARstartSEP\relax% | |
5924 | +% add in the optional offset | |
5925 | +\advance\@IEEEtrantmpdimenA by \IEEEPARstartHOFFSET\relax% | |
5926 | +% V1.7 don't allow negative offsets to produce negative hanging indents | |
5927 | +\@IEEEtrantmpdimenB\@IEEEtrantmpdimenA | |
5928 | +\ifnum\@IEEEtrantmpdimenB < 0 \@IEEEtrantmpdimenB 0pt\fi | |
5929 | +% \@IEEEtrantmpdimenA has the width of the big letter plus the | |
5930 | +% separation space and \@IEEEPARstartfont is the font we need to use | |
5931 | +% Now, we make the letter and issue the hanging indent command | |
5932 | +% The letter is placed in a box of zero width and height so that other | |
5933 | +% text won't be displaced by it. | |
5934 | +\hangindent\@IEEEtrantmpdimenB\hangafter=-\IEEEPARstartDROPLINES% | |
5935 | +\makebox[0pt][l]{\hspace{-\@IEEEtrantmpdimenA}% | |
5936 | +\raisebox{-\IEEEPARstartDROPDEPTH}[0pt][0pt]{\hspace{\IEEEPARstartHOFFSET}% | |
5937 | +\@IEEEPARstartfont\IEEEPARstartCAPSTYLE{#1\IEEEPARstartITLCORRECT}% | |
5938 | +\hspace{\IEEEPARstartSEP}}}% | |
5939 | +{\IEEEPARstartWORDFONTSTYLE{\IEEEPARstartWORDCAPSTYLE{\selectfont#2}}}} | |
5940 | + | |
5941 | + | |
5942 | + | |
5943 | + | |
5944 | +% determines if the space remaining on a given page is equal to or greater | |
5945 | +% than the specified space of argument one | |
5946 | +% if not, execute argument two (only if the remaining space is greater than zero) | |
5947 | +% and issue a \newpage | |
5948 | +% | |
5949 | +% example: \@IEEEtranneedspace{2in}{\vfill} | |
5950 | +% | |
5951 | +% Does not take into consideration rubber shrinkage, so it tends to | |
5952 | +% be overly cautious | |
5953 | +% Based on an example posted by Donald Arseneau | |
5954 | +% Note this macro uses \@IEEEtrantmpdimenB internally for calculations, | |
5955 | +% so DO NOT PASS \@IEEEtrantmpdimenB to this routine | |
5956 | +% if you need a dimen register, import with \@IEEEtrantmpdimenA instead | |
5957 | +\def\@IEEEtranneedspace#1#2{\penalty-100\begingroup%shield temp variable | |
5958 | +\@IEEEtrantmpdimenB\pagegoal\advance\@IEEEtrantmpdimenB-\pagetotal% space left | |
5959 | +\ifdim #1>\@IEEEtrantmpdimenB\relax% not enough space left | |
5960 | +\ifdim\@IEEEtrantmpdimenB>\z@\relax #2\fi% | |
5961 | +\newpage% | |
5962 | +\fi\endgroup} | |
5963 | + | |
5964 | + | |
5965 | + | |
5966 | +% IEEEbiography ENVIRONMENT | |
5967 | +% Allows user to enter biography leaving place for picture (adapts to font size) | |
5968 | +% As of V1.5, a new optional argument allows you to have a real graphic! | |
5969 | +% V1.5 and later also fixes the "colliding biographies" which could happen when a | |
5970 | +% biography's text was shorter than the space for the photo. | |
5971 | +% MDS 7/2001 | |
5972 | +% V1.6 prevent multiple biographies from making multiple TOC entries | |
5973 | +\newif\if@IEEEbiographyTOCentrynotmade | |
5974 | +\global\@IEEEbiographyTOCentrynotmadetrue | |
5975 | + | |
5976 | +% biography counter so hyperref can jump directly to the biographies | |
5977 | +% and not just the previous section | |
5978 | +\newcounter{IEEEbiography} | |
5979 | +\setcounter{IEEEbiography}{0} | |
5980 | + | |
5981 | +% photo area size | |
5982 | +\def\@IEEEBIOphotowidth{1.0in} % width of the biography photo area | |
5983 | +\def\@IEEEBIOphotodepth{1.25in} % depth (height) of the biography photo area | |
5984 | +% area cleared for photo | |
5985 | +\def\@IEEEBIOhangwidth{1.14in} % width cleared for the biography photo area | |
5986 | +\def\@IEEEBIOhangdepth{1.25in} % depth cleared for the biography photo area | |
5987 | + % actual depth will be a multiple of | |
5988 | + % \baselineskip, rounded up | |
5989 | +\def\@IEEEBIOskipN{4\baselineskip}% nominal value of the vskip above the biography | |
5990 | + | |
5991 | +\newenvironment{IEEEbiography}[2][]{\normalfont\@IEEEcompsoconly{\sffamily}\footnotesize% | |
5992 | +\unitlength 1in\parskip=0pt\par\parindent 1em\interlinepenalty500% | |
5993 | +% we need enough space to support the hanging indent | |
5994 | +% the nominal value of the spacer | |
5995 | +% and one extra line for good measure | |
5996 | +\@IEEEtrantmpdimenA=\@IEEEBIOhangdepth% | |
5997 | +\advance\@IEEEtrantmpdimenA by \@IEEEBIOskipN% | |
5998 | +\advance\@IEEEtrantmpdimenA by 1\baselineskip% | |
5999 | +% if this page does not have enough space, break it and lets start | |
6000 | +% with a new one | |
6001 | +\@IEEEtranneedspace{\@IEEEtrantmpdimenA}{\relax}% | |
6002 | +% nominal spacer can strech, not shrink use 1fil so user can out stretch with \vfill | |
6003 | +\vskip \@IEEEBIOskipN plus 1fil minus 0\baselineskip% | |
6004 | +% the default box for where the photo goes | |
6005 | +\def\@IEEEtempbiographybox{{\setlength{\fboxsep}{0pt}\framebox{% | |
6006 | +\begin{minipage}[b][\@IEEEBIOphotodepth][c]{\@IEEEBIOphotowidth}\centering PLACE\\ PHOTO\\ HERE \end{minipage}}}}% | |
6007 | +% | |
6008 | +% detect if the optional argument was supplied, this requires the | |
6009 | +% \@ifmtarg command as defined in the appendix section above | |
6010 | +% and if so, override the default box with what they want | |
6011 | +\@ifmtarg{#1}{\relax}{\def\@IEEEtempbiographybox{\mbox{\begin{minipage}[b][\@IEEEBIOphotodepth][c]{\@IEEEBIOphotowidth}% | |
6012 | +\centering% | |
6013 | +#1% | |
6014 | +\end{minipage}}}}% end if optional argument supplied | |
6015 | +% Make an entry into the table of contents only if we have not done so before | |
6016 | +\if@IEEEbiographyTOCentrynotmade% | |
6017 | +% link labels to the biography counter so hyperref will jump | |
6018 | +% to the biography, not the previous section | |
6019 | +\setcounter{IEEEbiography}{-1}% | |
6020 | +\refstepcounter{IEEEbiography}% | |
6021 | +\addcontentsline{toc}{section}{Biographies}% | |
6022 | +\global\@IEEEbiographyTOCentrynotmadefalse% | |
6023 | +\fi% | |
6024 | +% one more biography | |
6025 | +\refstepcounter{IEEEbiography}% | |
6026 | +% Make an entry for this name into the table of contents | |
6027 | +\addcontentsline{toc}{subsection}{#2}% | |
6028 | +% V1.6 properly handle if a new paragraph should occur while the | |
6029 | +% hanging indent is still active. Do this by redefining \par so | |
6030 | +% that it will not start a new paragraph. (But it will appear to the | |
6031 | +% user as if it did.) Also, strip any leading pars, newlines, or spaces. | |
6032 | +\let\@IEEEBIOORGparCMD=\par% save the original \par command | |
6033 | +\edef\par{\hfil\break\indent}% the new \par will not be a "real" \par | |
6034 | +\settoheight{\@IEEEtrantmpdimenA}{\@IEEEtempbiographybox}% get height of biography box | |
6035 | +\@IEEEtrantmpdimenB=\@IEEEBIOhangdepth% | |
6036 | +\@IEEEtrantmpcountA=\@IEEEtrantmpdimenB% countA has the hang depth | |
6037 | +\divide\@IEEEtrantmpcountA by \baselineskip% calculates lines needed to produce the hang depth | |
6038 | +\advance\@IEEEtrantmpcountA by 1% ensure we overestimate | |
6039 | +% set the hanging indent | |
6040 | +\hangindent\@IEEEBIOhangwidth% | |
6041 | +\hangafter-\@IEEEtrantmpcountA% | |
6042 | +% reference the top of the photo area to the top of a capital T | |
6043 | +\settoheight{\@IEEEtrantmpdimenB}{\mbox{T}}% | |
6044 | +% set the photo box, give it zero width and height so as not to disturb anything | |
6045 | +\noindent\makebox[0pt][l]{\hspace{-\@IEEEBIOhangwidth}\raisebox{\@IEEEtrantmpdimenB}[0pt][0pt]{% | |
6046 | +\raisebox{-\@IEEEBIOphotodepth}[0pt][0pt]{\@IEEEtempbiographybox}}}% | |
6047 | +% now place the author name and begin the bio text | |
6048 | +\noindent\textbf{#2\ }\@IEEEgobbleleadPARNLSP}{\relax\let\par=\@IEEEBIOORGparCMD\par% | |
6049 | +% 7/2001 V1.5 detect when the biography text is shorter than the photo area | |
6050 | +% and pad the unused area - preventing a collision from the next biography entry | |
6051 | +% MDS | |
6052 | +\ifnum \prevgraf <\@IEEEtrantmpcountA\relax% detect when the biography text is shorter than the photo | |
6053 | + \advance\@IEEEtrantmpcountA by -\prevgraf% calculate how many lines we need to pad | |
6054 | + \advance\@IEEEtrantmpcountA by -1\relax% we compensate for the fact that we indented an extra line | |
6055 | + \@IEEEtrantmpdimenA=\baselineskip% calculate the length of the padding | |
6056 | + \multiply\@IEEEtrantmpdimenA by \@IEEEtrantmpcountA% | |
6057 | + \noindent\rule{0pt}{\@IEEEtrantmpdimenA}% insert an invisible support strut | |
6058 | +\fi% | |
6059 | +\par\normalfont} | |
6060 | + | |
6061 | + | |
6062 | + | |
6063 | +% V1.6 | |
6064 | +% added biography without a photo environment | |
6065 | +\newenvironment{IEEEbiographynophoto}[1]{% | |
6066 | +% Make an entry into the table of contents only if we have not done so before | |
6067 | +\if@IEEEbiographyTOCentrynotmade% | |
6068 | +% link labels to the biography counter so hyperref will jump | |
6069 | +% to the biography, not the previous section | |
6070 | +\setcounter{IEEEbiography}{-1}% | |
6071 | +\refstepcounter{IEEEbiography}% | |
6072 | +\addcontentsline{toc}{section}{Biographies}% | |
6073 | +\global\@IEEEbiographyTOCentrynotmadefalse% | |
6074 | +\fi% | |
6075 | +% one more biography | |
6076 | +\refstepcounter{IEEEbiography}% | |
6077 | +% Make an entry for this name into the table of contents | |
6078 | +\addcontentsline{toc}{subsection}{#1}% | |
6079 | +\normalfont\@IEEEcompsoconly{\sffamily}\footnotesize\interlinepenalty500% | |
6080 | +\vskip 4\baselineskip plus 1fil minus 0\baselineskip% | |
6081 | +\parskip=0pt\par% | |
6082 | +\noindent\textbf{#1\ }\@IEEEgobbleleadPARNLSP}{\relax\par\normalfont} | |
6083 | + | |
6084 | + | |
6085 | +% provide the user with some old font commands | |
6086 | +% got this from article.cls | |
6087 | +\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} | |
6088 | +\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} | |
6089 | +\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} | |
6090 | +\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} | |
6091 | +\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} | |
6092 | +\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} | |
6093 | +\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} | |
6094 | +\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} | |
6095 | +\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} | |
6096 | + | |
6097 | + | |
6098 | +% SPECIAL PAPER NOTICE COMMANDS | |
6099 | +% | |
6100 | +% holds the special notice text | |
6101 | +\def\@IEEEspecialpapernotice{\relax} | |
6102 | + | |
6103 | +% for special papers, like invited papers, the user can do: | |
6104 | +% \IEEEspecialpapernotice{(Invited Paper)} before \maketitle | |
6105 | +\def\IEEEspecialpapernotice#1{\ifCLASSOPTIONconference% | |
6106 | +\def\@IEEEspecialpapernotice{{\sublargesize\textit{#1}\vspace*{1em}}}% | |
6107 | +\else% | |
6108 | +\def\@IEEEspecialpapernotice{{\\*[1.5ex]\sublargesize\textit{#1}}\vspace*{-2ex}}% | |
6109 | +\fi} | |
6110 | + | |
6111 | + | |
6112 | + | |
6113 | + | |
6114 | +% PUBLISHER ID COMMANDS | |
6115 | +% to insert a publisher's ID footer | |
6116 | +% V1.6 \IEEEpubid has been changed so that the change in page size and style | |
6117 | +% occurs in \maketitle. \IEEEpubid must now be issued prior to \maketitle | |
6118 | +% use \IEEEpubidadjcol as before - in the second column of the title page | |
6119 | +% These changes allow \maketitle to take the reduced page height into | |
6120 | +% consideration when dynamically setting the space between the author | |
6121 | +% names and the maintext. | |
6122 | +% | |
6123 | +% the amount the main text is pulled up to make room for the | |
6124 | +% publisher's ID footer | |
6125 | +% The IEEE uses about 1.3\baselineskip for journals, | |
6126 | +% dynamic title spacing will clean up the fraction | |
6127 | +\def\@IEEEpubidpullup{1.3\baselineskip} | |
6128 | +\ifCLASSOPTIONtechnote | |
6129 | +% for technotes it must be an integer of baselineskip as there can be no | |
6130 | +% dynamic title spacing for two column mode technotes (the title is in the | |
6131 | +% in first column) and we should maintain an integer number of lines in the | |
6132 | +% second column | |
6133 | +% There are some examples (such as older issues of "Transactions on | |
6134 | +% Information Theory") in which the IEEE really pulls the text off the ID for | |
6135 | +% technotes - about 0.55in (or 4\baselineskip). We'll use 2\baselineskip | |
6136 | +% and call it even. | |
6137 | +\def\@IEEEpubidpullup{2\baselineskip} | |
6138 | +\fi | |
6139 | + | |
6140 | +% V1.7 compsoc does not use a pullup | |
6141 | +\ifCLASSOPTIONcompsoc | |
6142 | +\def\@IEEEpubidpullup{0pt} | |
6143 | +\fi | |
6144 | + | |
6145 | +% holds the ID text | |
6146 | +\def\@IEEEpubid{\relax} | |
6147 | + | |
6148 | +% flag so \maketitle can tell if \IEEEpubid was called | |
6149 | +\newif\if@IEEEusingpubid | |
6150 | +\global\@IEEEusingpubidfalse | |
6151 | +% issue this command in the page to have the ID at the bottom | |
6152 | +% V1.6 use before \maketitle | |
6153 | +\def\IEEEpubid#1{\def\@IEEEpubid{#1}\global\@IEEEusingpubidtrue} | |
6154 | + | |
6155 | + | |
6156 | +% command which will pull up (shorten) the column it is executed in | |
6157 | +% to make room for the publisher ID. Place in the second column of | |
6158 | +% the title page when using \IEEEpubid | |
6159 | +% Is smart enough not to do anything when in single column text or | |
6160 | +% if the user hasn't called \IEEEpubid | |
6161 | +% currently needed in for the second column of a page with the | |
6162 | +% publisher ID. If not needed in future releases, please provide this | |
6163 | +% command and define it as \relax for backward compatibility | |
6164 | +% v1.6b do not allow command to operate if the peer review option has been | |
6165 | +% selected because \IEEEpubidadjcol will not be on the cover page. | |
6166 | +% V1.7 do nothing if compsoc | |
6167 | +\def\IEEEpubidadjcol{\ifCLASSOPTIONcompsoc\else\ifCLASSOPTIONpeerreview\else | |
6168 | +\if@twocolumn\if@IEEEusingpubid\enlargethispage{-\@IEEEpubidpullup}\fi\fi\fi\fi} | |
6169 | + | |
6170 | +% Special thanks to Peter Wilson, Daniel Luecking, and the other | |
6171 | +% gurus at comp.text.tex, for helping me to understand how best to | |
6172 | +% implement the IEEEpubid command in LaTeX. | |
6173 | + | |
6174 | + | |
6175 | + | |
6176 | +%% Lockout some commands under various conditions | |
6177 | + | |
6178 | +% general purpose bit bucket | |
6179 | +\newsavebox{\@IEEEtranrubishbin} | |
6180 | + | |
6181 | +% flags to prevent multiple warning messages | |
6182 | +\newif\if@IEEEWARNthanks | |
6183 | +\newif\if@IEEEWARNIEEEPARstart | |
6184 | +\newif\if@IEEEWARNIEEEbiography | |
6185 | +\newif\if@IEEEWARNIEEEbiographynophoto | |
6186 | +\newif\if@IEEEWARNIEEEpubid | |
6187 | +\newif\if@IEEEWARNIEEEpubidadjcol | |
6188 | +\newif\if@IEEEWARNIEEEmembership | |
6189 | +\newif\if@IEEEWARNIEEEaftertitletext | |
6190 | +\@IEEEWARNthankstrue | |
6191 | +\@IEEEWARNIEEEPARstarttrue | |
6192 | +\@IEEEWARNIEEEbiographytrue | |
6193 | +\@IEEEWARNIEEEbiographynophototrue | |
6194 | +\@IEEEWARNIEEEpubidtrue | |
6195 | +\@IEEEWARNIEEEpubidadjcoltrue | |
6196 | +\@IEEEWARNIEEEmembershiptrue | |
6197 | +\@IEEEWARNIEEEaftertitletexttrue | |
6198 | + | |
6199 | + | |
6200 | +%% Lockout some commands when in various modes, but allow them to be restored if needed | |
6201 | +%% | |
6202 | +% save commands which might be locked out | |
6203 | +% so that the user can later restore them if needed | |
6204 | +\let\@IEEESAVECMDthanks\thanks | |
6205 | +\let\@IEEESAVECMDIEEEPARstart\IEEEPARstart | |
6206 | +\let\@IEEESAVECMDIEEEbiography\IEEEbiography | |
6207 | +\let\@IEEESAVECMDendIEEEbiography\endIEEEbiography | |
6208 | +\let\@IEEESAVECMDIEEEbiographynophoto\IEEEbiographynophoto | |
6209 | +\let\@IEEESAVECMDendIEEEbiographynophoto\endIEEEbiographynophoto | |
6210 | +\let\@IEEESAVECMDIEEEpubid\IEEEpubid | |
6211 | +\let\@IEEESAVECMDIEEEpubidadjcol\IEEEpubidadjcol | |
6212 | +\let\@IEEESAVECMDIEEEmembership\IEEEmembership | |
6213 | +\let\@IEEESAVECMDIEEEaftertitletext\IEEEaftertitletext | |
6214 | + | |
6215 | + | |
6216 | +% disable \IEEEPARstart when in draft mode | |
6217 | +% This may have originally been done because the pre-V1.6 drop letter | |
6218 | +% algorithm had problems with a non-unity baselinestretch | |
6219 | +% At any rate, it seems too formal to have a drop letter in a draft | |
6220 | +% paper. | |
6221 | +\ifCLASSOPTIONdraftcls | |
6222 | +\def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** ATTENTION: \noexpand\IEEEPARstart | |
6223 | + is disabled in draft mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse} | |
6224 | +\fi | |
6225 | +% and for technotes | |
6226 | +\ifCLASSOPTIONtechnote | |
6227 | +\def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** WARNING: \noexpand\IEEEPARstart | |
6228 | + is locked out for technotes (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse} | |
6229 | +\fi | |
6230 | + | |
6231 | + | |
6232 | +% lockout unneeded commands when in conference mode | |
6233 | +\ifCLASSOPTIONconference | |
6234 | +% when locked out, \thanks, \IEEEbiography, \IEEEbiographynophoto, \IEEEpubid, | |
6235 | +% \IEEEmembership and \IEEEaftertitletext will all swallow their given text. | |
6236 | +% \IEEEPARstart will output a normal character instead | |
6237 | +% warn the user about these commands only once to prevent the console screen | |
6238 | +% from filling up with redundant messages | |
6239 | +\def\thanks#1{\if@IEEEWARNthanks\typeout{** WARNING: \noexpand\thanks | |
6240 | + is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNthanksfalse} | |
6241 | +\def\IEEEPARstart#1#2{#1#2\if@IEEEWARNIEEEPARstart\typeout{** WARNING: \noexpand\IEEEPARstart | |
6242 | + is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEPARstartfalse} | |
6243 | + | |
6244 | + | |
6245 | +% LaTeX treats environments and commands with optional arguments differently. | |
6246 | +% the actual ("internal") command is stored as \\commandname | |
6247 | +% (accessed via \csname\string\commandname\endcsname ) | |
6248 | +% the "external" command \commandname is a macro with code to determine | |
6249 | +% whether or not the optional argument is presented and to provide the | |
6250 | +% default if it is absent. So, in order to save and restore such a command | |
6251 | +% we would have to save and restore \\commandname as well. But, if LaTeX | |
6252 | +% ever changes the way it names the internal names, the trick would break. | |
6253 | +% Instead let us just define a new environment so that the internal | |
6254 | +% name can be left undisturbed. | |
6255 | +\newenvironment{@IEEEbogusbiography}[2][]{\if@IEEEWARNIEEEbiography\typeout{** WARNING: \noexpand\IEEEbiography | |
6256 | + is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEbiographyfalse% | |
6257 | +\setbox\@IEEEtranrubishbin\vbox\bgroup}{\egroup\relax} | |
6258 | +% and make biography point to our bogus biography | |
6259 | +\let\IEEEbiography=\@IEEEbogusbiography | |
6260 | +\let\endIEEEbiography=\end@IEEEbogusbiography | |
6261 | + | |
6262 | +\renewenvironment{IEEEbiographynophoto}[1]{\if@IEEEWARNIEEEbiographynophoto\typeout{** WARNING: \noexpand\IEEEbiographynophoto | |
6263 | + is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEbiographynophotofalse% | |
6264 | +\setbox\@IEEEtranrubishbin\vbox\bgroup}{\egroup\relax} | |
6265 | + | |
6266 | +\def\IEEEpubid#1{\if@IEEEWARNIEEEpubid\typeout{** WARNING: \noexpand\IEEEpubid | |
6267 | + is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEpubidfalse} | |
6268 | +\def\IEEEpubidadjcol{\if@IEEEWARNIEEEpubidadjcol\typeout{** WARNING: \noexpand\IEEEpubidadjcol | |
6269 | + is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEpubidadjcolfalse} | |
6270 | +\def\IEEEmembership#1{\if@IEEEWARNIEEEmembership\typeout{** WARNING: \noexpand\IEEEmembership | |
6271 | + is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEmembershipfalse} | |
6272 | +\def\IEEEaftertitletext#1{\if@IEEEWARNIEEEaftertitletext\typeout{** WARNING: \noexpand\IEEEaftertitletext | |
6273 | + is locked out when in conference mode (line \the\inputlineno).}\fi\global\@IEEEWARNIEEEaftertitletextfalse} | |
6274 | +\fi | |
6275 | + | |
6276 | + | |
6277 | +% provide a way to restore the commands that are locked out | |
6278 | +\def\IEEEoverridecommandlockouts{% | |
6279 | +\typeout{** ATTENTION: Overriding command lockouts (line \the\inputlineno).}% | |
6280 | +\let\thanks\@IEEESAVECMDthanks% | |
6281 | +\let\IEEEPARstart\@IEEESAVECMDIEEEPARstart% | |
6282 | +\let\IEEEbiography\@IEEESAVECMDIEEEbiography% | |
6283 | +\let\endIEEEbiography\@IEEESAVECMDendIEEEbiography% | |
6284 | +\let\IEEEbiographynophoto\@IEEESAVECMDIEEEbiographynophoto% | |
6285 | +\let\endIEEEbiographynophoto\@IEEESAVECMDendIEEEbiographynophoto% | |
6286 | +\let\IEEEpubid\@IEEESAVECMDIEEEpubid% | |
6287 | +\let\IEEEpubidadjcol\@IEEESAVECMDIEEEpubidadjcol% | |
6288 | +\let\IEEEmembership\@IEEESAVECMDIEEEmembership% | |
6289 | +\let\IEEEaftertitletext\@IEEESAVECMDIEEEaftertitletext} | |
6290 | + | |
6291 | + | |
6292 | + | |
6293 | +% need a backslash character for typeout output | |
6294 | +{\catcode`\|=0 \catcode`\\=12 | |
6295 | +|xdef|@IEEEbackslash{\}} | |
6296 | + | |
6297 | + | |
6298 | +% hook to allow easy disabling of all legacy warnings | |
6299 | +\def\@IEEElegacywarn#1#2{\typeout{** ATTENTION: \@IEEEbackslash #1 is deprecated (line \the\inputlineno). | |
6300 | +Use \@IEEEbackslash #2 instead.}} | |
6301 | + | |
6302 | + | |
6303 | +% provide some legacy IEEEtran commands | |
6304 | +\def\IEEEcompsoctitleabstractindextext{\@IEEElegacywarn{IEEEcompsoctitleabstractindextext}{IEEEtitleabstractindextext}\IEEEtitleabstractindextext} | |
6305 | +\def\IEEEdisplaynotcompsoctitleabstractindextext{\@IEEElegacywarn{IEEEdisplaynotcompsoctitleabstractindextext}{IEEEdisplaynontitleabstractindextext}\IEEEdisplaynontitleabstractindextext} | |
6306 | +% provide some legacy IEEEtran environments | |
6307 | + | |
6308 | + | |
6309 | +% V1.8a no more support for these legacy commands | |
6310 | +%\def\authorblockA{\@IEEElegacywarn{authorblockA}{IEEEauthorblockA}\IEEEauthorblockA} | |
6311 | +%\def\authorblockN{\@IEEElegacywarn{authorblockN}{IEEEauthorblockN}\IEEEauthorblockN} | |
6312 | +%\def\authorrefmark{\@IEEElegacywarn{authorrefmark}{IEEEauthorrefmark}\IEEEauthorrefmark} | |
6313 | +%\def\PARstart{\@IEEElegacywarn{PARstart}{IEEEPARstart}\IEEEPARstart} | |
6314 | +%\def\pubid{\@IEEElegacywarn{pubid}{IEEEpubid}\IEEEpubid} | |
6315 | +%\def\pubidadjcol{\@IEEElegacywarn{pubidadjcol}{IEEEpubidadjcol}\IEEEpubidadjcol} | |
6316 | +%\def\specialpapernotice{\@IEEElegacywarn{specialpapernotice}{IEEEspecialpapernotice}\IEEEspecialpapernotice} | |
6317 | +% and environments | |
6318 | +%\def\keywords{\@IEEElegacywarn{keywords}{IEEEkeywords}\IEEEkeywords} | |
6319 | +%\def\endkeywords{\endIEEEkeywords} | |
6320 | +% V1.8 no more support for legacy IED list commands | |
6321 | +%\let\labelindent\IEEElabelindent | |
6322 | +%\def\calcleftmargin{\@IEEElegacywarn{calcleftmargin}{IEEEcalcleftmargin}\IEEEcalcleftmargin} | |
6323 | +%\def\setlabelwidth{\@IEEElegacywarn{setlabelwidth}{IEEEsetlabelwidth}\IEEEsetlabelwidth} | |
6324 | +%\def\usemathlabelsep{\@IEEElegacywarn{usemathlabelsep}{IEEEusemathlabelsep}\IEEEusemathlabelsep} | |
6325 | +%\def\iedlabeljustifyc{\@IEEElegacywarn{iedlabeljustifyc}{IEEEiedlabeljustifyc}\IEEEiedlabeljustifyc} | |
6326 | +%\def\iedlabeljustifyl{\@IEEElegacywarn{iedlabeljustifyl}{IEEEiedlabeljustifyl}\IEEEiedlabeljustifyl} | |
6327 | +%\def\iedlabeljustifyr{\@IEEElegacywarn{iedlabeljustifyr}{IEEEiedlabeljustifyr}\IEEEiedlabeljustifyr} | |
6328 | +% V1.8 no more support for QED and proof stuff | |
6329 | +%\def\QED{\@IEEElegacywarn{QED}{IEEEQED}\IEEEQED} | |
6330 | +%\def\QEDclosed{\@IEEElegacywarn{QEDclosed}{IEEEQEDclosed}\IEEEQEDclosed} | |
6331 | +%\def\QEDopen{\@IEEElegacywarn{QEDopen}{IEEEQEDopen}\IEEEQEDopen} | |
6332 | +%\AtBeginDocument{\def\proof{\@IEEElegacywarn{proof}{IEEEproof}\IEEEproof}\def\endproof{\endIEEEproof}} | |
6333 | +% V1.8 no longer support biography or biographynophoto | |
6334 | +%\def\biography{\@IEEElegacywarn{biography}{IEEEbiography}\IEEEbiography} | |
6335 | +%\def\biographynophoto{\@IEEElegacywarn{biographynophoto}{IEEEbiographynophoto}\IEEEbiographynophoto} | |
6336 | +%\def\endbiography{\endIEEEbiography} | |
6337 | +%\def\endbiographynophoto{\endIEEEbiographynophoto} | |
6338 | +% V1.7 and later no longer supports \overrideIEEEmargins | |
6339 | +%\def\overrideIEEEmargins{% | |
6340 | +%\typeout{** WARNING: \string\overrideIEEEmargins \space no longer supported (line \the\inputlineno).}% | |
6341 | +%\typeout{** Use the \string\CLASSINPUTinnersidemargin, \string\CLASSINPUToutersidemargin \space controls instead.}} | |
6342 | + | |
6343 | +\endinput | |
6344 | + | |
6345 | +%%%%%%%%%%%%%%%%%%%%%%%%%%%%% End of IEEEtran.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6346 | +% That's all folks! | |
6347 | + | ... | ... |
IEEEtran_HOWTO.pdf
0 → 100644
No preview for this file type
README
0 → 100644
1 | +++ a/README | |
1 | + | |
2 | +August 26, 2015 | |
3 | + | |
4 | + | |
5 | +IEEEtran is a LaTeX class for authors of the Institute of Electrical and | |
6 | +Electronics Engineers (IEEE) transactions journals and conferences. | |
7 | +The latest version of the IEEEtran package can be found at CTAN: | |
8 | + | |
9 | +http://www.ctan.org/pkg/ieeetran | |
10 | + | |
11 | +as well as within IEEE's site: | |
12 | + | |
13 | +http://www.ieee.org/ | |
14 | + | |
15 | + | |
16 | +This package contains the IEEE Computer Society subset of the full IEEEtran | |
17 | +package and is intended for use with IEEE Computer Society publications. | |
18 | +The included version of the IEEEtran_HOWTO.pdf has been specially formatted | |
19 | +in IEEE Computer Society (compsoc) journal mode. | |
20 | + | |
21 | + | |
22 | +For latest news, helpful tips, answers to frequently asked questions, | |
23 | +beta releases and other support, visit the IEEEtran home page at my | |
24 | +website: | |
25 | + | |
26 | +http://www.michaelshell.org/tex/ieeetran/ | |
27 | + | |
28 | +Version 1.8b has a number of significant changes over the v1.8a release. | |
29 | +For a full history of changes, please read the file changelog.txt. | |
30 | +The most notable changes in this release include: | |
31 | + | |
32 | + 1) Added new comsoc mode for the IEEE Communications Society. | |
33 | + This mode (at present) only invokes the use of the newtxmath math fonts. | |
34 | + | |
35 | + 2) Revised IEEEeqnarray column specifications to work with active " | |
36 | + (or other punctuation catcode changes) as with babel under the | |
37 | + german or ngerman language modes. | |
38 | + Thanks to Stefan M. Moser for reporting this problem. | |
39 | + | |
40 | + 3) Added \indexspace and other index related macros as newer versions of | |
41 | + article.cls now do. These macros are needed to avoid an error when | |
42 | + using the glossaries package. | |
43 | + Thanks to Sebastian Nyberg for suggesting this change. | |
44 | + | |
45 | + 4) Fixed odd/even page header font bug under compsoc mode and | |
46 | + other page style code improvements. | |
47 | + Thanks to Marco Paolieri for reporting this problem. | |
48 | + | |
49 | + 5) Added hooks to allow for easy control of spacing above title. | |
50 | + | |
51 | + 6) Added the \IEEEnoauxwrite command. | |
52 | + Thanks to Sudarshan Mukherjee for suggesting this feature. | |
53 | + | |
54 | + | |
55 | +NOTE: Take care not to confuse the "comsoc" and "compsoc" class | |
56 | +options/modes as they are very different: | |
57 | + | |
58 | +comsoc ==> IEEE Communications Society | |
59 | +compsoc ==> IEEE Computer Society | |
60 | + | |
61 | +The comsoc mode requires that an acceptable Times math font be available on | |
62 | +the LaTeX system. This requirement will be enforced by IEEEtran in comsoc | |
63 | +mode. Either the freely available newtxmath font by Michael Sharpe | |
64 | +http://www.ctan.org/pkg/newtx | |
65 | +(version 1.451, July 28, 2015 or later is recommended) | |
66 | +or the commercial MathTime font (e.g., mtpro2.sty) is acceptable. | |
67 | +See Section II-D (2.4) "Class Options - comsoc, compsoc, transmag" of | |
68 | +the IEEEtran HOWTO for more details. | |
69 | + | |
70 | + | |
71 | +Best wishes for all your publication endeavors, | |
72 | + | |
73 | +Michael Shell | |
74 | +http://www.michaelshell.org/ | |
75 | + | |
76 | + | |
77 | +********************************** Files ********************************** | |
78 | + | |
79 | +README - This file. | |
80 | + | |
81 | +IEEEtran.cls - The IEEEtran LaTeX class file. | |
82 | + | |
83 | +changelog.txt - The revision history. | |
84 | + | |
85 | +IEEEtran_HOWTO.pdf - The IEEEtran LaTeX class user manual. | |
86 | + | |
87 | +bare_conf_compsoc.tex - A bare bones starter file for IEEE Computer Society | |
88 | + conference papers. | |
89 | + | |
90 | +bare_jrnl_compsoc.tex - A bare bones starter file for IEEE Computer Society | |
91 | + journal papers. | |
92 | + | |
93 | +bare_adv.tex - A bare bones starter file showing advanced | |
94 | + techniques such as conditional compilation, | |
95 | + hyperlinks, PDF thumbnails, etc. The illustrated | |
96 | + format is for a IEEE Computer Society journal paper. | |
97 | + | |
98 | +*************************************************************************** | |
99 | +Legal Notice: | |
100 | +This code is offered as-is without any warranty either expressed or | |
101 | +implied; without even the implied warranty of MERCHANTABILITY or | |
102 | +FITNESS FOR A PARTICULAR PURPOSE! | |
103 | +User assumes all risk. | |
104 | +In no event shall the IEEE or any contributor to this code be liable for | |
105 | +any damages or losses, including, but not limited to, incidental, | |
106 | +consequential, or any other damages, resulting from the use or misuse | |
107 | +of any information contained here. | |
108 | + | |
109 | +All comments are the opinions of their respective authors and are not | |
110 | +necessarily endorsed by the IEEE. | |
111 | + | |
112 | +This work is distributed under the LaTeX Project Public License (LPPL) | |
113 | +( http://www.latex-project.org/ ) version 1.3, and may be freely used, | |
114 | +distributed and modified. A copy of the LPPL, version 1.3, is included | |
115 | +in the base LaTeX documentation of all distributions of LaTeX released | |
116 | +2003/12/01 or later. | |
117 | +Retain all contribution notices and credits. | |
118 | +** Modified files should be clearly indicated as such, including ** | |
119 | +** renaming them and changing author support contact information. ** | |
120 | + | |
121 | +File list of work: IEEEtran.cls, IEEEtran_HOWTO.pdf, bare_adv.tex, | |
122 | + bare_conf_compsoc.tex, bare_jrnl_compsoc.tex. | |
123 | +*************************************************************************** | ... | ... |
bare_adv.tex
0 → 100644
1 | +++ a/bare_adv.tex | |
1 | + | |
2 | +%% bare_adv.tex | |
3 | +%% V1.4b | |
4 | +%% 2015/08/26 | |
5 | +%% by Michael Shell | |
6 | +%% See: | |
7 | +%% http://www.michaelshell.org/ | |
8 | +%% for current contact information. | |
9 | +%% | |
10 | +%% This is a skeleton file demonstrating the advanced use of IEEEtran.cls | |
11 | +%% (requires IEEEtran.cls version 1.8b or later) with an IEEE Computer | |
12 | +%% Society journal paper. | |
13 | +%% | |
14 | +%% Support sites: | |
15 | +%% http://www.michaelshell.org/tex/ieeetran/ | |
16 | +%% http://www.ctan.org/pkg/ieeetran | |
17 | +%% and | |
18 | +%% http://www.ieee.org/ | |
19 | + | |
20 | +%%************************************************************************* | |
21 | +%% Legal Notice: | |
22 | +%% This code is offered as-is without any warranty either expressed or | |
23 | +%% implied; without even the implied warranty of MERCHANTABILITY or | |
24 | +%% FITNESS FOR A PARTICULAR PURPOSE! | |
25 | +%% User assumes all risk. | |
26 | +%% In no event shall the IEEE or any contributor to this code be liable for | |
27 | +%% any damages or losses, including, but not limited to, incidental, | |
28 | +%% consequential, or any other damages, resulting from the use or misuse | |
29 | +%% of any information contained here. | |
30 | +%% | |
31 | +%% All comments are the opinions of their respective authors and are not | |
32 | +%% necessarily endorsed by the IEEE. | |
33 | +%% | |
34 | +%% This work is distributed under the LaTeX Project Public License (LPPL) | |
35 | +%% ( http://www.latex-project.org/ ) version 1.3, and may be freely used, | |
36 | +%% distributed and modified. A copy of the LPPL, version 1.3, is included | |
37 | +%% in the base LaTeX documentation of all distributions of LaTeX released | |
38 | +%% 2003/12/01 or later. | |
39 | +%% Retain all contribution notices and credits. | |
40 | +%% ** Modified files should be clearly indicated as such, including ** | |
41 | +%% ** renaming them and changing author support contact information. ** | |
42 | +%%************************************************************************* | |
43 | + | |
44 | + | |
45 | +% *** Authors should verify (and, if needed, correct) their LaTeX system *** | |
46 | +% *** with the testflow diagnostic prior to trusting their LaTeX platform *** | |
47 | +% *** with production work. The IEEE's font choices and paper sizes can *** | |
48 | +% *** trigger bugs that do not appear when using other class files. *** *** | |
49 | +% The testflow support page is at: | |
50 | +% http://www.michaelshell.org/tex/testflow/ | |
51 | + | |
52 | + | |
53 | +% IEEEtran V1.7 and later provides for these CLASSINPUT macros to allow the | |
54 | +% user to reprogram some IEEEtran.cls defaults if needed. These settings | |
55 | +% override the internal defaults of IEEEtran.cls regardless of which class | |
56 | +% options are used. Do not use these unless you have good reason to do so as | |
57 | +% they can result in nonIEEE compliant documents. User beware. ;) | |
58 | +% | |
59 | +%\newcommand{\CLASSINPUTbaselinestretch}{1.0} % baselinestretch | |
60 | +%\newcommand{\CLASSINPUTinnersidemargin}{1in} % inner side margin | |
61 | +%\newcommand{\CLASSINPUToutersidemargin}{1in} % outer side margin | |
62 | +%\newcommand{\CLASSINPUTtoptextmargin}{1in} % top text margin | |
63 | +%\newcommand{\CLASSINPUTbottomtextmargin}{1in}% bottom text margin | |
64 | + | |
65 | + | |
66 | + | |
67 | + | |
68 | +% | |
69 | +\documentclass[10pt,journal,compsoc]{IEEEtran} | |
70 | +% If IEEEtran.cls has not been installed into the LaTeX system files, | |
71 | +% manually specify the path to it like: | |
72 | +% \documentclass[10pt,journal,compsoc]{../sty/IEEEtran} | |
73 | + | |
74 | + | |
75 | +% For Computer Society journals, IEEEtran defaults to the use of | |
76 | +% Palatino/Palladio as is done in IEEE Computer Society journals. | |
77 | +% To go back to Times Roman, you can use this code: | |
78 | +%\renewcommand{\rmdefault}{ptm}\selectfont | |
79 | + | |
80 | + | |
81 | + | |
82 | + | |
83 | + | |
84 | +% Some very useful LaTeX packages include: | |
85 | +% (uncomment the ones you want to load) | |
86 | + | |
87 | + | |
88 | + | |
89 | +% *** MISC UTILITY PACKAGES *** | |
90 | +% | |
91 | +%\usepackage{ifpdf} | |
92 | +% Heiko Oberdiek's ifpdf.sty is very useful if you need conditional | |
93 | +% compilation based on whether the output is pdf or dvi. | |
94 | +% usage: | |
95 | +% \ifpdf | |
96 | +% % pdf code | |
97 | +% \else | |
98 | +% % dvi code | |
99 | +% \fi | |
100 | +% The latest version of ifpdf.sty can be obtained from: | |
101 | +% http://www.ctan.org/pkg/ifpdf | |
102 | +% Also, note that IEEEtran.cls V1.7 and later provides a builtin | |
103 | +% \ifCLASSINFOpdf conditional that works the same way. | |
104 | +% When switching from latex to pdflatex and vice-versa, the compiler may | |
105 | +% have to be run twice to clear warning/error messages. | |
106 | + | |
107 | + | |
108 | + | |
109 | + | |
110 | + | |
111 | + | |
112 | +% *** CITATION PACKAGES *** | |
113 | +% | |
114 | +\ifCLASSOPTIONcompsoc | |
115 | + % The IEEE Computer Society needs nocompress option | |
116 | + % requires cite.sty v4.0 or later (November 2003) | |
117 | + \usepackage[nocompress]{cite} | |
118 | +\else | |
119 | + % normal IEEE | |
120 | + \usepackage{cite} | |
121 | +\fi | |
122 | +% cite.sty was written by Donald Arseneau | |
123 | +% V1.6 and later of IEEEtran pre-defines the format of the cite.sty package | |
124 | +% \cite{} output to follow that of the IEEE. Loading the cite package will | |
125 | +% result in citation numbers being automatically sorted and properly | |
126 | +% "compressed/ranged". e.g., [1], [9], [2], [7], [5], [6] without using | |
127 | +% cite.sty will become [1], [2], [5]--[7], [9] using cite.sty. cite.sty's | |
128 | +% \cite will automatically add leading space, if needed. Use cite.sty's | |
129 | +% noadjust option (cite.sty V3.8 and later) if you want to turn this off | |
130 | +% such as if a citation ever needs to be enclosed in parenthesis. | |
131 | +% cite.sty is already installed on most LaTeX systems. Be sure and use | |
132 | +% version 5.0 (2009-03-20) and later if using hyperref.sty. | |
133 | +% The latest version can be obtained at: | |
134 | +% http://www.ctan.org/pkg/cite | |
135 | +% The documentation is contained in the cite.sty file itself. | |
136 | +% | |
137 | +% Note that some packages require special options to format as the Computer | |
138 | +% Society requires. In particular, Computer Society papers do not use | |
139 | +% compressed citation ranges as is done in typical IEEE papers | |
140 | +% (e.g., [1]-[4]). Instead, they list every citation separately in order | |
141 | +% (e.g., [1], [2], [3], [4]). To get the latter we need to load the cite | |
142 | +% package with the nocompress option which is supported by cite.sty v4.0 | |
143 | +% and later. | |
144 | + | |
145 | + | |
146 | + | |
147 | + | |
148 | + | |
149 | +% *** GRAPHICS RELATED PACKAGES *** | |
150 | +% | |
151 | +\ifCLASSINFOpdf | |
152 | + % \usepackage[pdftex]{graphicx} | |
153 | + % declare the path(s) where your graphic files are | |
154 | + % \graphicspath{{../pdf/}{../jpeg/}} | |
155 | + % and their extensions so you won't have to specify these with | |
156 | + % every instance of \includegraphics | |
157 | + % \DeclareGraphicsExtensions{.pdf,.jpeg,.png} | |
158 | +\else | |
159 | + % or other class option (dvipsone, dvipdf, if not using dvips). graphicx | |
160 | + % will default to the driver specified in the system graphics.cfg if no | |
161 | + % driver is specified. | |
162 | + % \usepackage[dvips]{graphicx} | |
163 | + % declare the path(s) where your graphic files are | |
164 | + % \graphicspath{{../eps/}} | |
165 | + % and their extensions so you won't have to specify these with | |
166 | + % every instance of \includegraphics | |
167 | + % \DeclareGraphicsExtensions{.eps} | |
168 | +\fi | |
169 | +% graphicx was written by David Carlisle and Sebastian Rahtz. It is | |
170 | +% required if you want graphics, photos, etc. graphicx.sty is already | |
171 | +% installed on most LaTeX systems. The latest version and documentation | |
172 | +% can be obtained at: | |
173 | +% http://www.ctan.org/pkg/graphicx | |
174 | +% Another good source of documentation is "Using Imported Graphics in | |
175 | +% LaTeX2e" by Keith Reckdahl which can be found at: | |
176 | +% http://www.ctan.org/pkg/epslatex | |
177 | +% | |
178 | +% latex, and pdflatex in dvi mode, support graphics in encapsulated | |
179 | +% postscript (.eps) format. pdflatex in pdf mode supports graphics | |
180 | +% in .pdf, .jpeg, .png and .mps (metapost) formats. Users should ensure | |
181 | +% that all non-photo figures use a vector format (.eps, .pdf, .mps) and | |
182 | +% not a bitmapped formats (.jpeg, .png). The IEEE frowns on bitmapped formats | |
183 | +% which can result in "jaggedy"/blurry rendering of lines and letters as | |
184 | +% well as large increases in file sizes. | |
185 | +% | |
186 | +% You can find documentation about the pdfTeX application at: | |
187 | +% http://www.tug.org/applications/pdftex | |
188 | + | |
189 | + | |
190 | + | |
191 | + | |
192 | + | |
193 | +% *** MATH PACKAGES *** | |
194 | +% | |
195 | +%\usepackage{amsmath} | |
196 | +% A popular package from the American Mathematical Society that provides | |
197 | +% many useful and powerful commands for dealing with mathematics. | |
198 | +% | |
199 | +% Note that the amsmath package sets \interdisplaylinepenalty to 10000 | |
200 | +% thus preventing page breaks from occurring within multiline equations. Use: | |
201 | +%\interdisplaylinepenalty=2500 | |
202 | +% after loading amsmath to restore such page breaks as IEEEtran.cls normally | |
203 | +% does. amsmath.sty is already installed on most LaTeX systems. The latest | |
204 | +% version and documentation can be obtained at: | |
205 | +% http://www.ctan.org/pkg/amsmath | |
206 | + | |
207 | + | |
208 | + | |
209 | + | |
210 | + | |
211 | +% *** SPECIALIZED LIST PACKAGES *** | |
212 | +%\usepackage{acronym} | |
213 | +% acronym.sty was written by Tobias Oetiker. This package provides tools for | |
214 | +% managing documents with large numbers of acronyms. (You don't *have* to | |
215 | +% use this package - unless you have a lot of acronyms, you may feel that | |
216 | +% such package management of them is bit of an overkill.) | |
217 | +% Do note that the acronym environment (which lists acronyms) will have a | |
218 | +% problem when used under IEEEtran.cls because acronym.sty relies on the | |
219 | +% description list environment - which IEEEtran.cls has customized for | |
220 | +% producing IEEE style lists. A workaround is to declared the longest | |
221 | +% label width via the IEEEtran.cls \IEEEiedlistdecl global control: | |
222 | +% | |
223 | +% \renewcommand{\IEEEiedlistdecl}{\IEEEsetlabelwidth{SONET}} | |
224 | +% \begin{acronym} | |
225 | +% | |
226 | +% \end{acronym} | |
227 | +% \renewcommand{\IEEEiedlistdecl}{\relax}% remember to reset \IEEEiedlistdecl | |
228 | +% | |
229 | +% instead of using the acronym environment's optional argument. | |
230 | +% The latest version and documentation can be obtained at: | |
231 | +% http://www.ctan.org/pkg/acronym | |
232 | + | |
233 | + | |
234 | +%\usepackage{algorithmic} | |
235 | +% algorithmic.sty was written by Peter Williams and Rogerio Brito. | |
236 | +% This package provides an algorithmic environment fo describing algorithms. | |
237 | +% You can use the algorithmic environment in-text or within a figure | |
238 | +% environment to provide for a floating algorithm. Do NOT use the algorithm | |
239 | +% floating environment provided by algorithm.sty (by the same authors) or | |
240 | +% algorithm2e.sty (by Christophe Fiorio) as the IEEE does not use dedicated | |
241 | +% algorithm float types and packages that provide these will not provide | |
242 | +% correct IEEE style captions. The latest version and documentation of | |
243 | +% algorithmic.sty can be obtained at: | |
244 | +% http://www.ctan.org/pkg/algorithms | |
245 | +% Also of interest may be the (relatively newer and more customizable) | |
246 | +% algorithmicx.sty package by Szasz Janos: | |
247 | +% http://www.ctan.org/pkg/algorithmicx | |
248 | + | |
249 | + | |
250 | + | |
251 | + | |
252 | +% *** ALIGNMENT PACKAGES *** | |
253 | +% | |
254 | +%\usepackage{array} | |
255 | +% Frank Mittelbach's and David Carlisle's array.sty patches and improves | |
256 | +% the standard LaTeX2e array and tabular environments to provide better | |
257 | +% appearance and additional user controls. As the default LaTeX2e table | |
258 | +% generation code is lacking to the point of almost being broken with | |
259 | +% respect to the quality of the end results, all users are strongly | |
260 | +% advised to use an enhanced (at the very least that provided by array.sty) | |
261 | +% set of table tools. array.sty is already installed on most systems. The | |
262 | +% latest version and documentation can be obtained at: | |
263 | +% http://www.ctan.org/pkg/array | |
264 | + | |
265 | + | |
266 | +%\usepackage{mdwmath} | |
267 | +%\usepackage{mdwtab} | |
268 | +% Also highly recommended is Mark Wooding's extremely powerful MDW tools, | |
269 | +% especially mdwmath.sty and mdwtab.sty which are used to format equations | |
270 | +% and tables, respectively. The MDWtools set is already installed on most | |
271 | +% LaTeX systems. The lastest version and documentation is available at: | |
272 | +% http://www.ctan.org/pkg/mdwtools | |
273 | + | |
274 | + | |
275 | +% IEEEtran contains the IEEEeqnarray family of commands that can be used to | |
276 | +% generate multiline equations as well as matrices, tables, etc., of high | |
277 | +% quality. | |
278 | + | |
279 | + | |
280 | +%\usepackage{eqparbox} | |
281 | +% Also of notable interest is Scott Pakin's eqparbox package for creating | |
282 | +% (automatically sized) equal width boxes - aka "natural width parboxes". | |
283 | +% Available at: | |
284 | +% http://www.ctan.org/pkg/eqparbox | |
285 | + | |
286 | + | |
287 | + | |
288 | + | |
289 | +% *** SUBFIGURE PACKAGES *** | |
290 | +%\ifCLASSOPTIONcompsoc | |
291 | +% \usepackage[caption=false,font=footnotesize,labelfont=sf,textfont=sf]{subfig} | |
292 | +%\else | |
293 | +% \usepackage[caption=false,font=footnotesize]{subfig} | |
294 | +%\fi | |
295 | +% subfig.sty, written by Steven Douglas Cochran, is the modern replacement | |
296 | +% for subfigure.sty, the latter of which is no longer maintained and is | |
297 | +% incompatible with some LaTeX packages including fixltx2e. However, | |
298 | +% subfig.sty requires and automatically loads Axel Sommerfeldt's caption.sty | |
299 | +% which will override IEEEtran.cls' handling of captions and this will result | |
300 | +% in non-IEEE style figure/table captions. To prevent this problem, be sure | |
301 | +% and invoke subfig.sty's "caption=false" package option (available since | |
302 | +% subfig.sty version 1.3, 2005/06/28) as this is will preserve IEEEtran.cls | |
303 | +% handling of captions. | |
304 | +% Note that the Computer Society format requires a sans serif font rather | |
305 | +% than the serif font used in traditional IEEE formatting and thus the need | |
306 | +% to invoke different subfig.sty package options depending on whether | |
307 | +% compsoc mode has been enabled. | |
308 | +% | |
309 | +% The latest version and documentation of subfig.sty can be obtained at: | |
310 | +% http://www.ctan.org/pkg/subfig | |
311 | + | |
312 | + | |
313 | + | |
314 | + | |
315 | +% *** FLOAT PACKAGES *** | |
316 | +% | |
317 | +%\usepackage{fixltx2e} | |
318 | +% fixltx2e, the successor to the earlier fix2col.sty, was written by | |
319 | +% Frank Mittelbach and David Carlisle. This package corrects a few problems | |
320 | +% in the LaTeX2e kernel, the most notable of which is that in current | |
321 | +% LaTeX2e releases, the ordering of single and double column floats is not | |
322 | +% guaranteed to be preserved. Thus, an unpatched LaTeX2e can allow a | |
323 | +% single column figure to be placed prior to an earlier double column | |
324 | +% figure. | |
325 | +% Be aware that LaTeX2e kernels dated 2015 and later have fixltx2e.sty's | |
326 | +% corrections already built into the system in which case a warning will | |
327 | +% be issued if an attempt is made to load fixltx2e.sty as it is no longer | |
328 | +% needed. | |
329 | +% The latest version and documentation can be found at: | |
330 | +% http://www.ctan.org/pkg/fixltx2e | |
331 | + | |
332 | + | |
333 | +%\usepackage{stfloats} | |
334 | +% stfloats.sty was written by Sigitas Tolusis. This package gives LaTeX2e | |
335 | +% the ability to do double column floats at the bottom of the page as well | |
336 | +% as the top. (e.g., "\begin{figure*}[!b]" is not normally possible in | |
337 | +% LaTeX2e). It also provides a command: | |
338 | +%\fnbelowfloat | |
339 | +% to enable the placement of footnotes below bottom floats (the standard | |
340 | +% LaTeX2e kernel puts them above bottom floats). This is an invasive package | |
341 | +% which rewrites many portions of the LaTeX2e float routines. It may not work | |
342 | +% with other packages that modify the LaTeX2e float routines. The latest | |
343 | +% version and documentation can be obtained at: | |
344 | +% http://www.ctan.org/pkg/stfloats | |
345 | +% Do not use the stfloats baselinefloat ability as the IEEE does not allow | |
346 | +% \baselineskip to stretch. Authors submitting work to the IEEE should note | |
347 | +% that the IEEE rarely uses double column equations and that authors should try | |
348 | +% to avoid such use. Do not be tempted to use the cuted.sty or midfloat.sty | |
349 | +% packages (also by Sigitas Tolusis) as the IEEE does not format its papers in | |
350 | +% such ways. | |
351 | +% Do not attempt to use stfloats with fixltx2e as they are incompatible. | |
352 | +% Instead, use Morten Hogholm'a dblfloatfix which combines the features | |
353 | +% of both fixltx2e and stfloats: | |
354 | +% | |
355 | +% \usepackage{dblfloatfix} | |
356 | +% The latest version can be found at: | |
357 | +% http://www.ctan.org/pkg/dblfloatfix | |
358 | + | |
359 | + | |
360 | +%\ifCLASSOPTIONcaptionsoff | |
361 | +% \usepackage[nomarkers]{endfloat} | |
362 | +% \let\MYoriglatexcaption\caption | |
363 | +% \renewcommand{\caption}[2][\relax]{\MYoriglatexcaption[#2]{#2}} | |
364 | +%\fi | |
365 | +% endfloat.sty was written by James Darrell McCauley, Jeff Goldberg and | |
366 | +% Axel Sommerfeldt. This package may be useful when used in conjunction with | |
367 | +% IEEEtran.cls' captionsoff option. Some IEEE journals/societies require that | |
368 | +% submissions have lists of figures/tables at the end of the paper and that | |
369 | +% figures/tables without any captions are placed on a page by themselves at | |
370 | +% the end of the document. If needed, the draftcls IEEEtran class option or | |
371 | +% \CLASSINPUTbaselinestretch interface can be used to increase the line | |
372 | +% spacing as well. Be sure and use the nomarkers option of endfloat to | |
373 | +% prevent endfloat from "marking" where the figures would have been placed | |
374 | +% in the text. The two hack lines of code above are a slight modification of | |
375 | +% that suggested by in the endfloat docs (section 8.4.1) to ensure that | |
376 | +% the full captions always appear in the list of figures/tables - even if | |
377 | +% the user used the short optional argument of \caption[]{}. | |
378 | +% IEEE papers do not typically make use of \caption[]'s optional argument, | |
379 | +% so this should not be an issue. A similar trick can be used to disable | |
380 | +% captions of packages such as subfig.sty that lack options to turn off | |
381 | +% the subcaptions: | |
382 | +% For subfig.sty: | |
383 | +% \let\MYorigsubfloat\subfloat | |
384 | +% \renewcommand{\subfloat}[2][\relax]{\MYorigsubfloat[]{#2}} | |
385 | +% However, the above trick will not work if both optional arguments of | |
386 | +% the \subfloat command are used. Furthermore, there needs to be a | |
387 | +% description of each subfigure *somewhere* and endfloat does not add | |
388 | +% subfigure captions to its list of figures. Thus, the best approach is to | |
389 | +% avoid the use of subfigure captions (many IEEE journals avoid them anyway) | |
390 | +% and instead reference/explain all the subfigures within the main caption. | |
391 | +% The latest version of endfloat.sty and its documentation can obtained at: | |
392 | +% http://www.ctan.org/pkg/endfloat | |
393 | +% | |
394 | +% The IEEEtran \ifCLASSOPTIONcaptionsoff conditional can also be used | |
395 | +% later in the document, say, to conditionally put the References on a | |
396 | +% page by themselves. | |
397 | + | |
398 | + | |
399 | + | |
400 | + | |
401 | + | |
402 | +% *** PDF, URL AND HYPERLINK PACKAGES *** | |
403 | +% | |
404 | +%\usepackage{url} | |
405 | +% url.sty was written by Donald Arseneau. It provides better support for | |
406 | +% handling and breaking URLs. url.sty is already installed on most LaTeX | |
407 | +% systems. The latest version and documentation can be obtained at: | |
408 | +% http://www.ctan.org/pkg/url | |
409 | +% Basically, \url{my_url_here}. | |
410 | + | |
411 | + | |
412 | +% NOTE: PDF thumbnail features are not required in IEEE papers | |
413 | +% and their use requires extra complexity and work. | |
414 | +%\ifCLASSINFOpdf | |
415 | +% \usepackage[pdftex]{thumbpdf} | |
416 | +%\else | |
417 | +% \usepackage[dvips]{thumbpdf} | |
418 | +%\fi | |
419 | +% thumbpdf.sty and its companion Perl utility were written by Heiko Oberdiek. | |
420 | +% It allows the user a way to produce PDF documents that contain fancy | |
421 | +% thumbnail images of each of the pages (which tools like acrobat reader can | |
422 | +% utilize). This is possible even when using dvi->ps->pdf workflow if the | |
423 | +% correct thumbpdf driver options are used. thumbpdf.sty incorporates the | |
424 | +% file containing the PDF thumbnail information (filename.tpm is used with | |
425 | +% dvips, filename.tpt is used with pdftex, where filename is the base name of | |
426 | +% your tex document) into the final ps or pdf output document. An external | |
427 | +% utility, the thumbpdf *Perl script* is needed to make these .tpm or .tpt | |
428 | +% thumbnail files from a .ps or .pdf version of the document (which obviously | |
429 | +% does not yet contain pdf thumbnails). Thus, one does a: | |
430 | +% | |
431 | +% thumbpdf filename.pdf | |
432 | +% | |
433 | +% to make a filename.tpt, and: | |
434 | +% | |
435 | +% thumbpdf --mode dvips filename.ps | |
436 | +% | |
437 | +% to make a filename.tpm which will then be loaded into the document by | |
438 | +% thumbpdf.sty the NEXT time the document is compiled (by pdflatex or | |
439 | +% latex->dvips->ps2pdf). Users must be careful to regenerate the .tpt and/or | |
440 | +% .tpm files if the main document changes and then to recompile the | |
441 | +% document to incorporate the revised thumbnails to ensure that thumbnails | |
442 | +% match the actual pages. It is easy to forget to do this! | |
443 | +% | |
444 | +% Unix systems come with a Perl interpreter. However, MS Windows users | |
445 | +% will usually have to install a Perl interpreter so that the thumbpdf | |
446 | +% script can be run. The Ghostscript PS/PDF interpreter is also required. | |
447 | +% See the thumbpdf docs for details. The latest version and documentation | |
448 | +% can be obtained at. | |
449 | +% http://www.ctan.org/pkg/thumbpdf | |
450 | + | |
451 | + | |
452 | +% NOTE: PDF hyperlink and bookmark features are not required in IEEE | |
453 | +% papers and their use requires extra complexity and work. | |
454 | +% *** IF USING HYPERREF BE SURE AND CHANGE THE EXAMPLE PDF *** | |
455 | +% *** TITLE/SUBJECT/AUTHOR/KEYWORDS INFO BELOW!! *** | |
456 | +\newcommand\MYhyperrefoptions{bookmarks=true,bookmarksnumbered=true, | |
457 | +pdfpagemode={UseOutlines},plainpages=false,pdfpagelabels=true, | |
458 | +colorlinks=true,linkcolor={black},citecolor={black},urlcolor={black}, | |
459 | +pdftitle={Bare Demo of IEEEtran.cls for Computer Society Journals},%<!CHANGE! | |
460 | +pdfsubject={Typesetting},%<!CHANGE! | |
461 | +pdfauthor={Michael D. Shell},%<!CHANGE! | |
462 | +pdfkeywords={Computer Society, IEEEtran, journal, LaTeX, paper, | |
463 | + template}}%<^!CHANGE! | |
464 | +%\ifCLASSINFOpdf | |
465 | +%\usepackage[\MYhyperrefoptions,pdftex]{hyperref} | |
466 | +%\else | |
467 | +%\usepackage[\MYhyperrefoptions,breaklinks=true,dvips]{hyperref} | |
468 | +%\usepackage{breakurl} | |
469 | +%\fi | |
470 | +% One significant drawback of using hyperref under DVI output is that the | |
471 | +% LaTeX compiler cannot break URLs across lines or pages as can be done | |
472 | +% under pdfLaTeX's PDF output via the hyperref pdftex driver. This is | |
473 | +% probably the single most important capability distinction between the | |
474 | +% DVI and PDF output. Perhaps surprisingly, all the other PDF features | |
475 | +% (PDF bookmarks, thumbnails, etc.) can be preserved in | |
476 | +% .tex->.dvi->.ps->.pdf workflow if the respective packages/scripts are | |
477 | +% loaded/invoked with the correct driver options (dvips, etc.). | |
478 | +% As most IEEE papers use URLs sparingly (mainly in the references), this | |
479 | +% may not be as big an issue as with other publications. | |
480 | +% | |
481 | +% That said, Vilar Camara Neto created his breakurl.sty package which | |
482 | +% permits hyperref to easily break URLs even in dvi mode. | |
483 | +% Note that breakurl, unlike most other packages, must be loaded | |
484 | +% AFTER hyperref. The latest version of breakurl and its documentation can | |
485 | +% be obtained at: | |
486 | +% http://www.ctan.org/pkg/breakurl | |
487 | +% breakurl.sty is not for use under pdflatex pdf mode. | |
488 | +% | |
489 | +% The advanced features offer by hyperref.sty are not required for IEEE | |
490 | +% submission, so users should weigh these features against the added | |
491 | +% complexity of use. | |
492 | +% The package options above demonstrate how to enable PDF bookmarks | |
493 | +% (a type of table of contents viewable in Acrobat Reader) as well as | |
494 | +% PDF document information (title, subject, author and keywords) that is | |
495 | +% viewable in Acrobat reader's Document_Properties menu. PDF document | |
496 | +% information is also used extensively to automate the cataloging of PDF | |
497 | +% documents. The above set of options ensures that hyperlinks will not be | |
498 | +% colored in the text and thus will not be visible in the printed page, | |
499 | +% but will be active on "mouse over". USING COLORS OR OTHER HIGHLIGHTING | |
500 | +% OF HYPERLINKS CAN RESULT IN DOCUMENT REJECTION BY THE IEEE, especially if | |
501 | +% these appear on the "printed" page. IF IN DOUBT, ASK THE RELEVANT | |
502 | +% SUBMISSION EDITOR. You may need to add the option hypertexnames=false if | |
503 | +% you used duplicate equation numbers, etc., but this should not be needed | |
504 | +% in normal IEEE work. | |
505 | +% The latest version of hyperref and its documentation can be obtained at: | |
506 | +% http://www.ctan.org/pkg/hyperref | |
507 | + | |
508 | + | |
509 | + | |
510 | + | |
511 | + | |
512 | +% *** Do not adjust lengths that control margins, column widths, etc. *** | |
513 | +% *** Do not use packages that alter fonts (such as pslatex). *** | |
514 | +% There should be no need to do such things with IEEEtran.cls V1.6 and later. | |
515 | +% (Unless specifically asked to do so by the journal or conference you plan | |
516 | +% to submit to, of course. ) | |
517 | + | |
518 | + | |
519 | +% correct bad hyphenation here | |
520 | +\hyphenation{op-tical net-works semi-conduc-tor} | |
521 | + | |
522 | + | |
523 | +\begin{document} | |
524 | +% | |
525 | +% paper title | |
526 | +% Titles are generally capitalized except for words such as a, an, and, as, | |
527 | +% at, but, by, for, in, nor, of, on, or, the, to and up, which are usually | |
528 | +% not capitalized unless they are the first or last word of the title. | |
529 | +% Linebreaks \\ can be used within to get better formatting as desired. | |
530 | +% Do not put math or special symbols in the title. | |
531 | +\title{Bare Advanced Demo of IEEEtran.cls for\\ IEEE Computer Society Journals} | |
532 | +% | |
533 | +% | |
534 | +% author names and IEEE memberships | |
535 | +% note positions of commas and nonbreaking spaces ( ~ ) LaTeX will not break | |
536 | +% a structure at a ~ so this keeps an author's name from being broken across | |
537 | +% two lines. | |
538 | +% use \thanks{} to gain access to the first footnote area | |
539 | +% a separate \thanks must be used for each paragraph as LaTeX2e's \thanks | |
540 | +% was not built to handle multiple paragraphs | |
541 | +% | |
542 | +% | |
543 | +%\IEEEcompsocitemizethanks is a special \thanks that produces the bulleted | |
544 | +% lists the Computer Society journals use for "first footnote" author | |
545 | +% affiliations. Use \IEEEcompsocthanksitem which works much like \item | |
546 | +% for each affiliation group. When not in compsoc mode, | |
547 | +% \IEEEcompsocitemizethanks becomes like \thanks and | |
548 | +% \IEEEcompsocthanksitem becomes a line break with idention. This | |
549 | +% facilitates dual compilation, although admittedly the differences in the | |
550 | +% desired content of \author between the different types of papers makes a | |
551 | +% one-size-fits-all approach a daunting prospect. For instance, compsoc | |
552 | +% journal papers have the author affiliations above the "Manuscript | |
553 | +% received ..." text while in non-compsoc journals this is reversed. Sigh. | |
554 | + | |
555 | +\author{Michael~Shell,~\IEEEmembership{Member,~IEEE,} | |
556 | + John~Doe,~\IEEEmembership{Fellow,~OSA,} | |
557 | + and~Jane~Doe,~\IEEEmembership{Life~Fellow,~IEEE}% <-this % stops a space | |
558 | +\IEEEcompsocitemizethanks{\IEEEcompsocthanksitem M. Shell was with the Department | |
559 | +of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, | |
560 | +GA, 30332.\protect\\ | |
561 | +% note need leading \protect in front of \\ to get a newline within \thanks as | |
562 | +% \\ is fragile and will error, could use \hfil\break instead. | |
563 | +E-mail: see http://www.michaelshell.org/contact.html | |
564 | +\IEEEcompsocthanksitem J. Doe and J. Doe are with Anonymous University.}% <-this % stops a space | |
565 | +\thanks{Manuscript received April 19, 2005; revised August 26, 2015.}} | |
566 | + | |
567 | +% note the % following the last \IEEEmembership and also \thanks - | |
568 | +% these prevent an unwanted space from occurring between the last author name | |
569 | +% and the end of the author line. i.e., if you had this: | |
570 | +% | |
571 | +% \author{....lastname \thanks{...} \thanks{...} } | |
572 | +% ^------------^------------^----Do not want these spaces! | |
573 | +% | |
574 | +% a space would be appended to the last name and could cause every name on that | |
575 | +% line to be shifted left slightly. This is one of those "LaTeX things". For | |
576 | +% instance, "\textbf{A} \textbf{B}" will typeset as "A B" not "AB". To get | |
577 | +% "AB" then you have to do: "\textbf{A}\textbf{B}" | |
578 | +% \thanks is no different in this regard, so shield the last } of each \thanks | |
579 | +% that ends a line with a % and do not let a space in before the next \thanks. | |
580 | +% Spaces after \IEEEmembership other than the last one are OK (and needed) as | |
581 | +% you are supposed to have spaces between the names. For what it is worth, | |
582 | +% this is a minor point as most people would not even notice if the said evil | |
583 | +% space somehow managed to creep in. | |
584 | + | |
585 | + | |
586 | + | |
587 | +% The paper headers | |
588 | +\markboth{Journal of \LaTeX\ Class Files,~Vol.~14, No.~8, August~2015}% | |
589 | +{Shell \MakeLowercase{\textit{et al.}}: Bare Advanced Demo of IEEEtran.cls for IEEE Computer Society Journals} | |
590 | +% The only time the second header will appear is for the odd numbered pages | |
591 | +% after the title page when using the twoside option. | |
592 | +% | |
593 | +% *** Note that you probably will NOT want to include the author's *** | |
594 | +% *** name in the headers of peer review papers. *** | |
595 | +% You can use \ifCLASSOPTIONpeerreview for conditional compilation here if | |
596 | +% you desire. | |
597 | + | |
598 | + | |
599 | + | |
600 | +% The publisher's ID mark at the bottom of the page is less important with | |
601 | +% Computer Society journal papers as those publications place the marks | |
602 | +% outside of the main text columns and, therefore, unlike regular IEEE | |
603 | +% journals, the available text space is not reduced by their presence. | |
604 | +% If you want to put a publisher's ID mark on the page you can do it like | |
605 | +% this: | |
606 | +%\IEEEpubid{0000--0000/00\$00.00~\copyright~2015 IEEE} | |
607 | +% or like this to get the Computer Society new two part style. | |
608 | +%\IEEEpubid{\makebox[\columnwidth]{\hfill 0000--0000/00/\$00.00~\copyright~2015 IEEE}% | |
609 | +%\hspace{\columnsep}\makebox[\columnwidth]{Published by the IEEE Computer Society\hfill}} | |
610 | +% Remember, if you use this you must call \IEEEpubidadjcol in the second | |
611 | +% column for its text to clear the IEEEpubid mark (Computer Society journal | |
612 | +% papers don't need this extra clearance.) | |
613 | + | |
614 | + | |
615 | + | |
616 | +% use for special paper notices | |
617 | +%\IEEEspecialpapernotice{(Invited Paper)} | |
618 | + | |
619 | + | |
620 | + | |
621 | +% for Computer Society papers, we must declare the abstract and index terms | |
622 | +% PRIOR to the title within the \IEEEtitleabstractindextext IEEEtran | |
623 | +% command as these need to go into the title area created by \maketitle. | |
624 | +% As a general rule, do not put math, special symbols or citations | |
625 | +% in the abstract or keywords. | |
626 | +\IEEEtitleabstractindextext{% | |
627 | +\begin{abstract} | |
628 | +The abstract goes here. | |
629 | +\end{abstract} | |
630 | + | |
631 | +% Note that keywords are not normally used for peerreview papers. | |
632 | +\begin{IEEEkeywords} | |
633 | +Computer Society, IEEE, IEEEtran, journal, \LaTeX, paper, template. | |
634 | +\end{IEEEkeywords}} | |
635 | + | |
636 | + | |
637 | +% make the title area | |
638 | +\maketitle | |
639 | + | |
640 | + | |
641 | +% To allow for easy dual compilation without having to reenter the | |
642 | +% abstract/keywords data, the \IEEEtitleabstractindextext text will | |
643 | +% not be used in maketitle, but will appear (i.e., to be "transported") | |
644 | +% here as \IEEEdisplaynontitleabstractindextext when compsoc mode | |
645 | +% is not selected <OR> if conference mode is selected - because compsoc | |
646 | +% conference papers position the abstract like regular (non-compsoc) | |
647 | +% papers do! | |
648 | +\IEEEdisplaynontitleabstractindextext | |
649 | +% \IEEEdisplaynontitleabstractindextext has no effect when using | |
650 | +% compsoc under a non-conference mode. | |
651 | + | |
652 | + | |
653 | +% For peer review papers, you can put extra information on the cover | |
654 | +% page as needed: | |
655 | +% \ifCLASSOPTIONpeerreview | |
656 | +% \begin{center} \bfseries EDICS Category: 3-BBND \end{center} | |
657 | +% \fi | |
658 | +% | |
659 | +% For peerreview papers, this IEEEtran command inserts a page break and | |
660 | +% creates the second title. It will be ignored for other modes. | |
661 | +\IEEEpeerreviewmaketitle | |
662 | + | |
663 | + | |
664 | +\ifCLASSOPTIONcompsoc | |
665 | +\IEEEraisesectionheading{\section{Introduction}\label{sec:introduction}} | |
666 | +\else | |
667 | +\section{Introduction} | |
668 | +\label{sec:introduction} | |
669 | +\fi | |
670 | +% Computer Society journal (but not conference!) papers do something unusual | |
671 | +% with the very first section heading (almost always called "Introduction"). | |
672 | +% They place it ABOVE the main text! IEEEtran.cls does not automatically do | |
673 | +% this for you, but you can achieve this effect with the provided | |
674 | +% \IEEEraisesectionheading{} command. Note the need to keep any \label that | |
675 | +% is to refer to the section immediately after \section in the above as | |
676 | +% \IEEEraisesectionheading puts \section within a raised box. | |
677 | + | |
678 | + | |
679 | + | |
680 | + | |
681 | +% The very first letter is a 2 line initial drop letter followed | |
682 | +% by the rest of the first word in caps (small caps for compsoc). | |
683 | +% | |
684 | +% form to use if the first word consists of a single letter: | |
685 | +% \IEEEPARstart{A}{demo} file is .... | |
686 | +% | |
687 | +% form to use if you need the single drop letter followed by | |
688 | +% normal text (unknown if ever used by the IEEE): | |
689 | +% \IEEEPARstart{A}{}demo file is .... | |
690 | +% | |
691 | +% Some journals put the first two words in caps: | |
692 | +% \IEEEPARstart{T}{his demo} file is .... | |
693 | +% | |
694 | +% Here we have the typical use of a "T" for an initial drop letter | |
695 | +% and "HIS" in caps to complete the first word. | |
696 | +\IEEEPARstart{T}{his} demo file is intended to serve as a ``starter file'' | |
697 | +for IEEE Computer Society journal papers produced under \LaTeX\ using | |
698 | +IEEEtran.cls version 1.8b and later. | |
699 | +% You must have at least 2 lines in the paragraph with the drop letter | |
700 | +% (should never be an issue) | |
701 | +I wish you the best of success. | |
702 | + | |
703 | +\hfill mds | |
704 | + | |
705 | +\hfill August 26, 2015 | |
706 | + | |
707 | +\subsection{Subsection Heading Here} | |
708 | +Subsection text here. | |
709 | + | |
710 | +% needed in second column of first page if using \IEEEpubid | |
711 | +%\IEEEpubidadjcol | |
712 | + | |
713 | +\subsubsection{Subsubsection Heading Here} | |
714 | +Subsubsection text here. | |
715 | + | |
716 | + | |
717 | +% An example of a floating figure using the graphicx package. | |
718 | +% Note that \label must occur AFTER (or within) \caption. | |
719 | +% For figures, \caption should occur after the \includegraphics. | |
720 | +% Note that IEEEtran v1.7 and later has special internal code that | |
721 | +% is designed to preserve the operation of \label within \caption | |
722 | +% even when the captionsoff option is in effect. However, because | |
723 | +% of issues like this, it may be the safest practice to put all your | |
724 | +% \label just after \caption rather than within \caption{}. | |
725 | +% | |
726 | +% Reminder: the "draftcls" or "draftclsnofoot", not "draft", class | |
727 | +% option should be used if it is desired that the figures are to be | |
728 | +% displayed while in draft mode. | |
729 | +% | |
730 | +%\begin{figure}[!t] | |
731 | +%\centering | |
732 | +%\includegraphics[width=2.5in]{myfigure} | |
733 | +% where an .eps filename suffix will be assumed under latex, | |
734 | +% and a .pdf suffix will be assumed for pdflatex; or what has been declared | |
735 | +% via \DeclareGraphicsExtensions. | |
736 | +%\caption{Simulation results for the network.} | |
737 | +%\label{fig_sim} | |
738 | +%\end{figure} | |
739 | + | |
740 | +% Note that the IEEE typically puts floats only at the top, even when this | |
741 | +% results in a large percentage of a column being occupied by floats. | |
742 | +% However, the Computer Society has been known to put floats at the bottom. | |
743 | + | |
744 | + | |
745 | +% An example of a double column floating figure using two subfigures. | |
746 | +% (The subfig.sty package must be loaded for this to work.) | |
747 | +% The subfigure \label commands are set within each subfloat command, | |
748 | +% and the \label for the overall figure must come after \caption. | |
749 | +% \hfil is used as a separator to get equal spacing. | |
750 | +% Watch out that the combined width of all the subfigures on a | |
751 | +% line do not exceed the text width or a line break will occur. | |
752 | +% | |
753 | +%\begin{figure*}[!t] | |
754 | +%\centering | |
755 | +%\subfloat[Case I]{\includegraphics[width=2.5in]{box}% | |
756 | +%\label{fig_first_case}} | |
757 | +%\hfil | |
758 | +%\subfloat[Case II]{\includegraphics[width=2.5in]{box}% | |
759 | +%\label{fig_second_case}} | |
760 | +%\caption{Simulation results for the network.} | |
761 | +%\label{fig_sim} | |
762 | +%\end{figure*} | |
763 | +% | |
764 | +% Note that often IEEE papers with subfigures do not employ subfigure | |
765 | +% captions (using the optional argument to \subfloat[]), but instead will | |
766 | +% reference/describe all of them (a), (b), etc., within the main caption. | |
767 | +% Be aware that for subfig.sty to generate the (a), (b), etc., subfigure | |
768 | +% labels, the optional argument to \subfloat must be present. If a | |
769 | +% subcaption is not desired, just leave its contents blank, | |
770 | +% e.g., \subfloat[]. | |
771 | + | |
772 | + | |
773 | +% An example of a floating table. Note that, for IEEE style tables, the | |
774 | +% \caption command should come BEFORE the table and, given that table | |
775 | +% captions serve much like titles, are usually capitalized except for words | |
776 | +% such as a, an, and, as, at, but, by, for, in, nor, of, on, or, the, to | |
777 | +% and up, which are usually not capitalized unless they are the first or | |
778 | +% last word of the caption. Table text will default to \footnotesize as | |
779 | +% the IEEE normally uses this smaller font for tables. | |
780 | +% The \label must come after \caption as always. | |
781 | +% | |
782 | +%\begin{table}[!t] | |
783 | +%% increase table row spacing, adjust to taste | |
784 | +%\renewcommand{\arraystretch}{1.3} | |
785 | +% if using array.sty, it might be a good idea to tweak the value of | |
786 | +% \extrarowheight as needed to properly center the text within the cells | |
787 | +%\caption{An Example of a Table} | |
788 | +%\label{table_example} | |
789 | +%\centering | |
790 | +%% Some packages, such as MDW tools, offer better commands for making tables | |
791 | +%% than the plain LaTeX2e tabular which is used here. | |
792 | +%\begin{tabular}{|c||c|} | |
793 | +%\hline | |
794 | +%One & Two\\ | |
795 | +%\hline | |
796 | +%Three & Four\\ | |
797 | +%\hline | |
798 | +%\end{tabular} | |
799 | +%\end{table} | |
800 | + | |
801 | + | |
802 | +% Note that the IEEE does not put floats in the very first column | |
803 | +% - or typically anywhere on the first page for that matter. Also, | |
804 | +% in-text middle ("here") positioning is typically not used, but it | |
805 | +% is allowed and encouraged for Computer Society conferences (but | |
806 | +% not Computer Society journals). Most IEEE journals/conferences use | |
807 | +% top floats exclusively. | |
808 | +% Note that, LaTeX2e, unlike IEEE journals/conferences, places | |
809 | +% footnotes above bottom floats. This can be corrected via the | |
810 | +% \fnbelowfloat command of the stfloats package. | |
811 | + | |
812 | + | |
813 | + | |
814 | + | |
815 | +\section{Conclusion} | |
816 | +The conclusion goes here. | |
817 | + | |
818 | + | |
819 | + | |
820 | + | |
821 | + | |
822 | +% if have a single appendix: | |
823 | +%\appendix[Proof of the Zonklar Equations] | |
824 | +% or | |
825 | +%\appendix % for no appendix heading | |
826 | +% do not use \section anymore after \appendix, only \section* | |
827 | +% is possibly needed | |
828 | + | |
829 | +% use appendices with more than one appendix | |
830 | +% then use \section to start each appendix | |
831 | +% you must declare a \section before using any | |
832 | +% \subsection or using \label (\appendices by itself | |
833 | +% starts a section numbered zero.) | |
834 | +% | |
835 | + | |
836 | + | |
837 | +\appendices | |
838 | +\section{Proof of the First Zonklar Equation} | |
839 | +Appendix one text goes here. | |
840 | + | |
841 | +% you can choose not to have a title for an appendix | |
842 | +% if you want by leaving the argument blank | |
843 | +\section{} | |
844 | +Appendix two text goes here. | |
845 | + | |
846 | + | |
847 | +% use section* for acknowledgment | |
848 | +\ifCLASSOPTIONcompsoc | |
849 | + % The Computer Society usually uses the plural form | |
850 | + \section*{Acknowledgments} | |
851 | +\else | |
852 | + % regular IEEE prefers the singular form | |
853 | + \section*{Acknowledgment} | |
854 | +\fi | |
855 | + | |
856 | + | |
857 | +The authors would like to thank... | |
858 | + | |
859 | + | |
860 | +% Can use something like this to put references on a page | |
861 | +% by themselves when using endfloat and the captionsoff option. | |
862 | +\ifCLASSOPTIONcaptionsoff | |
863 | + \newpage | |
864 | +\fi | |
865 | + | |
866 | + | |
867 | + | |
868 | +% trigger a \newpage just before the given reference | |
869 | +% number - used to balance the columns on the last page | |
870 | +% adjust value as needed - may need to be readjusted if | |
871 | +% the document is modified later | |
872 | +%\IEEEtriggeratref{8} | |
873 | +% The "triggered" command can be changed if desired: | |
874 | +%\IEEEtriggercmd{\enlargethispage{-5in}} | |
875 | + | |
876 | +% references section | |
877 | + | |
878 | +% can use a bibliography generated by BibTeX as a .bbl file | |
879 | +% BibTeX documentation can be easily obtained at: | |
880 | +% http://mirror.ctan.org/biblio/bibtex/contrib/doc/ | |
881 | +% The IEEEtran BibTeX style support page is at: | |
882 | +% http://www.michaelshell.org/tex/ieeetran/bibtex/ | |
883 | +%\bibliographystyle{IEEEtran} | |
884 | +% argument is your BibTeX string definitions and bibliography database(s) | |
885 | +%\bibliography{IEEEabrv,../bib/paper} | |
886 | +% | |
887 | +% <OR> manually copy in the resultant .bbl file | |
888 | +% set second argument of \begin to the number of references | |
889 | +% (used to reserve space for the reference number labels box) | |
890 | +\begin{thebibliography}{1} | |
891 | + | |
892 | +\bibitem{IEEEhowto:kopka} | |
893 | +H.~Kopka and P.~W. Daly, \emph{A Guide to {\LaTeX}}, 3rd~ed.\hskip 1em plus | |
894 | + 0.5em minus 0.4em\relax Harlow, England: Addison-Wesley, 1999. | |
895 | + | |
896 | +\end{thebibliography} | |
897 | + | |
898 | +% biography section | |
899 | +% | |
900 | +% If you have an EPS/PDF photo (graphicx package needed) extra braces are | |
901 | +% needed around the contents of the optional argument to biography to prevent | |
902 | +% the LaTeX parser from getting confused when it sees the complicated | |
903 | +% \includegraphics command within an optional argument. (You could create | |
904 | +% your own custom macro containing the \includegraphics command to make things | |
905 | +% simpler here.) | |
906 | +%\begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{mshell}}]{Michael Shell} | |
907 | +% or if you just want to reserve a space for a photo: | |
908 | + | |
909 | +\begin{IEEEbiography}{Michael Shell} | |
910 | +Biography text here. | |
911 | +\end{IEEEbiography} | |
912 | + | |
913 | +% if you will not have a photo at all: | |
914 | +\begin{IEEEbiographynophoto}{John Doe} | |
915 | +Biography text here. | |
916 | +\end{IEEEbiographynophoto} | |
917 | + | |
918 | +% insert where needed to balance the two columns on the last page with | |
919 | +% biographies | |
920 | +%\newpage | |
921 | + | |
922 | +\begin{IEEEbiographynophoto}{Jane Doe} | |
923 | +Biography text here. | |
924 | +\end{IEEEbiographynophoto} | |
925 | + | |
926 | +% You can push biographies down or up by placing | |
927 | +% a \vfill before or after them. The appropriate | |
928 | +% use of \vfill depends on what kind of text is | |
929 | +% on the last page and whether or not the columns | |
930 | +% are being equalized. | |
931 | + | |
932 | +%\vfill | |
933 | + | |
934 | +% Can be used to pull up biographies so that the bottom of the last one | |
935 | +% is flush with the other column. | |
936 | +%\enlargethispage{-5in} | |
937 | + | |
938 | + | |
939 | + | |
940 | +% that's all folks | |
941 | +\end{document} | |
942 | + | |
943 | + | ... | ... |
bare_conf_compsoc.tex
0 → 100644
1 | +++ a/bare_conf_compsoc.tex | |
1 | + | |
2 | +%% bare_conf_compsoc.tex | |
3 | +%% V1.4b | |
4 | +%% 2015/08/26 | |
5 | +%% by Michael Shell | |
6 | +%% See: | |
7 | +%% http://www.michaelshell.org/ | |
8 | +%% for current contact information. | |
9 | +%% | |
10 | +%% This is a skeleton file demonstrating the use of IEEEtran.cls | |
11 | +%% (requires IEEEtran.cls version 1.8b or later) with an IEEE Computer | |
12 | +%% Society conference paper. | |
13 | +%% | |
14 | +%% Support sites: | |
15 | +%% http://www.michaelshell.org/tex/ieeetran/ | |
16 | +%% http://www.ctan.org/pkg/ieeetran | |
17 | +%% and | |
18 | +%% http://www.ieee.org/ | |
19 | + | |
20 | +%%************************************************************************* | |
21 | +%% Legal Notice: | |
22 | +%% This code is offered as-is without any warranty either expressed or | |
23 | +%% implied; without even the implied warranty of MERCHANTABILITY or | |
24 | +%% FITNESS FOR A PARTICULAR PURPOSE! | |
25 | +%% User assumes all risk. | |
26 | +%% In no event shall the IEEE or any contributor to this code be liable for | |
27 | +%% any damages or losses, including, but not limited to, incidental, | |
28 | +%% consequential, or any other damages, resulting from the use or misuse | |
29 | +%% of any information contained here. | |
30 | +%% | |
31 | +%% All comments are the opinions of their respective authors and are not | |
32 | +%% necessarily endorsed by the IEEE. | |
33 | +%% | |
34 | +%% This work is distributed under the LaTeX Project Public License (LPPL) | |
35 | +%% ( http://www.latex-project.org/ ) version 1.3, and may be freely used, | |
36 | +%% distributed and modified. A copy of the LPPL, version 1.3, is included | |
37 | +%% in the base LaTeX documentation of all distributions of LaTeX released | |
38 | +%% 2003/12/01 or later. | |
39 | +%% Retain all contribution notices and credits. | |
40 | +%% ** Modified files should be clearly indicated as such, including ** | |
41 | +%% ** renaming them and changing author support contact information. ** | |
42 | +%%************************************************************************* | |
43 | + | |
44 | + | |
45 | +% *** Authors should verify (and, if needed, correct) their LaTeX system *** | |
46 | +% *** with the testflow diagnostic prior to trusting their LaTeX platform *** | |
47 | +% *** with production work. The IEEE's font choices and paper sizes can *** | |
48 | +% *** trigger bugs that do not appear when using other class files. *** *** | |
49 | +% The testflow support page is at: | |
50 | +% http://www.michaelshell.org/tex/testflow/ | |
51 | + | |
52 | + | |
53 | + | |
54 | +\documentclass[conference,compsoc]{IEEEtran} | |
55 | +% Some/most Computer Society conferences require the compsoc mode option, | |
56 | +% but others may want the standard conference format. | |
57 | +% | |
58 | +% If IEEEtran.cls has not been installed into the LaTeX system files, | |
59 | +% manually specify the path to it like: | |
60 | +% \documentclass[conference,compsoc]{../sty/IEEEtran} | |
61 | + | |
62 | + | |
63 | + | |
64 | + | |
65 | + | |
66 | +% Some very useful LaTeX packages include: | |
67 | +% (uncomment the ones you want to load) | |
68 | + | |
69 | + | |
70 | +% *** MISC UTILITY PACKAGES *** | |
71 | +% | |
72 | +%\usepackage{ifpdf} | |
73 | +% Heiko Oberdiek's ifpdf.sty is very useful if you need conditional | |
74 | +% compilation based on whether the output is pdf or dvi. | |
75 | +% usage: | |
76 | +% \ifpdf | |
77 | +% % pdf code | |
78 | +% \else | |
79 | +% % dvi code | |
80 | +% \fi | |
81 | +% The latest version of ifpdf.sty can be obtained from: | |
82 | +% http://www.ctan.org/pkg/ifpdf | |
83 | +% Also, note that IEEEtran.cls V1.7 and later provides a builtin | |
84 | +% \ifCLASSINFOpdf conditional that works the same way. | |
85 | +% When switching from latex to pdflatex and vice-versa, the compiler may | |
86 | +% have to be run twice to clear warning/error messages. | |
87 | + | |
88 | + | |
89 | + | |
90 | + | |
91 | + | |
92 | + | |
93 | +% *** CITATION PACKAGES *** | |
94 | +% | |
95 | +\ifCLASSOPTIONcompsoc | |
96 | + % IEEE Computer Society needs nocompress option | |
97 | + % requires cite.sty v4.0 or later (November 2003) | |
98 | + \usepackage[nocompress]{cite} | |
99 | +\else | |
100 | + % normal IEEE | |
101 | + \usepackage{cite} | |
102 | +\fi | |
103 | +% cite.sty was written by Donald Arseneau | |
104 | +% V1.6 and later of IEEEtran pre-defines the format of the cite.sty package | |
105 | +% \cite{} output to follow that of the IEEE. Loading the cite package will | |
106 | +% result in citation numbers being automatically sorted and properly | |
107 | +% "compressed/ranged". e.g., [1], [9], [2], [7], [5], [6] without using | |
108 | +% cite.sty will become [1], [2], [5]--[7], [9] using cite.sty. cite.sty's | |
109 | +% \cite will automatically add leading space, if needed. Use cite.sty's | |
110 | +% noadjust option (cite.sty V3.8 and later) if you want to turn this off | |
111 | +% such as if a citation ever needs to be enclosed in parenthesis. | |
112 | +% cite.sty is already installed on most LaTeX systems. Be sure and use | |
113 | +% version 5.0 (2009-03-20) and later if using hyperref.sty. | |
114 | +% The latest version can be obtained at: | |
115 | +% http://www.ctan.org/pkg/cite | |
116 | +% The documentation is contained in the cite.sty file itself. | |
117 | +% | |
118 | +% Note that some packages require special options to format as the Computer | |
119 | +% Society requires. In particular, Computer Society papers do not use | |
120 | +% compressed citation ranges as is done in typical IEEE papers | |
121 | +% (e.g., [1]-[4]). Instead, they list every citation separately in order | |
122 | +% (e.g., [1], [2], [3], [4]). To get the latter we need to load the cite | |
123 | +% package with the nocompress option which is supported by cite.sty v4.0 | |
124 | +% and later. | |
125 | + | |
126 | + | |
127 | + | |
128 | + | |
129 | + | |
130 | +% *** GRAPHICS RELATED PACKAGES *** | |
131 | +% | |
132 | +\ifCLASSINFOpdf | |
133 | + % \usepackage[pdftex]{graphicx} | |
134 | + % declare the path(s) where your graphic files are | |
135 | + % \graphicspath{{../pdf/}{../jpeg/}} | |
136 | + % and their extensions so you won't have to specify these with | |
137 | + % every instance of \includegraphics | |
138 | + % \DeclareGraphicsExtensions{.pdf,.jpeg,.png} | |
139 | +\else | |
140 | + % or other class option (dvipsone, dvipdf, if not using dvips). graphicx | |
141 | + % will default to the driver specified in the system graphics.cfg if no | |
142 | + % driver is specified. | |
143 | + % \usepackage[dvips]{graphicx} | |
144 | + % declare the path(s) where your graphic files are | |
145 | + % \graphicspath{{../eps/}} | |
146 | + % and their extensions so you won't have to specify these with | |
147 | + % every instance of \includegraphics | |
148 | + % \DeclareGraphicsExtensions{.eps} | |
149 | +\fi | |
150 | +% graphicx was written by David Carlisle and Sebastian Rahtz. It is | |
151 | +% required if you want graphics, photos, etc. graphicx.sty is already | |
152 | +% installed on most LaTeX systems. The latest version and documentation | |
153 | +% can be obtained at: | |
154 | +% http://www.ctan.org/pkg/graphicx | |
155 | +% Another good source of documentation is "Using Imported Graphics in | |
156 | +% LaTeX2e" by Keith Reckdahl which can be found at: | |
157 | +% http://www.ctan.org/pkg/epslatex | |
158 | +% | |
159 | +% latex, and pdflatex in dvi mode, support graphics in encapsulated | |
160 | +% postscript (.eps) format. pdflatex in pdf mode supports graphics | |
161 | +% in .pdf, .jpeg, .png and .mps (metapost) formats. Users should ensure | |
162 | +% that all non-photo figures use a vector format (.eps, .pdf, .mps) and | |
163 | +% not a bitmapped formats (.jpeg, .png). The IEEE frowns on bitmapped formats | |
164 | +% which can result in "jaggedy"/blurry rendering of lines and letters as | |
165 | +% well as large increases in file sizes. | |
166 | +% | |
167 | +% You can find documentation about the pdfTeX application at: | |
168 | +% http://www.tug.org/applications/pdftex | |
169 | + | |
170 | + | |
171 | + | |
172 | + | |
173 | + | |
174 | +% *** MATH PACKAGES *** | |
175 | +% | |
176 | +%\usepackage{amsmath} | |
177 | +% A popular package from the American Mathematical Society that provides | |
178 | +% many useful and powerful commands for dealing with mathematics. | |
179 | +% | |
180 | +% Note that the amsmath package sets \interdisplaylinepenalty to 10000 | |
181 | +% thus preventing page breaks from occurring within multiline equations. Use: | |
182 | +%\interdisplaylinepenalty=2500 | |
183 | +% after loading amsmath to restore such page breaks as IEEEtran.cls normally | |
184 | +% does. amsmath.sty is already installed on most LaTeX systems. The latest | |
185 | +% version and documentation can be obtained at: | |
186 | +% http://www.ctan.org/pkg/amsmath | |
187 | + | |
188 | + | |
189 | + | |
190 | + | |
191 | + | |
192 | +% *** SPECIALIZED LIST PACKAGES *** | |
193 | +% | |
194 | +%\usepackage{algorithmic} | |
195 | +% algorithmic.sty was written by Peter Williams and Rogerio Brito. | |
196 | +% This package provides an algorithmic environment fo describing algorithms. | |
197 | +% You can use the algorithmic environment in-text or within a figure | |
198 | +% environment to provide for a floating algorithm. Do NOT use the algorithm | |
199 | +% floating environment provided by algorithm.sty (by the same authors) or | |
200 | +% algorithm2e.sty (by Christophe Fiorio) as the IEEE does not use dedicated | |
201 | +% algorithm float types and packages that provide these will not provide | |
202 | +% correct IEEE style captions. The latest version and documentation of | |
203 | +% algorithmic.sty can be obtained at: | |
204 | +% http://www.ctan.org/pkg/algorithms | |
205 | +% Also of interest may be the (relatively newer and more customizable) | |
206 | +% algorithmicx.sty package by Szasz Janos: | |
207 | +% http://www.ctan.org/pkg/algorithmicx | |
208 | + | |
209 | + | |
210 | + | |
211 | + | |
212 | +% *** ALIGNMENT PACKAGES *** | |
213 | +% | |
214 | +%\usepackage{array} | |
215 | +% Frank Mittelbach's and David Carlisle's array.sty patches and improves | |
216 | +% the standard LaTeX2e array and tabular environments to provide better | |
217 | +% appearance and additional user controls. As the default LaTeX2e table | |
218 | +% generation code is lacking to the point of almost being broken with | |
219 | +% respect to the quality of the end results, all users are strongly | |
220 | +% advised to use an enhanced (at the very least that provided by array.sty) | |
221 | +% set of table tools. array.sty is already installed on most systems. The | |
222 | +% latest version and documentation can be obtained at: | |
223 | +% http://www.ctan.org/pkg/array | |
224 | + | |
225 | + | |
226 | +% IEEEtran contains the IEEEeqnarray family of commands that can be used to | |
227 | +% generate multiline equations as well as matrices, tables, etc., of high | |
228 | +% quality. | |
229 | + | |
230 | + | |
231 | + | |
232 | + | |
233 | +% *** SUBFIGURE PACKAGES *** | |
234 | +%\ifCLASSOPTIONcompsoc | |
235 | +% \usepackage[caption=false,font=footnotesize,labelfont=sf,textfont=sf]{subfig} | |
236 | +%\else | |
237 | +% \usepackage[caption=false,font=footnotesize]{subfig} | |
238 | +%\fi | |
239 | +% subfig.sty, written by Steven Douglas Cochran, is the modern replacement | |
240 | +% for subfigure.sty, the latter of which is no longer maintained and is | |
241 | +% incompatible with some LaTeX packages including fixltx2e. However, | |
242 | +% subfig.sty requires and automatically loads Axel Sommerfeldt's caption.sty | |
243 | +% which will override IEEEtran.cls' handling of captions and this will result | |
244 | +% in non-IEEE style figure/table captions. To prevent this problem, be sure | |
245 | +% and invoke subfig.sty's "caption=false" package option (available since | |
246 | +% subfig.sty version 1.3, 2005/06/28) as this is will preserve IEEEtran.cls | |
247 | +% handling of captions. | |
248 | +% Note that the Computer Society format requires a sans serif font rather | |
249 | +% than the serif font used in traditional IEEE formatting and thus the need | |
250 | +% to invoke different subfig.sty package options depending on whether | |
251 | +% compsoc mode has been enabled. | |
252 | +% | |
253 | +% The latest version and documentation of subfig.sty can be obtained at: | |
254 | +% http://www.ctan.org/pkg/subfig | |
255 | + | |
256 | + | |
257 | + | |
258 | + | |
259 | +% *** FLOAT PACKAGES *** | |
260 | +% | |
261 | +%\usepackage{fixltx2e} | |
262 | +% fixltx2e, the successor to the earlier fix2col.sty, was written by | |
263 | +% Frank Mittelbach and David Carlisle. This package corrects a few problems | |
264 | +% in the LaTeX2e kernel, the most notable of which is that in current | |
265 | +% LaTeX2e releases, the ordering of single and double column floats is not | |
266 | +% guaranteed to be preserved. Thus, an unpatched LaTeX2e can allow a | |
267 | +% single column figure to be placed prior to an earlier double column | |
268 | +% figure. | |
269 | +% Be aware that LaTeX2e kernels dated 2015 and later have fixltx2e.sty's | |
270 | +% corrections already built into the system in which case a warning will | |
271 | +% be issued if an attempt is made to load fixltx2e.sty as it is no longer | |
272 | +% needed. | |
273 | +% The latest version and documentation can be found at: | |
274 | +% http://www.ctan.org/pkg/fixltx2e | |
275 | + | |
276 | + | |
277 | +%\usepackage{stfloats} | |
278 | +% stfloats.sty was written by Sigitas Tolusis. This package gives LaTeX2e | |
279 | +% the ability to do double column floats at the bottom of the page as well | |
280 | +% as the top. (e.g., "\begin{figure*}[!b]" is not normally possible in | |
281 | +% LaTeX2e). It also provides a command: | |
282 | +%\fnbelowfloat | |
283 | +% to enable the placement of footnotes below bottom floats (the standard | |
284 | +% LaTeX2e kernel puts them above bottom floats). This is an invasive package | |
285 | +% which rewrites many portions of the LaTeX2e float routines. It may not work | |
286 | +% with other packages that modify the LaTeX2e float routines. The latest | |
287 | +% version and documentation can be obtained at: | |
288 | +% http://www.ctan.org/pkg/stfloats | |
289 | +% Do not use the stfloats baselinefloat ability as the IEEE does not allow | |
290 | +% \baselineskip to stretch. Authors submitting work to the IEEE should note | |
291 | +% that the IEEE rarely uses double column equations and that authors should try | |
292 | +% to avoid such use. Do not be tempted to use the cuted.sty or midfloat.sty | |
293 | +% packages (also by Sigitas Tolusis) as the IEEE does not format its papers in | |
294 | +% such ways. | |
295 | +% Do not attempt to use stfloats with fixltx2e as they are incompatible. | |
296 | +% Instead, use Morten Hogholm'a dblfloatfix which combines the features | |
297 | +% of both fixltx2e and stfloats: | |
298 | +% | |
299 | +% \usepackage{dblfloatfix} | |
300 | +% The latest version can be found at: | |
301 | +% http://www.ctan.org/pkg/dblfloatfix | |
302 | + | |
303 | + | |
304 | + | |
305 | + | |
306 | +% *** PDF, URL AND HYPERLINK PACKAGES *** | |
307 | +% | |
308 | +%\usepackage{url} | |
309 | +% url.sty was written by Donald Arseneau. It provides better support for | |
310 | +% handling and breaking URLs. url.sty is already installed on most LaTeX | |
311 | +% systems. The latest version and documentation can be obtained at: | |
312 | +% http://www.ctan.org/pkg/url | |
313 | +% Basically, \url{my_url_here}. | |
314 | + | |
315 | + | |
316 | + | |
317 | + | |
318 | +% *** Do not adjust lengths that control margins, column widths, etc. *** | |
319 | +% *** Do not use packages that alter fonts (such as pslatex). *** | |
320 | +% There should be no need to do such things with IEEEtran.cls V1.6 and later. | |
321 | +% (Unless specifically asked to do so by the journal or conference you plan | |
322 | +% to submit to, of course. ) | |
323 | + | |
324 | + | |
325 | +% correct bad hyphenation here | |
326 | +\hyphenation{op-tical net-works semi-conduc-tor} | |
327 | + | |
328 | + | |
329 | +\begin{document} | |
330 | +% | |
331 | +% paper title | |
332 | +% Titles are generally capitalized except for words such as a, an, and, as, | |
333 | +% at, but, by, for, in, nor, of, on, or, the, to and up, which are usually | |
334 | +% not capitalized unless they are the first or last word of the title. | |
335 | +% Linebreaks \\ can be used within to get better formatting as desired. | |
336 | +% Do not put math or special symbols in the title. | |
337 | +\title{Bare Demo of IEEEtran.cls for\\ IEEE Computer Society Conferences} | |
338 | + | |
339 | + | |
340 | +% author names and affiliations | |
341 | +% use a multiple column layout for up to three different | |
342 | +% affiliations | |
343 | +\author{\IEEEauthorblockN{Michael Shell} | |
344 | +\IEEEauthorblockA{School of Electrical and\\Computer Engineering\\ | |
345 | +Georgia Institute of Technology\\ | |
346 | +Atlanta, Georgia 30332--0250\\ | |
347 | +Email: http://www.michaelshell.org/contact.html} | |
348 | +\and | |
349 | +\IEEEauthorblockN{Homer Simpson} | |
350 | +\IEEEauthorblockA{Twentieth Century Fox\\ | |
351 | +Springfield, USA\\ | |
352 | +Email: homer@thesimpsons.com} | |
353 | +\and | |
354 | +\IEEEauthorblockN{James Kirk\\ and Montgomery Scott} | |
355 | +\IEEEauthorblockA{Starfleet Academy\\ | |
356 | +San Francisco, California 96678-2391\\ | |
357 | +Telephone: (800) 555--1212\\ | |
358 | +Fax: (888) 555--1212}} | |
359 | + | |
360 | +% conference papers do not typically use \thanks and this command | |
361 | +% is locked out in conference mode. If really needed, such as for | |
362 | +% the acknowledgment of grants, issue a \IEEEoverridecommandlockouts | |
363 | +% after \documentclass | |
364 | + | |
365 | +% for over three affiliations, or if they all won't fit within the width | |
366 | +% of the page (and note that there is less available width in this regard for | |
367 | +% compsoc conferences compared to traditional conferences), use this | |
368 | +% alternative format: | |
369 | +% | |
370 | +%\author{\IEEEauthorblockN{Michael Shell\IEEEauthorrefmark{1}, | |
371 | +%Homer Simpson\IEEEauthorrefmark{2}, | |
372 | +%James Kirk\IEEEauthorrefmark{3}, | |
373 | +%Montgomery Scott\IEEEauthorrefmark{3} and | |
374 | +%Eldon Tyrell\IEEEauthorrefmark{4}} | |
375 | +%\IEEEauthorblockA{\IEEEauthorrefmark{1}School of Electrical and Computer Engineering\\ | |
376 | +%Georgia Institute of Technology, | |
377 | +%Atlanta, Georgia 30332--0250\\ Email: see http://www.michaelshell.org/contact.html} | |
378 | +%\IEEEauthorblockA{\IEEEauthorrefmark{2}Twentieth Century Fox, Springfield, USA\\ | |
379 | +%Email: homer@thesimpsons.com} | |
380 | +%\IEEEauthorblockA{\IEEEauthorrefmark{3}Starfleet Academy, San Francisco, California 96678-2391\\ | |
381 | +%Telephone: (800) 555--1212, Fax: (888) 555--1212} | |
382 | +%\IEEEauthorblockA{\IEEEauthorrefmark{4}Tyrell Inc., 123 Replicant Street, Los Angeles, California 90210--4321}} | |
383 | + | |
384 | + | |
385 | + | |
386 | + | |
387 | +% use for special paper notices | |
388 | +%\IEEEspecialpapernotice{(Invited Paper)} | |
389 | + | |
390 | + | |
391 | + | |
392 | + | |
393 | +% make the title area | |
394 | +\maketitle | |
395 | + | |
396 | +% As a general rule, do not put math, special symbols or citations | |
397 | +% in the abstract | |
398 | +\begin{abstract} | |
399 | +The abstract goes here. | |
400 | +\end{abstract} | |
401 | + | |
402 | +% no keywords | |
403 | + | |
404 | + | |
405 | + | |
406 | + | |
407 | +% For peer review papers, you can put extra information on the cover | |
408 | +% page as needed: | |
409 | +% \ifCLASSOPTIONpeerreview | |
410 | +% \begin{center} \bfseries EDICS Category: 3-BBND \end{center} | |
411 | +% \fi | |
412 | +% | |
413 | +% For peerreview papers, this IEEEtran command inserts a page break and | |
414 | +% creates the second title. It will be ignored for other modes. | |
415 | +\IEEEpeerreviewmaketitle | |
416 | + | |
417 | + | |
418 | + | |
419 | +\section{Introduction} | |
420 | +% no \IEEEPARstart | |
421 | +This demo file is intended to serve as a ``starter file'' | |
422 | +for IEEE Computer Society conference papers produced under \LaTeX\ using | |
423 | +IEEEtran.cls version 1.8b and later. | |
424 | +% You must have at least 2 lines in the paragraph with the drop letter | |
425 | +% (should never be an issue) | |
426 | +I wish you the best of success. | |
427 | + | |
428 | +\hfill mds | |
429 | + | |
430 | +\hfill August 26, 2015 | |
431 | + | |
432 | +\subsection{Subsection Heading Here} | |
433 | +Subsection text here. | |
434 | + | |
435 | + | |
436 | +\subsubsection{Subsubsection Heading Here} | |
437 | +Subsubsection text here. | |
438 | + | |
439 | + | |
440 | +% An example of a floating figure using the graphicx package. | |
441 | +% Note that \label must occur AFTER (or within) \caption. | |
442 | +% For figures, \caption should occur after the \includegraphics. | |
443 | +% Note that IEEEtran v1.7 and later has special internal code that | |
444 | +% is designed to preserve the operation of \label within \caption | |
445 | +% even when the captionsoff option is in effect. However, because | |
446 | +% of issues like this, it may be the safest practice to put all your | |
447 | +% \label just after \caption rather than within \caption{}. | |
448 | +% | |
449 | +% Reminder: the "draftcls" or "draftclsnofoot", not "draft", class | |
450 | +% option should be used if it is desired that the figures are to be | |
451 | +% displayed while in draft mode. | |
452 | +% | |
453 | +%\begin{figure}[!t] | |
454 | +%\centering | |
455 | +%\includegraphics[width=2.5in]{myfigure} | |
456 | +% where an .eps filename suffix will be assumed under latex, | |
457 | +% and a .pdf suffix will be assumed for pdflatex; or what has been declared | |
458 | +% via \DeclareGraphicsExtensions. | |
459 | +%\caption{Simulation results for the network.} | |
460 | +%\label{fig_sim} | |
461 | +%\end{figure} | |
462 | + | |
463 | +% Note that the IEEE typically puts floats only at the top, even when this | |
464 | +% results in a large percentage of a column being occupied by floats. | |
465 | + | |
466 | + | |
467 | +% An example of a double column floating figure using two subfigures. | |
468 | +% (The subfig.sty package must be loaded for this to work.) | |
469 | +% The subfigure \label commands are set within each subfloat command, | |
470 | +% and the \label for the overall figure must come after \caption. | |
471 | +% \hfil is used as a separator to get equal spacing. | |
472 | +% Watch out that the combined width of all the subfigures on a | |
473 | +% line do not exceed the text width or a line break will occur. | |
474 | +% | |
475 | +%\begin{figure*}[!t] | |
476 | +%\centering | |
477 | +%\subfloat[Case I]{\includegraphics[width=2.5in]{box}% | |
478 | +%\label{fig_first_case}} | |
479 | +%\hfil | |
480 | +%\subfloat[Case II]{\includegraphics[width=2.5in]{box}% | |
481 | +%\label{fig_second_case}} | |
482 | +%\caption{Simulation results for the network.} | |
483 | +%\label{fig_sim} | |
484 | +%\end{figure*} | |
485 | +% | |
486 | +% Note that often IEEE papers with subfigures do not employ subfigure | |
487 | +% captions (using the optional argument to \subfloat[]), but instead will | |
488 | +% reference/describe all of them (a), (b), etc., within the main caption. | |
489 | +% Be aware that for subfig.sty to generate the (a), (b), etc., subfigure | |
490 | +% labels, the optional argument to \subfloat must be present. If a | |
491 | +% subcaption is not desired, just leave its contents blank, | |
492 | +% e.g., \subfloat[]. | |
493 | + | |
494 | + | |
495 | +% An example of a floating table. Note that, for IEEE style tables, the | |
496 | +% \caption command should come BEFORE the table and, given that table | |
497 | +% captions serve much like titles, are usually capitalized except for words | |
498 | +% such as a, an, and, as, at, but, by, for, in, nor, of, on, or, the, to | |
499 | +% and up, which are usually not capitalized unless they are the first or | |
500 | +% last word of the caption. Table text will default to \footnotesize as | |
501 | +% the IEEE normally uses this smaller font for tables. | |
502 | +% The \label must come after \caption as always. | |
503 | +% | |
504 | +%\begin{table}[!t] | |
505 | +%% increase table row spacing, adjust to taste | |
506 | +%\renewcommand{\arraystretch}{1.3} | |
507 | +% if using array.sty, it might be a good idea to tweak the value of | |
508 | +% \extrarowheight as needed to properly center the text within the cells | |
509 | +%\caption{An Example of a Table} | |
510 | +%\label{table_example} | |
511 | +%\centering | |
512 | +%% Some packages, such as MDW tools, offer better commands for making tables | |
513 | +%% than the plain LaTeX2e tabular which is used here. | |
514 | +%\begin{tabular}{|c||c|} | |
515 | +%\hline | |
516 | +%One & Two\\ | |
517 | +%\hline | |
518 | +%Three & Four\\ | |
519 | +%\hline | |
520 | +%\end{tabular} | |
521 | +%\end{table} | |
522 | + | |
523 | + | |
524 | +% Note that the IEEE does not put floats in the very first column | |
525 | +% - or typically anywhere on the first page for that matter. Also, | |
526 | +% in-text middle ("here") positioning is typically not used, but it | |
527 | +% is allowed and encouraged for Computer Society conferences (but | |
528 | +% not Computer Society journals). Most IEEE journals/conferences use | |
529 | +% top floats exclusively. | |
530 | +% Note that, LaTeX2e, unlike IEEE journals/conferences, places | |
531 | +% footnotes above bottom floats. This can be corrected via the | |
532 | +% \fnbelowfloat command of the stfloats package. | |
533 | + | |
534 | + | |
535 | + | |
536 | + | |
537 | +\section{Conclusion} | |
538 | +The conclusion goes here. | |
539 | + | |
540 | + | |
541 | + | |
542 | + | |
543 | +% conference papers do not normally have an appendix | |
544 | + | |
545 | + | |
546 | + | |
547 | +% use section* for acknowledgment | |
548 | +\ifCLASSOPTIONcompsoc | |
549 | + % The Computer Society usually uses the plural form | |
550 | + \section*{Acknowledgments} | |
551 | +\else | |
552 | + % regular IEEE prefers the singular form | |
553 | + \section*{Acknowledgment} | |
554 | +\fi | |
555 | + | |
556 | + | |
557 | +The authors would like to thank... | |
558 | + | |
559 | + | |
560 | + | |
561 | + | |
562 | + | |
563 | +% trigger a \newpage just before the given reference | |
564 | +% number - used to balance the columns on the last page | |
565 | +% adjust value as needed - may need to be readjusted if | |
566 | +% the document is modified later | |
567 | +%\IEEEtriggeratref{8} | |
568 | +% The "triggered" command can be changed if desired: | |
569 | +%\IEEEtriggercmd{\enlargethispage{-5in}} | |
570 | + | |
571 | +% references section | |
572 | + | |
573 | +% can use a bibliography generated by BibTeX as a .bbl file | |
574 | +% BibTeX documentation can be easily obtained at: | |
575 | +% http://mirror.ctan.org/biblio/bibtex/contrib/doc/ | |
576 | +% The IEEEtran BibTeX style support page is at: | |
577 | +% http://www.michaelshell.org/tex/ieeetran/bibtex/ | |
578 | +%\bibliographystyle{IEEEtran} | |
579 | +% argument is your BibTeX string definitions and bibliography database(s) | |
580 | +%\bibliography{IEEEabrv,../bib/paper} | |
581 | +% | |
582 | +% <OR> manually copy in the resultant .bbl file | |
583 | +% set second argument of \begin to the number of references | |
584 | +% (used to reserve space for the reference number labels box) | |
585 | +\begin{thebibliography}{1} | |
586 | + | |
587 | +\bibitem{IEEEhowto:kopka} | |
588 | +H.~Kopka and P.~W. Daly, \emph{A Guide to \LaTeX}, 3rd~ed.\hskip 1em plus | |
589 | + 0.5em minus 0.4em\relax Harlow, England: Addison-Wesley, 1999. | |
590 | + | |
591 | +\end{thebibliography} | |
592 | + | |
593 | + | |
594 | + | |
595 | + | |
596 | +% that's all folks | |
597 | +\end{document} | |
598 | + | |
599 | + | ... | ... |
bare_jrnl_compsoc.tex
0 → 100644
1 | +++ a/bare_jrnl_compsoc.tex | |
1 | + | |
2 | +%% bare_jrnl_compsoc.tex | |
3 | +%% V1.4b | |
4 | +%% 2015/08/26 | |
5 | +%% by Michael Shell | |
6 | +%% See: | |
7 | +%% http://www.michaelshell.org/ | |
8 | +%% for current contact information. | |
9 | +%% | |
10 | +%% This is a skeleton file demonstrating the use of IEEEtran.cls | |
11 | +%% (requires IEEEtran.cls version 1.8b or later) with an IEEE | |
12 | +%% Computer Society journal paper. | |
13 | +%% | |
14 | +%% Support sites: | |
15 | +%% http://www.michaelshell.org/tex/ieeetran/ | |
16 | +%% http://www.ctan.org/pkg/ieeetran | |
17 | +%% and | |
18 | +%% http://www.ieee.org/ | |
19 | + | |
20 | +%%************************************************************************* | |
21 | +%% Legal Notice: | |
22 | +%% This code is offered as-is without any warranty either expressed or | |
23 | +%% implied; without even the implied warranty of MERCHANTABILITY or | |
24 | +%% FITNESS FOR A PARTICULAR PURPOSE! | |
25 | +%% User assumes all risk. | |
26 | +%% In no event shall the IEEE or any contributor to this code be liable for | |
27 | +%% any damages or losses, including, but not limited to, incidental, | |
28 | +%% consequential, or any other damages, resulting from the use or misuse | |
29 | +%% of any information contained here. | |
30 | +%% | |
31 | +%% All comments are the opinions of their respective authors and are not | |
32 | +%% necessarily endorsed by the IEEE. | |
33 | +%% | |
34 | +%% This work is distributed under the LaTeX Project Public License (LPPL) | |
35 | +%% ( http://www.latex-project.org/ ) version 1.3, and may be freely used, | |
36 | +%% distributed and modified. A copy of the LPPL, version 1.3, is included | |
37 | +%% in the base LaTeX documentation of all distributions of LaTeX released | |
38 | +%% 2003/12/01 or later. | |
39 | +%% Retain all contribution notices and credits. | |
40 | +%% ** Modified files should be clearly indicated as such, including ** | |
41 | +%% ** renaming them and changing author support contact information. ** | |
42 | +%%************************************************************************* | |
43 | + | |
44 | + | |
45 | +% *** Authors should verify (and, if needed, correct) their LaTeX system *** | |
46 | +% *** with the testflow diagnostic prior to trusting their LaTeX platform *** | |
47 | +% *** with production work. The IEEE's font choices and paper sizes can *** | |
48 | +% *** trigger bugs that do not appear when using other class files. *** *** | |
49 | +% The testflow support page is at: | |
50 | +% http://www.michaelshell.org/tex/testflow/ | |
51 | + | |
52 | + | |
53 | +\documentclass[10pt,journal,compsoc]{IEEEtran} | |
54 | +% | |
55 | +% If IEEEtran.cls has not been installed into the LaTeX system files, | |
56 | +% manually specify the path to it like: | |
57 | +% \documentclass[10pt,journal,compsoc]{../sty/IEEEtran} | |
58 | + | |
59 | + | |
60 | + | |
61 | + | |
62 | + | |
63 | +% Some very useful LaTeX packages include: | |
64 | +% (uncomment the ones you want to load) | |
65 | + | |
66 | + | |
67 | +% *** MISC UTILITY PACKAGES *** | |
68 | +% | |
69 | +%\usepackage{ifpdf} | |
70 | +% Heiko Oberdiek's ifpdf.sty is very useful if you need conditional | |
71 | +% compilation based on whether the output is pdf or dvi. | |
72 | +% usage: | |
73 | +% \ifpdf | |
74 | +% % pdf code | |
75 | +% \else | |
76 | +% % dvi code | |
77 | +% \fi | |
78 | +% The latest version of ifpdf.sty can be obtained from: | |
79 | +% http://www.ctan.org/pkg/ifpdf | |
80 | +% Also, note that IEEEtran.cls V1.7 and later provides a builtin | |
81 | +% \ifCLASSINFOpdf conditional that works the same way. | |
82 | +% When switching from latex to pdflatex and vice-versa, the compiler may | |
83 | +% have to be run twice to clear warning/error messages. | |
84 | + | |
85 | + | |
86 | + | |
87 | + | |
88 | + | |
89 | + | |
90 | +% *** CITATION PACKAGES *** | |
91 | +% | |
92 | +\ifCLASSOPTIONcompsoc | |
93 | + % IEEE Computer Society needs nocompress option | |
94 | + % requires cite.sty v4.0 or later (November 2003) | |
95 | + \usepackage[nocompress]{cite} | |
96 | +\else | |
97 | + % normal IEEE | |
98 | + \usepackage{cite} | |
99 | +\fi | |
100 | +% cite.sty was written by Donald Arseneau | |
101 | +% V1.6 and later of IEEEtran pre-defines the format of the cite.sty package | |
102 | +% \cite{} output to follow that of the IEEE. Loading the cite package will | |
103 | +% result in citation numbers being automatically sorted and properly | |
104 | +% "compressed/ranged". e.g., [1], [9], [2], [7], [5], [6] without using | |
105 | +% cite.sty will become [1], [2], [5]--[7], [9] using cite.sty. cite.sty's | |
106 | +% \cite will automatically add leading space, if needed. Use cite.sty's | |
107 | +% noadjust option (cite.sty V3.8 and later) if you want to turn this off | |
108 | +% such as if a citation ever needs to be enclosed in parenthesis. | |
109 | +% cite.sty is already installed on most LaTeX systems. Be sure and use | |
110 | +% version 5.0 (2009-03-20) and later if using hyperref.sty. | |
111 | +% The latest version can be obtained at: | |
112 | +% http://www.ctan.org/pkg/cite | |
113 | +% The documentation is contained in the cite.sty file itself. | |
114 | +% | |
115 | +% Note that some packages require special options to format as the Computer | |
116 | +% Society requires. In particular, Computer Society papers do not use | |
117 | +% compressed citation ranges as is done in typical IEEE papers | |
118 | +% (e.g., [1]-[4]). Instead, they list every citation separately in order | |
119 | +% (e.g., [1], [2], [3], [4]). To get the latter we need to load the cite | |
120 | +% package with the nocompress option which is supported by cite.sty v4.0 | |
121 | +% and later. Note also the use of a CLASSOPTION conditional provided by | |
122 | +% IEEEtran.cls V1.7 and later. | |
123 | + | |
124 | + | |
125 | + | |
126 | + | |
127 | + | |
128 | +% *** GRAPHICS RELATED PACKAGES *** | |
129 | +% | |
130 | +\ifCLASSINFOpdf | |
131 | + % \usepackage[pdftex]{graphicx} | |
132 | + % declare the path(s) where your graphic files are | |
133 | + % \graphicspath{{../pdf/}{../jpeg/}} | |
134 | + % and their extensions so you won't have to specify these with | |
135 | + % every instance of \includegraphics | |
136 | + % \DeclareGraphicsExtensions{.pdf,.jpeg,.png} | |
137 | +\else | |
138 | + % or other class option (dvipsone, dvipdf, if not using dvips). graphicx | |
139 | + % will default to the driver specified in the system graphics.cfg if no | |
140 | + % driver is specified. | |
141 | + % \usepackage[dvips]{graphicx} | |
142 | + % declare the path(s) where your graphic files are | |
143 | + % \graphicspath{{../eps/}} | |
144 | + % and their extensions so you won't have to specify these with | |
145 | + % every instance of \includegraphics | |
146 | + % \DeclareGraphicsExtensions{.eps} | |
147 | +\fi | |
148 | +% graphicx was written by David Carlisle and Sebastian Rahtz. It is | |
149 | +% required if you want graphics, photos, etc. graphicx.sty is already | |
150 | +% installed on most LaTeX systems. The latest version and documentation | |
151 | +% can be obtained at: | |
152 | +% http://www.ctan.org/pkg/graphicx | |
153 | +% Another good source of documentation is "Using Imported Graphics in | |
154 | +% LaTeX2e" by Keith Reckdahl which can be found at: | |
155 | +% http://www.ctan.org/pkg/epslatex | |
156 | +% | |
157 | +% latex, and pdflatex in dvi mode, support graphics in encapsulated | |
158 | +% postscript (.eps) format. pdflatex in pdf mode supports graphics | |
159 | +% in .pdf, .jpeg, .png and .mps (metapost) formats. Users should ensure | |
160 | +% that all non-photo figures use a vector format (.eps, .pdf, .mps) and | |
161 | +% not a bitmapped formats (.jpeg, .png). The IEEE frowns on bitmapped formats | |
162 | +% which can result in "jaggedy"/blurry rendering of lines and letters as | |
163 | +% well as large increases in file sizes. | |
164 | +% | |
165 | +% You can find documentation about the pdfTeX application at: | |
166 | +% http://www.tug.org/applications/pdftex | |
167 | + | |
168 | + | |
169 | + | |
170 | + | |
171 | + | |
172 | + | |
173 | +% *** MATH PACKAGES *** | |
174 | +% | |
175 | +%\usepackage{amsmath} | |
176 | +% A popular package from the American Mathematical Society that provides | |
177 | +% many useful and powerful commands for dealing with mathematics. | |
178 | +% | |
179 | +% Note that the amsmath package sets \interdisplaylinepenalty to 10000 | |
180 | +% thus preventing page breaks from occurring within multiline equations. Use: | |
181 | +%\interdisplaylinepenalty=2500 | |
182 | +% after loading amsmath to restore such page breaks as IEEEtran.cls normally | |
183 | +% does. amsmath.sty is already installed on most LaTeX systems. The latest | |
184 | +% version and documentation can be obtained at: | |
185 | +% http://www.ctan.org/pkg/amsmath | |
186 | + | |
187 | + | |
188 | + | |
189 | + | |
190 | + | |
191 | +% *** SPECIALIZED LIST PACKAGES *** | |
192 | +% | |
193 | +%\usepackage{algorithmic} | |
194 | +% algorithmic.sty was written by Peter Williams and Rogerio Brito. | |
195 | +% This package provides an algorithmic environment fo describing algorithms. | |
196 | +% You can use the algorithmic environment in-text or within a figure | |
197 | +% environment to provide for a floating algorithm. Do NOT use the algorithm | |
198 | +% floating environment provided by algorithm.sty (by the same authors) or | |
199 | +% algorithm2e.sty (by Christophe Fiorio) as the IEEE does not use dedicated | |
200 | +% algorithm float types and packages that provide these will not provide | |
201 | +% correct IEEE style captions. The latest version and documentation of | |
202 | +% algorithmic.sty can be obtained at: | |
203 | +% http://www.ctan.org/pkg/algorithms | |
204 | +% Also of interest may be the (relatively newer and more customizable) | |
205 | +% algorithmicx.sty package by Szasz Janos: | |
206 | +% http://www.ctan.org/pkg/algorithmicx | |
207 | + | |
208 | + | |
209 | + | |
210 | + | |
211 | +% *** ALIGNMENT PACKAGES *** | |
212 | +% | |
213 | +%\usepackage{array} | |
214 | +% Frank Mittelbach's and David Carlisle's array.sty patches and improves | |
215 | +% the standard LaTeX2e array and tabular environments to provide better | |
216 | +% appearance and additional user controls. As the default LaTeX2e table | |
217 | +% generation code is lacking to the point of almost being broken with | |
218 | +% respect to the quality of the end results, all users are strongly | |
219 | +% advised to use an enhanced (at the very least that provided by array.sty) | |
220 | +% set of table tools. array.sty is already installed on most systems. The | |
221 | +% latest version and documentation can be obtained at: | |
222 | +% http://www.ctan.org/pkg/array | |
223 | + | |
224 | + | |
225 | +% IEEEtran contains the IEEEeqnarray family of commands that can be used to | |
226 | +% generate multiline equations as well as matrices, tables, etc., of high | |
227 | +% quality. | |
228 | + | |
229 | + | |
230 | + | |
231 | + | |
232 | +% *** SUBFIGURE PACKAGES *** | |
233 | +%\ifCLASSOPTIONcompsoc | |
234 | +% \usepackage[caption=false,font=footnotesize,labelfont=sf,textfont=sf]{subfig} | |
235 | +%\else | |
236 | +% \usepackage[caption=false,font=footnotesize]{subfig} | |
237 | +%\fi | |
238 | +% subfig.sty, written by Steven Douglas Cochran, is the modern replacement | |
239 | +% for subfigure.sty, the latter of which is no longer maintained and is | |
240 | +% incompatible with some LaTeX packages including fixltx2e. However, | |
241 | +% subfig.sty requires and automatically loads Axel Sommerfeldt's caption.sty | |
242 | +% which will override IEEEtran.cls' handling of captions and this will result | |
243 | +% in non-IEEE style figure/table captions. To prevent this problem, be sure | |
244 | +% and invoke subfig.sty's "caption=false" package option (available since | |
245 | +% subfig.sty version 1.3, 2005/06/28) as this is will preserve IEEEtran.cls | |
246 | +% handling of captions. | |
247 | +% Note that the Computer Society format requires a sans serif font rather | |
248 | +% than the serif font used in traditional IEEE formatting and thus the need | |
249 | +% to invoke different subfig.sty package options depending on whether | |
250 | +% compsoc mode has been enabled. | |
251 | +% | |
252 | +% The latest version and documentation of subfig.sty can be obtained at: | |
253 | +% http://www.ctan.org/pkg/subfig | |
254 | + | |
255 | + | |
256 | + | |
257 | + | |
258 | +% *** FLOAT PACKAGES *** | |
259 | +% | |
260 | +%\usepackage{fixltx2e} | |
261 | +% fixltx2e, the successor to the earlier fix2col.sty, was written by | |
262 | +% Frank Mittelbach and David Carlisle. This package corrects a few problems | |
263 | +% in the LaTeX2e kernel, the most notable of which is that in current | |
264 | +% LaTeX2e releases, the ordering of single and double column floats is not | |
265 | +% guaranteed to be preserved. Thus, an unpatched LaTeX2e can allow a | |
266 | +% single column figure to be placed prior to an earlier double column | |
267 | +% figure. | |
268 | +% Be aware that LaTeX2e kernels dated 2015 and later have fixltx2e.sty's | |
269 | +% corrections already built into the system in which case a warning will | |
270 | +% be issued if an attempt is made to load fixltx2e.sty as it is no longer | |
271 | +% needed. | |
272 | +% The latest version and documentation can be found at: | |
273 | +% http://www.ctan.org/pkg/fixltx2e | |
274 | + | |
275 | + | |
276 | +%\usepackage{stfloats} | |
277 | +% stfloats.sty was written by Sigitas Tolusis. This package gives LaTeX2e | |
278 | +% the ability to do double column floats at the bottom of the page as well | |
279 | +% as the top. (e.g., "\begin{figure*}[!b]" is not normally possible in | |
280 | +% LaTeX2e). It also provides a command: | |
281 | +%\fnbelowfloat | |
282 | +% to enable the placement of footnotes below bottom floats (the standard | |
283 | +% LaTeX2e kernel puts them above bottom floats). This is an invasive package | |
284 | +% which rewrites many portions of the LaTeX2e float routines. It may not work | |
285 | +% with other packages that modify the LaTeX2e float routines. The latest | |
286 | +% version and documentation can be obtained at: | |
287 | +% http://www.ctan.org/pkg/stfloats | |
288 | +% Do not use the stfloats baselinefloat ability as the IEEE does not allow | |
289 | +% \baselineskip to stretch. Authors submitting work to the IEEE should note | |
290 | +% that the IEEE rarely uses double column equations and that authors should try | |
291 | +% to avoid such use. Do not be tempted to use the cuted.sty or midfloat.sty | |
292 | +% packages (also by Sigitas Tolusis) as the IEEE does not format its papers in | |
293 | +% such ways. | |
294 | +% Do not attempt to use stfloats with fixltx2e as they are incompatible. | |
295 | +% Instead, use Morten Hogholm'a dblfloatfix which combines the features | |
296 | +% of both fixltx2e and stfloats: | |
297 | +% | |
298 | +% \usepackage{dblfloatfix} | |
299 | +% The latest version can be found at: | |
300 | +% http://www.ctan.org/pkg/dblfloatfix | |
301 | + | |
302 | + | |
303 | + | |
304 | + | |
305 | +%\ifCLASSOPTIONcaptionsoff | |
306 | +% \usepackage[nomarkers]{endfloat} | |
307 | +% \let\MYoriglatexcaption\caption | |
308 | +% \renewcommand{\caption}[2][\relax]{\MYoriglatexcaption[#2]{#2}} | |
309 | +%\fi | |
310 | +% endfloat.sty was written by James Darrell McCauley, Jeff Goldberg and | |
311 | +% Axel Sommerfeldt. This package may be useful when used in conjunction with | |
312 | +% IEEEtran.cls' captionsoff option. Some IEEE journals/societies require that | |
313 | +% submissions have lists of figures/tables at the end of the paper and that | |
314 | +% figures/tables without any captions are placed on a page by themselves at | |
315 | +% the end of the document. If needed, the draftcls IEEEtran class option or | |
316 | +% \CLASSINPUTbaselinestretch interface can be used to increase the line | |
317 | +% spacing as well. Be sure and use the nomarkers option of endfloat to | |
318 | +% prevent endfloat from "marking" where the figures would have been placed | |
319 | +% in the text. The two hack lines of code above are a slight modification of | |
320 | +% that suggested by in the endfloat docs (section 8.4.1) to ensure that | |
321 | +% the full captions always appear in the list of figures/tables - even if | |
322 | +% the user used the short optional argument of \caption[]{}. | |
323 | +% IEEE papers do not typically make use of \caption[]'s optional argument, | |
324 | +% so this should not be an issue. A similar trick can be used to disable | |
325 | +% captions of packages such as subfig.sty that lack options to turn off | |
326 | +% the subcaptions: | |
327 | +% For subfig.sty: | |
328 | +% \let\MYorigsubfloat\subfloat | |
329 | +% \renewcommand{\subfloat}[2][\relax]{\MYorigsubfloat[]{#2}} | |
330 | +% However, the above trick will not work if both optional arguments of | |
331 | +% the \subfloat command are used. Furthermore, there needs to be a | |
332 | +% description of each subfigure *somewhere* and endfloat does not add | |
333 | +% subfigure captions to its list of figures. Thus, the best approach is to | |
334 | +% avoid the use of subfigure captions (many IEEE journals avoid them anyway) | |
335 | +% and instead reference/explain all the subfigures within the main caption. | |
336 | +% The latest version of endfloat.sty and its documentation can obtained at: | |
337 | +% http://www.ctan.org/pkg/endfloat | |
338 | +% | |
339 | +% The IEEEtran \ifCLASSOPTIONcaptionsoff conditional can also be used | |
340 | +% later in the document, say, to conditionally put the References on a | |
341 | +% page by themselves. | |
342 | + | |
343 | + | |
344 | + | |
345 | + | |
346 | +% *** PDF, URL AND HYPERLINK PACKAGES *** | |
347 | +% | |
348 | +%\usepackage{url} | |
349 | +% url.sty was written by Donald Arseneau. It provides better support for | |
350 | +% handling and breaking URLs. url.sty is already installed on most LaTeX | |
351 | +% systems. The latest version and documentation can be obtained at: | |
352 | +% http://www.ctan.org/pkg/url | |
353 | +% Basically, \url{my_url_here}. | |
354 | + | |
355 | + | |
356 | + | |
357 | + | |
358 | + | |
359 | +% *** Do not adjust lengths that control margins, column widths, etc. *** | |
360 | +% *** Do not use packages that alter fonts (such as pslatex). *** | |
361 | +% There should be no need to do such things with IEEEtran.cls V1.6 and later. | |
362 | +% (Unless specifically asked to do so by the journal or conference you plan | |
363 | +% to submit to, of course. ) | |
364 | + | |
365 | + | |
366 | +% correct bad hyphenation here | |
367 | +\hyphenation{op-tical net-works semi-conduc-tor} | |
368 | + | |
369 | + | |
370 | +\begin{document} | |
371 | +% | |
372 | +% paper title | |
373 | +% Titles are generally capitalized except for words such as a, an, and, as, | |
374 | +% at, but, by, for, in, nor, of, on, or, the, to and up, which are usually | |
375 | +% not capitalized unless they are the first or last word of the title. | |
376 | +% Linebreaks \\ can be used within to get better formatting as desired. | |
377 | +% Do not put math or special symbols in the title. | |
378 | +\title{Bare Demo of IEEEtran.cls for\\ IEEE Computer Society Journals} | |
379 | +% | |
380 | +% | |
381 | +% author names and IEEE memberships | |
382 | +% note positions of commas and nonbreaking spaces ( ~ ) LaTeX will not break | |
383 | +% a structure at a ~ so this keeps an author's name from being broken across | |
384 | +% two lines. | |
385 | +% use \thanks{} to gain access to the first footnote area | |
386 | +% a separate \thanks must be used for each paragraph as LaTeX2e's \thanks | |
387 | +% was not built to handle multiple paragraphs | |
388 | +% | |
389 | +% | |
390 | +%\IEEEcompsocitemizethanks is a special \thanks that produces the bulleted | |
391 | +% lists the Computer Society journals use for "first footnote" author | |
392 | +% affiliations. Use \IEEEcompsocthanksitem which works much like \item | |
393 | +% for each affiliation group. When not in compsoc mode, | |
394 | +% \IEEEcompsocitemizethanks becomes like \thanks and | |
395 | +% \IEEEcompsocthanksitem becomes a line break with idention. This | |
396 | +% facilitates dual compilation, although admittedly the differences in the | |
397 | +% desired content of \author between the different types of papers makes a | |
398 | +% one-size-fits-all approach a daunting prospect. For instance, compsoc | |
399 | +% journal papers have the author affiliations above the "Manuscript | |
400 | +% received ..." text while in non-compsoc journals this is reversed. Sigh. | |
401 | + | |
402 | +\author{Michael~Shell,~\IEEEmembership{Member,~IEEE,} | |
403 | + John~Doe,~\IEEEmembership{Fellow,~OSA,} | |
404 | + and~Jane~Doe,~\IEEEmembership{Life~Fellow,~IEEE}% <-this % stops a space | |
405 | +\IEEEcompsocitemizethanks{\IEEEcompsocthanksitem M. Shell was with the Department | |
406 | +of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, | |
407 | +GA, 30332.\protect\\ | |
408 | +% note need leading \protect in front of \\ to get a newline within \thanks as | |
409 | +% \\ is fragile and will error, could use \hfil\break instead. | |
410 | +E-mail: see http://www.michaelshell.org/contact.html | |
411 | +\IEEEcompsocthanksitem J. Doe and J. Doe are with Anonymous University.}% <-this % stops an unwanted space | |
412 | +\thanks{Manuscript received April 19, 2005; revised August 26, 2015.}} | |
413 | + | |
414 | +% note the % following the last \IEEEmembership and also \thanks - | |
415 | +% these prevent an unwanted space from occurring between the last author name | |
416 | +% and the end of the author line. i.e., if you had this: | |
417 | +% | |
418 | +% \author{....lastname \thanks{...} \thanks{...} } | |
419 | +% ^------------^------------^----Do not want these spaces! | |
420 | +% | |
421 | +% a space would be appended to the last name and could cause every name on that | |
422 | +% line to be shifted left slightly. This is one of those "LaTeX things". For | |
423 | +% instance, "\textbf{A} \textbf{B}" will typeset as "A B" not "AB". To get | |
424 | +% "AB" then you have to do: "\textbf{A}\textbf{B}" | |
425 | +% \thanks is no different in this regard, so shield the last } of each \thanks | |
426 | +% that ends a line with a % and do not let a space in before the next \thanks. | |
427 | +% Spaces after \IEEEmembership other than the last one are OK (and needed) as | |
428 | +% you are supposed to have spaces between the names. For what it is worth, | |
429 | +% this is a minor point as most people would not even notice if the said evil | |
430 | +% space somehow managed to creep in. | |
431 | + | |
432 | + | |
433 | + | |
434 | +% The paper headers | |
435 | +\markboth{Journal of \LaTeX\ Class Files,~Vol.~14, No.~8, August~2015}% | |
436 | +{Shell \MakeLowercase{\textit{et al.}}: Bare Demo of IEEEtran.cls for Computer Society Journals} | |
437 | +% The only time the second header will appear is for the odd numbered pages | |
438 | +% after the title page when using the twoside option. | |
439 | +% | |
440 | +% *** Note that you probably will NOT want to include the author's *** | |
441 | +% *** name in the headers of peer review papers. *** | |
442 | +% You can use \ifCLASSOPTIONpeerreview for conditional compilation here if | |
443 | +% you desire. | |
444 | + | |
445 | + | |
446 | + | |
447 | +% The publisher's ID mark at the bottom of the page is less important with | |
448 | +% Computer Society journal papers as those publications place the marks | |
449 | +% outside of the main text columns and, therefore, unlike regular IEEE | |
450 | +% journals, the available text space is not reduced by their presence. | |
451 | +% If you want to put a publisher's ID mark on the page you can do it like | |
452 | +% this: | |
453 | +%\IEEEpubid{0000--0000/00\$00.00~\copyright~2015 IEEE} | |
454 | +% or like this to get the Computer Society new two part style. | |
455 | +%\IEEEpubid{\makebox[\columnwidth]{\hfill 0000--0000/00/\$00.00~\copyright~2015 IEEE}% | |
456 | +%\hspace{\columnsep}\makebox[\columnwidth]{Published by the IEEE Computer Society\hfill}} | |
457 | +% Remember, if you use this you must call \IEEEpubidadjcol in the second | |
458 | +% column for its text to clear the IEEEpubid mark (Computer Society jorunal | |
459 | +% papers don't need this extra clearance.) | |
460 | + | |
461 | + | |
462 | + | |
463 | +% use for special paper notices | |
464 | +%\IEEEspecialpapernotice{(Invited Paper)} | |
465 | + | |
466 | + | |
467 | + | |
468 | +% for Computer Society papers, we must declare the abstract and index terms | |
469 | +% PRIOR to the title within the \IEEEtitleabstractindextext IEEEtran | |
470 | +% command as these need to go into the title area created by \maketitle. | |
471 | +% As a general rule, do not put math, special symbols or citations | |
472 | +% in the abstract or keywords. | |
473 | +\IEEEtitleabstractindextext{% | |
474 | +\begin{abstract} | |
475 | +The abstract goes here. | |
476 | +\end{abstract} | |
477 | + | |
478 | +% Note that keywords are not normally used for peerreview papers. | |
479 | +\begin{IEEEkeywords} | |
480 | +Computer Society, IEEE, IEEEtran, journal, \LaTeX, paper, template. | |
481 | +\end{IEEEkeywords}} | |
482 | + | |
483 | + | |
484 | +% make the title area | |
485 | +\maketitle | |
486 | + | |
487 | + | |
488 | +% To allow for easy dual compilation without having to reenter the | |
489 | +% abstract/keywords data, the \IEEEtitleabstractindextext text will | |
490 | +% not be used in maketitle, but will appear (i.e., to be "transported") | |
491 | +% here as \IEEEdisplaynontitleabstractindextext when the compsoc | |
492 | +% or transmag modes are not selected <OR> if conference mode is selected | |
493 | +% - because all conference papers position the abstract like regular | |
494 | +% papers do. | |
495 | +\IEEEdisplaynontitleabstractindextext | |
496 | +% \IEEEdisplaynontitleabstractindextext has no effect when using | |
497 | +% compsoc or transmag under a non-conference mode. | |
498 | + | |
499 | + | |
500 | + | |
501 | +% For peer review papers, you can put extra information on the cover | |
502 | +% page as needed: | |
503 | +% \ifCLASSOPTIONpeerreview | |
504 | +% \begin{center} \bfseries EDICS Category: 3-BBND \end{center} | |
505 | +% \fi | |
506 | +% | |
507 | +% For peerreview papers, this IEEEtran command inserts a page break and | |
508 | +% creates the second title. It will be ignored for other modes. | |
509 | +\IEEEpeerreviewmaketitle | |
510 | + | |
511 | + | |
512 | + | |
513 | +\IEEEraisesectionheading{\section{Introduction}\label{sec:introduction}} | |
514 | +% Computer Society journal (but not conference!) papers do something unusual | |
515 | +% with the very first section heading (almost always called "Introduction"). | |
516 | +% They place it ABOVE the main text! IEEEtran.cls does not automatically do | |
517 | +% this for you, but you can achieve this effect with the provided | |
518 | +% \IEEEraisesectionheading{} command. Note the need to keep any \label that | |
519 | +% is to refer to the section immediately after \section in the above as | |
520 | +% \IEEEraisesectionheading puts \section within a raised box. | |
521 | + | |
522 | + | |
523 | + | |
524 | + | |
525 | +% The very first letter is a 2 line initial drop letter followed | |
526 | +% by the rest of the first word in caps (small caps for compsoc). | |
527 | +% | |
528 | +% form to use if the first word consists of a single letter: | |
529 | +% \IEEEPARstart{A}{demo} file is .... | |
530 | +% | |
531 | +% form to use if you need the single drop letter followed by | |
532 | +% normal text (unknown if ever used by the IEEE): | |
533 | +% \IEEEPARstart{A}{}demo file is .... | |
534 | +% | |
535 | +% Some journals put the first two words in caps: | |
536 | +% \IEEEPARstart{T}{his demo} file is .... | |
537 | +% | |
538 | +% Here we have the typical use of a "T" for an initial drop letter | |
539 | +% and "HIS" in caps to complete the first word. | |
540 | +\IEEEPARstart{T}{his} demo file is intended to serve as a ``starter file'' | |
541 | +for IEEE Computer Society journal papers produced under \LaTeX\ using | |
542 | +IEEEtran.cls version 1.8b and later. | |
543 | +% You must have at least 2 lines in the paragraph with the drop letter | |
544 | +% (should never be an issue) | |
545 | +I wish you the best of success. | |
546 | + | |
547 | +\hfill mds | |
548 | + | |
549 | +\hfill August 26, 2015 | |
550 | + | |
551 | +\subsection{Subsection Heading Here} | |
552 | +Subsection text here. | |
553 | + | |
554 | +% needed in second column of first page if using \IEEEpubid | |
555 | +%\IEEEpubidadjcol | |
556 | + | |
557 | +\subsubsection{Subsubsection Heading Here} | |
558 | +Subsubsection text here. | |
559 | + | |
560 | + | |
561 | +% An example of a floating figure using the graphicx package. | |
562 | +% Note that \label must occur AFTER (or within) \caption. | |
563 | +% For figures, \caption should occur after the \includegraphics. | |
564 | +% Note that IEEEtran v1.7 and later has special internal code that | |
565 | +% is designed to preserve the operation of \label within \caption | |
566 | +% even when the captionsoff option is in effect. However, because | |
567 | +% of issues like this, it may be the safest practice to put all your | |
568 | +% \label just after \caption rather than within \caption{}. | |
569 | +% | |
570 | +% Reminder: the "draftcls" or "draftclsnofoot", not "draft", class | |
571 | +% option should be used if it is desired that the figures are to be | |
572 | +% displayed while in draft mode. | |
573 | +% | |
574 | +%\begin{figure}[!t] | |
575 | +%\centering | |
576 | +%\includegraphics[width=2.5in]{myfigure} | |
577 | +% where an .eps filename suffix will be assumed under latex, | |
578 | +% and a .pdf suffix will be assumed for pdflatex; or what has been declared | |
579 | +% via \DeclareGraphicsExtensions. | |
580 | +%\caption{Simulation results for the network.} | |
581 | +%\label{fig_sim} | |
582 | +%\end{figure} | |
583 | + | |
584 | +% Note that the IEEE typically puts floats only at the top, even when this | |
585 | +% results in a large percentage of a column being occupied by floats. | |
586 | +% However, the Computer Society has been known to put floats at the bottom. | |
587 | + | |
588 | + | |
589 | +% An example of a double column floating figure using two subfigures. | |
590 | +% (The subfig.sty package must be loaded for this to work.) | |
591 | +% The subfigure \label commands are set within each subfloat command, | |
592 | +% and the \label for the overall figure must come after \caption. | |
593 | +% \hfil is used as a separator to get equal spacing. | |
594 | +% Watch out that the combined width of all the subfigures on a | |
595 | +% line do not exceed the text width or a line break will occur. | |
596 | +% | |
597 | +%\begin{figure*}[!t] | |
598 | +%\centering | |
599 | +%\subfloat[Case I]{\includegraphics[width=2.5in]{box}% | |
600 | +%\label{fig_first_case}} | |
601 | +%\hfil | |
602 | +%\subfloat[Case II]{\includegraphics[width=2.5in]{box}% | |
603 | +%\label{fig_second_case}} | |
604 | +%\caption{Simulation results for the network.} | |
605 | +%\label{fig_sim} | |
606 | +%\end{figure*} | |
607 | +% | |
608 | +% Note that often IEEE papers with subfigures do not employ subfigure | |
609 | +% captions (using the optional argument to \subfloat[]), but instead will | |
610 | +% reference/describe all of them (a), (b), etc., within the main caption. | |
611 | +% Be aware that for subfig.sty to generate the (a), (b), etc., subfigure | |
612 | +% labels, the optional argument to \subfloat must be present. If a | |
613 | +% subcaption is not desired, just leave its contents blank, | |
614 | +% e.g., \subfloat[]. | |
615 | + | |
616 | + | |
617 | +% An example of a floating table. Note that, for IEEE style tables, the | |
618 | +% \caption command should come BEFORE the table and, given that table | |
619 | +% captions serve much like titles, are usually capitalized except for words | |
620 | +% such as a, an, and, as, at, but, by, for, in, nor, of, on, or, the, to | |
621 | +% and up, which are usually not capitalized unless they are the first or | |
622 | +% last word of the caption. Table text will default to \footnotesize as | |
623 | +% the IEEE normally uses this smaller font for tables. | |
624 | +% The \label must come after \caption as always. | |
625 | +% | |
626 | +%\begin{table}[!t] | |
627 | +%% increase table row spacing, adjust to taste | |
628 | +%\renewcommand{\arraystretch}{1.3} | |
629 | +% if using array.sty, it might be a good idea to tweak the value of | |
630 | +% \extrarowheight as needed to properly center the text within the cells | |
631 | +%\caption{An Example of a Table} | |
632 | +%\label{table_example} | |
633 | +%\centering | |
634 | +%% Some packages, such as MDW tools, offer better commands for making tables | |
635 | +%% than the plain LaTeX2e tabular which is used here. | |
636 | +%\begin{tabular}{|c||c|} | |
637 | +%\hline | |
638 | +%One & Two\\ | |
639 | +%\hline | |
640 | +%Three & Four\\ | |
641 | +%\hline | |
642 | +%\end{tabular} | |
643 | +%\end{table} | |
644 | + | |
645 | + | |
646 | +% Note that the IEEE does not put floats in the very first column | |
647 | +% - or typically anywhere on the first page for that matter. Also, | |
648 | +% in-text middle ("here") positioning is typically not used, but it | |
649 | +% is allowed and encouraged for Computer Society conferences (but | |
650 | +% not Computer Society journals). Most IEEE journals/conferences use | |
651 | +% top floats exclusively. | |
652 | +% Note that, LaTeX2e, unlike IEEE journals/conferences, places | |
653 | +% footnotes above bottom floats. This can be corrected via the | |
654 | +% \fnbelowfloat command of the stfloats package. | |
655 | + | |
656 | + | |
657 | + | |
658 | + | |
659 | +\section{Conclusion} | |
660 | +The conclusion goes here. | |
661 | + | |
662 | + | |
663 | + | |
664 | + | |
665 | + | |
666 | +% if have a single appendix: | |
667 | +%\appendix[Proof of the Zonklar Equations] | |
668 | +% or | |
669 | +%\appendix % for no appendix heading | |
670 | +% do not use \section anymore after \appendix, only \section* | |
671 | +% is possibly needed | |
672 | + | |
673 | +% use appendices with more than one appendix | |
674 | +% then use \section to start each appendix | |
675 | +% you must declare a \section before using any | |
676 | +% \subsection or using \label (\appendices by itself | |
677 | +% starts a section numbered zero.) | |
678 | +% | |
679 | + | |
680 | + | |
681 | +\appendices | |
682 | +\section{Proof of the First Zonklar Equation} | |
683 | +Appendix one text goes here. | |
684 | + | |
685 | +% you can choose not to have a title for an appendix | |
686 | +% if you want by leaving the argument blank | |
687 | +\section{} | |
688 | +Appendix two text goes here. | |
689 | + | |
690 | + | |
691 | +% use section* for acknowledgment | |
692 | +\ifCLASSOPTIONcompsoc | |
693 | + % The Computer Society usually uses the plural form | |
694 | + \section*{Acknowledgments} | |
695 | +\else | |
696 | + % regular IEEE prefers the singular form | |
697 | + \section*{Acknowledgment} | |
698 | +\fi | |
699 | + | |
700 | + | |
701 | +The authors would like to thank... | |
702 | + | |
703 | + | |
704 | +% Can use something like this to put references on a page | |
705 | +% by themselves when using endfloat and the captionsoff option. | |
706 | +\ifCLASSOPTIONcaptionsoff | |
707 | + \newpage | |
708 | +\fi | |
709 | + | |
710 | + | |
711 | + | |
712 | +% trigger a \newpage just before the given reference | |
713 | +% number - used to balance the columns on the last page | |
714 | +% adjust value as needed - may need to be readjusted if | |
715 | +% the document is modified later | |
716 | +%\IEEEtriggeratref{8} | |
717 | +% The "triggered" command can be changed if desired: | |
718 | +%\IEEEtriggercmd{\enlargethispage{-5in}} | |
719 | + | |
720 | +% references section | |
721 | + | |
722 | +% can use a bibliography generated by BibTeX as a .bbl file | |
723 | +% BibTeX documentation can be easily obtained at: | |
724 | +% http://mirror.ctan.org/biblio/bibtex/contrib/doc/ | |
725 | +% The IEEEtran BibTeX style support page is at: | |
726 | +% http://www.michaelshell.org/tex/ieeetran/bibtex/ | |
727 | +%\bibliographystyle{IEEEtran} | |
728 | +% argument is your BibTeX string definitions and bibliography database(s) | |
729 | +%\bibliography{IEEEabrv,../bib/paper} | |
730 | +% | |
731 | +% <OR> manually copy in the resultant .bbl file | |
732 | +% set second argument of \begin to the number of references | |
733 | +% (used to reserve space for the reference number labels box) | |
734 | +\begin{thebibliography}{1} | |
735 | + | |
736 | +\bibitem{IEEEhowto:kopka} | |
737 | +H.~Kopka and P.~W. Daly, \emph{A Guide to \LaTeX}, 3rd~ed.\hskip 1em plus | |
738 | + 0.5em minus 0.4em\relax Harlow, England: Addison-Wesley, 1999. | |
739 | + | |
740 | +\end{thebibliography} | |
741 | + | |
742 | +% biography section | |
743 | +% | |
744 | +% If you have an EPS/PDF photo (graphicx package needed) extra braces are | |
745 | +% needed around the contents of the optional argument to biography to prevent | |
746 | +% the LaTeX parser from getting confused when it sees the complicated | |
747 | +% \includegraphics command within an optional argument. (You could create | |
748 | +% your own custom macro containing the \includegraphics command to make things | |
749 | +% simpler here.) | |
750 | +%\begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{mshell}}]{Michael Shell} | |
751 | +% or if you just want to reserve a space for a photo: | |
752 | + | |
753 | +\begin{IEEEbiography}{Michael Shell} | |
754 | +Biography text here. | |
755 | +\end{IEEEbiography} | |
756 | + | |
757 | +% if you will not have a photo at all: | |
758 | +\begin{IEEEbiographynophoto}{John Doe} | |
759 | +Biography text here. | |
760 | +\end{IEEEbiographynophoto} | |
761 | + | |
762 | +% insert where needed to balance the two columns on the last page with | |
763 | +% biographies | |
764 | +%\newpage | |
765 | + | |
766 | +\begin{IEEEbiographynophoto}{Jane Doe} | |
767 | +Biography text here. | |
768 | +\end{IEEEbiographynophoto} | |
769 | + | |
770 | +% You can push biographies down or up by placing | |
771 | +% a \vfill before or after them. The appropriate | |
772 | +% use of \vfill depends on what kind of text is | |
773 | +% on the last page and whether or not the columns | |
774 | +% are being equalized. | |
775 | + | |
776 | +%\vfill | |
777 | + | |
778 | +% Can be used to pull up biographies so that the bottom of the last one | |
779 | +% is flush with the other column. | |
780 | +%\enlargethispage{-5in} | |
781 | + | |
782 | + | |
783 | + | |
784 | +% that's all folks | |
785 | +\end{document} | |
786 | + | |
787 | + | ... | ... |
changelog.txt
0 → 100644
1 | +++ a/changelog.txt | |
1 | + | |
2 | + | |
3 | + Changelog history of the IEEEtran LaTeX class. | |
4 | + 2015/08/26 | |
5 | + by Michael Shell (MDS) | |
6 | + http://www.michaelshell.org/ | |
7 | + | |
8 | + | |
9 | + 2015/08/26 V1.8b (MDS) changes: | |
10 | + | |
11 | + 1) Added new comsoc mode for the IEEE Communications Society. | |
12 | + This mode (at present) only invokes the use of the newtxmath math fonts. | |
13 | + | |
14 | + 2) Revised IEEEeqnarray column specifications to work with active " | |
15 | + (or other punctuation catcode changes) as with babel under the | |
16 | + german or ngerman language modes. | |
17 | + Thanks to Stefan M. Moser for reporting this problem. | |
18 | + | |
19 | + 3) Added \indexspace and other index related macros as newer versions of | |
20 | + article.cls now do. These macros are needed to avoid an error when | |
21 | + using the glossaries package. | |
22 | + Thanks to Sebastian Nyberg for suggesting this change. | |
23 | + | |
24 | + 4) Fixed odd/even page header font bug under compsoc mode and | |
25 | + other page style code improvements. | |
26 | + Thanks to Marco Paolieri for reporting this problem. | |
27 | + | |
28 | + 5) Added hooks to allow for easy control of spacing above title. | |
29 | + | |
30 | + 6) Added the \IEEEnoauxwrite command. | |
31 | + Thanks to Sudarshan Mukherjee for suggesting this feature. | |
32 | + | |
33 | + | |
34 | + 2014/09/17 V1.8a (MDS) changes: | |
35 | + | |
36 | + 1) Extensive rework of the compsoc mode to comply with the latest standards | |
37 | + of the IEEE Computer Society. | |
38 | + | |
39 | + 2) Internal code improvements for page setup and command argument | |
40 | + processing. | |
41 | + | |
42 | + 3) Fixed abstract, index terms and diamond line for compsoc technotes. | |
43 | + Thanks to Dimitris Schinianakis for reporting this problem. | |
44 | + | |
45 | + 4) New cspaper option to support the special trim paper size | |
46 | + (7.875in x 10.75in) used in actual Computer Society journals. For | |
47 | + compsoc journal mode, typesetting will not be altered by the use of this | |
48 | + option. | |
49 | + | |
50 | + 5) New \IEEEraisesectionheading{} command to provide for the special raised | |
51 | + first section heading of Computer Society journal papers. | |
52 | + | |
53 | + 6) Increased \clubpenalty, \widowpenalty, \displaywidowpenalty to | |
54 | + discourage paragraph breaks at the first and last lines. | |
55 | + Thanks to Dirk Beyer for suggesting this change. | |
56 | + | |
57 | + 7) Added lines per column console message. | |
58 | + | |
59 | + | |
60 | +******* | |
61 | + 2012/12/27 V1.8 (MDS) changes:: | |
62 | + | |
63 | + 1) New transmag class option to support the IEEE Transactions on Magnetics | |
64 | + format. Thanks to Wei Yingkang, Sangmin Suh and Benjamin Gaussens | |
65 | + for suggestions and beta testing. | |
66 | + | |
67 | + 2) The \IEEEcompsoctitleabstractindextext and | |
68 | + \IEEEdisplaynotcompsoctitleabstractindextext | |
69 | + commands have been deprecated in favor of their | |
70 | + \IEEEtitleabstractindextext and \IEEEdisplaynontitleabstractindextext | |
71 | + (observe that the "not" has changed to "non") equivalents. This change | |
72 | + generalizes and decouples them from compsoc mode because the new | |
73 | + transmag mode also uses them now. | |
74 | + | |
75 | + 3) Added new *-forms of \IEEEyesnumber*, \IEEEnonumber*, \IEEEyessubnumber*, | |
76 | + and \IEEEnosubnumber* (the non-star form of the latter is also new) which | |
77 | + persist across IEEEeqnarray lines until countermanded. To provide for | |
78 | + continued subequations across instances of IEEEeqnarrays as well as for | |
79 | + subequations that follow a main equation (e.g., 14, 14a, 14b ...) | |
80 | + \IEEEyessubnumber no longer automatically increments the equation number | |
81 | + on it's first invocation of a subequation group. Invoke both | |
82 | + \IEEEyesnumber\IEEEyessubnumber together to start a new | |
83 | + equation/subequation group. | |
84 | + | |
85 | + 4) Hyperref links now work with IEEEeqnarray equations. | |
86 | + Thanks to Stefan M. Moser for reporting this problem. | |
87 | + | |
88 | + 5) Fixed \markboth so that it does not cause an error with babel.sty. | |
89 | + Thanks to Frank Meier for suggesting this change. | |
90 | + | |
91 | + 6) Change all instances of ~ to \nobreakspace to avoid | |
92 | + | |
93 | + ! Argument of \language@active@arg~ has an extra } | |
94 | + | |
95 | + figure caption error with bable.sty under spanish. Thanks to | |
96 | + Manuel Olivares and Javier Bezos for suggesting this change. | |
97 | + | |
98 | + 7) Allow line breaks within long theorem names. | |
99 | + Thanks to Miquel Payaro for suggesting this change. | |
100 | + | |
101 | + 8) Revised \IEEEeqnarraymulticol{} to allow inner alignments without | |
102 | + requiring extra containing braces to prevent an incomplete \ifx error. | |
103 | + Thanks to Stefan M. Moser and Auke van der Valk for reporting this | |
104 | + problem. | |
105 | + | |
106 | + 9) Revised spacing at top of top figures and tables to better | |
107 | + align with the top main text lines as IEEE does in its journals. | |
108 | + Thanks to Dirk Beyer for reporting this issue and beta testing. | |
109 | + | |
110 | +10) Removed support for legacy IED list commands, legacy QED and proof | |
111 | + commands and the legacy biography and biographynophoto environments. | |
112 | + IEEEtran no longer defines or references \labelindent so as to | |
113 | + avoid namespace problems with list packages that define it. | |
114 | + Thanks to Sven Köhler for reporting the problem with enumitem.sty. | |
115 | + | |
116 | + | |
117 | +******* | |
118 | + 2007/03/05 V1.7a (MDS) changes: | |
119 | + | |
120 | + 1) Corrected problem of unwanted two column peer review title page format. | |
121 | + Thanks to Virgilio Rodriguez for reporting this bug. | |
122 | + | |
123 | + 2) "depreciated" -> "deprecated". Thanks to Virgilio Rodriguez for | |
124 | + suggesting this change. | |
125 | + | |
126 | + | |
127 | + | |
128 | +******* | |
129 | + 2007/01/11 V1.7 (MDS) changes: | |
130 | + | |
131 | + 1) New class option compsoc to support the IEEE Computer Society format. | |
132 | + | |
133 | + 2) New class option captionsoff disables the display of figure/table | |
134 | + captions. endfloat.sty is now mentioned in the docs. Thanks to Geoff | |
135 | + Walker for suggesting these changes. | |
136 | + | |
137 | + 3) Fixed compatibility issues with subfig.sty and caption.sty. Thanks to | |
138 | + Steven Douglas Cochran and Axel Sommerfeldt for suggesting this change. | |
139 | + | |
140 | + 4) New \CLASSINPUT, \CLASSOPTION and \CLASSINFO interface allows for more | |
141 | + user control and conditional compilation. | |
142 | + | |
143 | + 5) \ifcenterfigcaptions (\centerfigcaptionstrue, \centerfigcaptionsfalse), | |
144 | + \CMPARstart and \overrideIEEEmargins have been removed and no are | |
145 | + longer supported. The effect of \overrideIEEEmargins can be mimicked | |
146 | + via the more general \CLASSINPUT interface: | |
147 | + % US letter paper: | |
148 | + \newcommand{\CLASSINPUTinnersidemargin}{0.775in} | |
149 | + \newcommand{\CLASSINPUToutersidemargin}{0.585in} | |
150 | + % A4 paper: | |
151 | + \newcommand{\CLASSINPUTinnersidemargin}{17mm} | |
152 | + \newcommand{\CLASSINPUToutersidemargin}{11.647mm} | |
153 | + | |
154 | + 6) Several commands and environments have been deprecated in favor of | |
155 | + replacements with IEEE prefixes to better avoid potential future name | |
156 | + clashes with other packages. Legacy code retained to allow the use of | |
157 | + the obsolete forms (for now), but with a warning message to the console | |
158 | + during compilation: | |
159 | + \IEEEauthorblockA, \IEEEauthorblockN, \IEEEauthorrefmark, | |
160 | + \IEEEbiography, \IEEEbiographynophoto, \IEEEkeywords, \IEEEPARstart, | |
161 | + \IEEEproof, \IEEEpubid, \IEEEpubidadjcol, \IEEEQED, \IEEEQEDclosed, | |
162 | + \IEEEQEDopen, \IEEEspecialpapernotice. IEEEtran.cls now redefines | |
163 | + \proof in way to avoid problems with the amsthm.sty package. | |
164 | + For IED lists: | |
165 | + \IEEEiedlabeljustifyc, \IEEEiedlabeljustifyl, \IEEEiedlabeljustifyr, | |
166 | + \IEEEnocalcleftmargin, \IEEElabelindent, \IEEEsetlabelwidth, | |
167 | + \IEEEusemathlabelsep | |
168 | + | |
169 | + 7) These commands/lengths now require the IEEE prefix and do not have | |
170 | + legacy support: \IEEEnormaljot. | |
171 | + For IED lists: \ifIEEEnocalcleftmargin, \ifIEEEnolabelindentfactor, | |
172 | + \IEEEiedlistdecl, \IEEElabelindentfactor | |
173 | + | |
174 | + 8) \normalsizebaselineskip skip replaced by | |
175 | + \CLASSINFOnormalsizebaselineskip (nonrubber dimen) length. | |
176 | + Also, new \CLASSINFOnormalsizeunitybaselineskip (nonrubber dimen) | |
177 | + provided. | |
178 | + | |
179 | + 9) Now defaults to using Alpha numbering rather than Roman for appendices | |
180 | + numbering. This is because Alpha numbering is more common and avoids | |
181 | + problems with theorem numbering. \ifuseRomanappendices | |
182 | + (\useRomanappendicestrue, \useRomanappendicesfalse) is no longer | |
183 | + supported. Instead, use the new class option romanappendices if Roman | |
184 | + appendices numbering is desired. Thanks to Leonid Mirkin for reporting | |
185 | + the problem with theorems in appendices and suggesting changes. | |
186 | + | |
187 | +10) Improved paper size setting code for pdflatex. | |
188 | + | |
189 | +11) Better handling of theorem numbering when using the section counter | |
190 | + within the appendix(cies). Thanks to Leonid Mirkin for suggesting | |
191 | + this change. | |
192 | + | |
193 | +12) Fixed bug that caused equations at the end of theorems to be too | |
194 | + close to the line below them. | |
195 | + | |
196 | +13) Provided hook to conference mode console notice and changed notice to | |
197 | + better support conferences that use A4 paper. Thanks to Volker Kuhlmann | |
198 | + for suggesting this change. | |
199 | + | |
200 | +14) \IEEEauthorrefmark made robust to allow it to be used in \thanks | |
201 | + without a leading \protect | |
202 | + | |
203 | +15) Improved \textunderscore to provide a much better fake _ when used with | |
204 | + OT1 encoding. Under OT1, detect use of pcr or cmtt \ttfamily and use | |
205 | + available true _ glyph for those two typewriter fonts. | |
206 | + | |
207 | +16) Revised internal \@sect command to be more robust for users who employ | |
208 | + modified section heading formats. Thanks to Zarko F. Cucej for | |
209 | + suggesting this change. | |
210 | + | |
211 | +17) Improved \thesubsubsection definition to prevent breaks at the hyphen. | |
212 | + Thanks to Moritz Borgmann for suggesting this change. Thanks to | |
213 | + Dan Luecking and Heiko Oberdiek for explaining some of the various | |
214 | + alternatives and techniques to fix it. | |
215 | + | |
216 | +18) No longer provide \NAT@parse hack to get cite.sty to play (somewhat) | |
217 | + with hyperref.sty as this is already included in cite.sty version | |
218 | + 4.0 (2003-05-27) and later. | |
219 | + | |
220 | +19) At the beginning of document, set the default style of url.sty to be | |
221 | + the same as the current text font - as is done in IEEE journals. | |
222 | + | |
223 | +20) Corrected excessive line spacing in journal table captions. Thanks to | |
224 | + Moritz Borgmann for suggesting this change. | |
225 | + | |
226 | +21) Corrected \thesubsubsection to use the "I-A1" format IEEE uses rather | |
227 | + than "I-A.1" as was done before. Ditto for \theparagraph. Thanks to | |
228 | + Moritz Borgmann for suggesting this change. | |
229 | + | |
230 | +22) Enclose papersize specials within \AtBeginDvi in case someone wants | |
231 | + to make a format with IEEEtran. Thanks to Moritz Borgmann for | |
232 | + suggesting this change. | |
233 | + | |
234 | +23) Eliminated the small space after abstract and keywords dash as IEEE | |
235 | + now does. Thanks to Moritz Borgmann for suggesting this change. | |
236 | + | |
237 | +24) IEEEkeywords is no longer locked out in conference mode | |
238 | + | |
239 | +25) Increase defaults of \binoppenalty and \relpenalty to discourage | |
240 | + breaks within equations. Thanks to Moritz Borgmann for suggesting | |
241 | + this change. | |
242 | + | |
243 | +26) Support optional argument for IEEEproof. Thanks to Ingo Steinwart for | |
244 | + suggesting this change. Also, start a new \par with \IEEEproof. | |
245 | + | |
246 | +27) Add support for an optional argument to \bstctlcite. | |
247 | + | |
248 | +28) Changed \topfraction and \dbltopfraction from 1.0 to 0.9. Thanks to | |
249 | + Donald Arseneau for suggesting this change. | |
250 | + | |
251 | + | |
252 | +******* | |
253 | + 2005/09/13 V1.6c (MDS) changes: | |
254 | + | |
255 | + 1) Changed endfigure/endfloat definitions so as not to cause problems with | |
256 | + preview-LaTeX and other packages. Thanks to Stephan Heuel and David | |
257 | + Kastrup for reporting this problem. | |
258 | + | |
259 | + | |
260 | + | |
261 | +******* | |
262 | + 2002/11/18 V1.6b (MDS) changes: | |
263 | + | |
264 | + 1) Fixed problem with figure captions when using hyperref. Thanks to | |
265 | + Leandro Barajas and Michael Bassetti for reporting this bug. | |
266 | + | |
267 | + 2) Provide a fake nabib command \NAT@parse so that hyperref will not | |
268 | + interfere with the operation of cite.sty. However, as a result citation | |
269 | + numbers will not be hyperlinked. Also, natbib will not be able to work | |
270 | + with IEEEtran. However, this is perhaps the best solution until | |
271 | + cite.sty and hyperref.sty are able to co-exist with each other. | |
272 | + It easy enough to override the fake command via: | |
273 | + \makeatletter | |
274 | + \let\NAT@parse\undefined | |
275 | + \makeatother | |
276 | + | |
277 | + 3) Revised font selection method so as not to have problems when used | |
278 | + with setspace.sty. Thanks to Zhang Yan for reporting this bug. | |
279 | + | |
280 | + 4) Added \special to feed papersize to dvips. Thanks to Moritz Borgmann | |
281 | + for suggesting this feature. | |
282 | + | |
283 | + 5) In addition to the IEEE IED lists, the original IED style list | |
284 | + environments (as is done in article.cls) are now provided as | |
285 | + LaTeXitemize, LaTeXenumerate, and LaTeXdescription. Also, users can | |
286 | + now redefine \makelabel within IEEE IED list controls. There may be | |
287 | + some use for this in specialized applications. Thanks to Eli Barzilay | |
288 | + for suggesting this feature. | |
289 | + | |
290 | + 6) \table* now defaults to \footnotesize text like \table. | |
291 | + | |
292 | + 7) The draft modes now no longer force a pagebreak after the title. | |
293 | + Thanks to Christian Peel for suggesting this change. | |
294 | + | |
295 | + 8) New draftclsnofoot mode is like draftcls, but does not display the | |
296 | + date and the word "DRAFT" at the foot of the page. Thanks to | |
297 | + Christian Peel for suggesting this feature. | |
298 | + | |
299 | + 9) New peerreview and peerreviewca modes with \IEEEpeerreviewmaketitle | |
300 | + command allows for a "cover" titlepage for anonymous peer review. | |
301 | + Except for the cover titlepage, peerreview is much like journal mode. | |
302 | + peerreviewca is like peerreview, but allows the author names to be | |
303 | + entered and formatted as under conference mode so that author | |
304 | + affiliations and contact information can be easily seen on the cover | |
305 | + page. Thanks to Eric Benedict for suggesting this feature. | |
306 | + | |
307 | + | |
308 | + | |
309 | +******* | |
310 | + 2002/08/13 V1.6 (MDS) changes: | |
311 | + | |
312 | + 1) Added conference mode via conference option. Defaults to the | |
313 | + traditional journal mode. e.g., \documentclass[conference]{IEEEtran} | |
314 | + | |
315 | + 2) Added support for A4 paper via new a4paper option. Pdflatex's paper | |
316 | + size lengths are now automatically set to the proper paper size being | |
317 | + used. | |
318 | + | |
319 | + 3) Revised margins again. Page text is now horizontally centered. | |
320 | + Conference mode increases the top and bottom margins with the bottom | |
321 | + margin being slightly larger. For A4 paper, the top margin and text | |
322 | + typesetting will not change from those of US letter paper, but the side | |
323 | + margins will be smaller and the bottom margin will be larger than that | |
324 | + of US letter. All per IEEE specs. | |
325 | + | |
326 | + 4) Fixed footnote line spacing anomaly in draft mode. | |
327 | + Thanks to Alberto Rodriguez for reporting this bug. | |
328 | + | |
329 | + Also, slightly revised footnote and \thanks note spacing. | |
330 | + Set \interfootnotelinepenalty=10000 to prevent LaTeX | |
331 | + from breaking footnotes across multiple pages or columns. | |
332 | + | |
333 | + 5) Fixed bug that caused overwritten photo areas and sometimes anomalous | |
334 | + spacing when a new paragraph was started within a biography. Also, | |
335 | + the presence of \par's, new lines or spaces at the beginning of | |
336 | + abstract, keywords, biography, or biographynophoto will no longer | |
337 | + affect the first word spacing. | |
338 | + Thanks to Eric Durant for reporting this bug. | |
339 | + | |
340 | + The biography environment now does a better job in preventing | |
341 | + a biography photo area from being broken across pages or columns. | |
342 | + | |
343 | + 6) Fixed whitespace between \cite entries bug. i.e., | |
344 | + both \cite{einstein24, knuth84} and \cite{einstein24,knuth84} | |
345 | + are now valid. \cite is now a robust command as it should be. | |
346 | + IEEEtran now no longer defines the old non-standard \shortcite or | |
347 | + \citename. | |
348 | + | |
349 | + The base IEEEtran.cls does not sort citation numbers or produce ranges | |
350 | + for three or more consecutive numbers. However, V1.6 of IEEEtran.cls | |
351 | + now pre-defines the following format control macros to facilitate easy | |
352 | + use with Donald Arseneau's cite.sty package (tested with cite.sty V3.9): | |
353 | + | |
354 | + \def\citepunct{], [} | |
355 | + \def\citedash{]--[} | |
356 | + | |
357 | + cite.sty is standard on most LaTeX sytems and can be obtained from | |
358 | + www.ctan.org. Thanks to Donald Arseneau for creating cite.sty, | |
359 | + providing the required format arguments to produce the IEEE style | |
360 | + and designing a cite interface capable of handling the IEEE citation | |
361 | + style. | |
362 | + | |
363 | + Note: Historically, IEEE has wanted authors to "hardcode" symbolics. | |
364 | + (i.e., replace all \cite{} with fixed [x]). However, it now seems that | |
365 | + most electronic manuscript submissions to IEEE are in .pdf format, and | |
366 | + as such, do not require the LaTeX document reference numbers to be hard | |
367 | + coded. If an author is required to submit actual LaTeX files, I do | |
368 | + recommend that the bibliography file (.bbl) be copied into the .tex | |
369 | + document and the \bibliographystyle{} and \bibliography{} commands be | |
370 | + commented out so that the .tex file does not depend on (potentially | |
371 | + lengthy and/or confidential) external bibliography database files | |
372 | + | |
373 | + 7) Adjusted some spacing parameters. The spacing above and below equations | |
374 | + has been revised (to a typical IEEE value). \jot now has a decent value. | |
375 | + The title text is now exactly 24pt. (On a related note, \fontsubfuzz has | |
376 | + been increased to 0.9pt to prevent annoying font substitution warnings | |
377 | + when using the Computer Modern fonts that use the 24.88pt size.) | |
378 | + In V1.6, \small is now 8.5pt in 9pt docs because \footnotesize is 8pt. | |
379 | + For 9pt docs, you should probably go ahead and use \footnotesize when | |
380 | + you need text a little smaller than \normalsize. | |
381 | + The interword spacing has been adjusted to be extremely close to that | |
382 | + which IEEE uses. You can use a new class option, nofonttune, if you need | |
383 | + to disable the adjusting of the interword spacing. This adjustment and | |
384 | + an increase to \hyphenpenalty have greatly reduced the amount of | |
385 | + hyphenation in a typical paper. | |
386 | + The baselineskip for the normalsize fonts has been tweaked to reduce | |
387 | + underfull vboxes on journal paper columns with only paragraphs. | |
388 | + Conference mode does the same thing but by also tweaking the \textheight | |
389 | + slightly off 9.25in (IEEE spec) to ensure an integer number of lines per | |
390 | + page. Draft (also draftcls) mode has also been revised to reduce | |
391 | + underfull vbox warnings. However, draft mode can still produce underfull | |
392 | + vboxes (a direct result of the increase in line spacing and margins) if: | |
393 | + A non-normalsize font occupies an entire column (abstract and index | |
394 | + terms take up a whole column by themselves); or the beginning of a | |
395 | + section occurs near the end of a column and cannot be squeezed into the | |
396 | + bottom, etc. This is normal as draft mode's liberal spacings cannot | |
397 | + guarantee perfect formatting. | |
398 | + | |
399 | + 8) New biographynophoto environment for biographies without photos. | |
400 | + Usage: | |
401 | + | |
402 | + \begin{biographynophoto}{author name} | |
403 | + biography text here | |
404 | + \end{biographynophoto} | |
405 | + | |
406 | + 9) Fixed bug that produced multiple table of contents entries for papers | |
407 | + with more than one biography. Also, biography now works better with | |
408 | + hyperref. | |
409 | + | |
410 | +10) New \sublargesize font size command provides for 11pt text in a 10pt | |
411 | + document. (Needed for things like author names.) For documents not | |
412 | + using 10pt normal size text, \sublargesize is currently identical | |
413 | + to \large. | |
414 | + | |
415 | +11) New \IEEEmembership command to provide correct font to indicate IEEE | |
416 | + membership for journal papers. | |
417 | + | |
418 | +12) Fixed author name line overflow problem when in journal mode. This | |
419 | + problem had been introduced in V1.5 in my rush to get \and to work for | |
420 | + conferences. \and is unneeded (and invalid) in journal mode. For | |
421 | + conference mode, \and will work as expected and features an optional | |
422 | + spacing argument. i.e., \and[\hspace{5ex}] | |
423 | + \and will default (recommended) to using \hfill which will result in | |
424 | + equal spacing between author blocks. | |
425 | + | |
426 | +13) New \authorblockN, \authorblockA and \authorrefmark commands to | |
427 | + facilitate easy formatting of author names, affiliations and cross | |
428 | + reference symbols, respectively, when in conference mode. These | |
429 | + three commands are to be used only for conference papers. | |
430 | + In conference mode, \author text is placed within a modified tabular | |
431 | + environment (somewhat like article.cls). So, within \author in | |
432 | + conference mode, you should not try to enclose multiple \\ within an | |
433 | + environment or command (other than the argument braces of | |
434 | + \authorblockX{}). For example: | |
435 | + | |
436 | + \author{\authorblockN{{John Doe \\ Jane Doe}}} % WRONG! | |
437 | + | |
438 | + will generate an error. | |
439 | + | |
440 | + Note that font size/attribute changes will now persists across \\ | |
441 | + within \author. (But, not across author blocks nor across \and.) | |
442 | + However, with the new commands, there should be no need to alter any | |
443 | + font attributes within \author. All text sizing and spacing within | |
444 | + \author{} and the author block commands is per IEEE specs for both | |
445 | + conference and journal modes. (In conference mode, the author names | |
446 | + are only very slightly larger than the affiliations which are in normal | |
447 | + size.) For specialized applications you can alter the justification of | |
448 | + author lines by placing \hfill at the beginning or at the end of a line. | |
449 | + The interline spacing within \author is determined by the font | |
450 | + attributes that are in effect at the end of each line within author. | |
451 | + | |
452 | +14) Because the titles and author name blocks use different font | |
453 | + sizes/styles from the main text, it was possible that two column papers | |
454 | + with titles that span both columns (standard journal and conference | |
455 | + papers, but not technotes) with certain numbers of lines for the title | |
456 | + and authors' name/affiliations can cause underfull vbox problems | |
457 | + (paragraphs with large spacings between them) in the second column of | |
458 | + the main text on the title page - if there were no new sections, | |
459 | + equations or figures in this column (they would provide some needed | |
460 | + rubber spacing). The use of things like special paper notices and | |
461 | + publisher ID marks also affected this issue. The problem could not | |
462 | + happen in the first column because the first column has a rubber length | |
463 | + around the heading of the first section. Furthermore, problems seldom | |
464 | + occurred on pages after the first as the margins had been chosen not to | |
465 | + cause it with the popular font sizes. Rubber lengths after the author | |
466 | + names would not fix this problem. | |
467 | + Auto-calculating a "good" spacing after the title is a tad difficult | |
468 | + to do in LaTeX. However, I am pleased to report that V1.6 has this new | |
469 | + capability - "dynamically determined title spacing". IEEEtran will now | |
470 | + measure the height of all the title and author text in \maketitle | |
471 | + and then calculate a rigid (non-rubber) spacer to follow that meets | |
472 | + IEEE specs and also produces a \textheight on the title page that | |
473 | + ensures an integer number of normalsized lines on the rest of the page. | |
474 | + Single column papers, and two column papers with the title entirely in | |
475 | + column one (technotes) do not need dynamic rigid spacing and therefore | |
476 | + use standard rubber spacers. | |
477 | + | |
478 | + Note: This problem can still crop up if you use floats that span both | |
479 | + columns (i.e., figure*). It has been a decade+ long limitation with | |
480 | + LaTeX that the stretchable portion of \dbltextfloatsep is ignored. | |
481 | + If you get a problem with underful vbox warnings and paragraphs that | |
482 | + "are pulled apart" on page with a float that spans both columns, tweak | |
483 | + the space between the figure and the main text a little: | |
484 | + | |
485 | + \vskip 5pt | |
486 | + \end{figure*} | |
487 | + | |
488 | + If you can't find a value that fixes both columns, you are going to | |
489 | + have to put a rubber spacer somewhere in one or both of the columns. | |
490 | +15) Because of change #14 above, those of you using \pubid will, as of V1.6, | |
491 | + have to place it *before* \maketitle in order for it have the intended | |
492 | + affect. The dynamic spacer algorithm must see if you are using \pubid | |
493 | + when \maketitle is called. \pubidadjcol works as before except that it | |
494 | + now has additional logic to prevent it from doing anything if \pubid | |
495 | + was never called. | |
496 | + | |
497 | +16) In some unusual, non-standard circumstances, an author may desire to | |
498 | + alter the spacing after the title area or put some unusual text above | |
499 | + the main text. For instance, to stop a bad break when a new section | |
500 | + occurs right at the start of the second page. This is difficult to do | |
501 | + when the title spans both columns of two column text since LaTeX treats | |
502 | + such title text as a type of float. A new command, | |
503 | + \IEEEaftertitletext{}, gives access to the end of that produced by | |
504 | + \maketitle. The types of things that can go into \IEEEaftertitletext | |
505 | + are the same as those into \twocolumn[] - no \par, but \\ are OK. There | |
506 | + is no restriction on the range of spacings that can be used. e.g., | |
507 | + \IEEEaftertitletext{\vspace{-100pt}} will push the main text well into | |
508 | + the title and \IEEEaftertitletext{\vspace{100pt}} will push it far down | |
509 | + the page. You will have complete control. If used, place | |
510 | + \IEEEaftertitletext{} before \maketitle like \title and \author. | |
511 | + IEEEtran's dynamic title spacing intentionally does not take into | |
512 | + consideration the contents of \IEEEaftertitletext{} when determining | |
513 | + the spacer after the title area (otherwise it would try to second | |
514 | + guess you), so the user will have manually adjust the height of the | |
515 | + contents in \IEEEaftertitletext{} if the problem discussed in #14 above | |
516 | + should develop. A safe bet is to keep the height of contents of | |
517 | + \IEEEaftertitletext{} to integer multiples of \baselineskip, e.g., | |
518 | + \IEEEaftertitletext{\vspace{-1\baselineskip}} | |
519 | + | |
520 | + Because it can result in an IEEE nonstandard format, the use of | |
521 | + \IEEEaftertitletext{} is discouraged. Possible uses include (1) the use | |
522 | + of IEEEtran for non-IEEE work with different title spacing requirements, | |
523 | + or (2) as an emergency manual override if a problem should develop in | |
524 | + IEEEtran's automatic spacing algorithm. | |
525 | + | |
526 | +17) completely rewritten \PARstart to: | |
527 | + a. no longer have problems when the user begins an environment | |
528 | + within the paragraph that uses \PARstart. | |
529 | + b. auto-detect and use the current font family | |
530 | + c. revise handling of the space at the end of the first word so that | |
531 | + interword glue will now work as normal. | |
532 | + d. produce correctly aligned edges for the (two) indented lines. | |
533 | + | |
534 | + Because the current font family is now auto-detected, there is no | |
535 | + longer any need for \CMPARstart - it is now the same as \PARstart. | |
536 | + | |
537 | +18) There is now a new "open box" Q.E.D. symbol (\QEDopen) as well as the | |
538 | + original default (\QED) closed one (\QEDclosed). Some journals use | |
539 | + the open form. To make \proof use the open form, just do: | |
540 | + \renewcommand{\QED}{\QEDopen} | |
541 | + | |
542 | +19) Additional \typeout{} notices added to warn the user when unusual | |
543 | + settings/commands are detected or as reminders to avoid common errors | |
544 | + when in conference mode. | |
545 | + | |
546 | +20) IEEEtran now provides \abovecaptionskip and \belowcaptionskip skip | |
547 | + registers because article class provides them and some packages | |
548 | + may error if they are missing. However, IEEEtran only uses | |
549 | + \abovecaptionskip for actual caption spacing. | |
550 | + | |
551 | +21) Fixed bug that prevented users from redefining the section headings | |
552 | + to use arabic digits. Thanks to Richardt H. Wilkinson for reporting | |
553 | + this bug. | |
554 | + | |
555 | +22) Code cleaned up to be more efficient with the use of TeX registers; | |
556 | + removed some old LaTeX 2.09 code; revised option processing to | |
557 | + LaTeX2e standard; eliminated unwanted "phantom" spaces in some | |
558 | + environments. | |
559 | + | |
560 | +23) Added new \IEEEeqnarray, \IEEEeqnarraybox, \IEEEeqnarrayboxm and | |
561 | + \IEEEeqnarrayboxt environments to provide superior alternatives to the | |
562 | + standard LaTeX \eqnarray, \array and \tabular. Additional new support | |
563 | + commands include \IEEEeqnarraydecl, \IEEEeqnarrayboxdecl, | |
564 | + \IEEEeqnarraymathstyle, \IEEEeqnarraytextstyle, \yesnumber. | |
565 | + \IEEEnonumber, \IEEEyesnumber, \IEEEyessubnumber, \IEEEeqnarraynumspace, | |
566 | + \IEEEeqnarraymulticol, \IEEEeqnarrayomit, \IEEEeqnarraydefcol, | |
567 | + \IEEEeqnarraydefcolsep, \IEEEeqnarrayseprow, \IEEEeqnarrayseprowcut, | |
568 | + \IEEEeqnarrayrulerow, \IEEEeqnarraydblrulerowcut, | |
569 | + \IEEEeqnarraystrutmode, \IEEEeqnarraystrutsize, | |
570 | + \IEEEeqnarraystrutsizeadd, \IEEEvisiblestrutstrue, | |
571 | + \IEEEvisiblestrutsfalse and \IEEEstrut. | |
572 | + These are documented in the user's guide. | |
573 | + | |
574 | +24) V1.6 changed back to using () around theorem names (which are also now | |
575 | + in italics) as this is what IEEE is using now. Thanks to Christian Peel | |
576 | + for reporting this. Also, when section numbers are used as the first | |
577 | + part of theorem numbers, display them in arabic, not Roman. | |
578 | + | |
579 | +25) New \IEEEtriggeratref{X} command allows a page break to be triggered | |
580 | + just before the given reference number "X". This is most useful when | |
581 | + balancing the columns on the last page and a \newpage between references | |
582 | + is desired. \IEEEtriggercmd{X} allows a different command to be executed | |
583 | + at trigger. | |
584 | + | |
585 | + | |
586 | + | |
587 | +******* | |
588 | + 2001/07/26 V1.5 (MDS) changes: | |
589 | + | |
590 | + | |
591 | + 1) Fixed \and within \author bug: (! Misplaced \crcr. \endtabular ->\crcr) | |
592 | + Thanks to Rainer Dorsch for discovering and reporting that \and | |
593 | + did not work. | |
594 | + | |
595 | + 2) Fixed the biography environment so that if a biography's text is shorter | |
596 | + than the area allocated for the photo, a collision with the next | |
597 | + biography does not occur. You can now put real graphics (using the | |
598 | + graphicx package) into the biography photo box with a new optional | |
599 | + argument of the biography command! For example: | |
600 | + | |
601 | + \begin{biography}[{\includegraphics[width=1in,height=1.25in,clip, | |
602 | + keepaspectratio]{./tux.eps}}]{Linux Penguin} | |
603 | + | |
604 | + will use the specified graphic as the author's photo. The photo area is | |
605 | + exactly 1in wide by 1.25in high - as is done in IEEE Transactions. Try | |
606 | + to keep the same 4:5 aspect ratio if scanning/cropping your photos. | |
607 | + Note the need for the extra set of enclosing braces around the | |
608 | + \includegraphics. Without it, The LaTeX parser may get confused when it | |
609 | + sees the \includegraphics's brackets within the biography's optional | |
610 | + argument. Due to the length of the \includegraphics command, you may | |
611 | + wish to define your own shorthand form of it. I have not done so with | |
612 | + IEEEtran to prevent dependence on the graphicx package. If you do not | |
613 | + use the optional argument, or leave it empty, a standard frame box | |
614 | + with the words "Place Photo Here" will be used. If you want the space | |
615 | + to remain completely empty, you can do: | |
616 | + | |
617 | + \begin{biography}[\mbox{}]{The Invisible Man} | |
618 | + | |
619 | + The interface to biography's optional argument is into a | |
620 | + 1in X 1.25in minipage in which the argument text is centered both | |
621 | + horizontally and vertically: | |
622 | + | |
623 | + \begin{minipage}[b][1.25in][c]{1in}% | |
624 | + \centering | |
625 | + #1% | |
626 | + \end{minipage} | |
627 | + | |
628 | + Within the biography environment, \unitlength is set to 1in. | |
629 | + With this in mind, you can even design your own custom frameboxes. | |
630 | + For instance: | |
631 | + | |
632 | + \begin{biography}[\framebox(1,1.25){\parbox[][\height | |
633 | + ][c]{0.9in}{\centering PLACE\\ PHOTO\\ | |
634 | + HERE}}]{Author Name} | |
635 | + | |
636 | + will yield the same type of result as the default photo box. | |
637 | + | |
638 | + Thanks to Herbert Voss for discovering the collision bug, suggesting | |
639 | + the ability to handle graphics and providing some prototype code. | |
640 | + | |
641 | + | |
642 | + | |
643 | +******* | |
644 | + 2001/03/15 V1.4 (MDS) changes: | |
645 | + | |
646 | + | |
647 | + 1) New "draftcls" and "final" options have been added. | |
648 | + Thanks to Dragan Cvetkovic for suggesting an option like draftcls. | |
649 | + | |
650 | + 2) Documentation changes to reflect the fact that this IEEEtran.cls | |
651 | + is no longer beta test. | |
652 | + | |
653 | + 3) Slightly revised caption sizes. Figure and table captions are now | |
654 | + in \footnotesize, not \small as before. | |
655 | + | |
656 | + 4) Allow user to control figure caption justification. IEEEtran.cls | |
657 | + normally defaults to left justified as is done in Transactions. | |
658 | + However, for conferences, you may wish to issue the command: | |
659 | + \centerfigcaptionstrue | |
660 | + in the preamble. Short (less than one line long) figure captions | |
661 | + will then be centered. Multi-line figure captions will always be | |
662 | + properly left justified. V1.6: This is already done for you when | |
663 | + using the conference mode. | |
664 | + | |
665 | + | |
666 | + | |
667 | +******* | |
668 | + 2001/01/18 V1.3 | |
669 | + Michael Shell (MDS) made extensive changes and additions: | |
670 | + | |
671 | + | |
672 | + BUGS FIXED (and many others too numerous to mention!): | |
673 | + 1) Fixed improper alignment with itemized, enumerated and | |
674 | + description lists. Added new controls to these three | |
675 | + environments so that it is easy to get the alignment IEEE | |
676 | + uses. Furthermore, the itemize, enumerate and description lists | |
677 | + no longer force a new paragraph to begin at the end the list | |
678 | + (\par). (Sometimes lists are used within paragraphs.) | |
679 | + | |
680 | + 2) JVH's fixes now allow things like $\mathbf{N}(0,P(0))$ | |
681 | + to work properly without needing the extra braces: | |
682 | + ${\mathbf{N}}(0,P(0))$. There is no longer any dependence | |
683 | + on the "rawfonts" and "oldlfont" packages. Thanks Juergen! | |
684 | + | |
685 | + 3) Fixed underfull hbox errors and incorrect reference number | |
686 | + alignment when the number of references in the bibliography | |
687 | + exceeded 9 entries (which is almost every paper!). | |
688 | + | |
689 | + 4) Removed dependence on the LaTeX sizexx.clo files. | |
690 | + Now, 9pt documents should work correctly even on systems that | |
691 | + lack a size9.clo file. This is most often used in conjunction | |
692 | + with the option "technote" for "correspondence" papers like those | |
693 | + in IEEE Transactions on Information Theory. For virtually all | |
694 | + other papers, 10pt is used and so it is the default. | |
695 | + Some improper font sizes have been corrected. \footnotesize is | |
696 | + now 8pt in 9pt docs, so footnotes in technotes should be the | |
697 | + correct size now. | |
698 | + | |
699 | + 5) Added \interlinepenalty within the bibliography section to discourage | |
700 | + LaTeX from breaking within a reference. IEEE almost never breaks within | |
701 | + a reference and when they do it is usually in technotes | |
702 | + (correspondence papers). You may get an underfull vbox warning in the | |
703 | + bibliography indicating that the spacing just before the "REFERENCES" | |
704 | + section is larger than normal, but the final result will be more like | |
705 | + what IEEE will publish. See the comments in the BIBLIOGRAPHY section | |
706 | + around line 2034 below if you want to change this behavior. | |
707 | + | |
708 | + 6) No longer "blows up" when you use \paragraph and have a table | |
709 | + of contents. | |
710 | + | |
711 | + 7) Theorem environment changed, (but for V1.6, back to the old way, sigh). | |
712 | + | |
713 | + 8) Figure captions adjusted: IEEE left (not center) justifies | |
714 | + figure captions (for journals) and does not indent figure caption text. | |
715 | + | |
716 | + 9) Adjusted some spacings in the table of contents(TOC))/list-of-figures/ | |
717 | + list-of-tables so that section/table numbers will not so easily | |
718 | + collide with the titles. Section VIII was usually the worst offender. | |
719 | + Still doesn't right justify the section numbers, but neither does | |
720 | + article.cls (This must be why LaTeX likes the x.y.z section numbering | |
721 | + scheme unlike I, II, III, etc. of IEEE. ) | |
722 | + It may be "normal" as it is (left justified). sigh. | |
723 | + | |
724 | +10) Now uses "index terms" now as a heading instead of "keywords". | |
725 | + Furthermore, the "index terms" and "abstract" headings are in bold | |
726 | + italic. This is how IEEE does things. | |
727 | + | |
728 | +11) \thebibliography and \biography now put entries into | |
729 | + the table of contents for you. | |
730 | + | |
731 | + | |
732 | +******* | |
733 | + | |
734 | + | |
735 | + | |
736 | + | |
737 | + ******* | |
738 | + 2000/09/06 (JVH) changes: (now designated as V1.2) | |
739 | + | |
740 | + made some corrections to get closer to LaTeX2e | |
741 | + 20000906 Juergen v.Hagen | |
742 | + vonhagen@ihefiji.etec.uni-karlsruhe.de | |
743 | + | |
744 | + Permission to redistribute granted as of December 2000. | |
745 | + ******* | |
746 | + | |
747 | + | |
748 | + | |
749 | + | |
750 | + | |
751 | + ******* | |
752 | + | |
753 | + 1996 (JWD) LaTeX2e version: (now designated as V1.1) | |
754 | + | |
755 | + In the most recent TeXhax digest, there was a request for a copy of | |
756 | + IEEEtrans.sty modified to work with LaTeX2e. I have a version I | |
757 | + modified to make it IEEEtrans.cls, which I have sent to the person | |
758 | + making the request and am now sending to you to consider posting to | |
759 | + the archives. | |
760 | + -- | |
761 | + Jon Dixon | |
762 | + dixonj@colorado.edu | |
763 | + http://spot.colorado.edu/~dixonj/ | |
764 | + | |
765 | +******* | |
766 | + | |
767 | + | |
768 | + | |
769 | + | |
770 | + | |
771 | +******* | |
772 | + | |
773 | + 30-August-1993 original LaTeX 2.09 version (IEEEtran.sty), | |
774 | + (now designated as V1.0): | |
775 | + | |
776 | + by Gerry Murray and Silvano Balemi | |
777 | + Automatic Control Lab, ETH Zurich, Switzerland | |
778 | + balemi@aut.ee.ethz.ch | |
779 | + | |
780 | +******* | |
781 | + | |
782 | + | |
783 | + | ... | ... |