答案1
答案2
如果你想保留 的标准符号\max
,你可以玩一些技巧:
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\varmax}[1]{%
\mathop{}\!{\mathpalette\varmaxback{#1}}\!%
\mathop{\hphantom{{}^{#1}}\!\max\nolimits^{#1}}\limits
}
\newcommand{\varmaxback}[2]{%
\sbox0{\mathsurround=0pt $#1{}^{#2}$}%
\kern-\wd0
}
\begin{document}
$\varmax{k}_{\underline{x_a}}$
\begin{align*}
X&=\varmax{k}_{\underline{x_a}}=Y
\\
X&=\max_{\underline{x_a}}
\end{align*}
\end{document}