horizontal maya numerals (mathabx)

The following seems to work as expected:

enter image description here

\documentclass{article}
\usepackage{graphicx,mathabx}% http://ctan.org/pkg/{graphicx,mathabx}

\newcommand\mathbfont{\usefont{U}{mathb}{m}{n}}

\begin{document}

\mayadigit{17}

\[
  \maya{2013}, \maya{123}, \maya{45}
\]

\noindent\hrulefill

\def\mayaexpansion{%
    \mayacntc=\mayacnta\mathbfont
    \ifnum\mayacntc=0 0\else
    \rotatebox[origin=c]{-90}{%
    \loop\ifnum\mayacntc>5\advance\mayacntc by -5\repeat
    \the\mayacntc\mayacntc=\mayacnta
    \loop\ifnum\mayacntc>5\advance\mayacntc by -5 5\repeat}%
    \fi}%

\mayadigit{17}

\[
  \maya{2013}, \maya{123}, \maya{45}
\]

\end{document}

The definition of \mayaexpansion is taken from mathabx.dcl. Inserted is a graphicx rotation of -90 degrees around the center of the object. This is only done if the object is not zero.


NOTE: The following does not work with pdfLaTeX.


In the website, MayaPS: Typing Maya with TeX/LaTeX you will find a font package that enables you to use several maya glyphs like for writing numbers as what you are requesting. Here is a MWE:

enter image description here

\documentclass[letterpaper]{article}
\input mayaps
\begin{document}
\mayaSize{0.5cm}
\begin{minipage}{1cm}
\maya{905}\\
\maya{900}\\
\maya{913}
\end{minipage}
\end{document}

The numbers you see here, 905, 900 and 913 are those assigned to the glyphs. You can find these on page 10 and ll of the codex-map file. For you to compile the document you will need to copy the files mayaps.tex, mayaps.pro, codex.mpf, red89.tex (if needed), and mpfmap.tex (if needed) to the current directory (folder). You can find this on page 5 of the package documentation (Reference Manual).