Greek numbering

I wish to use numbering like 1\alpha, 1\beta,... in some subequations. I know that this is obtainable by redefining the \theequation like the following (which gives lower-case Roman numerals, 1.i, 1.ii,...)

\begin{subequations}
\renewcommand{\theequation}{\theparentequation{}.\roman{equation}}
\begin{align}
a1 &= b1 \\
a2 &= b2
\end{align}
\end{subequations}


The problem is I don't know the equivalent of \roman that will yield the Greek alphabet.

A related question (which might subsume the above) is: can someone complete the set of commands

\arabic, \alph, \Alph, \roman, \Roman, ...


You can create a Greek equivalent by taking the code of e.g. \alph from the file latex.ltx and modify it to get what you want. It also requires a slight modification to the subequations environment from amsmath.

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}

\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$
}
\renewenvironment{subequations}{%
\refstepcounter{equation}%
\protected@edef\theparentequation{\theequation}%
\setcounter{parentequation}{\value{equation}}%
\setcounter{equation}{0}%
\def\theequation{\theparentequation\greek{equation}}%
\ignorespaces
}{%
\setcounter{equation}{\value{parentequation}}%
\ignorespacesafterend
}
\makeatother

\begin{document}
\begin{subequations}
\begin{align}
(a+b)^2 &= a^2+2ab+b^2 \\
(a-b)^2 &= a^2-2ab+b^2 \\
(a+b)(a-b) &= a^2-b^2
\end{align}
\end{subequations}
\end{document}


You mentioned that you only want to modify some equations. The above introduced approach is a general modification. So you might have to do some adjustment on your own. At least you have Greek letters as enumeration symbols which also could be used at other places.

• Great answer. Shame subequations needs so much redefinition. Oct 13 '10 at 12:57
• Why redefine the subequations environment, when you can just do what the OP did in his post and \renewcommand\theequation inside the \begin{subequations}...\end{subequations} block? Oct 13 '10 at 13:43
• @Willie: You are right. Another possibility would be to clone the subequations environment, do the necessary modification and give it a new name (e. g. gsubequations). The new environment could be used wherever wanted. Oct 13 '10 at 14:46
• Thanks for the comprehensive answer. I followed Willie's suggestion and dropped the code for modifying the subeqations environment. It all worked perfectly. Oct 14 '10 at 1:28
• You need a % after \else\@ctrerr\fi\$ otherwise there will be a space after \greek{counter} Jul 27 '11 at 14:08

Taking inspiration from T.D.'s excellent answer, I wrote a small package to add extra counter output types. As well as greek, it defines binary, hexadecimal, and "First, Second, Third...".

You can use the \greeknumeral or \Greeknumeral from the babel package. I am not sure how well they will play within a maths environment, but you can read the source for some inspiration.

• Those are, I think, not quite the format the OP expects. See en.wikipedia.org/wiki/Greek_numerals for what \greeknumeral outputs. Oct 13 '10 at 13:47
• @Wong I am aware what a Greek Numeral (I speak, Greek!) Greek numerals (like their Roman counterparts) do not have a one to one representation with the alphabet. However, using the Babel package you can even have page-numbers with Greek numerals. Oct 13 '10 at 15:01

There is no LaTeX2e equivalent for Greek letters. The only numbering command you're missing there is \fnsymbol, which is actually how you'll implement support for Greek letters yourself. \fnsymbol is (from source2e.pdf)

\def\fnsymbol#1{\expandafter\@fnsymbol\csname c@#1\endcsname}


and \@fnsymbol is

\def\@fnsymbol#1{\ensuremath{\ifcase#1\or
*\or \dagger\or \ddagger\or\mathsection\or
\mathparagraph\or \|\or **\or \dagger\dagger\or
\ddagger\ddagger
\else\@ctrerr\fi}}


So to define your own numbering scheme, just define a new macro along similar lines and insert the appropriate symbols.

There may be a package that does this already; another package along similar lines is alphalph which lets you display alphabetically numbers greater than 26: {A, …, X, Y, Z, AA, AB, …, ZZ, AAA, AAB, …, FXSHRXW}

• Is FXSHRXW a random string of letters, or is it actually some limit on the size of the integers that TeX can handle, written in base 26? I somewhat doubt it because a string ending in W represents a even number (A = 0, Z = 25, W = 22), and limits on number sizes in computer science tend to be odd. Oct 13 '10 at 13:41
• I just grabbed it from the alphalph docs; FXSHRXW is the max integer (corresponding to decimal 2147483647). I'm a bit rusty on my non-base-10 arithmetic, but for alphalph A = 1 and W = 23. Oct 13 '10 at 13:55
• Thanks for pointing out the command missing from my list. Your suggestion to modify the code above is basically what Thorsten did - but I saw his answer first! Oct 14 '10 at 1:33
• No problem—his answer was better because he did the work of actually defining the new command! Oct 14 '10 at 2:24
• moreenum.sty uses alphalph to do exactly this. Jul 13 '11 at 11:50