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:




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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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