# How to generate a smaller \sim with respect to text

When I use \sim I get:

Is there a way to make the \sim sign smaller with respect to the text?

I looked online but did not find what I was looking for.

Thanks.

• Please provide a complete minimal example we can copy-paste-compilet to see what you see. This is obviously highly font dependent and the image you've posted doesn't seem to be CMR. – cfr Apr 24 '16 at 14:15
• I would support @cfr 's comment. – Dr. Manuel Kuehner Apr 24 '16 at 20:22

With \mathpalette trickery we can choose the smaller size.

\documentclass{article}

\newcommand{\smallsim}{\smallsym{\mathrel}{\sim}}

\makeatletter
\newcommand{\smallsym}[2]{#1{\mathpalette\make@small@sym{#2}}}
\newcommand{\make@small@sym}[2]{%
\vcenter{\hbox{$\m@th\downgrade@style#1#2$}}%
}
\ifx#1\displaystyle\scriptstyle\else
\ifx#1\textstyle\scriptstyle\else
\scriptscriptstyle
\fi\fi
}
\makeatother

\begin{document}

exchange $\sim 60\%$ and $\sim 15\%$

exchange $\smallsim 60\%$ and $\smallsim 15\%$

\end{document}


I defined a generic \smallsym command in case you need other symbols to be made smaller in a similar way. For instance, with

\newcommand{\smallcirc}{\smallsym{\mathbin}{\circ}}


you get

from the input

$f\circ g$

$f\smallcirc g$

• Small doubt: since using \m@th is a good practice, why is it so commonly used at the begining of math mode $\m@th#1#2$ rather than at the end $#1#2\m@th$? – Manuel Apr 24 '16 at 14:45
• @Manuel Tradition? The chances #2 sets \mathsurround are very small. – egreg Apr 24 '16 at 15:22
• I was asking in case there was something more to that decision. In any case, since it's so simple, I don't see why tradition has taken us to a different path. – Manuel Apr 24 '16 at 15:31
• shouldn't the (small) \sim be unary? – barbara beeton Apr 24 '16 at 19:43
• @barbarabeeton I don't think so; but of course it's possible to make it a unary symbol by doing ${\smallsim}60\%$. – egreg Apr 24 '16 at 21:09

You could try {\small \sim}, {\scriptsize \sim} or {\footnotesize \sim} for example. See e. g. What point (pt) font size are \Large etc.? for more font size related commands.