Does there exist such a notation? It looks similar to old factorial notation, but its in upper right corner rather than lower left.
I need it as math environment or with some simple code so as to achieve:
These are made in ms word.
Does there exist such a notation? It looks similar to old factorial notation, but its in upper right corner rather than lower left.
I need it as math environment or with some simple code so as to achieve:
These are made in ms word.
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand*{\foo}[1]{{\mathpalette\@foo{#1}}}
\newcommand*{\@foo}[2]{%
\dimen@=\fontdimen8
\ifx#1\displaystyle\textfont\else
\ifx#1\textstyle\textfont\else
\ifx#1\scriptstyle\scriptfont\else
\scriptscriptfont\fi\fi\fi3\relax
\hbox{%
\vbox{%
\hrule\@height\dimen@
\kern2\dimen@
\hbox{\m@th$#1#2$\kern\dimen@}%
}%
\vrule\@width\dimen@
}%
}
\makeatother
\begin{document}
\[
\foo{n} \quad
a^{\foo{n}} \quad
{\scriptstyle\foo{n}} \quad
{\scriptscriptstyle\foo{n}}
\]
\end{document}
The scratch length \dimen@ is set up to be the fraction rule width in the current math style. That's chosen to be the rule width and the horizontal spacing on the right, while the vertical spacing is twice that value. Choose the values as you prefer.
There is a package named actuarialangle that produces your expected result. Here I have done a MWE with Cambria Math using the engine XeLaTeX.
\documentclass{article}
\usepackage{unicode-math}
\usepackage{actuarialangle}
\setmathfont{Cambria Math}
\begin{document}
$\actuarialangle{n\,}\cdot a^{\actuarialangle{n\,}}$
\end{document}
\annuityor one of the angle commands from actuarialange. See, e.g.,symbols-a4.pdf, table 241. – cabohah Jul 22 '23 at 06:29