# How do I get two mathrings centered over a variable?

I am trying to represent a second order, dimensionless derivative by two open circles overtop a variable. I understand how to do one (\mathring v), and I understand how to do multiple solid dots (\ddot v), but I can't figure out how to get two open circles over my variable. Any help would be greatly appreciated.

-

A modification of the \dddot macro of amsmath:

\documentclass{article}

\newcommand\ringring[1]{%
{% make an Ord atom
\mathop{\kern0pt #1}\limits^{% set a box over the variable
\vbox to-1.85ex{
\kern-2ex % lower the ring accents
\hbox to 0pt{\hss\normalfont\kern.1em \r{}\kern-.45em \r{}\hss}%
\vss % fill
}% end of \vbox
}% end of the superscript
}% end of \mathop
}

\begin{document}
$\mathring{x}\ringring{x}\ddot{x}$
\end{document}


-
Wow, that was a bit more complicated than I thought. This is great, thank you. –  Michael Price Mar 10 '14 at 20:46
@MichaelPrice I made a few fixes. –  egreg Mar 10 '14 at 21:02

Using a stack inset, the code is straightforward.

\documentclass{article}
\usepackage{stackengine}
\def\dcirc#1{\stackinset{c}{}{t}{-3.5pt}%
{$\mkern2.5mu\scriptscriptstyle\circ\mkern-2mu\circ$}{$#1$}}
\begin{document}
$\dcirc{X}= A\dcirc{x}$
\end{document}


-

With the accentspackage, it' as simple as \mathring{\mathring{…}}:

    \documentclass{article}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{accents}

\begin{document}

$\mathring{\mathring{A}}$

\end{document}


-
Thanks for the response. Traditionally the dots (or rings in this case) are set horizontally (similar to the command \ddot) and not vertically. Is there any way to flip those? This will be what I use if I can't figure out the other way. Thanks again. –  Michael Price Mar 10 '14 at 20:29