0

I am using the memoir class.

My document consists of chapters, which consist of sections.

Within sections, I want tables, figures, etc. to be numbered by chapter.section.number; e.g. Table 1.2.1 for the first table in Section 2 of Chapter 1.

If I have tables, lemmas, etc. in some introductory text of the chapter before the first section, I would like them to be labelled by chapter.number; e.g. Table 1.1.

Currently if I do this, I get Table 1.0.1 instead. I suppose it might be possible to do something like

\renewcommand{\thetable}{\arabic{chapter}.\arabic{table}} 

at the beginning of the chapter and some other \renewcommand before the first section of the chapter, but is there any other way? Is there some built-in functionality e.g. in memoir to do this?

1

Write the following code in the preamble:

\renewcommand{\thetable}{\arabic{chapter}.\ifnum\value{section}>0 \arabic{section}.\fi\arabic{table}} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.