You can put {\raisebox{2pt}{$\scriptstyle-$}}
in the subscript. You may need to play with \mathchoice
if you want a solution that will work in subsubscripts as well.
Edit: Or better yet, \mathpalette
:
\makeatletter
\newcommand{\raisemath}[1]{\mathpalette{\raisem@th{#1}}}
\newcommand{\raisem@th}[3]{\raisebox{#1}{$#2#3$}}
\makeatother
and use $\Pi_{\raisemath{2pt}{-}}$
.
David has explained this one way, I will take a slightly different tack.
First, what is going on? When e-TeX finds a protected macro, it will not expand it inside an \edef
, \write
and some similar circumstances, which usually exhaustively expand everything. That is to ensure you can see the protected token in the result. For example,
\protected\def\a{}
\typeout{%
\a%
b%
}
will show \a b
, even though there is no space between \a
and b
as far as TeX is concerned. That's because the alternative is \ab
, which as we can't see the tokens would be misleading (does it mean \a
followed by b
or a different macro \ab
?).
You can 'force' expansion of a protected macro by using the fact that they do respect \expandafter
:
\protected\def\a{b}
\edef\test{\expandafter\empty\a}
\show\a
using \empty
as something to expand after which will not result in anything remaining behind.
Second, why do you need protection? Some operations in TeX simply will not work within an \edef
as they use TeX primitives which are not 'expandable'. The classic ones here are assignments (\def
, \let
and so on). If you try
\let\a\undefined
\def\b{a}
\edef\test{\let\a\b}
you will not find that \a
ends up defined to give a
. Instead, you'll get an error: in this case 'Undefined control sequence
'. That is because \let
is not expandable. So TeX simply 'leaves it alone' inside the \edef
, and tries to expand \a
. That's not possible, and so an error arises. Thus in general it is not a good idea to try to expand protected macros.
Best Answer
The command
\LaTeX
should produce what you want. You'd probably want to add a\<space>
after it if used inside a sentence.