2

How can I get the the term shown in the picture:

k-max with xa centered below

$\underline{x_a}$ should be centered under max.

What I know is the structure below, but this is not what I am looking for:

$max_{\atop \underline{x_a}}^k$

2 Answers 2

1

If \underline is really needed this is a matter of taste (I just kept it)

But the centering can be achieved by using \underset. \max is declared as an operator, as far as I know.

\documentclass{article}

\usepackage{mathtools}

\begin{document}
$\underset{\underline{x_{a}}}{\max}^k$
\end{document}

enter image description here

4
  • Dear complainers (and there will be some again): It's not my style about \underline...
    – user31729
    Jan 24, 2016 at 11:07
  • What is wrong about \underline ?
    – kimliv
    Jan 24, 2016 at 11:09
  • @kimliv: \underline is actually not wrong, rather underlining that really look nice in general
    – user31729
    Jan 24, 2016 at 11:21
  • in this case \underline is necessary since x is a vector of a boolean variable.
    – kimliv
    Jan 24, 2016 at 11:34
1

If you want to keep the standard notation for \max, you can play some tricks:

\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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.