Page Layoutgreek letters as page numerals?

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
ianrobinson
Posts: 1
Joined: Fri Jun 19, 2009 12:43 am

greek letters as page numerals?

Post by ianrobinson »

Hi

I appreciate that this is probably an easy one but....

Is there a simple way to employ greek letters rather than roman ones as page numerals?

(It's a pedagogical thing, I teach physics and keep trying to push a little bit of broader education under the radar whilst training my little gonks to go off to university.)

cheers

ian

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

greek letters as page numerals?

Post by localghost »

ianrobinson wrote:[...] I appreciate that this is probably an easy one but....

Is there a simple way to employ greek letters rather than roman ones as page numerals?
This is not so easy as you might think but not impossible. As you already know the \pagenumbering command accepts arguments like alph, arabic or roman. But there is no such argument called greek. So you have to build one on your own.

You can do so by looking at the latex.ltx file, borrow some code from it and adapt this code to your needs. The result is a format for counters numbered with small Greek symbols. Take a look at the following code.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{blindtext}

\parindent0em

\makeatletter
\newcommand*{\greek}[1]{%
  \expandafter\@greek\csname c@#1\endcsname
}
\newcommand*{\@greek}[1]{%
  $\ifcase#1\or\alpha\or\beta\or\gamma\or\delta\or\varepsilon
    \or\zeta\or\eta\or\theta\or\iota\or\kappa\or\lambda
    \or\mu\or\nu\or\xi\or o\or\pi\or\varrho\or\sigma
    \or\tau\or\upsilon\or\phi\or\chi\or\psi\or\omega
    \else\@ctrerr\fi$%
}
\makeatother

\begin{document}
  \pagenumbering{greek}
  \Blinddocument
\end{document}
Note that this way of numbering has similar limitations like alphabetic numerals (caused by the amount of characters, here 24). Of course you can use the new numerals also in an enumeration environment or in sectioning commands. It works like the other counter formatting commands.



Best regards and welcome to the board
Thorsten
Post Reply