更新后章节号和图号之间的点消失

更新后章节号和图号之间的点消失

最近更新后,章节号和图号之间的点消失了。这是一个最简单的例子。

\documentclass[]{memoir}
\begin{document}
\frontmatter
Some text
\mainmatter
\chapter{Chapter name}
\begin{figure}
  \caption{A figure}\label{A caption}
\end{figure}
Some text~\ref{A caption}
\end{document}

标题应为“图 1.1:一个图”,但我得到的却是“图 11:一个图”。

完整的日志文件是

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
**./aaa.tex
(aaa.tex
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
\onelineskip=\skip41
\lxvchars=\skip42
\xlvchars=\skip43
\@memcnta=\count80
\c@@memmarkcntra=\count81
("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.
)
\stockheight=\skip44
\stockwidth=\skip45
\trimtop=\skip46
\trimedge=\skip47

("C:\Program Files\MiKTeX 2.9\tex\latex\memoir\mem10.clo"
File: mem10.clo 2008/01/30 v0.3 memoir class 10pt size option
)
\binding=\skip48
\spinemargin=\skip49
\foremargin=\skip50
\uppermargin=\skip51
\lowermargin=\skip52
\headdrop=\skip53
\normalrulethickness=\skip54
\mem@maxheadheight=\skip55
\mem@maxfootheight=\skip56
\headwidth=\skip57
\c@storedpagenumber=\count82
\memPD=\dimen102
\m@mabparskip=\skip58
\thanksmarkwidth=\skip59
\thanksmarksep=\skip60
\droptitle=\skip61
\c@book=\count83
\c@part=\count84
\c@chapter=\count85
\c@section=\count86
\c@subsection=\count87
\c@subsubsection=\count88
\c@paragraph=\count89
\c@subparagraph=\count90
\beforechapskip=\skip62
\midchapskip=\skip63
\afterchapskip=\skip64
\chapindent=\skip65
\bottomsectionskip=\skip66
\secindent=\skip67
\beforesecskip=\skip68
\aftersecskip=\skip69
\subsecindent=\skip70
\beforesubsecskip=\skip71
\aftersubsecskip=\skip72
\subsubsecindent=\skip73
\beforesubsubsecskip=\skip74
\aftersubsubsecskip=\skip75
\paraindent=\skip76
\beforeparaskip=\skip77
\afterparaskip=\skip78
\subparaindent=\skip79
\beforesubparaskip=\skip80
\aftersubparaskip=\skip81
\pfbreakskip=\skip82
\c@@ppsavesec=\count91
\c@@ppsaveapp=\count92
\ragrparindent=\dimen103
\everylistparindent=\dimen104
\parsepi=\skip83
\topsepi=\skip84
\itemsepi=\skip85
\parsepii=\skip86
\topsepii=\skip87
\topsepiii=\skip88
\itemsepii=\skip89
\itemsepiii=\skip90
\partopsepii=\skip91
\partopsepiii=\skip92
\m@msavetopsep=\skip93
\m@msavepartopsep=\skip94
\@enLab=\toks14
\abstitleskip=\skip95
\absleftindent=\skip96
\abs@leftindent=\dimen105
\absrightindent=\skip97
\absparindent=\skip98
\absparsep=\skip99
\c@vslineno=\count93
\c@poemline=\count94
\c@modulo@vs=\count95
\c@memfvsline=\count96
\vleftskip=\skip100
\vrightskip=\skip101
\stanzaskip=\skip102
\versewidth=\skip103
\vgap=\skip104
\vindent=\skip105
\vleftmargin=\dimen106
\c@verse=\count97
\c@chrsinstr=\count98
\beforepoemtitleskip=\skip106
\afterpoemtitleskip=\skip107
\c@poem=\count99
\beforePoemTitleskip=\skip108
\midPoemTitleskip=\skip109
\afterPoemTitleskip=\skip110
\col@sep=\dimen107
\extrarowheight=\dimen108
\NC@list=\toks15
\extratabsurround=\skip111
\backup@length=\skip112
\TX@col@width=\dimen109
\TX@old@table=\dimen110
\TX@old@col=\dimen111
\TX@target=\dimen112
\TX@delta=\dimen113
\TX@cols=\count100
\TX@ftn=\toks16
\heavyrulewidth=\dimen114
\lightrulewidth=\dimen115
\cmidrulewidth=\dimen116
\belowrulesep=\dimen117
\belowbottomsep=\dimen118
\aboverulesep=\dimen119
\abovetopsep=\dimen120
\cmidrulesep=\dimen121
\cmidrulekern=\dimen122
\defaultaddspace=\dimen123
\@cmidla=\count101
\@cmidlb=\count102
\@aboverulesep=\dimen124
\@belowrulesep=\dimen125
\@thisruleclass=\count103
\@lastruleclass=\count104
\@thisrulewidth=\dimen126
\ctableftskip=\skip113
\ctabrightskip=\skip114
\abovecolumnspenalty=\count105
\@linestogo=\count106
\@cellstogo=\count107
\@cellsincolumn=\count108
\crtok=\toks17
\@mincolumnwidth=\dimen127
\c@newflo@tctr=\count109
\mem@margin@floatbox=\box26
\@contcwidth=\skip115
\@contindw=\skip116
\abovecaptionskip=\skip117
\belowcaptionskip=\skip118
\subfloattopskip=\skip119
\subfloatcapskip=\skip120
\subfloatcaptopadj=\skip121
\subfloatbottomskip=\skip122
\subfloatlabelskip=\skip123
\subfloatcapmargin=\dimen128
\c@@contsubnum=\count110
\m@mscap@capbox=\box27
\m@mscap@fbox=\box28
\sidecapsep=\dimen129
\sidecapwidth=\dimen130
\m@m@tempdima=\dimen131
\m@mscapraise=\dimen132
\sidecapraise=\dimen133
\m@mscapmainwidth=\dimen134
\m@mscaplkern=\dimen135
\beforeepigraphskip=\skip124
\afterepigraphskip=\skip125
\epigraphwidth=\skip126
\epigraphrule=\skip127
LaTeX Info: Redefining \em on input line 7578.
LaTeX Info: Redefining \emph on input line 7586.
\tocentryskip=\skip128
\tocbaseline=\skip129
\cftparskip=\skip130
\cftbeforebookskip=\skip131
\cftbookindent=\dimen136
\cftbooknumwidth=\dimen137
\cftbeforepartskip=\skip132
\cftpartindent=\skip133
\cftpartnumwidth=\skip134
\cftbeforechapterskip=\skip135
\cftchapterindent=\skip136
\cftchapternumwidth=\skip137
\cftbeforesectionskip=\skip138
\cftsectionindent=\skip139
\cftsectionnumwidth=\skip140
\cftbeforesubsectionskip=\skip141
\cftsubsectionindent=\skip142
\cftsubsectionnumwidth=\skip143
\cftbeforesubsubsectionskip=\skip144
\cftsubsubsectionindent=\skip145
\cftsubsubsectionnumwidth=\skip146
\cftbeforeparagraphskip=\skip147
\cftparagraphindent=\skip148
\cftparagraphnumwidth=\skip149
\cftbeforesubparagraphskip=\skip150
\cftsubparagraphindent=\skip151
\cftsubparagraphnumwidth=\skip152
\prechapterprecisshift=\dimen138
\c@maxsecnumdepth=\count111
\bibindent=\dimen139
\bibitemsep=\skip153
\indexcolsep=\skip154
\indexrule=\skip155
\indexmarkstyle=\toks18
\@indexbox=\insert199
\glossarycolsep=\dimen140
\glossaryrule=\dimen141
\sideparvshift=\skip156
\sideins=\insert198
\sidebartopsep=\skip157
\sidebarhsep=\skip158
\sidebarvsep=\skip159
\sidebarwidth=\skip160
\footmarkwidth=\skip161
\footmarksep=\skip162
\footparindent=\skip163
\footinsdim=\skip164
\footinsv@r=\insert197
\@mpfootinsv@r=\insert196
\m@m@k=\count112
\m@m@h=\dimen142
\m@mipn@skip=\skip165
\sidefootins=\insert195
\sidefootadjust=\skip166
\sidefootheight=\skip167
\sidefoothsep=\skip168
\sidefootvsep=\skip169
\sidefootwidth=\skip170
\m@mdownsf=\skip171
\c@sidefootnote=\count113
\sidefootmarkwidth=\skip172
\sidefootmarksep=\skip173
\sidefootparindent=\skip174
\c@pagenote=\count114
\c@pagenoteshadow=\count115
\mem@pn@lastkern=\skip175
\every@verbatim=\toks19
\afterevery@verbatim=\toks20
\verbatim@line=\toks21
\tab@position=\count116
\verbatim@in@stream=\read1
\verbatimindent=\skip176
\verbatim@out=\write3
\bvboxsep=\skip177
\c@memfbvline=\count117
\c@bvlinectr=\count118
\bvnumlength=\skip178
\fb@frw=\dimen143
\fb@frh=\dimen144
\FrameRule=\dimen145
\FrameSep=\dimen146
\c@cp@cntr=\count119
LaTeX Info: Redefining \: on input line 12100.
LaTeX Info: Redefining \! on input line 12102.
\c@ism@mctr=\count120
\c@xsm@mctr=\count121
\c@csm@mctr=\count122
\c@ksm@mctr=\count123
\c@xksm@mctr=\count124
\c@cksm@mctr=\count125
\c@msm@mctr=\count126
\c@xmsm@mctr=\count127
\c@cmsm@mctr=\count128
\c@bsm@mctr=\count129
\c@workm@mctr=\count130
\c@sheetsequence=\count131
\c@lastsheet=\count132
\c@lastpage=\count133
\c@figure=\count134
\c@lofdepth=\count135
\cftbeforefigureskip=\skip179
\cftfigureindent=\skip180
\cftfigurenumwidth=\skip181
\c@table=\count136
\c@lotdepth=\count137
\cftbeforetableskip=\skip182
\cfttableindent=\skip183
\cfttablenumwidth=\skip184
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

]
[1

] (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)

