summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/IEEEtran
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-01-02 22:56:16 +0000
committerKarl Berry <karl@freefriends.org>2013-01-02 22:56:16 +0000
commitf0cc716316bc05b757f8c652feab6205ac11e3f0 (patch)
tree6df995375b60faef22956479244f2932ebf53b08 /Master/texmf-dist/tex/latex/IEEEtran
parent77180107ed1f272af1f1e2f03469f7dbd996b602 (diff)
IEEEtran (2jan13)
git-svn-id: svn://tug.org/texlive/trunk@28697 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/IEEEtran')
-rw-r--r--Master/texmf-dist/tex/latex/IEEEtran/IEEEtran.cls593
-rw-r--r--Master/texmf-dist/tex/latex/IEEEtran/IEEEtrantools.sty389
2 files changed, 664 insertions, 318 deletions
diff --git a/Master/texmf-dist/tex/latex/IEEEtran/IEEEtran.cls b/Master/texmf-dist/tex/latex/IEEEtran/IEEEtran.cls
index 56817146a5b..5e2d1839b4c 100644
--- a/Master/texmf-dist/tex/latex/IEEEtran/IEEEtran.cls
+++ b/Master/texmf-dist/tex/latex/IEEEtran/IEEEtran.cls
@@ -1,8 +1,7 @@
%%
-%% IEEEtran.cls 2007/03/05 version V1.7a
+%% IEEEtran.cls 2012/12/27 version V1.8
%%
-%%
-%% This is the official IEEE LaTeX class for authors of the Institute of
+%% This is the IEEEtran LaTeX class for authors of the Institute of
%% Electrical and Electronics Engineers (IEEE) Transactions journals and
%% conferences.
%%
@@ -19,16 +18,16 @@
%% Contributors:
%% Gerry Murray (1993), Silvano Balemi (1993),
%% Jon Dixon (1996), Peter N"uchter (1996),
-%% Juergen von Hagen (2000), and Michael Shell (2001-2007)
+%% Juergen von Hagen (2000), and Michael Shell (2001-2012)
%%
%%
%% Copyright (c) 1993-2000 by Gerry Murray, Silvano Balemi,
%% Jon Dixon, Peter N"uchter,
%% Juergen von Hagen
%% and
-%% Copyright (c) 2001-2007 by Michael Shell
+%% Copyright (c) 2001-2012 by Michael Shell
%%
-%% Current maintainer (V1.3 to V1.7): Michael Shell
+%% Current maintainer (V1.3 to V1.8): Michael Shell
%% See:
%% http://www.michaelshell.org/
%% for current contact information.
@@ -141,8 +140,8 @@
% column mode is usually used only with draft papers.
% The default is twocolumn.
%
-% compsoc
-% Use the format of the IEEE Computer Society.
+% compsoc, transmag
+% Use the format of the IEEE Computer Society or IEEE Transactions on Magnetics
%
% romanappendices
% Use the "Appendix I" convention when numbering appendices. IEEEtran.cls
@@ -191,7 +190,7 @@
-\ProvidesClass{IEEEtran}[2007/03/05 V1.7a by Michael Shell]
+\ProvidesClass{IEEEtran}[2012/12/27 V1.8 by Michael Shell]
\typeout{-- See the "IEEEtran_HOWTO" manual for usage information.}
\typeout{-- http://www.michaelshell.org/tex/ieeetran/}
\NeedsTeXFormat{LaTeX2e}
@@ -204,7 +203,7 @@
% KEEP THESE AS INTEGERS! i.e., NO {4a} or anything like that-
% (no need to enumerate "a" minor changes here)
\def\IEEEtransversionmajor{1}
-\def\IEEEtransversionminor{7}
+\def\IEEEtransversionminor{8}
% These do nothing, but provide them like in article.cls
\newif\if@restonecol
@@ -235,6 +234,7 @@
\newif\ifCLASSOPTIONcaptionsoff \CLASSOPTIONcaptionsofffalse
\newif\ifCLASSOPTIONcompsoc \CLASSOPTIONcompsocfalse
+\newif\ifCLASSOPTIONtransmag \CLASSOPTIONtransmagfalse
\newif\ifCLASSOPTIONromanappendices \CLASSOPTIONromanappendicesfalse
@@ -328,7 +328,9 @@
\DeclareOption{captionsoff}{\CLASSOPTIONcaptionsofftrue}
-\DeclareOption{compsoc}{\CLASSOPTIONcompsoctrue}
+\DeclareOption{compsoc}{\CLASSOPTIONcompsoctrue\CLASSOPTIONtransmagfalse}
+
+\DeclareOption{transmag}{\CLASSOPTIONtransmagtrue\CLASSOPTIONcompsocfalse}
\DeclareOption{romanappendices}{\CLASSOPTIONromanappendicestrue}
@@ -778,6 +780,8 @@
% use the normal font baselineskip
% so that \topskip is unaffected by changes in \baselinestretch
\topskip=\@IEEEnormalsizeunitybaselineskip
+% V1.8 \maxdepth defaults to 4pt, but should be font size dependent
+\maxdepth=0.5\@IEEEnormalsizeunitybaselineskip
\textheight 58pc % 9.63in, 696pt
% Tweak textheight to a perfect integer number of lines/page.
% The normal baselineskip for each document point size is used
@@ -1303,7 +1307,7 @@
\ifnum\@listdepth>5\relax\@toodeep\else%
\advance\@itemdepth\@ne%
\edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
- % get the labelindentfactor for this level
+ % get the IEEElabelindentfactor for this level
\advance\@listdepth\@ne% we need to know what the level WILL be
\edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
\advance\@listdepth-\@ne% undo our increment
@@ -1332,9 +1336,9 @@
\IEEEiedlistdecl% let user alter parameters
#1\relax%
% If the user has requested not to use the
- % labelindent factor, don't revise \labelindent
+ % IEEElabelindent factor, don't revise \IEEElabelindent
\ifIEEEnolabelindentfactor\relax%
- \else\IEEElabelindent=\IEEElabelindentfactor\labelindent%
+ \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent%
\fi%
% Unless the user has requested otherwise,
% calculate our left margin based
@@ -1354,7 +1358,7 @@
\ifnum\@listdepth>5\relax\@toodeep\else%
\advance\@enumdepth\@ne%
\edef\@enumctr{enum\romannumeral\the\@enumdepth}%
- % get the labelindentfactor for this level
+ % get the IEEElabelindentfactor for this level
\advance\@listdepth\@ne% we need to know what the level WILL be
\edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
\advance\@listdepth-\@ne% undo our increment
@@ -1403,7 +1407,7 @@
% Note controlled spacing here, shield end of lines with %
\def\@@IEEEdescription[#1]{%
\ifnum\@listdepth>5\relax\@toodeep\else%
- % get the labelindentfactor for this level
+ % get the IEEElabelindentfactor for this level
\advance\@listdepth\@ne% we need to know what the level WILL be
\edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
\advance\@listdepth-\@ne% undo our increment
@@ -1498,9 +1502,9 @@
% draft mode. Here is a little LaTeX secret - \footnotesep
% determines the height of an invisible strut that is placed
% *above* the baseline of footnotes after the first. Since
-% LaTeX considers the space for characters to be 0.7/baselineskip
-% above the baseline and 0.3/baselineskip below it, we need to
-% use 0.7/baselineskip as a \footnotesep to maintain equal spacing
+% LaTeX considers the space for characters to be 0.7\baselineskip
+% above the baseline and 0.3\baselineskip below it, we need to
+% use 0.7\baselineskip as a \footnotesep to maintain equal spacing
% between all the lines of the footnotes. IEEE often uses a tad
% more, so use 0.8\baselineskip. This slightly larger value also helps
% the text to clear the footnote marks. Note that \thanks in IEEEtran
@@ -1673,11 +1677,13 @@
\let\l@table\l@figure
-%% Definitions for floats
-%%
-%% Normal Floats
-\floatsep 1\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
-\textfloatsep 1.7\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip
+% Definitions for floats
+%
+% Normal Floats
+% V1.8 floatsep et al. revised down by 0.15\baselineskip
+% to account for the sideeffects of \topskip compensation
+\floatsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
+\textfloatsep 1.55\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip
\@fptop 0pt plus 1fil
\@fpsep 0.75\baselineskip plus 2fil
\@fpbot 0pt plus 1fil
@@ -1687,10 +1693,10 @@
% V1.7, let top floats approach 90% of page
\def\textfraction{0.1}
-%% Double Column Floats
-\dblfloatsep 1\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
+% Double Column Floats
+\dblfloatsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
-\dbltextfloatsep 1.7\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip
+\dbltextfloatsep 1.55\baselineskip plus 0.2\baselineskip minus 0.4\baselineskip
% Note that it would be nice if the rubber here actually worked in LaTeX2e.
% There is a long standing limitation in LaTeX, first discovered (to the best
% of my knowledge) by Alan Jeffrey in 1992. LaTeX ignores the stretchable
@@ -1708,7 +1714,7 @@
\def\dblfloatpagefraction{0.8}
\setcounter{dbltopnumber}{4}
-\intextsep 1\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
+\intextsep 0.85\baselineskip plus 0.2\baselineskip minus 0.2\baselineskip
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4}
@@ -1732,6 +1738,23 @@
% as with LaTeX2e. Otherwise, there will be problems when using hyperref.
\def\@IEEEtablestring{table}
+
+% V1.8 compensate for \topskip so top of top figures align with tops of the first lines of main text
+% here we calculate a space equal to the amount \topskip exceeds the main text height
+% we hook in at \@floatboxreset
+\def\@IEEEfiguretopskipspace{\ifdim\prevdepth=-1000pt\relax
+\setlength{\@IEEEtrantmpdimenA}{1\topskip}\relax
+\addtolength{\@IEEEtrantmpdimenA}{-0.7\@IEEEnormalsizeunitybaselineskip}\relax
+\vspace*{\@IEEEtrantmpdimenA}\fi}
+% V1.8 compensate for \topskip at the top of top tables so caption text is on main text baseline
+% use a strut set on the caption baseline within \@makecaption
+\def\@IEEEtabletopskipstrut{\ifdim\prevdepth=-1000pt\rule{0pt}{\topskip}\fi}
+% the \ifdim\prevdepth checks are always expected to be true for IEEE style float caption ordering
+% because top of figure content and top of captions in tables is the first thing on the vertical
+% list of these floats
+% thanks to Donald Arseneau for his 2000/11/11 post "Re: caption hacking" with info on this topic.
+
+
\ifCLASSOPTIONcompsoc
% V1.7 compsoc \@makecaption
\ifCLASSOPTIONconference% compsoc conference
@@ -1739,56 +1762,57 @@
% test if is a for a figure or table
\ifx\@captype\@IEEEtablestring%
% if a table, do table caption
-\normalsize\begin{center}{\normalfont\sffamily\normalsize {#1.}~ #2}\end{center}%
+\normalsize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\sffamily\normalsize {#1.}\nobreakspace #2}\par\addvspace{0.5\baselineskip}\egroup%
\@IEEEtablecaptionsepspace
% if not a table, format it as a figure
\else
\@IEEEfigurecaptionsepspace
-\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}~ #2}%
+\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}\nobreakspace #2}%
\ifdim \wd\@tempboxa >\hsize%
% if caption is longer than a line, let it wrap around
-\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}~ }%
+\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}\nobreakspace}%
\parbox[t]{\hsize}{\normalfont\sffamily\normalsize \noindent\unhbox\@tempboxa#2}%
% if caption is shorter than a line, center
\else%
\hbox to\hsize{\normalfont\sffamily\normalsize\hfil\box\@tempboxa\hfil}%
\fi\fi}
+%
\else% nonconference compsoc
\long\def\@makecaption#1#2{%
% test if is a for a figure or table
\ifx\@captype\@IEEEtablestring%
% if a table, do table caption
-\normalsize\begin{center}{\normalfont\sffamily\normalsize #1}\\{\normalfont\sffamily\normalsize #2}\end{center}%
+\normalsize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\sffamily\normalsize #1}\\{\normalfont\sffamily\normalsize #2}\par\addvspace{0.5\baselineskip}\egroup%
\@IEEEtablecaptionsepspace
% if not a table, format it as a figure
\else
\@IEEEfigurecaptionsepspace
-\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}~ #2}%
+\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}\nobreakspace #2}%
\ifdim \wd\@tempboxa >\hsize%
% if caption is longer than a line, let it wrap around
-\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}~ }%
+\setbox\@tempboxa\hbox{\normalfont\sffamily\normalsize {#1.}\nobreakspace}%
\parbox[t]{\hsize}{\normalfont\sffamily\normalsize \noindent\unhbox\@tempboxa#2}%
% if caption is shorter than a line, left justify
\else%
\hbox to\hsize{\normalfont\sffamily\normalsize\box\@tempboxa\hfil}%
\fi\fi}
\fi
-
+%
\else% traditional noncompsoc \@makecaption
\long\def\@makecaption#1#2{%
% test if is a for a figure or table
\ifx\@captype\@IEEEtablestring%
% if a table, do table caption
-\footnotesize\begin{center}{\normalfont\footnotesize #1}\\{\normalfont\footnotesize\scshape #2}\end{center}%
+\footnotesize\bgroup\par\centering\@IEEEtabletopskipstrut{\normalfont\footnotesize #1}\\{\normalfont\footnotesize\scshape #2}\par\addvspace{0.5\baselineskip}\egroup%
\@IEEEtablecaptionsepspace
% if not a table, format it as a figure
\else
\@IEEEfigurecaptionsepspace
% 3/2001 use footnotesize, not small; use two nonbreaking spaces, not one
-\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}~~ #2}%
+\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace\nobreakspace #2}%
\ifdim \wd\@tempboxa >\hsize%
% if caption is longer than a line, let it wrap around
-\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}~~ }%
+\setbox\@tempboxa\hbox{\normalfont\footnotesize {#1.}\nobreakspace\nobreakspace}%
\parbox[t]{\hsize}{\normalfont\footnotesize\noindent\unhbox\@tempboxa#2}%
% if caption is shorter than a line, center if conference, left justify otherwise
\else%
@@ -1802,7 +1826,7 @@
% V1.7 disable captions class option, do so in a way that retains operation of \label
% within \caption
\ifCLASSOPTIONcaptionsoff
-\long\def\@makecaption#1#2{\vspace*{2em}\footnotesize\begin{center}{\footnotesize #1}\end{center}%
+\long\def\@makecaption#1#2{\vspace*{2em}\footnotesize\bgroup\par\addvspace{0.5\baselineskip}\centering{\footnotesize #1}\par\addvspace{0.5\baselineskip}\egroup%
\let\@IEEEtemporiglabeldefsave\label
\let\@IEEEtemplabelargsave\relax
\def\label##1{\gdef\@IEEEtemplabelargsave{##1}}%
@@ -1819,11 +1843,14 @@
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
-\def\fnum@figure{\figurename~\thefigure}
-\def\figure{\@float{figure}}
+\def\fnum@figure{\figurename\nobreakspace\thefigure}
+% V1.8 within figures add \@IEEEfiguretopskipspace compensation to LaTeX2e's \@floatboxreset
+\def\figure{\def\@floatboxreset{\reset@font\normalsize\@setminipage\@IEEEfiguretopskipspace}\@float{figure}}
\def\endfigure{\end@float}
-\@namedef{figure*}{\@dblfloat{figure}}
+% V1.8 also add \@IEEEfiguretopskipspace compensation to \figure*
+\@namedef{figure*}{\def\@floatboxreset{\reset@font\normalsize\@setminipage\@IEEEfiguretopskipspace}\@dblfloat{figure}}
\@namedef{endfigure*}{\end@dblfloat}
+
\newcounter{table}
\ifCLASSOPTIONcompsoc
\def\thetable{\arabic{table}}
@@ -1833,9 +1860,9 @@
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
-\def\fnum@table{\tablename~\thetable}
+\def\fnum@table{\tablename\nobreakspace\thetable}
% V1.6 IEEE uses 8pt text for tables
-% to default to footnotesize, we hack into LaTeX2e's \@floatboxreset and pray
+% within tables alter LaTeX2e's \@floatboxreset to use \footnotesize
\def\table{\def\@floatboxreset{\reset@font\footnotesize\@setminipage}\@float{table}}
\def\endtable{\end@float}
% v1.6b double column tables need to default to footnotesize as well.
@@ -1846,7 +1873,7 @@
%%
-%% START OF IEEEeqnarry DEFINITIONS
+%% START OF IEEEeqnarray DEFINITIONS
%%
%% Inspired by the concepts, examples, and previous works of LaTeX
%% coders and developers such as Donald Arseneau, Fred Bartlett,
@@ -1858,8 +1885,8 @@
% hook to allow easy changeover to IEEEtran.cls/tools.sty error reporting
\def\@IEEEclspkgerror{\ClassError{IEEEtran}}
-\newif\if@IEEEeqnarraystarform% flag to indicate if the environment was called as the star form
-\@IEEEeqnarraystarformfalse
+\newif\if@IEEEeqnarrayboxnojot% flag to indicate if the environment was called as the star form
+\@IEEEeqnarrayboxnojotfalse
\newif\if@advanceIEEEeqncolcnt% tracks if the environment should advance the col counter
% allows a way to make an \IEEEeqnarraybox that can be used within an \IEEEeqnarray
@@ -1880,43 +1907,116 @@
\def\IEEEeqnarraydecl{\relax}
\def\IEEEeqnarrayboxdecl{\relax}
+
+
+% V1.8 flags to indicate that equation numbering is to persist
+\newif\if@IEEEeqnumpersist%
+\@IEEEeqnumpersistfalse
+\newif\if@IEEEsubeqnumpersist%
+\@IEEEsubeqnumpersistfalse
+%
+% V1.8 flags to indicate if (sub)equation number of last line was preadvanced
+\newif\if@IEEEeqnumpreadv%
+\@IEEEeqnumpreadvfalse
+\newif\if@IEEEsubeqnumpreadv%
+\@IEEEsubeqnumpreadvfalse
+
+\newcount\@IEEEsubeqnnumrollback% saves previous value of IEEEsubequation number in case we need to restore it
+
% \yesnumber is the opposite of \nonumber
% a novel concept with the same def as the equationarray package
% However, we give IEEE versions too since some LaTeX packages such as
% the MDWtools mathenv.sty redefine \nonumber to something else.
+% This command is intended for use in non-IEEEeqnarray math environments
\providecommand{\yesnumber}{\global\@eqnswtrue}
-\def\IEEEyesnumber{\global\@eqnswtrue}
-\def\IEEEnonumber{\global\@eqnswfalse}
-\def\IEEEyessubnumber{\global\@IEEEissubequationtrue\global\@eqnswtrue%
-\if@IEEEeqnarrayISinner% only do something inside an IEEEeqnarray
-\if@IEEElastlinewassubequation\addtocounter{equation}{-1}\else\setcounter{IEEEsubequation}{1}\fi%
-\def\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\fi}
+% IEEEyes/nonumber
+% V1.8 add persistant * forms
+% These commands can alter the type of equation an IEEEeqnarray line is.
+\def\IEEEyesnumber{\@ifstar{\global\@IEEEeqnumpersisttrue\global\@IEEEsubeqnumpersistfalse\@IEEEyesnumber}{\@IEEEyesnumber}}
+
+\def\@IEEEyesnumber{\global\@eqnswtrue
+\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
+\ifnum\c@IEEEsubequation>0\relax
+ \stepcounter{equation}\setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
+\fi
+% even if we reached this eqn num via a preadv, it is legit now
+\global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse
+\fi}
+
+\def\IEEEnonumber{\@ifstar{\global\@IEEEeqnumpersistfalse\global\@IEEEsubeqnumpersistfalse\global\@eqnswfalse}{\global\@eqnswfalse}}
+
+
+\def\IEEEyessubnumber{\@ifstar{\global\@IEEEsubeqnumpersisttrue\@IEEEyessubnumber}{\@IEEEyessubnumber}}
+%
+\def\@IEEEyessubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
+ \ifnum\c@IEEEsubequation>0\relax% if it already is a subequation, we are good to go as-is
+ \else% if we are a regular equation we have to watch out for two cases
+ \if@IEEEeqnumpreadv% if this equation is the result of a preadvance, backout and bump the sub eqnnum
+ \global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\addtocounter{IEEEsubequation}{1}\relax
+ \else% non-preadvanced equations just need initialization of their sub eqnnum
+ \setcounter{IEEEsubequation}{1}\relax
+ \fi
+ \fi% fi already is subequation
+ \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
+ \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore
+ \global\@eqnswtrue
+\fi}
+
+
+\def\IEEEnosubnumber{\@ifstar{\global\@IEEEsubeqnumpersistfalse\@IEEEnosubnumber}{\@IEEEnosubnumber}}
+%
+\def\@IEEEnosubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
+ \if@eqnsw % we do nothing unless we know we will display because we play with the counters here
+ % if it currently is a subequation, bump up to the next equation number and turn off the subequation
+ \ifnum\c@IEEEsubequation>0\relax\addtocounter{equation}{1}\setcounter{IEEEsubequation}{0}\relax
+ \fi
+ \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore
+ \gdef\@currentlabel{\p@equation\theequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
+ \fi
+\fi}
+
-% flag to indicate that an equation is a sub equation
-\newif\if@IEEEissubequation%
-\@IEEEissubequationfalse
% allows users to "push away" equations that get too close to the equation numbers
-\def\IEEEeqnarraynumspace{\hphantom{\if@IEEEissubequation\theIEEEsubequationdis\else\theequationdis\fi}}
+\def\IEEEeqnarraynumspace{\hphantom{\ifnum\c@IEEEsubequation>0\relax\theIEEEsubequationdis\else\theequationdis\fi}}
% provides a way to span multiple columns within IEEEeqnarray environments
% will consider \if@advanceIEEEeqncolcnt before globally advancing the
% column counter - so as to work within \IEEEeqnarraybox
% usage: \IEEEeqnarraymulticol{number cols. to span}{col type}{cell text}
-\long\def\IEEEeqnarraymulticol#1#2#3{\multispan{#1}%
-% check if column is defined
-\relax\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined%
-\csname @IEEEeqnarraycolPRE#2\endcsname#3\relax\relax\relax\relax\relax%
-\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST#2\endcsname%
+\long\def\IEEEeqnarraymulticol#1#2#3{\multispan{#1}\relax
+% check if column is defined for the precolumn definition
+% We have to be careful here because TeX scans for & even within an \iffalse
+% where it does not expand macros. So, if we used only one \ifx and a #3
+% appeared in the false branch and the user inserted another alignment
+% structure that uses & in the \IEEEeqnarraymulticol{}, TeX will not see that
+% there is an inner alignment in the false branch yet still will see any &
+% there and will think that they apply to the outer alignment resulting in an
+% incomplete \ifx error.
+% So, here we use separate checks for the pre and post parts in order to keep
+% the #3 outside of all conditionals.
+\relax\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax
+\csname @IEEEeqnarraycolPRE#2\endcsname
\else% if not, error and use default type
\@IEEEclspkgerror{Invalid column type "#2" in \string\IEEEeqnarraymulticol.\MessageBreak
Using a default centering column instead}%
{You must define IEEEeqnarray column types before use.}%
-\csname @IEEEeqnarraycolPRE@IEEEdefault\endcsname#3\relax\relax\relax\relax\relax%
-\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST@IEEEdefault\endcsname%
-\fi%
+\csname @IEEEeqnarraycolPRE@IEEEdefault\endcsname
+\fi
+% The ten \relax are to help prevent misleading error messages in case a user
+% accidently inserted a macro that tries to acquire additional arguments.
+#3\relax\relax\relax\relax\relax\relax\relax\relax\relax\relax
+% check if column is defined for the postcolumn definition
+\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax
+\csname @IEEEeqnarraycolPOST#2\endcsname
+\else% if not, use the default type
+\csname @IEEEeqnarraycolPOST@IEEEdefault\endcsname
+\fi
% advance column counter only if the IEEEeqnarray environment wants it
\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by #1\relax\fi}
@@ -2376,11 +2476,15 @@ Using a default centering column instead}%
\baselineskip=0pt\lineskip=0pt\lineskiplimit=0pt\jot=0pt}
+% equation and subequation forms to use to setup hyperref's \@currentHref
+\def\@IEEEtheHrefequation{equation.\theHequation}
+\def\@IEEEtheHrefsubequation{equation.\theHequation\alph{IEEEsubequation}}
-\def\IEEEeqnarray{\@IEEEeqnarraystarformfalse\@IEEEeqnarray}
+
+\def\IEEEeqnarray{\@IEEEeqnumpersisttrue\@IEEEsubeqnumpersistfalse\@IEEEeqnarray}
\def\endIEEEeqnarray{\end@IEEEeqnarray}
-\@namedef{IEEEeqnarray*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarray}
+\@namedef{IEEEeqnarray*}{\@IEEEeqnumpersistfalse\@IEEEsubeqnumpersistfalse\@IEEEeqnarray}
\@namedef{endIEEEeqnarray*}{\end@IEEEeqnarray}
@@ -2391,12 +2495,19 @@ Using a default centering column instead}%
\def\@@IEEEeqnarray[#1]#2{%
% default to showing the equation number or not based on whether or not
% the star form was involked
- \if@IEEEeqnarraystarform\global\@eqnswfalse
+ \if@IEEEeqnumpersist\global\@eqnswtrue
\else% not the star form
- \global\@eqnswtrue
+ \global\@eqnswfalse
\fi% if star form
- \@IEEEissubequationfalse% default to no subequations
- \@IEEElastlinewassubequationfalse% assume last line is not a sub equation
+ % provide a basic hyperref \theHequation if this has not already been setup (hyperref not loaded, or no section counter)
+ \@ifundefined{theHequation}{\def\theHequation{\arabic{equation}}}{}\relax
+ % provide dummy hyperref commands in case hyperref is not loaded
+ \providecommand{\Hy@raisedlink}[1]{}\relax
+ \providecommand{\hyper@anchorstart}[1]{}\relax
+ \providecommand{\hyper@anchorend}{}\relax
+ \providecommand{\@currentHref}{}\relax
+ \@IEEEeqnumpreadvfalse% reset eqnpreadv flag
+ \@IEEEsubeqnumpreadvfalse% reset subeqnpreadv flag
\@IEEEeqnarrayISinnerfalse% not yet within the lines of the halign
\@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default
\@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise
@@ -2409,9 +2520,15 @@ Using a default centering column instead}%
\mathsurround\z@\relax% no extra spacing around math
\@advanceIEEEeqncolcnttrue% advance the col counter for each col the user uses,
% used in \IEEEeqnarraymulticol and in the preamble build
- \stepcounter{equation}% advance equation counter before first line
- \setcounter{IEEEsubequation}{0}% no subequation yet
+ %V1.8 Here we preadvance to the next equation number.
+ % If the user later wants a continued subequation, we can roll back.
+ \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation%
+ \stepcounter{equation}\@IEEEeqnumpreadvtrue% advance equation counter before first line
+ \setcounter{IEEEsubequation}{0}% no subequation yet
+ \let\@IEEEcurrentlabelsave\@currentlabel% save current label as we later change it globally
+ \let\@IEEEcurrentHrefsave\@currentHref% save current href label as we later change it globally
\def\@currentlabel{\p@equation\theequation}% redefine the ref label
+ \def\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
\IEEEeqnarraydecl\relax% allow a way for the user to make global overrides
#1\relax% allow user to override defaults
\let\\\@IEEEeqnarraycr% replace newline with one that can put in eqn. numbers
@@ -2439,19 +2556,19 @@ Using a default centering column instead}%
% enter isolation/strut column (or the next column if the user did not use
% every column), record the strut status, complete the columns, do the strut if needed,
-% restore counters to correct values and exit
-\def\end@IEEEeqnarray{\@IEEEeqnarrayglobalizestrutstatus&\@@IEEEeqnarraycr\egroup%
-\if@IEEElastlinewassubequation\global\advance\c@IEEEsubequation\m@ne\fi%
-\global\advance\c@equation\m@ne%
+% restore counters (to backout any equation setup for a next line that was never used)
+% to their correct values and exit
+\def\end@IEEEeqnarray{\@IEEEeqnarrayglobalizestrutstatus&\@@IEEEeqnarraycr\egroup
+\if@IEEEsubeqnumpreadv\global\advance\c@IEEEsubequation\m@ne\fi
+\if@IEEEeqnumpreadv\global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\fi
+\global\let\@currentlabel\@IEEEcurrentlabelsave% restore current label
+\global\let\@currentHref\@IEEEcurrentHrefsave% restore current href label
$$\@ignoretrue}
-% need a way to remember if last line is a subequation
-\newif\if@IEEElastlinewassubequation%
-\@IEEElastlinewassubequationfalse
% IEEEeqnarray uses a modifed \\ instead of the plain \cr to
% end rows. This allows for things like \\*[vskip amount]
-% This "cr" macros are modified versions those for LaTeX2e's eqnarray
+% These "cr" macros are modified versions of those for LaTeX2e's eqnarray
% the {\ifnum0=`} braces must be kept away from the last column to avoid
% altering spacing of its math, so we use & to advance to the next column
% as there is an isolation/strut column after the user's columns
@@ -2476,7 +2593,7 @@ $$\@ignoretrue}
\ifnum\@IEEEeqncolcnt>\@IEEEeqnnumcols\relax
\@IEEEclspkgerror{Too many columns within the IEEEeqnarray\MessageBreak
environment}%
- {Use fewer \string &'s or put more columns in the IEEEeqnarry column\MessageBreak
+ {Use fewer \string &'s or put more columns in the IEEEeqnarray column\MessageBreak
specifications.}\relax%
\else
\loop% add cols if the user did not use them all
@@ -2492,18 +2609,54 @@ $$\@ignoretrue}
\@IEEEeqnarrayinsertstrut% do the strut if needed
\@IEEEeqnarraystrutreset% reset the strut system for next line or IEEEeqnarray
&% and enter the equation number column
- % is this line needs an equation number, display it and advance the
- % (sub)equation counters, record what type this line was
- \if@eqnsw%
- \if@IEEEissubequation\theIEEEsubequationdis\addtocounter{equation}{1}\stepcounter{IEEEsubequation}%
- \global\@IEEElastlinewassubequationtrue%
- \else% display a standard equation number, initialize the IEEEsubequation counter
- \theequationdis\stepcounter{equation}\setcounter{IEEEsubequation}{0}%
- \global\@IEEElastlinewassubequationfalse\fi%
- \fi%
- % reset the eqnsw flag to indicate default preference of the display of equation numbers
- \if@IEEEeqnarraystarform\global\@eqnswfalse\else\global\@eqnswtrue\fi
- \global\@IEEEissubequationfalse% reset the subequation flag
+ \if@eqnsw% only if we display something
+ \Hy@raisedlink{\hyper@anchorstart{\@currentHref}}% start a hyperref anchor
+ \global\@IEEEeqnumpreadvfalse\relax% displaying an equation number means
+ \global\@IEEEsubeqnumpreadvfalse\relax% the equation counters point to valid equations
+ % V1.8 Here we setup the counters, currentlabel and status for what would be the *next*
+ % equation line as would be the case under the current settings. However, there are two problems.
+ % One problem is that there might not ever be a next line. The second problem is that the user
+ % may later alter the meaning of a line with commands such as \IEEEyessubnumber. So, to handle
+ % these cases we have to record the current values of the (sub)equation counters and revert back
+ % to them if the next line is changed or never comes. The \if@IEEEeqnumpreadv, \if@IEEEsubeqnumpreadv
+ % and \@IEEEsubeqnnumrollback stuff tracks this.
+ % The logic to handle all this is surprisingly complex, but a nice feature of the approach here is
+ % that the equation counters and labels remain valid for what the line would be unless a
+ % \IEEEyessubnumber et al. later changes it. So, any hyperref links are always correct.
+ \ifnum\c@IEEEsubequation>0\relax% handle subequation
+ \theIEEEsubequationdis\relax
+ \if@IEEEsubeqnumpersist% setup for default type of next line
+ \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax
+ \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
+ \else
+ % if no subeqnum persist, go ahead and setup for a new equation number
+ \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation
+ \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax
+ \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
+ \fi
+ \else% display a standard equation number
+ \theequationdis\relax
+ \setcounter{IEEEsubequation}{0}\relax% not really needed
+ \if@IEEEsubeqnumpersist% setup for default type of next line
+ % subequations that follow plain equations carry the same equation number e.g, 5, 5a rather than 5, 6a
+ \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax
+ \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
+ \else
+ % if no subeqnum persist, go ahead and setup for a new equation number
+ \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation
+ \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax
+ \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
+ \fi
+ \fi%
+ \Hy@raisedlink{\hyper@anchorend}% end hyperref anchor
+ \fi% fi only if we display something
+ % reset the flags to indicate the default preferences of the display of equation numbers
+ \if@IEEEeqnumpersist\global\@eqnswtrue\else\global\@eqnswfalse\fi
+ \if@IEEEsubeqnumpersist\global\@eqnswtrue\fi% ditto for the subequation flag
% reset the number of columns the user actually used
\global\@IEEEeqncolcnt\z@\relax
% the real end of the line
@@ -2527,21 +2680,21 @@ $$\@ignoretrue}
% natural width is the default.
% The * forms do not add \jot line spacing
% usage: \IEEEeqnarraybox[decl][pos][width]{cols}
-\def\IEEEeqnarrayboxm{\@IEEEeqnarraystarformfalse\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
+\def\IEEEeqnarrayboxm{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
\def\endIEEEeqnarrayboxm{\end@IEEEeqnarraybox}
-\@namedef{IEEEeqnarrayboxm*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
+\@namedef{IEEEeqnarrayboxm*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
\@namedef{endIEEEeqnarrayboxm*}{\end@IEEEeqnarraybox}
-\def\IEEEeqnarrayboxt{\@IEEEeqnarraystarformfalse\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
+\def\IEEEeqnarrayboxt{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
\def\endIEEEeqnarrayboxt{\end@IEEEeqnarraybox}
-\@namedef{IEEEeqnarrayboxt*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
+\@namedef{IEEEeqnarrayboxt*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
\@namedef{endIEEEeqnarrayboxt*}{\end@IEEEeqnarraybox}
-\def\IEEEeqnarraybox{\@IEEEeqnarraystarformfalse\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
+\def\IEEEeqnarraybox{\@IEEEeqnarrayboxnojotfalse\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
\@IEEEeqnarraybox}
\def\endIEEEeqnarraybox{\end@IEEEeqnarraybox}
-\@namedef{IEEEeqnarraybox*}{\@IEEEeqnarraystarformtrue\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
+\@namedef{IEEEeqnarraybox*}{\@IEEEeqnarrayboxnojottrue\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
\@IEEEeqnarraybox}
\@namedef{endIEEEeqnarraybox*}{\end@IEEEeqnarraybox}
@@ -2639,7 +2792,7 @@ $$\@ignoretrue}
% IEEEeqnarraybox does not automatically increase line spacing by \jot
\def\@IEEEeqnarrayboxXCR[#1]{\ifnum0=`{\fi}%
-\cr\noalign{\if@IEEEeqnarraystarform\else\vskip\jot\fi\vskip#1\relax}}
+\cr\noalign{\if@IEEEeqnarrayboxnojot\else\vskip\jot\fi\vskip#1\relax}}
@@ -2914,7 +3067,7 @@ between column types.}%
%%
-%% END OF IEEEeqnarry DEFINITIONS
+%% END OF IEEEeqnarray DEFINITIONS
%%
@@ -3053,8 +3206,9 @@ between column types.}%
%% that needs to be in lower case, for instance et. al., then either manually
%% set \leftmark and \rightmark or use \MakeLowercase{et. al.} within the
%% arguments to \markboth.
-\def\markboth#1#2{\def\leftmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{#1}}%
-\def\rightmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{#2}}}
+%% V1.7b add \protect to work with Babel
+\def\markboth#1#2{\def\leftmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{\protect#1}}%
+\def\rightmark{\@IEEEcompsoconly{\sffamily}\MakeUppercase{\protect#2}}}
\def\footernote#1{\markboth{#1}{#1}}
\def\today{\ifcase\month\or
@@ -3201,9 +3355,14 @@ between column types.}%
% the interline spacing is large enough to prevent \IEEEauthorrefmark{} from colliding
% with the text above.
% V1.7 make this a robust command
+% V1.8 transmag uses an arabic author affiliation symbol
+\ifCLASSOPTIONtransmag
+\DeclareRobustCommand*{\IEEEauthorrefmark}[1]{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize #1}}}
+\else
\DeclareRobustCommand*{\IEEEauthorrefmark}[1]{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or%
\mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger%
\or \ddagger\ddagger \else\textsuperscript{\expandafter\romannumeral#1}\fi}}}}
+\fi
% FONT CONTROLS AND SPACINGS FOR CONFERENCE MODE AUTHOR NAME AND AFFILIATION BLOCKS
@@ -3214,7 +3373,7 @@ between column types.}%
% The default if the user does not use an author block
\def\@IEEEauthordefaulttextstyle{\normalfont\@IEEEcompsocnotconfonly{\sffamily}\sublargesize}
-% spacing from title (or special paper notice) to author name blocks (confmode)
+% adjustment spacing from title (or special paper notice) to author name blocks (confmode)
% can be negative
\def\@IEEEauthorblockconfadjspace{-0.25em}
% compsoc conferences need more space here
@@ -3229,6 +3388,11 @@ between column types.}%
%\def\@IEEEauthorblockAtopspace{0.75ex}
\def\@IEEEauthorblockNtopspace{0.0ex}
\def\@IEEEauthorblockAtopspace{0.0ex}
+\ifCLASSOPTIONtransmag
+% transmag uses one line of space above first affiliation block
+\def\@IEEEauthorblockAtopspace{1\@IEEEnormalsizeunitybaselineskip}
+\fi
+
% baseline spacing within name and affiliation blocks (confmode)
% must be positive, spacings below certain values will make
% the position of line of text sensitive to the contents of the
@@ -3317,7 +3481,10 @@ between column types.}%
% input the author affiliations
#1%
% end the row if the user did not already
-\crcr}
+\crcr
+% V1.8 transmag does not use any additional affiliation spacing after the first author
+\ifCLASSOPTIONtransmag\gdef\@IEEEauthorblockAtopspace{0pt}\fi}
+
% spacer row for affiliations
\def\@IEEEauthorblockAtopspaceline{\cr\noalign{\vskip\@IEEEauthorblockAtopspace}}
@@ -3327,9 +3494,11 @@ between column types.}%
\ifCLASSOPTIONconference
\else
\ifCLASSOPTIONpeerreviewca\else
- % not conference or peerreviewca mode
- \def\IEEEauthorblockN#1{#1}%
- \def\IEEEauthorblockA#1{#1}%
+ % not conference, peerreviewca or transmag mode
+ \ifCLASSOPTIONtransmag\else
+ \def\IEEEauthorblockN#1{#1}%
+ \def\IEEEauthorblockA#1{#1}%
+ \fi
\fi
\fi
@@ -3383,7 +3552,10 @@ between column types.}%
\ifCLASSOPTIONpeerreviewca
\renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}%
\fi
-
+% V1.8 transmag uses conference author format
+\ifCLASSOPTIONtransmag
+\renewcommand{\and}[1][\hfill]{\end{@IEEEauthorhalign}#1\begin{@IEEEauthorhalign}}%
+\fi
% page clearing command
% based on LaTeX2e's \cleardoublepage, but allows different page styles
@@ -3432,21 +3604,25 @@ between column types.}%
-% V1.7 parbox to format \@IEEEcompsoctitleabstractindextext
-\long\def\@IEEEcompsoctitleabstractindextextbox#1{\parbox{0.915\textwidth}{#1}}
+% V1.8 parbox to format \@IEEEtitleabstractindextext
+\long\def\@IEEEtitleabstractindextextbox#1{\parbox{1\textwidth}{#1}}
+% V1.8 compsoc is partial width
+\ifCLASSOPTIONcompsoc
+\long\def\@IEEEtitleabstractindextextbox#1{\parbox{0.915\textwidth}{#1}}
+\fi
% formats the Title, authors names, affiliations and special paper notice
% THIS IS A CONTROLLED SPACING COMMAND! Do not allow blank lines or unintentional
% spaces to enter the definition - use % at the end of each line
\def\@maketitle{\newpage
-\begin{center}%
+\bgroup\par\addvspace{0.5\baselineskip}\centering%
\ifCLASSOPTIONtechnote% technotes
{\bfseries\large\@IEEEcompsoconly{\sffamily}\@title\par}\vskip 1.3em{\lineskip .5em\@IEEEcompsoconly{\sffamily}\@author
\@IEEEspecialpapernotice\par{\@IEEEcompsoconly{\vskip 1.5em\relax
- \@IEEEcompsoctitleabstractindextextbox{\@IEEEcompsoctitleabstractindextext}\par
+ \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par
\hfill\@IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
\else% not a technote
- \vskip0.2em{\Huge\@IEEEcompsoconly{\sffamily}\@IEEEcompsocconfonly{\normalfont\normalsize\vskip 2\@IEEEnormalsizeunitybaselineskip
+ \vskip0.2em{\Huge\ifCLASSOPTIONtransmag\bfseries\LARGE\fi\@IEEEcompsoconly{\sffamily}\@IEEEcompsocconfonly{\normalfont\normalsize\vskip 2\@IEEEnormalsizeunitybaselineskip
\bfseries\Large}\@title\par}\vskip1.0em\par%
% V1.6 handle \author differently if in conference mode
\ifCLASSOPTIONconference%
@@ -3458,16 +3634,25 @@ between column types.}%
{\@IEEEcompsoconly{\sffamily}\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
\mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par
{\@IEEEcompsoconly{\vskip 1.5em\relax
- \@IEEEcompsoctitleabstractindextextbox{\@IEEEcompsoctitleabstractindextext}\par\hfill
- \@IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
- \else% journal or peerreview
- {\lineskip.5em\@IEEEcompsoconly{\sffamily}\sublargesize\@author\@IEEEspecialpapernotice\par
- {\@IEEEcompsoconly{\vskip 1.5em\relax
- \@IEEEcompsoctitleabstractindextextbox{\@IEEEcompsoctitleabstractindextext}\par\hfill
+ \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\hfill
\@IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
+ \else% journal, peerreview or transmag
+ \ifCLASSOPTIONtransmag
+ % transmag also handles author names just like conference mode
+ % it also uses \@IEEEtitleabstractindextex, but with one line less
+ % space above, and one more below
+ {\@IEEEspecialpapernotice\mbox{}\vskip\@IEEEauthorblockconfadjspace%
+ \mbox{}\hfill\begin{@IEEEauthorhalign}\@author\end{@IEEEauthorhalign}\hfill\mbox{}\par
+ {\vspace{0.5\baselineskip}\relax\@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\vspace{-1\baselineskip}\par}}\relax
+ \else% journal or peerreview
+ {\lineskip.5em\@IEEEcompsoconly{\sffamily}\sublargesize\@author\@IEEEspecialpapernotice\par
+ {\@IEEEcompsoconly{\vskip 1.5em\relax
+ \@IEEEtitleabstractindextextbox{\@IEEEtitleabstractindextext}\par\hfill
+ \@IEEEcompsocdiamondline\hfill\hbox{}\par}}}\relax
+ \fi
\fi
\fi
-\fi\end{center}}
+\fi\par\addvspace{0.5\baselineskip}\egroup}
@@ -3537,9 +3722,9 @@ between column types.}%
\fi
% peerreview formats the repeated title like the title in journal papers.
-\def\@IEEEpeerreviewmaketitle{\begin{center}\@IEEEcompsoconly{\sffamily}%
+\def\@IEEEpeerreviewmaketitle{\bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEcompsoconly{\sffamily}%
\normalfont\normalsize\vskip0.2em{\Huge\@title\par}\vskip1.0em\par
-\end{center}}
+\par\addvspace{0.5\baselineskip}\egroup}
@@ -3666,19 +3851,27 @@ between column types.}%
\let\@IEEEaftertitletext=\relax
\long\def\IEEEaftertitletext#1{\def\@IEEEaftertitletext{#1}}
+
% V1.7 provide a way for users to enter abstract and keywords
% into the onecolumn title are. This text is compensated for
% in the dynamic sizer.
-\let\@IEEEcompsoctitleabstractindextext=\relax
-\long\def\IEEEcompsoctitleabstractindextext#1{\def\@IEEEcompsoctitleabstractindextext{#1}}
-% V1.7 provide a way for users to get the \@IEEEcompsoctitleabstractindextext if
-% not in compsoc journal mode - this way abstract and keywords can be placed
-% in their conventional position if not in compsoc mode.
-\def\IEEEdisplaynotcompsoctitleabstractindextext{%
-\ifCLASSOPTIONcompsoc% display if compsoc conf
-\ifCLASSOPTIONconference\@IEEEcompsoctitleabstractindextext\fi
-\else% or if not compsoc
-\@IEEEcompsoctitleabstractindextext\fi}
+\let\@IEEEtitleabstractindextext=\relax
+\long\def\IEEEtitleabstractindextext#1{\def\@IEEEtitleabstractindextext{#1}}
+% V1.7 provide a way for users to get the \@IEEEtitleabstractindextext if
+% not in compsoc or transmag journal mode - this way abstract and keywords
+% can still be placed in their conventional position if not in those modes.
+\def\IEEEdisplaynontitleabstractindextext{%
+% display for all conference formats
+\ifCLASSOPTIONconference\@IEEEtitleabstractindextext\relax
+\else% non-conferences
+ \ifCLASSOPTIONcompsoc% display if not compsoc and not transmag
+ \else
+ \ifCLASSOPTIONtransmag
+ \else% not compsoc journal nor transmag journal
+ \@IEEEtitleabstractindextext\relax
+ \fi
+ \fi
+\fi}
% command to allow alteration of baselinestretch, but only if the current
@@ -3710,7 +3903,7 @@ between column types.}%
\if@twocolumn
\@IEEEabskeysecsize\bfseries\textit{\abstractname}---\relax
\else
- \begin{center}\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\end{center}\quotation\@IEEEabskeysecsize
+ \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
\fi\@IEEEgobbleleadPARNLSP}
% V1.6 IEEE wants only 1 pica from end of abstract to introduction heading when in
% conference mode (the heading already has this much above it)
@@ -3721,7 +3914,7 @@ between column types.}%
\if@twocolumn
\@IEEEabskeysecsize\bfseries\textit{\IEEEkeywordsname}---\relax
\else
- \begin{center}\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\end{center}\quotation\@IEEEabskeysecsize
+ \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
\fi\@IEEEgobbleleadPARNLSP}
\def\endIEEEkeywords{\relax\ifCLASSOPTIONtechnote\vspace{1.34ex}\else\vspace{0.67ex}\fi
\par\if@twocolumn\else\endquotation\fi%
@@ -3731,11 +3924,11 @@ between column types.}%
\ifCLASSOPTIONcompsoc
\ifCLASSOPTIONconference% compsoc conference
\def\abstract{\normalfont
- \begin{center}\@IEEEabskeysecsize\textbf{\large\abstractname}\end{center}\vskip 0.5\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip
+ \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\large\abstractname}\par\addvspace{0.5\baselineskip}\egroup\vskip 0.5\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip
\if@twocolumn\else\quotation\fi\itshape\@IEEEabskeysecsize%
\par\@IEEEgobbleleadPARNLSP}
\def\IEEEkeywords{\normalfont\vskip 1.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip
- \begin{center}\@IEEEabskeysecsize\textbf{\large\IEEEkeywordsname}\end{center}\vskip 0.5\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip
+ \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\large\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\vskip 0.5\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip
\if@twocolumn\else\quotation\fi\itshape\@IEEEabskeysecsize%
\par\@IEEEgobbleleadPARNLSP}
\else% compsoc not conference
@@ -3743,18 +3936,38 @@ between column types.}%
\if@twocolumn
\@IEEEabskeysecsize\noindent\textbf{\abstractname}---\relax
\else
- \begin{center}\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\end{center}\quotation\@IEEEabskeysecsize%
+ \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize\textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize%
\fi\@IEEEgobbleleadPARNLSP}
\def\IEEEkeywords{\normalfont\@IEEEtweakunitybaselinestretch{1.15}\sffamily
\if@twocolumn
\@IEEEabskeysecsize\vskip 0.5\baselineskip plus 0.25\baselineskip minus 0.25\baselineskip\noindent
\textbf{\IEEEkeywordsname}---\relax
\else
- \begin{center}\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\end{center}\quotation\@IEEEabskeysecsize%
+ \bgroup\par\addvspace{0.5\baselineskip}\centering\@IEEEabskeysecsize\textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize%
\fi\@IEEEgobbleleadPARNLSP}
\fi
\fi
+% V1.8 transmag keywords index terms
+% no abstract name, use indentation
+\ifCLASSOPTIONtransmag
+\def\abstract{\normalfont\parindent 1em\relax
+ \if@twocolumn
+ \@IEEEabskeysecsize\bfseries\indent
+ \else
+ \bgroup\par\addvspace{0.5\baselineskip}\centering\vspace{-1.78ex}\@IEEEabskeysecsize
+ \textbf{\abstractname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
+ \fi\@IEEEgobbleleadPARNLSP}
+
+\def\IEEEkeywords{\normalfont\parindent 1em\relax
+ \if@twocolumn
+ \@IEEEabskeysecsize\vspace{1\baselineskip}\bfseries\indent\textit{\IEEEkeywordsname}---\relax
+ \else
+ \bgroup\par\vspace{1\baselineskip}\centering\@IEEEabskeysecsize
+ \textbf{\IEEEkeywordsname}\par\addvspace{0.5\baselineskip}\egroup\quotation\@IEEEabskeysecsize
+ \fi\@IEEEgobbleleadPARNLSP}
+\fi
+
% gobbles all leading \, \\ and \par, upon finding first token that
@@ -3918,7 +4131,13 @@ between column types.}%
{0ex}{\normalfont\normalsize}}%
\fi\fi
-
+% transmag
+\ifCLASSOPTIONtransmag
+\def\subsection{\@startsection{subsection}{2}{0.75\parindent}{3.5ex plus 1.5ex minus 1.5ex}%
+{0.7ex plus .5ex minus 0ex}{\normalfont\normalsize\itshape}}%
+\def\subsubsection{\@startsection{subsubsection}{3}{1.25\parindent}{0.1ex plus 0.1ex minus 0.1ex}%
+{0.1ex}{\normalfont\normalsize\itshape}}%
+\fi
%% ENVIRONMENTS
@@ -3932,21 +4151,34 @@ between column types.}%
\def\IEEEQED{\IEEEQEDclosed} % otherwise default to closed
\fi
+%V1.8 flag to indicate if QED symbol is to be shown
+\newif\if@IEEEQEDshow \@IEEEQEDshowtrue
+\def\IEEEproofindentspace{2\parindent}% V1.8 allow user to change indentation amount if desired
% v1.7 name change to avoid namespace collision with amsthm. Also add support
% for an optional argument.
\def\IEEEproof{\@ifnextchar[{\@IEEEproof}{\@IEEEproof[\IEEEproofname]}}
-\def\@IEEEproof[#1]{\par\noindent\hspace{2em}{\itshape #1: }}
-\def\endIEEEproof{\hspace*{\fill}~\IEEEQED\par}
+\def\@IEEEproof[#1]{\@IEEEQEDshowtrue\par\noindent\hspace{\IEEEproofindentspace}{\itshape #1: }}
+\def\endIEEEproof{\if@IEEEQEDshow\hspace*{\fill}\nobreakspace\IEEEQED\fi\par}
+% qedhere for equation environments, similar to AMS \qedhere
+\def\IEEEQEDhereeqn{\global\@IEEEQEDshowfalse\eqno\let\eqno\relax\let\leqno\relax
+ \let\veqno\relax\hbox{\IEEEQED}}
+% IEEE style qedhere for IEEEeqnarray and other environments
+\def\IEEEQEDhere{\global\@IEEEQEDshowfalse\IEEEQED}
+% command to disable QED at end of IEEEproof
+\def\IEEEQEDoff{\global\@IEEEQEDshowfalse}
%\itemindent is set to \z@ by list, so define new temporary variable
\newdimen\@IEEEtmpitemindent
-\def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\topsep 0pt\rmfamily\trivlist%
- \item[\hskip \labelsep{\indent\itshape #1\ #2:}]\itemindent\@IEEEtmpitemindent}
-\def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\topsep 0pt\rmfamily \trivlist%
+
+% V1.8 allow long theorem names to break across lines.
+% Thanks to Miquel Payaro for reporting this.
+\def\@begintheorem#1#2{\@IEEEtmpitemindent\itemindent\relax\topsep 0pt\rmfamily\trivlist%
+ \item[]\textit{\indent #1\ #2:} \itemindent\@IEEEtmpitemindent\relax}
+\def\@opargbegintheorem#1#2#3{\@IEEEtmpitemindent\itemindent\relax\topsep 0pt\rmfamily \trivlist%
% V1.6 IEEE is back to using () around theorem names which are also in italics
% Thanks to Christian Peel for reporting this.
- \item[\hskip\labelsep{\indent\itshape #1\ #2\ (#3):}]\itemindent\@IEEEtmpitemindent}
+ \item[]\textit{\indent #1\ #2\ (#3):} \itemindent\@IEEEtmpitemindent\relax}
% V1.7 remove bogus \unskip that caused equations in theorems to collide with
% lines below.
\def\@endtheorem{\endtrivlist}
@@ -4057,10 +4289,10 @@ between column types.}%
% note we reroute the call to the old \section*
\def\@IEEEprocessthesectionargument#1{%
\@ifmtarg{#1}{%
-\@IEEEappendixsavesection*{\appendixname~\thesectiondis}%
-\addcontentsline{toc}{section}{\appendixname~\thesection}}{%
-\@IEEEappendixsavesection*{\appendixname~\thesectiondis \\* #1}%
-\addcontentsline{toc}{section}{\appendixname~\thesection: #1}}}
+\@IEEEappendixsavesection*{\appendixname\nobreakspace\thesectiondis}%
+\addcontentsline{toc}{section}{\appendixname\nobreakspace\thesection}}{%
+\@IEEEappendixsavesection*{\appendixname\nobreakspace\thesectiondis\\* #1}%
+\addcontentsline{toc}{section}{\appendixname\nobreakspace\thesection: #1}}}
% we use this if the user calls \section{} after
% \appendix-- which has no meaning. So, we ignore the
@@ -4094,7 +4326,7 @@ between column types.}%
\refstepcounter{section}% update the \ref counter
\@ifmtarg{#1}{\@IEEEappendixsavesection*{\appendixname}%
\addcontentsline{toc}{section}{\appendixname}}{%
- \@IEEEappendixsavesection*{\appendixname~\\* #1}%
+ \@IEEEappendixsavesection*{\appendixname\nobreakspace\\* #1}%
\addcontentsline{toc}{section}{\appendixname: #1}}%
% redefine \section command for appendix
% leave \section* as is
@@ -4651,49 +4883,44 @@ between column types.}%
Use \@IEEEbackslash #2 instead.}}
-% provide for legacy commands
+% provide some legacy IEEEtran commands
\def\authorblockA{\@IEEElegacywarn{authorblockA}{IEEEauthorblockA}\IEEEauthorblockA}
\def\authorblockN{\@IEEElegacywarn{authorblockN}{IEEEauthorblockN}\IEEEauthorblockN}
\def\authorrefmark{\@IEEElegacywarn{authorrefmark}{IEEEauthorrefmark}\IEEEauthorrefmark}
\def\PARstart{\@IEEElegacywarn{PARstart}{IEEEPARstart}\IEEEPARstart}
\def\pubid{\@IEEElegacywarn{pubid}{IEEEpubid}\IEEEpubid}
\def\pubidadjcol{\@IEEElegacywarn{pubidadjcol}{IEEEpubidadjcol}\IEEEpubidadjcol}
-\def\QED{\@IEEElegacywarn{QED}{IEEEQED}\IEEEQED}
-\def\QEDclosed{\@IEEElegacywarn{QEDclosed}{IEEEQEDclosed}\IEEEQEDclosed}
-\def\QEDopen{\@IEEElegacywarn{QEDopen}{IEEEQEDopen}\IEEEQEDopen}
\def\specialpapernotice{\@IEEElegacywarn{specialpapernotice}{IEEEspecialpapernotice}\IEEEspecialpapernotice}
-
-
-
-% provide for legacy environments
-\def\biography{\@IEEElegacywarn{biography}{IEEEbiography}\IEEEbiography}
-\def\biographynophoto{\@IEEElegacywarn{biographynophoto}{IEEEbiographynophoto}\IEEEbiographynophoto}
+\def\IEEEcompsoctitleabstractindextext{\@IEEElegacywarn{IEEEcompsoctitleabstractindextext}{IEEEtitleabstractindextext}\IEEEtitleabstractindextext}
+\def\IEEEdisplaynotcompsoctitleabstractindextext{\@IEEElegacywarn{IEEEdisplaynotcompsoctitleabstractindextext}{IEEEdisplaynontitleabstractindextext}\IEEEdisplaynontitleabstractindextext}
+% provide some legacy IEEEtran environments
\def\keywords{\@IEEElegacywarn{keywords}{IEEEkeywords}\IEEEkeywords}
-\def\endbiography{\endIEEEbiography}
-\def\endbiographynophoto{\endIEEEbiographynophoto}
\def\endkeywords{\endIEEEkeywords}
-% provide for legacy IED commands/lengths when possible
-\let\labelindent\IEEElabelindent
-\def\calcleftmargin{\@IEEElegacywarn{calcleftmargin}{IEEEcalcleftmargin}\IEEEcalcleftmargin}
-\def\setlabelwidth{\@IEEElegacywarn{setlabelwidth}{IEEEsetlabelwidth}\IEEEsetlabelwidth}
-\def\usemathlabelsep{\@IEEElegacywarn{usemathlabelsep}{IEEEusemathlabelsep}\IEEEusemathlabelsep}
-\def\iedlabeljustifyc{\@IEEElegacywarn{iedlabeljustifyc}{IEEEiedlabeljustifyc}\IEEEiedlabeljustifyc}
-\def\iedlabeljustifyl{\@IEEElegacywarn{iedlabeljustifyl}{IEEEiedlabeljustifyl}\IEEEiedlabeljustifyl}
-\def\iedlabeljustifyr{\@IEEElegacywarn{iedlabeljustifyr}{IEEEiedlabeljustifyr}\IEEEiedlabeljustifyr}
-
-
-
-% let \proof use the IEEEtran version even after amsthm is loaded
-% \proof is now deprecated in favor of \IEEEproof
-\AtBeginDocument{\def\proof{\@IEEElegacywarn{proof}{IEEEproof}\IEEEproof}\def\endproof{\endIEEEproof}}
-
-% V1.7 \overrideIEEEmargins is no longer supported.
-\def\overrideIEEEmargins{%
-\typeout{** WARNING: \string\overrideIEEEmargins \space no longer supported (line \the\inputlineno).}%
-\typeout{** Use the \string\CLASSINPUTinnersidemargin, \string\CLASSINPUToutersidemargin \space controls instead.}}
+% V1.8 no more support for legacy IED list commands
+%\let\labelindent\IEEElabelindent
+%\def\calcleftmargin{\@IEEElegacywarn{calcleftmargin}{IEEEcalcleftmargin}\IEEEcalcleftmargin}
+%\def\setlabelwidth{\@IEEElegacywarn{setlabelwidth}{IEEEsetlabelwidth}\IEEEsetlabelwidth}
+%\def\usemathlabelsep{\@IEEElegacywarn{usemathlabelsep}{IEEEusemathlabelsep}\IEEEusemathlabelsep}
+%\def\iedlabeljustifyc{\@IEEElegacywarn{iedlabeljustifyc}{IEEEiedlabeljustifyc}\IEEEiedlabeljustifyc}
+%\def\iedlabeljustifyl{\@IEEElegacywarn{iedlabeljustifyl}{IEEEiedlabeljustifyl}\IEEEiedlabeljustifyl}
+%\def\iedlabeljustifyr{\@IEEElegacywarn{iedlabeljustifyr}{IEEEiedlabeljustifyr}\IEEEiedlabeljustifyr}
+% V1.8 no more support for QED and proof stuff
+%\def\QED{\@IEEElegacywarn{QED}{IEEEQED}\IEEEQED}
+%\def\QEDclosed{\@IEEElegacywarn{QEDclosed}{IEEEQEDclosed}\IEEEQEDclosed}
+%\def\QEDopen{\@IEEElegacywarn{QEDopen}{IEEEQEDopen}\IEEEQEDopen}
+%\AtBeginDocument{\def\proof{\@IEEElegacywarn{proof}{IEEEproof}\IEEEproof}\def\endproof{\endIEEEproof}}
+% V1.8 no longer support biography or biographynophoto
+%\def\biography{\@IEEElegacywarn{biography}{IEEEbiography}\IEEEbiography}
+%\def\biographynophoto{\@IEEElegacywarn{biographynophoto}{IEEEbiographynophoto}\IEEEbiographynophoto}
+%\def\endbiography{\endIEEEbiography}
+%\def\endbiographynophoto{\endIEEEbiographynophoto}
+% V1.7 and later no longer supports \overrideIEEEmargins
+%\def\overrideIEEEmargins{%
+%\typeout{** WARNING: \string\overrideIEEEmargins \space no longer supported (line \the\inputlineno).}%
+%\typeout{** Use the \string\CLASSINPUTinnersidemargin, \string\CLASSINPUToutersidemargin \space controls instead.}}
\endinput
diff --git a/Master/texmf-dist/tex/latex/IEEEtran/IEEEtrantools.sty b/Master/texmf-dist/tex/latex/IEEEtran/IEEEtrantools.sty
index 76ce3930c07..7f09bc81b60 100644
--- a/Master/texmf-dist/tex/latex/IEEEtran/IEEEtrantools.sty
+++ b/Master/texmf-dist/tex/latex/IEEEtran/IEEEtrantools.sty
@@ -1,13 +1,14 @@
%%
-%% IEEEtrantools.sty 2007/01/11 version V1.2
+%% IEEEtrantools.sty 2012/12/27 version V1.3
%%
%%
%% This package provides several popular and unique commands from the
-%% IEEEtran.cls class (version 1.7) file.
+%% IEEEtran.cls class (version 1.8) file.
%%
%% The provided commands include \IEEEPARstart, \IEEEitemize, \IEEEenumerate,
%% \IEEEdescription as well as the \IEEEeqnarray, \IEEEeqnarraybox family
-%% of commands including support commands such as \IEEEstrut.
+%% of commands including support commands such as \IEEEstrut, the IEEEproof
+%% environment and its support commands and the \IEEEauthorrefmark command.
%% Also provides the \bstctlcite command for the control entry types of
%% IEEEtran.bst V1.00 and later.
%%
@@ -18,7 +19,7 @@
%% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/
%%
%%
-%% Copyright (c) 2002-2007 by Michael Shell
+%% Copyright (c) 2002-2012 by Michael Shell
%% See: http://www.michaelshell.org/
%% for current contact information.
%%
@@ -50,75 +51,36 @@
%%
%%
%%
-%% Available package options (e.g., \usepackage[retainorgcmds]{IEEEtrantools}
+%% Available package options (e.g., \usepackage[redeflists]{IEEEtrantools}
%%
-%% retainorgcmds
-%% Prevents IEEEtrantools from overriding existing LaTeX commands.
-%% Currently, the only effect is to preserve the original definitions
-%% of itemize, enumerate and description. The IEEEtran versions are
-%% always available as IEEEitemize, IEEEenumerate and IEEEdescription.
+%% redeflists
+%% Causes IEEEtrantools to redefine the standard itemize, enumerate and
+%% description (IED) list environments to their IEEE versions.
+%% IEEEitemize, IEEEenumerate and IEEEdescription remain available in any
+%% case. This option may not be compatible with packages that alter the
+%% standard IED list environments.
+%%
%%
-%%*******
-% 1/2007 V1.2 (V1.7 of IEEEtran.cls) changes:
-%
-% 1) Several commands and environments have depreciated in favor of
-% replacements with IEEE prefixes to better avoid potential future name
-% clashes with other packages. Legacy code retained to allow
-% use of the obsolete forms, but with an warning message to the
-% console during compilation:
-% \IEEEPARstart
-% For IED lists:
-% \IEEEiedlabeljustifyc, \IEEEiedlabeljustifyl, \IEEEiedlabeljustifyr,
-% \IEEEnocalcleftmargin, \IEEElabelindent, \IEEEsetlabelwidth,
-% \IEEEusemathlabelsep
-%
-% 2) These commands/lengths now require the IEEE prefix and do not have
-% legacy support: \IEEEnormaljot.
-% For IED lists: \ifIEEEnocalcleftmargin, \ifIEEEnolabelindentfactor,
-% \IEEEiedlistdecl, \IEEElabelindentfactor
-%
-% 3) \normalsizebaselineskip no longer provided.
-%
-% 4) New \IEEEPARstart controls:
-% \IEEEPARstartHEIGHTTEXT, \IEEEPARstartFONTSTYLE, \IEEEPARstartCAPSTYLE,
-% \IEEEPARstartWORDFONTSTYLE, \IEEEPARstartWORDCAPSTYLE,
-% \IEEEPARstartHOFFSET, \IEEEPARstartITLCORRECT
-% and the (output) length \IEEEPARstartletwidth.
-%
-% 5) Provide for an optional argument to \bstctlcite to provide a way to
-% specify a different aux file.
-%
-%
-% 11/2002 V1.1 (V1.6b of IEEEtran.cls) changes:
-%
-% 1) In addition to the IEEE IED lists, the original LaTeX IED style list
-% environments are now preserved as LaTeXitemize, LaTeXenumerate, and
-% LaTeXdescription. Also, users can now redefine \makelabel within
-% IEEE IED list controls. There may be some use for these in specialized
-% applications. Thanks to Eli Barzilay for suggesting this feature.
-%
%%**********************************************************************
-\ProvidesPackage{IEEEtrantools}[2007/01/11 V1.2 by Michael Shell]
+\ProvidesPackage{IEEEtrantools}[2012/12/27 V1.3 by Michael Shell]
\typeout{-- See the "IEEEtrantools_doc.txt" manual for usage information.}
\typeout{-- http://www.michaelshell.org/tex/ieeetran/tools/}
\NeedsTeXFormat{LaTeX2e}
-% If IEEEtran.cls is detected, error.
-{\@ifundefined{IEEEtransversionmajor}{\relax}{%
-\PackageError{IEEEtrantools}{IEEEtrantools is not for use with the\MessageBreak
- IEEEtran class}%
+% If \@IEEEeqnarray is detected, error.
+{\@ifundefined{@IEEEeqnarray}{\relax}{%
+\PackageError{IEEEtrantools}{The IEEEtrantools package is not for use\MessageBreak
+ with classes that already provide it}%
{Do not load IEEEtrantools - you don't need it.}%
}}
-% define new needed flags to indicate document options
-% and set a few "failsafe" defaults
-\newif\if@IEEETOOLSretainorgcmds
-\global\@IEEETOOLSretainorgcmdsfalse
-
+% define needed flags to indicate document options
+\newif\if@IEEETOOLSredeflists
+\global\@IEEETOOLSredeflistsfalse
% IEEEtran class scratch pad registers
@@ -133,7 +95,9 @@
% declare the options
-\DeclareOption{retainorgcmds}{\@IEEETOOLSretainorgcmdstrue}
+\DeclareOption{redeflists}{\@IEEETOOLSredefliststrue}
+% provide legacy support for retainorgcmds which does nothing now.
+\DeclareOption{retainorgcmds}{\@IEEETOOLSredeflistsfalse}
% get and process any supplied options
\ProcessOptions
@@ -351,8 +315,8 @@
\let\endLaTeXdescription\enddescription
-% override LaTeX's default IED lists, unless the user requested they be retained
-\if@IEEETOOLSretainorgcmds\relax\else
+% override LaTeX's default IED lists, if the user requested it
+\if@IEEETOOLSredeflists
\def\itemize{\@IEEEitemize}
\def\enditemize{\@endIEEEitemize}
\def\enumerate{\@IEEEenumerate}
@@ -390,7 +354,7 @@
\ifnum\@listdepth>5\relax\@toodeep\else%
\advance\@itemdepth\@ne%
\edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
- % get the labelindentfactor for this level
+ % get the IEEElabelindentfactor for this level
\advance\@listdepth\@ne% we need to know what the level WILL be
\edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
\advance\@listdepth-\@ne% undo our increment
@@ -419,9 +383,9 @@
\IEEEiedlistdecl% let user alter parameters
#1\relax%
% If the user has requested not to use the
- % labelindent factor, don't revise \labelindent
+ % IEEElabelindent factor, don't revise \IEEElabelindent
\ifIEEEnolabelindentfactor\relax%
- \else\IEEElabelindent=\IEEElabelindentfactor\labelindent%
+ \else\IEEElabelindent=\IEEElabelindentfactor\IEEElabelindent%
\fi%
% Unless the user has requested otherwise,
% calculate our left margin based
@@ -441,7 +405,7 @@
\ifnum\@listdepth>5\relax\@toodeep\else%
\advance\@enumdepth\@ne%
\edef\@enumctr{enum\romannumeral\the\@enumdepth}%
- % get the labelindentfactor for this level
+ % get the IEEElabelindentfactor for this level
\advance\@listdepth\@ne% we need to know what the level WILL be
\edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
\advance\@listdepth-\@ne% undo our increment
@@ -490,7 +454,7 @@
% Note controlled spacing here, shield end of lines with %
\def\@@IEEEdescription[#1]{%
\ifnum\@listdepth>5\relax\@toodeep\else%
- % get the labelindentfactor for this level
+ % get the IEEElabelindentfactor for this level
\advance\@listdepth\@ne% we need to know what the level WILL be
\edef\IEEElabelindentfactor{\csname IEEElabelindentfactor\romannumeral\the\@listdepth\endcsname}%
\advance\@listdepth-\@ne% undo our increment
@@ -565,7 +529,7 @@
%%
-%% START OF IEEEeqnarry DEFINITIONS
+%% START OF IEEEeqnarray DEFINITIONS
%%
%% Inspired by the concepts, examples, and previous works of LaTeX
%% coders and developers such as Donald Arseneau, Fred Bartlett,
@@ -575,10 +539,10 @@
% hook to allow easy changeover to IEEEtran.cls/tools.sty error reporting
-\def\@IEEEclspkgerror{\PackageError{IEEEtran}}
+\def\@IEEEclspkgerror{\ClassError{IEEEtran}}
-\newif\if@IEEEeqnarraystarform% flag to indicate if the environment was called as the star form
-\@IEEEeqnarraystarformfalse
+\newif\if@IEEEeqnarrayboxnojot% flag to indicate if the environment was called as the star form
+\@IEEEeqnarrayboxnojotfalse
\newif\if@advanceIEEEeqncolcnt% tracks if the environment should advance the col counter
% allows a way to make an \IEEEeqnarraybox that can be used within an \IEEEeqnarray
@@ -599,43 +563,116 @@
\def\IEEEeqnarraydecl{\relax}
\def\IEEEeqnarrayboxdecl{\relax}
+
+
+% V1.8 flags to indicate that equation numbering is to persist
+\newif\if@IEEEeqnumpersist%
+\@IEEEeqnumpersistfalse
+\newif\if@IEEEsubeqnumpersist%
+\@IEEEsubeqnumpersistfalse
+%
+% V1.8 flags to indicate if (sub)equation number of last line was preadvanced
+\newif\if@IEEEeqnumpreadv%
+\@IEEEeqnumpreadvfalse
+\newif\if@IEEEsubeqnumpreadv%
+\@IEEEsubeqnumpreadvfalse
+
+\newcount\@IEEEsubeqnnumrollback% saves previous value of IEEEsubequation number in case we need to restore it
+
% \yesnumber is the opposite of \nonumber
% a novel concept with the same def as the equationarray package
% However, we give IEEE versions too since some LaTeX packages such as
% the MDWtools mathenv.sty redefine \nonumber to something else.
+% This command is intended for use in non-IEEEeqnarray math environments
\providecommand{\yesnumber}{\global\@eqnswtrue}
-\def\IEEEyesnumber{\global\@eqnswtrue}
-\def\IEEEnonumber{\global\@eqnswfalse}
-\def\IEEEyessubnumber{\global\@IEEEissubequationtrue\global\@eqnswtrue%
-\if@IEEEeqnarrayISinner% only do something inside an IEEEeqnarray
-\if@IEEElastlinewassubequation\addtocounter{equation}{-1}\else\setcounter{IEEEsubequation}{1}\fi%
-\def\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\fi}
+% IEEEyes/nonumber
+% V1.8 add persistant * forms
+% These commands can alter the type of equation an IEEEeqnarray line is.
+\def\IEEEyesnumber{\@ifstar{\global\@IEEEeqnumpersisttrue\global\@IEEEsubeqnumpersistfalse\@IEEEyesnumber}{\@IEEEyesnumber}}
+
+\def\@IEEEyesnumber{\global\@eqnswtrue
+\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
+\ifnum\c@IEEEsubequation>0\relax
+ \stepcounter{equation}\setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
+\fi
+% even if we reached this eqn num via a preadv, it is legit now
+\global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse
+\fi}
+
+\def\IEEEnonumber{\@ifstar{\global\@IEEEeqnumpersistfalse\global\@IEEEsubeqnumpersistfalse\global\@eqnswfalse}{\global\@eqnswfalse}}
+
+
+\def\IEEEyessubnumber{\@ifstar{\global\@IEEEsubeqnumpersisttrue\@IEEEyessubnumber}{\@IEEEyessubnumber}}
+%
+\def\@IEEEyessubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
+ \ifnum\c@IEEEsubequation>0\relax% if it already is a subequation, we are good to go as-is
+ \else% if we are a regular equation we have to watch out for two cases
+ \if@IEEEeqnumpreadv% if this equation is the result of a preadvance, backout and bump the sub eqnnum
+ \global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\addtocounter{IEEEsubequation}{1}\relax
+ \else% non-preadvanced equations just need initialization of their sub eqnnum
+ \setcounter{IEEEsubequation}{1}\relax
+ \fi
+ \fi% fi already is subequation
+ \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
+ \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore
+ \global\@eqnswtrue
+\fi}
+
+
+\def\IEEEnosubnumber{\@ifstar{\global\@IEEEsubeqnumpersistfalse\@IEEEnosubnumber}{\@IEEEnosubnumber}}
+%
+\def\@IEEEnosubnumber{\if@IEEEeqnarrayISinner% alter counters and label only inside an IEEEeqnarray
+ \if@eqnsw % we do nothing unless we know we will display because we play with the counters here
+ % if it currently is a subequation, bump up to the next equation number and turn off the subequation
+ \ifnum\c@IEEEsubequation>0\relax\addtocounter{equation}{1}\setcounter{IEEEsubequation}{0}\relax
+ \fi
+ \global\@IEEEeqnumpreadvfalse\global\@IEEEsubeqnumpreadvfalse% no longer a preadv anymore
+ \gdef\@currentlabel{\p@equation\theequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
+ \fi
+\fi}
+
-% flag to indicate that an equation is a sub equation
-\newif\if@IEEEissubequation%
-\@IEEEissubequationfalse
% allows users to "push away" equations that get too close to the equation numbers
-\def\IEEEeqnarraynumspace{\hphantom{\if@IEEEissubequation\theIEEEsubequationdis\else\theequationdis\fi}}
+\def\IEEEeqnarraynumspace{\hphantom{\ifnum\c@IEEEsubequation>0\relax\theIEEEsubequationdis\else\theequationdis\fi}}
% provides a way to span multiple columns within IEEEeqnarray environments
% will consider \if@advanceIEEEeqncolcnt before globally advancing the
% column counter - so as to work within \IEEEeqnarraybox
% usage: \IEEEeqnarraymulticol{number cols. to span}{col type}{cell text}
-\long\def\IEEEeqnarraymulticol#1#2#3{\multispan{#1}%
-% check if column is defined
-\relax\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined%
-\csname @IEEEeqnarraycolPRE#2\endcsname#3\relax\relax\relax\relax\relax%
-\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST#2\endcsname%
+\long\def\IEEEeqnarraymulticol#1#2#3{\multispan{#1}\relax
+% check if column is defined for the precolumn definition
+% We have to be careful here because TeX scans for & even within an \iffalse
+% where it does not expand macros. So, if we used only one \ifx and a #3
+% appeared in the false branch and the user inserted another alignment
+% structure that uses & in the \IEEEeqnarraymulticol{}, TeX will not see that
+% there is an inner alignment in the false branch yet still will see any &
+% there and will think that they apply to the outer alignment resulting in an
+% incomplete \ifx error.
+% So, here we use separate checks for the pre and post parts in order to keep
+% the #3 outside of all conditionals.
+\relax\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax
+\csname @IEEEeqnarraycolPRE#2\endcsname
\else% if not, error and use default type
\@IEEEclspkgerror{Invalid column type "#2" in \string\IEEEeqnarraymulticol.\MessageBreak
Using a default centering column instead}%
{You must define IEEEeqnarray column types before use.}%
-\csname @IEEEeqnarraycolPRE@IEEEdefault\endcsname#3\relax\relax\relax\relax\relax%
-\relax\relax\relax\relax\relax\csname @IEEEeqnarraycolPOST@IEEEdefault\endcsname%
-\fi%
+\csname @IEEEeqnarraycolPRE@IEEEdefault\endcsname
+\fi
+% The ten \relax are to help prevent misleading error messages in case a user
+% accidently inserted a macro that tries to acquire additional arguments.
+#3\relax\relax\relax\relax\relax\relax\relax\relax\relax\relax
+% check if column is defined for the postcolumn definition
+\expandafter\ifx\csname @IEEEeqnarraycolDEF#2\endcsname\@IEEEeqnarraycolisdefined\relax
+\csname @IEEEeqnarraycolPOST#2\endcsname
+\else% if not, use the default type
+\csname @IEEEeqnarraycolPOST@IEEEdefault\endcsname
+\fi
% advance column counter only if the IEEEeqnarray environment wants it
\if@advanceIEEEeqncolcnt\global\advance\@IEEEeqncolcnt by #1\relax\fi}
@@ -926,6 +963,9 @@ Using a default centering column instead}%
\xdef\@IEEEeqnarrayTHEstrutdepth{\@IEEEeqnarrayTHEstrutdepth}%
\global\@IEEEeqnarrayusemasterstrutfalse%
\fi}
+
+
+
% usage: \IEEEeqnarraystrutsize{height}{depth}[font size commands]
% If called outside the lines of an IEEEeqnarray, sets the height
% and depth of both the master and local struts. If called inside
@@ -1092,11 +1132,15 @@ Using a default centering column instead}%
\baselineskip=0pt\lineskip=0pt\lineskiplimit=0pt\jot=0pt}
+% equation and subequation forms to use to setup hyperref's \@currentHref
+\def\@IEEEtheHrefequation{equation.\theHequation}
+\def\@IEEEtheHrefsubequation{equation.\theHequation\alph{IEEEsubequation}}
+
-\def\IEEEeqnarray{\@IEEEeqnarraystarformfalse\@IEEEeqnarray}
+\def\IEEEeqnarray{\@IEEEeqnumpersisttrue\@IEEEsubeqnumpersistfalse\@IEEEeqnarray}
\def\endIEEEeqnarray{\end@IEEEeqnarray}
-\@namedef{IEEEeqnarray*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarray}
+\@namedef{IEEEeqnarray*}{\@IEEEeqnumpersistfalse\@IEEEsubeqnumpersistfalse\@IEEEeqnarray}
\@namedef{endIEEEeqnarray*}{\end@IEEEeqnarray}
@@ -1107,12 +1151,19 @@ Using a default centering column instead}%
\def\@@IEEEeqnarray[#1]#2{%
% default to showing the equation number or not based on whether or not
% the star form was involked
- \if@IEEEeqnarraystarform\global\@eqnswfalse
+ \if@IEEEeqnumpersist\global\@eqnswtrue
\else% not the star form
- \global\@eqnswtrue
+ \global\@eqnswfalse
\fi% if star form
- \@IEEEissubequationfalse% default to no subequations
- \@IEEElastlinewassubequationfalse% assume last line is not a sub equation
+ % provide a basic hyperref \theHequation if this has not already been setup (hyperref not loaded, or no section counter)
+ \@ifundefined{theHequation}{\def\theHequation{\arabic{equation}}}{}\relax
+ % provide dummy hyperref commands in case hyperref is not loaded
+ \providecommand{\Hy@raisedlink}[1]{}\relax
+ \providecommand{\hyper@anchorstart}[1]{}\relax
+ \providecommand{\hyper@anchorend}{}\relax
+ \providecommand{\@currentHref}{}\relax
+ \@IEEEeqnumpreadvfalse% reset eqnpreadv flag
+ \@IEEEsubeqnumpreadvfalse% reset subeqnpreadv flag
\@IEEEeqnarrayISinnerfalse% not yet within the lines of the halign
\@IEEEeqnarraystrutsize{0pt}{0pt}[\relax]% turn off struts by default
\@IEEEeqnarrayusemasterstruttrue% use master strut till user asks otherwise
@@ -1125,9 +1176,15 @@ Using a default centering column instead}%
\mathsurround\z@\relax% no extra spacing around math
\@advanceIEEEeqncolcnttrue% advance the col counter for each col the user uses,
% used in \IEEEeqnarraymulticol and in the preamble build
- \stepcounter{equation}% advance equation counter before first line
- \setcounter{IEEEsubequation}{0}% no subequation yet
+ %V1.8 Here we preadvance to the next equation number.
+ % If the user later wants a continued subequation, we can roll back.
+ \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation%
+ \stepcounter{equation}\@IEEEeqnumpreadvtrue% advance equation counter before first line
+ \setcounter{IEEEsubequation}{0}% no subequation yet
+ \let\@IEEEcurrentlabelsave\@currentlabel% save current label as we later change it globally
+ \let\@IEEEcurrentHrefsave\@currentHref% save current href label as we later change it globally
\def\@currentlabel{\p@equation\theequation}% redefine the ref label
+ \def\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
\IEEEeqnarraydecl\relax% allow a way for the user to make global overrides
#1\relax% allow user to override defaults
\let\\\@IEEEeqnarraycr% replace newline with one that can put in eqn. numbers
@@ -1155,19 +1212,19 @@ Using a default centering column instead}%
% enter isolation/strut column (or the next column if the user did not use
% every column), record the strut status, complete the columns, do the strut if needed,
-% restore counters to correct values and exit
-\def\end@IEEEeqnarray{\@IEEEeqnarrayglobalizestrutstatus&\@@IEEEeqnarraycr\egroup%
-\if@IEEElastlinewassubequation\global\advance\c@IEEEsubequation\m@ne\fi%
-\global\advance\c@equation\m@ne%
+% restore counters (to backout any equation setup for a next line that was never used)
+% to their correct values and exit
+\def\end@IEEEeqnarray{\@IEEEeqnarrayglobalizestrutstatus&\@@IEEEeqnarraycr\egroup
+\if@IEEEsubeqnumpreadv\global\advance\c@IEEEsubequation\m@ne\fi
+\if@IEEEeqnumpreadv\global\advance\c@equation\m@ne\global\c@IEEEsubequation=\@IEEEsubeqnnumrollback\fi
+\global\let\@currentlabel\@IEEEcurrentlabelsave% restore current label
+\global\let\@currentHref\@IEEEcurrentHrefsave% restore current href label
$$\@ignoretrue}
-% need a way to remember if last line is a subequation
-\newif\if@IEEElastlinewassubequation%
-\@IEEElastlinewassubequationfalse
% IEEEeqnarray uses a modifed \\ instead of the plain \cr to
% end rows. This allows for things like \\*[vskip amount]
-% This "cr" macros are modified versions those for LaTeX2e's eqnarray
+% These "cr" macros are modified versions of those for LaTeX2e's eqnarray
% the {\ifnum0=`} braces must be kept away from the last column to avoid
% altering spacing of its math, so we use & to advance to the next column
% as there is an isolation/strut column after the user's columns
@@ -1192,7 +1249,7 @@ $$\@ignoretrue}
\ifnum\@IEEEeqncolcnt>\@IEEEeqnnumcols\relax
\@IEEEclspkgerror{Too many columns within the IEEEeqnarray\MessageBreak
environment}%
- {Use fewer \string &'s or put more columns in the IEEEeqnarry column\MessageBreak
+ {Use fewer \string &'s or put more columns in the IEEEeqnarray column\MessageBreak
specifications.}\relax%
\else
\loop% add cols if the user did not use them all
@@ -1208,18 +1265,54 @@ $$\@ignoretrue}
\@IEEEeqnarrayinsertstrut% do the strut if needed
\@IEEEeqnarraystrutreset% reset the strut system for next line or IEEEeqnarray
&% and enter the equation number column
- % is this line needs an equation number, display it and advance the
- % (sub)equation counters, record what type this line was
- \if@eqnsw%
- \if@IEEEissubequation\theIEEEsubequationdis\addtocounter{equation}{1}\stepcounter{IEEEsubequation}%
- \global\@IEEElastlinewassubequationtrue%
- \else% display a standard equation number, initialize the IEEEsubequation counter
- \theequationdis\stepcounter{equation}\setcounter{IEEEsubequation}{0}%
- \global\@IEEElastlinewassubequationfalse\fi%
- \fi%
- % reset the eqnsw flag to indicate default preference of the display of equation numbers
- \if@IEEEeqnarraystarform\global\@eqnswfalse\else\global\@eqnswtrue\fi
- \global\@IEEEissubequationfalse% reset the subequation flag
+ \if@eqnsw% only if we display something
+ \Hy@raisedlink{\hyper@anchorstart{\@currentHref}}% start a hyperref anchor
+ \global\@IEEEeqnumpreadvfalse\relax% displaying an equation number means
+ \global\@IEEEsubeqnumpreadvfalse\relax% the equation counters point to valid equations
+ % V1.8 Here we setup the counters, currentlabel and status for what would be the *next*
+ % equation line as would be the case under the current settings. However, there are two problems.
+ % One problem is that there might not ever be a next line. The second problem is that the user
+ % may later alter the meaning of a line with commands such as \IEEEyessubnumber. So, to handle
+ % these cases we have to record the current values of the (sub)equation counters and revert back
+ % to them if the next line is changed or never comes. The \if@IEEEeqnumpreadv, \if@IEEEsubeqnumpreadv
+ % and \@IEEEsubeqnnumrollback stuff tracks this.
+ % The logic to handle all this is surprisingly complex, but a nice feature of the approach here is
+ % that the equation counters and labels remain valid for what the line would be unless a
+ % \IEEEyessubnumber et al. later changes it. So, any hyperref links are always correct.
+ \ifnum\c@IEEEsubequation>0\relax% handle subequation
+ \theIEEEsubequationdis\relax
+ \if@IEEEsubeqnumpersist% setup for default type of next line
+ \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax
+ \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
+ \else
+ % if no subeqnum persist, go ahead and setup for a new equation number
+ \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation
+ \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax
+ \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
+ \fi
+ \else% display a standard equation number
+ \theequationdis\relax
+ \setcounter{IEEEsubequation}{0}\relax% not really needed
+ \if@IEEEsubeqnumpersist% setup for default type of next line
+ % subequations that follow plain equations carry the same equation number e.g, 5, 5a rather than 5, 6a
+ \stepcounter{IEEEsubequation}\global\@IEEEsubeqnumpreadvtrue\relax
+ \gdef\@currentlabel{\p@IEEEsubequation\theIEEEsubequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefsubequation}% setup hyperref label
+ \else
+ % if no subeqnum persist, go ahead and setup for a new equation number
+ \global\@IEEEsubeqnnumrollback=\c@IEEEsubequation
+ \stepcounter{equation}\global\@IEEEeqnumpreadvtrue\relax
+ \setcounter{IEEEsubequation}{0}\gdef\@currentlabel{\p@equation\theequation}\relax
+ \gdef\@currentHref{\@IEEEtheHrefequation}% setup hyperref label
+ \fi
+ \fi%
+ \Hy@raisedlink{\hyper@anchorend}% end hyperref anchor
+ \fi% fi only if we display something
+ % reset the flags to indicate the default preferences of the display of equation numbers
+ \if@IEEEeqnumpersist\global\@eqnswtrue\else\global\@eqnswfalse\fi
+ \if@IEEEsubeqnumpersist\global\@eqnswtrue\fi% ditto for the subequation flag
% reset the number of columns the user actually used
\global\@IEEEeqncolcnt\z@\relax
% the real end of the line
@@ -1243,21 +1336,21 @@ $$\@ignoretrue}
% natural width is the default.
% The * forms do not add \jot line spacing
% usage: \IEEEeqnarraybox[decl][pos][width]{cols}
-\def\IEEEeqnarrayboxm{\@IEEEeqnarraystarformfalse\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
+\def\IEEEeqnarrayboxm{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
\def\endIEEEeqnarrayboxm{\end@IEEEeqnarraybox}
-\@namedef{IEEEeqnarrayboxm*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
+\@namedef{IEEEeqnarrayboxm*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWfalse\@IEEEeqnarraybox}
\@namedef{endIEEEeqnarrayboxm*}{\end@IEEEeqnarraybox}
-\def\IEEEeqnarrayboxt{\@IEEEeqnarraystarformfalse\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
+\def\IEEEeqnarrayboxt{\@IEEEeqnarrayboxnojotfalse\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
\def\endIEEEeqnarrayboxt{\end@IEEEeqnarraybox}
-\@namedef{IEEEeqnarrayboxt*}{\@IEEEeqnarraystarformtrue\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
+\@namedef{IEEEeqnarrayboxt*}{\@IEEEeqnarrayboxnojottrue\@IEEEeqnarrayboxHBOXSWtrue\@IEEEeqnarraybox}
\@namedef{endIEEEeqnarrayboxt*}{\end@IEEEeqnarraybox}
-\def\IEEEeqnarraybox{\@IEEEeqnarraystarformfalse\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
+\def\IEEEeqnarraybox{\@IEEEeqnarrayboxnojotfalse\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
\@IEEEeqnarraybox}
\def\endIEEEeqnarraybox{\end@IEEEeqnarraybox}
-\@namedef{IEEEeqnarraybox*}{\@IEEEeqnarraystarformtrue\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
+\@namedef{IEEEeqnarraybox*}{\@IEEEeqnarrayboxnojottrue\ifmmode\@IEEEeqnarrayboxHBOXSWfalse\else\@IEEEeqnarrayboxHBOXSWtrue\fi%
\@IEEEeqnarraybox}
\@namedef{endIEEEeqnarraybox*}{\end@IEEEeqnarraybox}
@@ -1355,7 +1448,7 @@ $$\@ignoretrue}
% IEEEeqnarraybox does not automatically increase line spacing by \jot
\def\@IEEEeqnarrayboxXCR[#1]{\ifnum0=`{\fi}%
-\cr\noalign{\if@IEEEeqnarraystarform\else\vskip\jot\fi\vskip#1\relax}}
+\cr\noalign{\if@IEEEeqnarrayboxnojot\else\vskip\jot\fi\vskip#1\relax}}
@@ -1630,7 +1723,7 @@ between column types.}%
%%
-%% END OF IEEEeqnarry DEFINITIONS
+%% END OF IEEEeqnarray DEFINITIONS
%%
@@ -1811,8 +1904,34 @@ between column types.}%
\fi\endgroup}
+% \IEEEauthorrefmark
+\DeclareRobustCommand*{\IEEEauthorrefmark}[1]{\raisebox{0pt}[0pt][0pt]{\textsuperscript{\footnotesize\ensuremath{\ifcase#1\or *\or \dagger\or \ddagger\or%
+ \mathsection\or \mathparagraph\or \|\or **\or \dagger\dagger%
+ \or \ddagger\ddagger \else\textsuperscript{\expandafter\romannumeral#1}\fi}}}}
+
+
+% V1.3 IEEEQED and IEEEproof
+\def\IEEEproofname{Proof}
+\def\IEEEQEDclosed{\mbox{\rule[0pt]{1.3ex}{1.3ex}}} % for a filled box
+\def\IEEEQEDopen{{\setlength{\fboxsep}{0pt}\setlength{\fboxrule}{0.2pt}\fbox{\rule[0pt]{0pt}{1.3ex}\rule[0pt]{1.3ex}{0pt}}}}
+\def\IEEEQED{\IEEEQEDclosed} % default to closed
+%V1.8 flag to indicate if QED symbol is to be shown
+\newif\if@IEEEQEDshow \@IEEEQEDshowtrue
+\def\IEEEproofindentspace{2\parindent}% V1.8 allow user to change indentation amount if desired
+% v1.7 name change to avoid namespace collision with amsthm. Also add support
+% for an optional argument.
+\def\IEEEproof{\@ifnextchar[{\@IEEEproof}{\@IEEEproof[\IEEEproofname]}}
+\def\@IEEEproof[#1]{\@IEEEQEDshowtrue\par\noindent\hspace{\IEEEproofindentspace}{\itshape #1: }}
+\def\endIEEEproof{\if@IEEEQEDshow\hspace*{\fill}\nobreakspace\IEEEQED\fi\par}
+% qedhere for equation environments, similar to AMS \qedhere
+\def\IEEEQEDhereeqn{\global\@IEEEQEDshowfalse\eqno\let\eqno\relax\let\leqno\relax
+ \let\veqno\relax\hbox{\IEEEQED}}
+% IEEE style qedhere for IEEEeqnarray and other environments
+\def\IEEEQEDhere{\global\@IEEEQEDshowfalse\IEEEQED}
+% command to disable QED at end of IEEEproof
+\def\IEEEQEDoff{\global\@IEEEQEDshowfalse}
% Provide support for the control entries of IEEEtran.bst V1.00 and later.
@@ -1836,20 +1955,20 @@ between column types.}%
% hook to allow easy disabling of all legacy warnings
-\def\@IEEElegacywarn#1#2{\typeout{** ATTENTION: \@IEEEbackslash #1 is depreciated (line \the\inputlineno).
+\def\@IEEElegacywarn#1#2{\typeout{** ATTENTION: \@IEEEbackslash #1 is deprecated (line \the\inputlineno).
Use \@IEEEbackslash #2 instead.}}
% provide for legacy commands
\def\PARstart{\@IEEElegacywarn{PARstart}{IEEEPARstart}\IEEEPARstart}
-% provide for legacy IED commands/lengths when possible
-\let\labelindent\IEEElabelindent
-\def\calcleftmargin{\@IEEElegacywarn{calcleftmargin}{IEEEcalcleftmargin}\IEEEcalcleftmargin}
-\def\setlabelwidth{\@IEEElegacywarn{setlabelwidth}{IEEEsetlabelwidth}\IEEEsetlabelwidth}
-\def\usemathlabelsep{\@IEEElegacywarn{usemathlabelsep}{IEEEusemathlabelsep}\IEEEusemathlabelsep}
-\def\iedlabeljustifyc{\@IEEElegacywarn{iedlabeljustifyc}{IEEEiedlabeljustifyc}\IEEEiedlabeljustifyc}
-\def\iedlabeljustifyl{\@IEEElegacywarn{iedlabeljustifyl}{IEEEiedlabeljustifyl}\IEEEiedlabeljustifyl}
-\def\iedlabeljustifyr{\@IEEElegacywarn{iedlabeljustifyr}{IEEEiedlabeljustifyr}\IEEEiedlabeljustifyr}
+% V1.3 no longer support legacy IED list commands
+% \let\labelindent\IEEElabelindent
+% \def\calcleftmargin{\@IEEElegacywarn{calcleftmargin}{IEEEcalcleftmargin}\IEEEcalcleftmargin}
+% \def\setlabelwidth{\@IEEElegacywarn{setlabelwidth}{IEEEsetlabelwidth}\IEEEsetlabelwidth}
+% \def\usemathlabelsep{\@IEEElegacywarn{usemathlabelsep}{IEEEusemathlabelsep}\IEEEusemathlabelsep}
+% \def\iedlabeljustifyc{\@IEEElegacywarn{iedlabeljustifyc}{IEEEiedlabeljustifyc}\IEEEiedlabeljustifyc}
+% \def\iedlabeljustifyl{\@IEEElegacywarn{iedlabeljustifyl}{IEEEiedlabeljustifyl}\IEEEiedlabeljustifyl}
+% \def\iedlabeljustifyr{\@IEEElegacywarn{iedlabeljustifyr}{IEEEiedlabeljustifyr}\IEEEiedlabeljustifyr}
\endinput