when using \documentclass[12pt,article, a4paper, oneside, onecolumn]{memoir}
. The article
option addition interferes with the figure numbering. Removing it fixes the numbering but changes the look of the document and increases the page count. Any suggestions for keeping the look from article and retaining the numbering without it?
With the format x.n: 'x' being the chapter number in which the figure is in and 'n' as the figure number in the chapter?
I have tried \numberwithin{figure}{section}
which changes 'n' to per section number with n being renewed for the new section but 'x' in missing.
code with continues figure numbers
\documentclass[12pt, article, a4paper, oneside, onecolumn]{memoir}
\usepackage{amsmath, amssymb, amsthm}
\usepackage[english]{babel}
\usepackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.pdf,.jpg,.png,.psv,.PNG}
\setsecnumdepth{section}
\maxtocdepth{subsection}
\setlrmarginsandblock{2.5cm}{2.5cm}{*} % Left and right margin
\setulmarginsandblock{3cm}{3cm}{*} % Upper and lower margin
\checkandfixthelayout
\setlength{\parindent}{4em}
\setlength{\parskip}{1em}
\usepackage[english]{babel}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{wrapfig}
\usepackage{gensymb}
\usepackage{ upgreek }
\setlength{\parindent}{0pt}
\usepackage{makeidx}
\makeindex
\begin{document}
\frontmatter
\pagenumbering{Roman}
\newpage
\chapter{Abstract}
stuff
\clearpage
\chapter{Acknowledgments}
stuff
\clearpage
\listoffigures
\newpage
%\renewcommand\contentsname{Table of Contents}
\renewcommand{\cftchapterdotsep}{\cftdotsep}
\tableofcontents
\newpage
\mainmatter
\chapter {Introduction}
stuff
\chapter{Chapter One}
\section{Section One}
\begin{figure}[h]
Figure One
\caption{Figure One}
\end{figure}
\section{Section Two}
\begin{figure}[h]
Figure Two
\caption{Figure Two}
\end{figure}
\end{document}
this provides figure numbering as shown
by removing article the list of figure changes to the desired numbering
Best Answer
If you are using
article
option ofmemoir
with\frontmatter
and\mainmatter
,\frontmatter
still does a\counterwithout{figure}{chapter}
but\mainmatter
does not reactivate\counterwithin{figure}{chapter}
. So you have to add the command after\mainmatter
on your own:But note: If you add
\newpage
or\clearpage
before every\chapter
it would make more sense to not use optionarticle
and remove those\newpage
and\clearpage
. In this case you also would not need the\counterwithin
.