6

I would like to have a \smile symbol under a plus symbol. What I have so far is

\newcommand{\pluss}{\raisebox{-.5ex}{\,$\overset{\textstyle{\raisebox{-0.5ex}{$+$}}}{\smile}$}\,}

However, I would like to have the plus further below. I tried to do this via the \raisebox command (as you can see). This works to some extend, but when I go further than -0.5ex, the whole thing will go down instead of just the plus symbol.

Can anyone help, please?

amsmath
  • 217
  • In which context should it be used? – Bernard Aug 13 '19 at 18:24
  • 3
    @Bernard Why is this relevant? I don't understand these kind of questions.... – amsmath Aug 13 '19 at 18:30
  • 2
    I mean – will it be specifically used in mathmode, or is it just some kind of smiley? – Bernard Aug 13 '19 at 18:34
  • @Bernard Oh, I'm sorry. Yes, only in math mode. It's supposed to be a special symbol for an operator sum. I got now a quick and dirty solution, but I don't think LaTeX enthusiasts would like it: \newcommand{\pluss}{\,\text{\raisebox{-.4ex}{$\smile$}}\text{\hspace{-1.3ex}\raisebox{.4ex}{$+$}}\,} – amsmath Aug 13 '19 at 18:37
  • Also should know whether it’s a binary operator, relational operator, or an operator like nabla. These affect the spacing. – Davislor Aug 14 '19 at 02:10
  • In addition to the excellent answers here, the closest standard symbol to this is ⨄ . – Davislor Aug 14 '19 at 02:11
  • @Davislor I know that symbol, thanks. If you read my last comment carefully, you can only get to the conclusion that it should be binary. BTW relational operators are binary. – amsmath Aug 14 '19 at 11:25
  • 1
    @amsmath Great! In TeX, \mathbin and \mathrel have slightly different spacing. So, when I say binary or relational in this context, I’m referring to the TeX character class—you’re certainly correct that, mathematically, relational operators are binary! If you like how the answers look, you don’t need to modify them. In other cases, you might want to wrap the symbols you generate in something like \mathrel{\SomeRelationalSymbol}. – Davislor Aug 14 '19 at 15:42

3 Answers3

9

Here is an easy solution (I think) with stackengine:

\documentclass{article}
\usepackage{stackengine}
\newcommand\pluss{\mathop{\stackMath\stackinset{c}{0pt}{c}{-1ex}{{\smile}}{{+}}}}

\begin{document}

\[ \pluss_{k} f(k) \]

\end{document} 

enter image description here

Bernard
  • 271,350
5

With some low level TeX programming:

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\DeclareRobustCommand{\pluss}{\mathbin{\text{\pluss@}}}
\newcommand{\pluss@}{%
  \vtop{%
    \offinterlineskip\m@th
    \halign{\hfil##\hfil\cr$+$\cr$\smile$\cr}%
  }%
}
\makeatother

\begin{document}

$3\pluss 4+5$

$\scriptstyle 3\pluss 4+5$

\end{document}

enter image description here

With a smaller \smile:

\documentclass{article}
\usepackage{amsmath}

\makeatletter
\DeclareRobustCommand{\pluss}{\mathbin{\text{\pluss@}}}
\newcommand{\pluss@}{%
  \vtop{%
    \offinterlineskip\m@th
    \halign{\hfil##\hfil\cr$+$\cr$\scriptstyle\smile$\cr}%
  }%
}
\makeatother

\begin{document}

$3\pluss 4+5$

$\scriptstyle 3\pluss 4+5$

\end{document}

enter image description here

egreg
  • 1,121,712
4

I'm not sure exactly what spacing you want, so this is an adjustable approach using xparse around your original design.

\documentclass[11pt]{article}

\usepackage{amsmath,xparse}  

\NewDocumentCommand{\pluss}{O{-.5ex} O{0.5ex}}{%
    \raisebox{#1}{\,$\overset{\textstyle{\raisebox{#2}{$+$}}}{\smash{\smile}}$}\,%
}

\begin{document}

$3 \pluss 4 $

$3 \pluss[0.ex][0.2ex] 4 $

$3 \pluss[-0.3ex][0.2ex] 4 $

\end{document}

You can adjust it until you find the defaults you like.

enter image description here

John
  • 2,400