13

I am trying to get a double tilde symbol over a letter but I can't find a well suiting solution. I tried

$\tilde{\tilde{z}}$

and

$\overset{\approx}{z}$ 

but both solution look a bit off. I am trying to find something with less vertical space between the two tildes but a similar size like \tilde{}.

edit: vertical spacing

FourKP
  • 133
  • 1
  • 1
  • 6
  • 2
    Welcome to TeX.SE. Have you tried loading the amsmath package? – Mico Feb 16 '18 at 14:04
  • Thank you! Yes, the problem is not that this solutions do not work, they just look really bad. – FourKP Feb 16 '18 at 14:10
  • If you do load this package, you will get proper-looking double tildes. That's why I asked if you'd tried it. – Mico Feb 16 '18 at 14:12
  • Yeah sry that is true. I meant the vertical spacing. I changed it in the original question. – FourKP Feb 16 '18 at 14:20

3 Answers3

17

One of these?

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{calc}

\usepackage{accents}
\newcommand{\dbtilde}[1]{\accentset{\approx}{#1}}
\newcommand{\vardbtilde}[1]{\tilde{\raisebox{0pt}[0.85\height]{$\tilde{#1}$}}}

\begin{document}

    \[ \vardbtilde{z}\quad \dbtilde{z} \]%

\end{document} 

enter image description here

Bernard
  • 271,350
13

A variation on my answer here: double tilde symbol under letter. Here, \tsup takes an optional argument specifying the number of symbols to overset (default 2).

\documentclass{article}
\usepackage{stackengine}
\stackMath
\newcommand\tsup[2][2]{%
 \def\useanchorwidth{T}%
  \ifnum#1>1%
    \stackon[-.5pt]{\tsup[\numexpr#1-1\relax]{#2}}{\scriptscriptstyle\sim}%
  \else%
    \stackon[.5pt]{#2}{\scriptscriptstyle\sim}%
  \fi%
}
\begin{document}
\[
\tsup[1]{z}\neq\tsup{\Lambda}\neq\tsup[3]{\Delta}\neq\tsup[4]{\psi}
\]

\end{document}

enter image description here

Here's a version that uses the proper tilde glyph and works across 10-12pt fontsize range:

\documentclass[10pt]{article}
\usepackage{stackengine}
\stackMath
\newcommand\tsup[2][2]{%
 \def\useanchorwidth{T}%
  \ifnum#1>1%
    \stackon[-1.3ex]{\tsup[\numexpr#1-1\relax]{#2}}{\mathchar"307E}%
  \else%
    \stackon[-1ex]{#2}{\mathchar"307E}%
  \fi%
}
\begin{document}
\[
\tilde z=\tsup[1]{z}\neq\tsup{\Lambda}\neq\tsup[3]{\Delta}\neq\tsup[4]{\psi}
\]
\fontsize{12pt}{14pt}\selectfont
\[
\tilde z=\tsup[1]{z}\neq\tsup{\Lambda}\neq\tsup[3]{\Delta}\neq\tsup[4]{\psi}
\]
\end{document}

enter image description here

In both MWE's the only issue missing is the italic kerning of the overset. That could be somewhat addressed globally (not for each particular character) with a little \kern

\newcommand\tsup[2][2]{%
 \def\useanchorwidth{T}%
  \ifnum#1>1%
    \stackon[-1.3ex]{\tsup[\numexpr#1-1\relax]{#2}}{\mathchar"307E\kern-.5pt}%
  \else%
    \stackon[-1ex]{#2}{\mathchar"307E\kern-.5pt}%
  \fi%
}

enter image description here

8

The tipa package has \doubletilde. However, it is not made for math mode, so you have to cheat a bit:

\documentclass{article}
\usepackage{amsmath}
\usepackage[extra]{tipa}

\begin{document}

$\doubletilde{\kern-1pt$z$}$

\end{document}

enter image description here