TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 13 down vote accepted

Here's a possibility:




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

enter image description here

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

share|improve this answer
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

\( 0_{\dot 4}t_1 \)

\( 0_{\dot{12}}t_1 \)

\( 0_{\dot{123}}t_1 \)

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

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.