Underlined math operator
Here's a slightly different version: I apply the shortening on both sides, for symmetry.
The shorthening depends on the value given to the parameter \uHomskip
.
\documentclass{article}
\usepackage{amsmath}
\newmuskip\uHomskip
\DeclareMathOperator{\uHom}{%
\mkern\uHomskip
\underline{\mkern-\uHomskip Hom\mkern-\uHomskip}
\mkern\uHomskip
}
\begin{document}
\newcommand{\test}[1]{%
\begingroup\uHomskip=#1mu\relax
\makebox[2em][l]{#1:}$\uHom_R$
\endgroup\par
}
\test{0} \test{0.5} \test{1} \test{1.5} \test{2}
\end{document}
When you decide for the amount you want, just set it in the preamble, for instance
\newmuskip\uHomskip \setlength{\uHomskip}{1.5mu}
\DeclareMathOperator{\uHom}{%
\mkern\uHomskip
\underline{\mkern-\uHomskip Hom\mkern-\uHomskip}
\mkern\uHomskip
}
The advantage of using mu
units is that they automatically scale in subscripts/superscripts.
If you don't want the shortening at the left, just remove the relevant kerns:
\newmuskip\uHomskip \setlength{\uHomskip}{1.5mu}
\DeclareMathOperator{\uHom}{%
\underline{Hom\mkern-\uHomskip}
\mkern\uHomskip
}
You can add/remove small spaces before and in the underlined material.
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\uHom}{\,\underline{\!Hom\!}\,}
\begin{document}
$\uHom_R$
\end{document}
this answer is much like steven's, but is a little more reserved about the sizes of the "small spaces".
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\uHom}{\underline{Hom\kern-.05em}\kern.1em}
\begin{document}
$\uHom_R$
\end{document}