I've looked everywhere, and there does not seem to be a symbol for this, i.e. a \propto with a \sim underneath. I've googled ways of combining these two symbols but haven't found anything satisfactory. Anybody know a simple way of achieving this? \stackrel and \utilde look horrible.
Asked
Active
Viewed 1.7e+01k times
53
Torbjørn T.
- 206,688
Seb
- 531
4 Answers
42
\newcommand{\approptoinn}[2]{\mathrel{\vcenter{
\offinterlineskip\halign{\hfil$##$\cr
#1\propto\cr\noalign{\kern2pt}#1\sim\cr\noalign{\kern-2pt}}}}}
\newcommand{\appropto}{\mathpalette\approptoinn\relax}
If you don't need the symbol also in subscripts or superscripts, then the simpler
\newcommand{\appropto}{\mathrel{\vcenter{
\offinterlineskip\halign{\hfil$##$\cr
\propto\cr\noalign{\kern2pt}\sim\cr\noalign{\kern-2pt}}}}}
will do.
Paulo Cereda
- 44,220
egreg
- 1,121,712
15
With this code the spacing looks quite acceptable
\documentclass{article}
\usepackage{amsmath}
\def\approxprop{%
\def\p{%
\setbox0=\vbox{\hbox{$\propto$}}%
\ht0=0.6ex \box0 }%
\def\s{%
\vbox{\hbox{$\sim$}}%
}%
\mathrel{\raisebox{0.7ex}{%
\mbox{$\underset{\s}{\p}$}%
}}%
}
\begin{document}
\[
a \approxprop b
\]
\end{document}
All this box stuff doesn't really look nice and there are probably easier ways to do this. However the result looks ok, and you can tweek the vertical position and spacing to whatever you like.

EDIT: According to the comments from egreg and barbara beeton I've improved the code. Now, what about that?
\documentclass{article}
\usepackage{amsmath}
\def\app#1#2{%
\mathrel{%
\setbox0=\hbox{$#1\sim$}%
\setbox2=\hbox{%
\rlap{\hbox{$#1\propto$}}%
\lower1.1\ht0\box0%
}%
\raise0.25\ht2\box2%
}%
}
\def\approxprop{\mathpalette\app\relax}
\begin{document}
\[a \approxprop b\] \centerline{$a \approxprop b$}
\[\sum_{a \approxprop b}\]
\[X_{Y_{a \approxprop b}}\]
\end{document}
The result looks like that

(so I think it looks now ok in all sizes)
Elmar Zander
- 1,890
-
This code has many redundancies:
\vbox{\hbox{...}}can be reduced to\hbox{...}and the\mboxinside\raiseboxis useless. Also defining each time\sand\pcan be avoided by defining them (with different names) beforehand. – egreg Nov 03 '11 at 14:24 -
2using
\hboxor\mbox, the symbol size won't change if this happens to be used in a subscript or fraction (not that that's likely).\textwould allow the sizes to change according to the current environment. the\mathrelis a good idea though as it "corrects" the vertical alignment of the composite symbol. – barbara beeton Nov 03 '11 at 16:06 -
@egreg: You were right. The code was pretty ugly, just a quick hack to get the symbol right. I've updated it now, and if there's still anything to improve I'll gladly hear from you. – Elmar Zander Nov 03 '11 at 22:49
-
@barbarabeeton: Thanks for the comment. The size of the symbol adapts now to the environment as it should. – Elmar Zander Nov 03 '11 at 22:50
-
Define
\appwith two arguments (#2won't be used) and say\def\approxprop{\mathpalette\app\relax}. Also\kern-\wd0can be saved by saying\rlap{\copy0}which wouldn't move the current point. Don't use\box1for local assignments; change all references to\box1to\box2and what you have now as\box2can become\box0if you use\boxinstead of\copy(the box is built before performing the assignment to the box register). – egreg Nov 03 '11 at 22:57 -
Great, thanks. There's always so much to learn about TeX. I didn't know
\mathpalette(cute) and had completely forgotten about\rlap. What about box1? Is it reserved for something? As boxes are local to a group I wouldn't expect any problem here... – Elmar Zander Nov 03 '11 at 23:17 -
Knuth advises to use odd numbered scratch registers (1, 3, 5, 7, 9) only for global assignments and even numbered ones (0, 2, 4, 6, 8, but also 255) only for local assignments. You find why in the TeXbook (pages 301 and 346) or in TeX by Topic (look for "save stack"). A last remark:
\hboxin\rlapis redundant, as\rlapalready does\hbox. – egreg Nov 03 '11 at 23:25
5
Does underset look better?
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\underset{\sim}{\propto} \qquad \stackrel{\propto}{\sim}
\]
\end{document}

Torbjørn T.
- 206,688
-
-
I tried these, problem is the spacing between the symbols is too large and it won't be properly centered vertically. – Seb Nov 03 '11 at 12:57
-
@Seb I see. I'm afraid I'm not very good with fine tuning of such constructs, but there are others here who can probably help you. – Torbjørn T. Nov 03 '11 at 13:07
-
2in both cases, the two symbols are different sizes, so neither is really appropriate, regardless of spacing. – barbara beeton Nov 03 '11 at 16:02
2
Does such a symbol officially exist? What about slight variations like \propto\!\!\sim

or \sim\!\propto

Tobias Kienzler
- 1,232
\undertilde{\propto}is acceptable: the tilde is quite different from\sim. – egreg Nov 03 '11 at 14:42