I'm aware of the topic: Continuous v. per-chapter/section numbering of figures, tables, and other document elements and I tried use the options given, but none worked for me.
I'm using memoir
class.
What I'm doing wrong?
I tried:
\documentclass{memoir}
\usepackage{chngcntr}
\counterwithout{figure}{chapter}
\begin{document}
\chapter{A}
\begin{figure}
\centering
\caption{A figure}
\end{figure}
\end{document}
Figure remains 1.1.
So, I tried \counterwithout{figure}{chapter}
since memoir
supports this command.
Figure remains 1.1.
So I tried:
\usepackage[figurewithin=none]{caption}
Figure remains 1.1.
@jon This is my "style file", named folhadeestilos.txt:
% ---
% Pacotes
% ---
\usepackage[brazilian]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[none]{hyphenat}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage[authoryear,round]{natbib}
% ---
% Margens
% ---
\setlrmarginsandblock{3cm}{2cm}{*}
\setulmarginsandblock{3cm}{2cm}{*}
\setheaderspaces{*}{1cm}{*}
\checkandfixthelayout
% ---
% Fonte Arial
% ---
\usepackage[scaled]{uarial}
\renewcommand*\familydefault{\sfdefault}
%\usepackage{microtype}
% ---
% Customização da numeração de páginas e das seções
% ---
\renewcommand{\printtoctitle}[1]{%
\centering\large\bfseries\MakeUppercase{#1}}
\renewcommand{\aftertoctitle}{%
\thispagestyle{empty}\afterchaptertitle}
\renewcommand{\printloftitle}[1]{%
\centering\large\bfseries\MakeUppercase{#1}}
\renewcommand{\afterloftitle}{%
\thispagestyle{empty}\afterchaptertitle}
\renewcommand{\printlottitle}[1]{%
\centering\large\bfseries\MakeUppercase{#1}}
\renewcommand{\afterlottitle}{%
\thispagestyle{empty}\afterchaptertitle}
\chapterstyle{tandh}
\aliaspagestyle{chapter}{simple}
\setlength\beforechapskip{-\baselineskip}
\renewcommand{\printchaptertitle}[1]{%
\large\bfseries\MakeUppercase{#1}}
\renewcommand{\printchapternum}{%
\large\bfseries \thechapter\space}
\setsecheadstyle{\large\bfseries}
\renewcommand{\bibname}{Referências Bibliográficas}
\AtBeginDocument{\renewcommand{\bibsection}{\chapter{\bibname}}}
% ---
% Legendas e numeração de figuras e tabelas
% ---
\usepackage[center,small,bf]{caption}
% ---
% Ambiente matemático em sans serif
% ---
\everymath{\mathsf{\xdef\mysf{\mathgroup\the\mathgroup\relax}}\mysf}
% ---
% Hyperref
% ---
\usepackage[hidelinks]{hyperref}
And this is my simplified main file:
\documentclass[a4paper,12pt,oneside]{memoir}
\input{folhadeestilos.tex}
\begin{document}
...
\pagestyle{simple}
\input{mem.tex}
\end{document}
Where mem.tex contains the \begin{figure}
enviroment.
Best Answer
This works for me (revised, to take into account the new file structure):
If you are using
memoir
's\<front|main|back>matter
commands, you will need to renew some definitions in order to make\counterwithout
work as expected.Thus, you can add to your preamble in this case (where all figures and tables are in the 'mainmatter' section):
(This could do in your personal
.sty
file, e.g.; but in that case, you don't need the two\makeat*
commands.)Less elegantly, you can simply move the
\counter*
commands to after the\mainmatter
declaration.