After a recent update the dot between chapter numbers and figure numbers disappeared. Here is a minimal example.

Some text
\chapter{Chapter name}
  \caption{A figure}\label{A caption}
Some text~\ref{A caption}

The caption should be "Figure 1.1: A figure", but instead I get "Figure 11: A figure".

The complete log file is

This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6670 64-bit) (preloaded format=pdflatex 2018.4.19)  19 APR 2018 19:30
entering extended mode
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 76 language(s) loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\memoir\memoir.cls"
Document Class: memoir 2018/04/04 v3.7g configurable book, report, article docu
ment class
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty"
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
("C:\Program Files\MiKTeX 2.9\tex\latex\ifetex\ifetex.sty"
Package: ifetex 2018/03/31 v1.2a ifetex

("C:\Program Files\MiKTeX 2.9\tex\plain\ifetex\ifetex.tex"))
("C:\Program Files\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty"
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"
Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.

("C:\Program Files\MiKTeX 2.9\tex\latex\memoir\mem10.clo"
File: mem10.clo 2008/01/30 v0.3 memoir class 10pt size option
LaTeX Info: Redefining \em on input line 7578.
LaTeX Info: Redefining \emph on input line 7586.
LaTeX Info: Redefining \: on input line 12100.
LaTeX Info: Redefining \! on input line 12102.
Package abstract [2008/07/23] emulated by memoir.
Package appendix [2008/07/23] emulated by memoir.
Package array [2016/10/06] emulated by memoir.
Package booktabs [2016/05/16] emulated by memoir.
Package ccaption [2008/07/23] emulated by memoir.
Package changepage [2008/07/23] emulated by memoir.
Package chngcntr [2008/07/23] emulated by memoir.
Package chngpage [2008/07/23] emulated by memoir.
Package crop emulated by memoir.
Package dcolumn [2008/07/23] emulated by memoir.
Package delarray [2014/10/28] emulated by memoir.
Package enumerate [2008/07/23] emulated by memoir.
Package epigraph [2008/07/23] emulated by memoir.
Package ifmtarg [2008/07/23] emulated by memoir.
Package index [2008/07/23] emulated by memoir.
Package makeidx [2008/07/23] emulated by memoir.
Package moreverb [2008/07/23] emulated by memoir.
Package mparhack [2008/07/23] emulated by memoir.
Package needspace [2008/07/23] emulated by memoir.
Package newfile [2008/07/23] emulated by memoir.
Package nextpage [2008/07/23] emulated by memoir.
Package pagenote [2008/07/23] emulated by memoir.
Package parskip [2008/07/23] emulated by memoir.
Package patchcmd [2008/07/23] emulated by memoir.
Package setspace [2008/07/23] emulated by memoir.
Package shortvrb [2008/07/23] emulated by memoir.
Package showidx [2008/07/23] emulated by memoir.
Package tabularx [2016/02/03] emulated by memoir.
Package titleref [2008/07/23] emulated by memoir.
Package titling [2008/07/23] emulated by memoir.
Package tocbibind [2008/07/23] emulated by memoir.
Package tocloft [2008/07/23] emulated by memoir.
Package tocvsec2 [2008/07/23] emulated by memoir.
Package verbatim [2008/07/23] emulated by memoir.
Package verse [2008/07/23] emulated by memoir.
) (aaa.aux)
\openout1 = `aaa.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
 [1{C:/Users/Carlos Tiago/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}

] [2


] (aaa.aux) ) 
Here is how much of TeX's memory you used:
 3529 strings out of 492972
 47082 string characters out of 3135837
 136157 words of memory out of 3000000
 7459 multiletter control sequences out of 15000+200000
 5803 words of font info for 21 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 31i,10n,24p,153b,221s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmbx12
.pfb><C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on aaa.pdf (3 pages, 24368 bytes).
PDF statistics:
 20 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)
  • I just compiled your MWE and I got "Figure 1.1: A figure". See this image: i.imgur.com/69cbgC4.png – Milo Apr 19 '18 at 17:03
  • I'm using pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6670 64-bit). What you obtained was exactly what I wanted ... – Carlos Tiago Apr 19 '18 at 17:17
  • Your code is working when I compile it with pdfLaTeX. I don't know what the problem is. Perhaps you should be using pdfLaTeX not pdfTeX? – Milo Apr 19 '18 at 17:57
  • See the difference between pdfTeX and pdfLaTeX – Milo Apr 19 '18 at 17:59
  • I copy the information "pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6670 64-bit)" from the log file. It says pdfTeX, but I'm compiling with pdfLaTeX. Thanks. – Carlos Tiago Apr 19 '18 at 18:32

Until the error is fixed in the new LaTeX format, you can explicitly use the version that memoir still provides by using


in your preamble.

Thanks to jfbu for the analysis.

| improve this answer | |
  • 2
    fixed in kernel code, so should show up soon – Frank Mittelbach Apr 22 '18 at 9:38

Initially, \thefigure has the dot

> \thefigure=\long macro:
->\thechapter .\@arabic \c@figure .
l.2 \show\thefigure

\frontmatter does \counterwithout {figure}{chapter} which resets \thefigure to

> \thefigure=macro:
->\@arabic \c@figure .
l.12 \show\thefigure

Where the dot has disappeard (in the above the final dot is always added by \show).

As part of expansion of \mainmatter we also see

\@secondoftwo #1#2->#2
#1<-\@nocounterr {chapter}
#2<-\@addtoreset {figure}{chapter}\expandafter \gdef \csname thefigure\expandaf
ter \endcsname \expandafter {\csname thechapter\expandafter \endcsname \expanda
fter \@arabic \csname c@figure\endcsname }

Thus again \thefigure is defined without dot.

The latter comes from expansion of:

\@memmain@floats ->\counterwithin {figure}{chapter} \counterwithin {table}{chap

So it seems \counterwithout/\counterwithin is culprit. Perhaps the recent change in the LaTeX format ?

(I will investigate a bit more and report)

With memoir as in TL2017 I see in the log

\@csin #1#2->\@ifbothcntrs {#1}{#2}{\@addtoreset {#1}{#2}\@namedef {the#1}{\@na
meuse {the#2}.\arabic {#1}}}

With memoir + TL2018 current I see

\counterwithin@x #1#2->\@ifbothcounters {#1}{#2}{\@addtoreset {#1}{#2}\expandaf
ter \gdef \csname the#1\expandafter \endcsname \expandafter {\csname the#2\expa
ndafter \endcsname \expandafter \@arabic \csname c@#1\endcsname }}

This is where the dot has disappeared. Both expand from

\@memmain@floats ->\counterwithin {figure}{chapter} \counterwithin {table}{chap

but expansion of \counterwithin has changed. The new memoir has


whereas the former had


LaTeX of TL2017 did not define \counterwithin:

$ latexdef counterwithin


but LaTeX of TL2018 does define it

$ latexdef counterwithin

macro:->\@ifstar \counterwithin@s \counterwithin@x 

The cautious \providecommand done by memoir 2018/04/04 v3.7g does not overrule the \counterwithin now from LaTeX. But this one adds no dot...

Thus a report to maintainers of memoir and LaTeX2e is in order...

well this appears to be a LaTeX2e bug because the definition does not include the dot which is in the description: enter image description here

| improve this answer | |
  • github.com/latex3/latex2e/issues/38 – user4686 Apr 19 '18 at 21:34
  • Good investigation. I did indeed just add \providecommand to memoir to prepare for the new format. Where exactly do you see the text in the image? – daleif Apr 20 '18 at 11:35
  • @daleif in source2e.pdf: section 22 Counters and Lengths corresponding to file ltcounts.dtx – user4686 Apr 20 '18 at 11:36
  • Thanks, hopefully they'll have that fixed soon enough, sad though that this is after the TL freeze – daleif Apr 20 '18 at 11:39
  • 1
    @daleif the github commit does include a thorough test for many things and among them \counterwithin{footnote}{subsection}, followed by \show\thefootnote with the comment % \thesubsection.\arabic{footnote}. But the committed expectation was without the dot, in contradiction to comment.. thus the commit went through the validation. I feel sympathy for having myself pushed an update to a package a bit in haste when I belatedly realized TeXLive schedule had been advanced by one full month. Bugs creep-in even in validation suites... – user4686 Apr 20 '18 at 12:24

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.