I am writing a science dissertation in the memoir class. The numbering system of the figures and tables appears to use the Chapter Figure number in chapter format, but does not include any separator between Chapter and Figure number in chapter.

This results in code like galaxies in figure \ref{fig:mo_2.7}., in reference to the first figure in the document, producingSDSS galaxies in figure 11

This reads like "figure eleven" (11) instead of "figure one point one" (1.1), as I would expect the figure reference package to produce. The same glitch is happening in the caption beneath the actual figure. So, again for the first figure of the document, code that reads

\caption[Galaxies in the SDSS]{The colour–magnitude\index{galaxy colour} relation of about 365,000 galaxies in the SDSS\index{SDSS} (see section \ref{bimodality} for discussion).

produces the following text upon compilation with pdflatex:

Figure 11. The colour-magnitude relation of about 365,000 galaxies in the SDSS (see section 1.2.1 for discussion).

As you can see, references to section labels work fine with chapter, section and subsection numbers all separarated by periods. References to figure and table labels, however, are all missing periods. To illustrate how this numbering looks throughout the document, see the list of figures that latex generates: List of figures, showing 6 enteries numbered 11, 12, 13, 21, 22, and 31

The document does not have 31 figures, but does have three chapters that include figures.

The preamble for this dissertation is

\documentclass[11pt, oneside, a4paper]{memoir}
\newcommand{\thesisTitle}{Alpha Omega}
\newcommand{\thesisName}{AA BB}
\newcommand{\thesisFirstSupervisor}{XX YY}
\newcommand{\thesisSecondSupervisor}{YY ZZ}
\newcommand{\thesisUniversity}{\protect{XX U}}
\newcommand{\thesisUniversityDepartment}{Department of X}
\newcommand{\thesisUniversityInstitute}{Institute X}
\newcommand{\thesisUniversityStreetAddress}{XX Road}
\makeheadrule {myruled}{\textwidth}{\normalrulethickness}
\makefootrule {myruled}{\textwidth}{\normalrulethickness}{\footruleskip}
\makeevenhead {myruled}{}{\small\itshape\leftmark}{}
\makeoddhead {myruled}{}{\small\itshape\rightmark}{}
\makeevenfoot {myruled}{\small \thepage}{}{}
\makeoddfoot {myruled}{}{}{\small \thepage}

\makepsmarks {myruled}{
\createmark {chapter} {both} {shownumber}{}{. \ }
\createmark {section} {both}{shownumber}{} {. \ }
\createmark {subsection} {both}{shownumber}{} {. \ }
\createmark {subsubsection}{both}{shownumber}{} {. \ }
\createplainmark {toc} {both} {\contentsname}
\createplainmark {lof} {both} {\listfigurename}
\createplainmark {lot} {both} {\listtablename}
\createplainmark {bib} {both} {\bibname}
\createplainmark {index} {both} {\indexname}
\createplainmark {glossary} {both} {\glossaryname}

\makefootrule {plain}{\textwidth}{\normalrulethickness}{\footruleskip}
\makeevenfoot {plain}{\small \thepage}{}{}
\makeoddfoot {plain}{}{}{\small \thepage}

\makepsmarks {plain}{
\createmark {chapter} {both} {shownumber}{}{. \ }
\createmark {section} {both}{shownumber}{} {. \ }
\createmark {subsection} {both}{shownumber}{} {. \ }
\createmark {subsubsection}{both}{shownumber}{} {. \ }
\createplainmark {toc} {both} {\contentsname}
\createplainmark {lof} {both} {\listfigurename}
\createplainmark {lot} {both} {\listtablename}
\createplainmark {bib} {both} {\bibname}
\createplainmark {index} {both} {\indexname}
\createplainmark {glossary} {both} {\glossaryname}

How can I get latex to add periods to figure and table labels and references?


After a discussion in the comments, I show a minimal example that reproduces the problem and a fix that addresses it. The minimal example is:





See figure \ref{fig:plot}.






fixes the problem on the surface level, and the figure numbering system now includes a period between Chapter and Figure number in the chapter:

Screenshot that reads "See figure one point one".

  • 1
    Welcome to TeX SX! Strange… What you want it the default, normally. Try \renewcommand{\thefigure}{\thechapter.\arabic{figure}} in your preamble. – Bernard Jul 1 '19 at 15:05
  • @Bernard Tried adding \renewcommand{\thefigure}{\thechapter.\arabic{figure}} in several parts of the preamble. Does not seem to produce any change. – parallelogram Jul 1 '19 at 15:22
  • 2
    You should post a minimal, but complete code reproducing the problem. I don't think it's the standard behaviour in the memoir class. – Bernard Jul 1 '19 at 15:37
  • 1
    I tried your code after I had added some document content. Various problems were reported related to your code. In the LoF numbers looked like 2.1 In the caption as 2.1. and in a \ref as 2.1. Basically the caption package does not work well with memoir. – Peter Wilson Jul 1 '19 at 17:35
  • 1
    This is a known error, please make sure to update your LaTeX installation. At one point the counter resetting macros was added to the LaTeX kernel, but they did so with an errror. This error have long since been fixed. – daleif Jul 2 '19 at 10:38

Your Answer

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

Browse other questions tagged or ask your own question.