[Tex/LaTex] Sub and superscript on the left

spacingsubscriptssuperscripts

I want to do something like this:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
   Hom_{K\cap {}_a^bK}  
\end{align*}
\end{document}

But there seems that the _a^b is on the \cap and not attached to the K.

How might I do this right?

Best Answer

None of the mentioned packages would give a good result in this case, because TeX suppresses space around binary operations in subscripts.

A good solution for this particular case seems to be

\documentclass{article}
\usepackage{amsmath,leftidx}
\DeclareMathOperator{\Hom}{Hom}
\begin{document}
\[
   \Hom_{K\cap \,\leftidx{_a^b}{\!K}{}}
\]
\end{document}

The \, pushes right the right operand a bit, so to separate it from the intersection symbol. The K would however be too detached from the prescripts, so I add a small correction.

enter image description here