7

How can I get proper spacing when using tilde over operator symbols?

\begin{align*}
x &= y\\
x &\tilde{=} b
\end{align*}

Yields:

enter image description here

But I would like the tilde version to have the same kind of spacing as normal equality

  • 1
    Why don't you use \simeq or \cong instead? – Werner Jan 7 at 20:59
11

You can make arbitrary symbol a relation by wrapping it into \mathrel{}. For example: \mathrel{\tilde{=}} will use the correct spaces around it. There are other ways: \stackrel{}{} (as Herbert noted), or use of a predefined symbol like \cong. They all have different looks. Chose what you prefer:

\documentclass{article}
\usepackage{amsmath}
\newcommand\teq{\mathrel{\tilde{=}}}
\newcommand\seq{\stackrel{\sim}{=}}
\begin{document}
\begin{align*}
x &= y\\
x &\teq b\\
x &\seq b\\
x &\cong b\\
\end{align*}
\end{document}

The result:

enter image description here

3
\begin{align*}
x &= y\\
x &\stackrel{\sim}{=} b
\end{align*}

enter image description here

2

Here there is another minimal example.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}

\begin{align*}
x &= y\\
x &\overset{\sim}{=} b
\end{align*}

\begin{align*}
x &= y\\
x &\overset{\thicksim}{=} b
\end{align*}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.