[texhax] [Q] Reformatting the numbering scheme of document divisions in memoir class.

Ozan Öktem ozan.oktem at sidec.com
Fri Feb 3 15:21:37 CET 2006


Hi,

I want to redefine how memoir numbers document divisions.

Document divisions in LaTeX are numbered if the value of the secnumdepth
counter is equal to or greater than their level. The default format for
numbering of document divisions in memoir is the ``dot-notation'', i.e.
the number of a document division is made up of a sequence of integers
separated by dots. The ordering of integers is that the leftmost one is
the number of the chapter, followed in decreasing order by the numbers
of document divisions higher than the one to be numbered, and finally
ending with the number of the document division itself. As an example,
if subsections are to be numbered (which depends on the setting for
secnumdepth), then 2.1.3 corresponds to chapter 2, section 1, subsection
3.

Now, if the document does not have chapters, which would be the case if
the highest document division is a section, then the default behavior of
memoir is to set the corresponding number of the subsection to 0.1.3. I
want to change that and I seek the following behaviour.

Redefine the format for the numbering of document divisions in memoir so
that the number of a document division is made up of a sequence of
integers separated by dots. The ordering of integers is that the
leftmost one is the number of the highest document division (in contrast
to chapter), followed in decreasing order by the numbers of document
divisions higher than the one to be numbered, and finally ending with
the number of the document division itself. Thus, if section is the
highest document division, then this modified format for the numbering
would in our above example yield 1.3 and not 0.1.3. If subsection would
be the highest division (which is strange though), then we would get 3
instead of 0.0.3. The same should also hold for numbering of appendices.

Any help is appreciated.

/Ozan



More information about the texhax mailing list