Let us assume that in all fonts you are using the transpose operator ⊤ has form similar to the Latin letter T in Computer Modern. How on earth do I move ⊤ to the left, and, if necessary, down, automatically? On the one hand, ⊤ could be moved slightly to the left in $W^{\top}T^{\top}M^{\top}$, but not too much. On the other hand, the vertical and horizontal spacing between the letter and the following ⊤ in $A^{\top} L^{\top} u^{\top} w^{\top}$ is horribly large:
In other words, I need a universal macro, say, \transpose{stuff} that would automatically take care of placing the down tack symbol as a right superscript of stuff but not wasting space. Of course, "universal" is not well-defined; we just want that the macro does the right job for as many fonts and letters as possible.
(An aside: the known mitigation attempt uses fixed horizontal length -1\mu and no vertical space change. This is not good enough for me.)
My attempts to do horizontal and vertical spacing at the same time with LaTeX3 have no visible effect. In my example below, tl_case does not work as I expect, e.g., \transpose{u} is the same as u^{\top} (which should not be the case):
\tl_new:N\l_tl_lastTokenOfList
\NewDocumentCommand{\transpose}{m}{
\tl_set:Nn \l_tl_lastTokenOfList {\tl_item:nn {#1} {-1}}
#1^{\tl_case:NnTF \l_tl_lastTokenOfList
{ {A}{\mkern-3mu\top}
{L}{\mkern-3mu\top}
{u}{\mkern-3mu\raisebox{-.1ex}{\top}}
{w}{\mkern-3mu\raisebox{-.1ex}{\top}}
}
{}
{\top}
}
}


\def\alttop{\!\top}and then manually employ it where appropriate. – Steven B. Segletes Jun 06 '16 at 13:15\transpose{A}and then in the definition of\tranksposeI usedxstring(I think) to test the end of the string and adjust those combinations that needed adjustment. – daleif Jun 06 '16 at 13:16$P_0$ $P^0$where a subscript on P is tucked in but a superscript not. – David Carlisle Jun 08 '16 at 08:35