0

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

enter image description here by removing article the list of figure changes to the desired numbering enter image description here

2

If you are using article option of memoir 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:

\documentclass[12pt, article, a4paper, oneside, onecolumn]{memoir}
\usepackage[english]{babel}
\setsecnumdepth{section}
\maxtocdepth{subsection}
\setlrmarginsandblock{2.5cm}{2.5cm}{*} % Left and right margin
\setulmarginsandblock{3cm}{3cm}{*} % Upper and lower margin
\checkandfixthelayout
\usepackage[english]{babel}
\begin{document}

\frontmatter
\pagenumbering{Roman}

\chapter{Abstract}
\listoffigures
\tableofcontents

\newpage
\mainmatter
\counterwithin{figure}{chapter}
\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}

enter image description here

But note: If you add \newpage or \clearpage before every \chapter it would make more sense to not use option article and remove those \newpage and \clearpage. In this case you also would not need the \counterwithin.

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.