I'm using IEEEtrantools to typeset equations (here's an excellent tutorial).
The package offers, among other things the IEEEeqnarray environment to typeset equations. That environment has an issue with labels, so one must use
\newcommand{\IEEElabel}[1]{\begingroup\addtocounter{equation}{-1}\refstepcounter{equation}\label{#1}\endgroup}
instead of \label.
The problem is to show IEEElabels with showlabel (or some other way?).
Here's an MWE:
\documentclass{article}
\usepackage{fontspec} % enagles loading of OpenType fonts
\usepackage{polyglossia} % support for languages
% fonts:
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} % without this XeLaTeX won't turn "--" into dashes
\setmainfont{Arial}
\setsansfont{Arial}
\setmonofont{DejaVu Sans Mono}
% math:
\usepackage{IEEEtrantools} % for advanced typesetting like multiline equations, and the likes.
\newcommand{\IEEElabel}[1]{\begingroup\addtocounter{equation}{-1}\refstepcounter{equation}\label{#1}\endgroup}
\usepackage{unicode-math} % to use unicode in the formulas -- to improve readability of sources
\setmathfont{Asana-Math.otf}
% showlabels?
\usepackage[inline]{showlabels}
\begin{document}
\begin{IEEEeqnarray}{rCl}
e^{i π} + 1 = 0
\IEEElabel{eq:test}
\end{IEEEeqnarray}
\end{document}
Edit:
Here's a snippet with amsmath, mathtools. When I use them -- I get no labels, when I don't -- the labels are there.
\documentclass{article}
\usepackage{fontspec} % enagles loading of OpenType fonts
\usepackage{polyglossia} % support for languages
% fonts:
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} % without this XeLaTeX won't turn "--" into dashes
\setmainfont{Arial}
\setsansfont{Arial}
\setmonofont{DejaVu Sans Mono}
% math:
\usepackage{amsmath, mathtools}
\usepackage{IEEEtrantools} % for advanced typesetting like multiline equations, and the likes.
\usepackage{unicode-math} % to use unicode in the formulas -- to improve readability of sources
\setmathfont{Asana-Math.otf}
% showlabels?
\usepackage[inline]{showlabels}
% define a general showlabels patch for equation numbering commands
\makeatletter
\def\eqnnumpatch#1{
\expandafter\let\csname SL@#1\expandafter\endcsname\csname #1\endcsname
\expandafter\def\csname #1\endcsname{%
\csname SL@#1\endcsname %% produce original equation number %%
\ifx\SL@labelname\relax
% do nothing
\else
\SL@eqnlrtext{\SL@labelname}% %% produce label annotation %%
\fi
\global\let\SL@labelname\relax
}
}
\makeatother
% patch the two macros relevant for the IEEEeqnarray environment
\eqnnumpatch{theequationdis}
\eqnnumpatch{theIEEEsubequationdis}
\begin{document}
\begin{IEEEeqnarray}{rCl}
e^{i π} + 1 & = & 0
\label{eq:test}
\end{IEEEeqnarray}
\end{document}
I have the same IEEEtrantools and showlabel. Here're the full two logs: no math, with math.

inlineoption is failing withIEEEeqalign. Without it the example works. – egreg Feb 27 at 15:11