# How can I put a ring accent below (or inside) a letter in math mode?

I need to put a circle (ring, zero etc.) below or inside a \Lambda letter.

I need to do so both in math mode of LaTeX document and in mathtext mode of matplotlib - so my choice of commands is limited.

If I use \stackrel{\Lambda}{\circ} then lambda is to small.

\Lambda\!\!\!\!\!\circlooks like bad 'A'.

I even have considered to go with upper accent. Results look bad. In \mathring{\Lambda} ring is to small and not centered. In \Lambda\ocirc ring size is acceptable, but it overlaps with lambda (and is not centered).

NOTE: OP indicates this method does not work for his application, because package imports are not allowed.

Nonetheless, here it is for regular LaTeX, in two forms:

(1) Without smaller math styles:

\documentclass{article}
\usepackage{stackengine,graphicx}
\newcommand\circLambda{\ensurestackMath{\stackengine{-.25pt}{\Lambda}{%
\scalebox{.7}{$\circ\mkern1.7mu$}}{O}{c}{F}{F}{L}}}
\begin{document}
Here is \circLambda

$A \circLambda$
\end{document}


(2) Here it is for smaller mathstyles:

\documentclass{article}
\usepackage{stackengine,graphicx,scalerel}
\newcommand\circLambda{\ThisStyle{\ensurestackMath{\stackengine{%
\dimexpr-.6\LMpt+.3pt\relax}{%
\SavedStyle\Lambda}{%
\scalebox{.7}{$\SavedStyle\circ\mkern1.7mu$}}{O}{c}{F}{F}{L}}}}
\begin{document}
Here is \circLambda

$A \circLambda \scriptstyle\circLambda \scriptscriptstyle\circLambda$
\end{document}


• I am afraid I can not import any packages in mathtext mode of matplotlib, can I? Nov 7, 2018 at 20:25

Without packages.

\documentclass{article}

\makeatletter
\newcommand{\Lambdaring}{{\mathpalette\Lambda@ring\relax}}
\newcommand{\Lambda@ring}[2]{%
\ooalign{%
$\m@th#1\Lambda$\cr
\hidewidth
\raisebox{-.52\height}[0pt][0pt]{%
$\m@th#1\mskip-0.9mu\nonscript\mskip-0.2mu\mathring{}$%
}%
\hidewidth\cr
}%
}
\makeatother

\begin{document}

$\mathrm{A}\Lambdaring_{\Lambdaring_{\Lambdaring}}$

\end{document}


• I am arfraid I can not define macros in mathtext mode of matplotlib. I have tried to unfold the macro to \makeatletter \mathpalette \ooalign{% $\m@th#1\Lambda$\cr \hidewidth \raisebox{-.52\height}[0pt][0pt]{% $\m@th#1\mskip-0.9mu\nonscript\mskip-0.2mu\mathring{}$% }% \hidewidth\cr } \relax \makeatother, but all I got is: Unknown symbol: \makeatletter (at char 0), (line:1, col:1) How shall I unfold it properly? Nov 8, 2018 at 19:03
• @abukaj Then you're doomed, sorry. Nov 8, 2018 at 23:07