# How to have a number directly under a decimal point?

I am trying to write a number in quaternary form and would ideally like to show this by having a four underneath the decimal point. I've searched around, but can't figure out how to do this so any help would be appreciated. What I'm looking for:

Update: Thank you very much, excellent solutions. I'm very grateful.

-

Here's a possibility:

\documentclass{article}
\newcommand{\basex}[3]{#2\separator{#1}#3}
\newcommand{\separator}[1]{%
{\,\oalign{$\cdot$\cr\noalign{\kern-.3ex}%
\hidewidth$\scriptscriptstyle#1$\hidewidth\cr}\,}}
\newcommand{\quaternary}[2]{\basex{4}{#1}{#2}}

\begin{document}
$\quaternary{0}{t_1}$

$\basex{12}{0}{t_1}$
\end{document}

The \basex command is generic, so you can use different bases; saying \quaternary{a}{b} is equivalent to saying \basex{4}{a}{b}.

Using "official" LaTeX commands would be possible, but in cases like this one lower level commands are more flexible.

-
nice! what if the base has more digits? might that not tend to spread the arguments farther apart than desirable? – barbara beeton Apr 8 '13 at 12:23
\oalign and \noalign together must be worth +1 – David Carlisle Apr 8 '13 at 12:26
@barbarabeeton I've added the needed \hidewidth commands; up to two digits show well, it seems. – egreg Apr 8 '13 at 12:30

I would do it as

\documentclass{article}
\begin{document}
$$0_{\dot 4}t_1$$

$$0_{\dot{12}}t_1$$

$$0_{\dot{123}}t_1$$
\end{document}

One can also shift the dot to left or right, if needed (which I have not done here).

-