# Right superscript dot

I would like to achieve the following: a dot right of an expression

with this minimal example

\documentclass{article}
\usepackage{amsmath}
\usepackage{accents}

\newcommand{\dotr}[1]{%
#1\accentset{\mbox{\bfseries .}}{\vphantom{#1}}}

\begin{document}
$\dotr{(X+Y)}$
\end{document}

but the dot is too high. How can I lower the dot?

Thanks a lot!

A simple solution using \bullet as superscript:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\dotr}[1]{#1^{\bullet}}

\begin{document}
$\dotr{(X+Y)}$
\end{document}

If the bullet is too large, it can be reduced using the graphicx package. The following example also measures the first term and puts the bullet as high as possible without exceeding the height of the term before:

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}

\makeatletter
\newcommand{\dotr}[1]{%
\mathpalette\@dotr{#1}%
}
\newcommand*{\@dotr}[2]{%
% #1: math style (\displaystyle, ..., \scriptscriptstyle)
% #2: argument of \dotr
\sbox0{$\m@th#1#2$}%
\usebox{0}%
% simulating a superscript
\raisebox{\dimexpr\ht0-\height}{$\m@th#1\@smallbullet#1\bullet$}%
\kern\scriptspace
}
\newcommand*{\@smallbullet}[2]{%
\scalebox{.5}{$\m@th#1#2$}%
}
\makeatother

\begin{document}
$\dotr{(X+Y)}$
\end{document}

Remarks:

• The size of the small bullet can be configured by the number for \scalebox.
• \mathpalette takes into account the current math style. It is further explained in the answers of question "The mysteries of \mathpalette". Therefore \@dotr has two arguments, the first argument is the math style.
• \m@th is just a shortcut (defined in the LaTeX kernel) for \mathsurround=0pt for the case someone the feature of having additional white space around math formulas.
• \sbox is the LaTeX version of setting a box register (first argument) with a horizontal box, whose contents is given in the second argument. It should be explained in a LaTeX manual. Even box numbers below 10 are free scratch registers for local assignments. The group is indirectly given by \mathpalette.
• Couldy you explain what exactly \sbox0{$\m@th#1#2$} does and from where the definition of \ht0 comes? Why has \@dotr 2 arguments? Thx alot! – Gabriel May 21 '13 at 8:29
• @Gabriel I have extended the "Remarks". – Heiko Oberdiek May 21 '13 at 11:53

another approach:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\dotr}{\mbox{$\boldsymbol{\cdot}$}}

\begin{document}
$(X+Y)^{\dotr}$
\end{document}

Your title says "Left" but your example code has a standard right superscript?

Assuming you want it on the right, I'd probably just do

(X+Y)^{\cdot}
• good idea, but the dot is kind of puny. see my answer. – barbara beeton May 17 '13 at 13:38
• true but \bullet is a bit big and \scriptscriptstyle\bullet too much to type. Oh I see you used a bold one, OK. – David Carlisle May 17 '13 at 14:17

The altitude of the dot is adjustable, currently 1ex

\documentclass{article}
\usepackage{verbatimbox}
\begin{document}
$\dotr{(X+Y)}$
\end{document}

\documentclass{article}
\usepackage{amsmath}
\usepackage{accents}

\newcommand{\dotr}[1]{%
#1\accentset{\mbox{\bfseries .}}{\vphantom{#1}}}

\begin{document}
$\dotr{(X+Y)}$

$(X+Y)^{\textstyle\textbf{.}}$
\end{document}

Of course, corrections of the heighth are possible.