Discussion:
Page numbering with maya numbers
(too old to reply)
o***@gmail.com
2018-01-15 23:47:39 UTC
Permalink
Raw Message
Gods of LaTeX: enlighten me with your wisdom! How can I use maya numbers for page numbering?
Holger Schieferdecker
2018-01-16 08:36:31 UTC
Permalink
Raw Message
Post by o***@gmail.com
Gods of LaTeX: enlighten me with your wisdom! How can I use maya numbers for page numbering?
The package mathabx provides maya numbers, but they need to be rotated
[1]. With the help of the package fancyhdr you can use them for page
numbering[2].

Note that those maya numbers need to be used in math mode.

If you want different delimiters instead of the vertical lines you can
change them for example to brackets using

\mayadelimiters([,])

Hope that helps,
Holger

[1] https://tex.stackexchange.com/a/142285
[2] https://tex.stackexchange.com/a/3743

%%%%%%%%%%%%%%%%%%%%%
\documentclass{article}

\usepackage{graphicx}
\usepackage{mathabx}% http://ctan.org/pkg/mathabx
\usepackage{fancyhdr}

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

% rotate the numerals
\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}%

% use maya numbers as pagenumber
\fancypagestyle{plain}{%
\fancyhf{} % clear all header and footer fields
\fancyfoot[C]{$\maya{\thepage}$} % except the center
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\pagestyle{plain}

\begin{document}

\mayadigit{17}

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

\clearpage
And so on.
\clearpage
And so on.
\clearpage
And so on.
\clearpage
And so on.

\end{document}
o***@gmail.com
2018-01-16 09:36:22 UTC
Permalink
Raw Message
Post by o***@gmail.com
Gods of LaTeX: enlighten me with your wisdom! How can I use maya numbers for page numbering?
Thank you Holger: it works like a charm!
Holger Schieferdecker
2018-01-16 10:29:33 UTC
Permalink
Raw Message
Post by o***@gmail.com
Post by o***@gmail.com
Gods of LaTeX: enlighten me with your wisdom! How can I use maya numbers for page numbering?
Thank you Holger: it works like a charm!
You're welcome.

As I don't know anything about your document there are limitations:

- Due to the vertical alignment of maya numbers the page number is
higher than conventional page numbers. You have to check if it fits in
the page footer in all cases.

- The page numbers in the table of contents are not maya numbers

- The same applies to page references

Holger

Loading...