答案1

memoir在新版 LaTeX 格式的错误修复之前,你可以明确使用仍然提供的版本

\makeatletter
\renewcommand{\counterwithin}{\@ifstar{\@csinstar}{\@csin}}
\makeatother

在你的序言中。

感谢jfbu的分析。

答案2

最初,\thefigure有点

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

\frontmatter重置为\counterwithout {figure}{chapter}\thefigure

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

点消失的位置(上文中的最后一个点总是由 添加\show)。

作为扩展的一部分,\mainmatter我们还看到

\@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 }

因此再次\thefigure定义没有点。

后者来自于以下扩展:

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

所以这似乎\counterwithout/\counterwithin是罪魁祸首。也许是最近 LaTeX 格式的变化?

(我将进行进一步调查并报告)


就像我在 TL2017 中看到的回忆录一样

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

通过回忆录 + TL2018 当前我看到

\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 }}

这是点消失的地方。两者都从

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

但扩展\counterwithin已经改变。新的回忆录

\providecommand{\counterwithin}{\@ifstar{\@csinstar}{\@csin}}
\providecommand{\@csinstar}[2]{%
  \@ifbothcntrs{#1}{#2}{\@addtoreset{#1}{#2}}}
\providecommand{\@csin}[2]{%
  \@ifbothcntrs{#1}{#2}{\@addtoreset{#1}{#2}%
                        \@namedef{the#1}{\@nameuse{the#2}.\arabic{#1}}}}

而前者

\newcommand{\counterwithin}{\@ifstar{\@csinstar}{\@csin}}
\newcommand{\@csinstar}[2]{%
  \@ifbothcntrs{#1}{#2}{\@addtoreset{#1}{#2}}}
\newcommand{\@csin}[2]{%
  \@ifbothcntrs{#1}{#2}{\@addtoreset{#1}{#2}%
                        \@namedef{the#1}{\@nameuse{the#2}.\arabic{#1}}}}

TL2017 的 LaTeX 没有定义\counterwithin

$ latexdef counterwithin

\counterwithin:
undefined

但 TL2018 的 LaTeX 确实定义了它

$ latexdef counterwithin

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

\providecommand回忆录所做的谨慎工作2018/04/04 v3.7g并没有推翻\counterwithinLaTeX 的现在。但是这个没有添加点...

因此,需要向回忆录和 LaTeX2e 的维护者提供一份报告……

这似乎是 LaTeX2e 的一个错误,因为定义中不包含描述中的点: enter image description here

相关内容