5

Trying to use notation of the form (a, b)\underset{{+}}{\bumpeq}(c, d), I find the combined symbol \underset{{+}}{\bumpeq} too much spread vertically for my purposes:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
$(a, b)\underset{{+}}{\bumpeq}(c, d)$
\end{document}

How can the vertical spacing in \underset and \overset be controlled?

1
  • Could you please post a complete compilable code?
    – Bernard
    Oct 10, 2021 at 12:55

1 Answer 1

4

You can use a low level alignment tool.

\documentclass{article}
\usepackage{amsmath,amssymb}

\makeatletter
\DeclareRobustCommand{\bumpeqplus}{\mathrel{\mathpalette\bumpeq@{+}}}
\newcommand{\bumpeq@}[2]{%
  \vtop{\offinterlineskip
    \ialign{\hfil##\hfil\cr
      $\m@th#1\bumpeq$\cr % top
      \noalign{\sbox\z@{$\m@th#1\mkern2mu$}\kern-\wd\z@}
      $\m@th\alexey@demote{#1}#2$\cr
    }%
  }%
}
\newcommand{\alexey@demote}[1]{%
  \ifx#1\displaystyle\scriptstyle\else
  \ifx#1\textstyle\scriptstyle\else
  \scriptscriptstyle\fi\fi
}
\makeatother

\begin{document}

\[
(a, b)\bumpeqplus(c, d)_{x\bumpeqplus y}
\]

\end{document}

Change 2mu after experimenting some values (always in mu units).

enter image description here

In case you need also other symbols instead of + you can define other commands, for instance

\DeclareRobustCommand{\bumpeqminus}{\mathrel{\mathpalette\bumpeq@{-}}}

and nothing else is required.

3
  • Hi, visually I think in subscript mode the size of the symbol created looks too big to me.
    – Sebastiano
    Oct 10, 2021 at 21:48
  • 1
    @Sebastiano The proportions seem the same. I don't really like the symbol, to be honest.
    – egreg
    Oct 10, 2021 at 21:57
  • ahahaahh..also for me...But does this symbol is used? :-( Never I have seen this notation. It reminds me of the rank of second officer when I was in the Italian Navy.
    – Sebastiano
    Oct 10, 2021 at 21:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .