# Special underline/Partial box

I'm not exactly sure what to call this, but I'd like to know how to replicate the text decoration shown under the $n$ in the image. It seems a hooked underline or similar to, a partial box, but only around the character. But I have no idea which packages to even start looking in for it.

• Perhaps analogous to $n\rfloor$ using the amssymb package. – Steven B. Segletes Mar 16 '18 at 1:42

One proposal:

\documentclass{article}
\usepackage{amsmath}
\newcommand{\partialbox}[1]{%
\underline{#1}\raisebox{-1.1pt}{\rule[-0.5pt]{0.5pt}{4pt}}}
\begin{document}
$S(\pi)=:\left(\partialbox{n}\dots\right)$
\end{document}


EDIT: A rather close reproduction of your scan.

\documentclass{article}
\usepackage{amsmath}
\newcommand{\partialbox}[1]{%
\underline{#1}\raisebox{-1.1pt}{\rule[-0.5pt]{0.5pt}{4pt}}}
\begin{document}
$S(\pi)=:\left(\partialbox{n},\,\to_\pi,\,\le_\pi\right)$
\end{document}