In Latex, How do I write "\sim_G" but so that the G is directly underneath the "\sim"?
Asked
Active
Viewed 563 times
1 Answers
5
If you are going to use it often, you can declare it to be a math operator. If used rarely, you can make a stack or an \underset. Here, I show all ways. Notice I made the stack a \mathrel, rather than \mathop, which has a slightly larger horizontal spacing. Choose what suits. When using the \stackunder, the vertical gap may be set with the optional argument.
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator*{\simop}{\sim}
\usepackage{stackengine}
\stackMath
\begin{document}
\[A \underset{G}{\sim} B \mathrel{\stackunder[1.8pt]{\sim}{\scriptstyle G}} B \simop_G A \]
\end{document}

Steven B. Segletes
- 237,551
argminorargmax? You have to define it as a math operator. – Werner Feb 25 '14 at 20:02