Graphics, Figures & Tablesmemoir | Figure Numbering restarts automatically

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
tho_mi
Posts: 20
Joined: Tue Sep 11, 2012 6:57 pm

memoir | Figure Numbering restarts automatically

Post by tho_mi »

Hey,

i have a little problem with the numbering of my figures. My document consists of several chapters, and after the second one the counter of the figures is reset, but I don't know why.

The code looks like the following:

Code: Select all

\begin{figure}
	\centering
	\noindent\includegraphics[width=\ScaleIfNeeded]{xy.jpg}
	\caption[title_short]{title_long}
\end{figure}

Code: Select all

\begin{equation}
\Delta T = L - Ln + K - Kn
\end{equation}
In the head I did the following:

Code: Select all

\numberwithin{equation}{section}
\renewcommand{\theequation}{\arabic{equation}}
\renewcommand{\thefigure}{\arabic{figure}}
\addto\captionsenglish{\renewcommand{\figurename}{Fig.}}
I use the document class memoir.
Does anybody know why the counter of the figures is reset after the second chapter?

Thanks in advance :)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

memoir | Figure Numbering restarts automatically

Post by Stefan Kottwitz »

Hi,

welcome to the board!

The answer in Continuously numbering figures and tables can be applied here. Specifically in memoir, the chngcntr functionality is included, so it's sufficient to write into the preamble:

Code: Select all

\counterwithout{figure}{chapter}
Similar for other counters, for consistency, if desired.

Stefan
LaTeX.org admin
tho_mi
Posts: 20
Joined: Tue Sep 11, 2012 6:57 pm

Re: memoir | Figure Numbering restarts automatically

Post by tho_mi »

Hey,

wonderful, thanks :)
But there's still another problem. In the list of figures there's a little gap between figure 6 and 7 (at figure 7 occured the problem with the reset of the numbering).
A screenshot is enclosed.
Attachments
latex_figures_gap.JPG
latex_figures_gap.JPG (14.55 KiB) Viewed 7688 times
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

memoir | Figure Numbering restarts automatically

Post by sommerfee »

Code: Select all

\renewcommand*\insertchapterspace{}
should help. For more information about \insertchapterspace take a peek at the memoir documentation.

(Since I got no MWE from you, I will not a offer a MWE, too.)
tho_mi
Posts: 20
Joined: Tue Sep 11, 2012 6:57 pm

memoir | Figure Numbering restarts automatically

Post by tho_mi »

sommerfee wrote:

Code: Select all

\renewcommand*\insertchapterspace{}
should help. For more information about \insertchapterspace take a peek at the memoir documentation.

(Since I got no MWE from you, I will not a offer a MWE, too.)
Thanks, works fine. Could you please tell me what the problem was?
User avatar
sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

memoir | Figure Numbering restarts automatically

Post by sommerfee »

tho_mi wrote:Could you please tell me what the problem was?
Usually an extra vertical space will be inserted between figure and table list entries of different chapters. So if Figure 1 and Figure 2 belong to the same chapter, but Figure 3 to a different one, one will get an extra vertical space (usually 10pt) between the list entries of Figure 2 and Figure 3.

Using memoir this space will be inserted by \chapter with \insertchapterspace. So re-defining \insertchapterspace to do nothing will cause the removal of the extra vertical space.
tho_mi
Posts: 20
Joined: Tue Sep 11, 2012 6:57 pm

Re: memoir | Figure Numbering restarts automatically

Post by tho_mi »

Ok, thanks :)
Post Reply