
Recentemente adicionei \frontmatter
, \mainmatter
, etc. com a \numberwithin
configuração de minhas figuras e tabelas em um documento, mas agora minhas figuras não são mais numeradas por subseção de exportação. Dentro do LyX, eles ainda mostram a numeração correta, mas perco o número da subseção na exportação. Estou usando o pacote de memórias. Aqui está parte do meu preâmbulo:
\setsecnumdepth{subsubsection}
\maxtocdepth{subsubsection}
\numberwithin{figure}{subsubsection}
\numberwithin{table}{subsubsection}
Toda a numeração estava funcionando antes de inserir as \...matter
declarações.
Responder1
Internamente, memoir
faz
\newcommand\@memmain@floats{%
\counterwithin{figure}{chapter}
\counterwithin{table}{chapter}
}
o que significa que as figuras e tabelas da matéria principal serão numeradas subordinadas ao chapter
contador; para substituir isso, você pode adicionar ao preâmbulo
\makeatletter
\renewcommand\@memmain@floats{%
\counterwithin{figure}{subsubsection}
\counterwithin{table}{subsubsection}
}
\makeatother
Um exemplo completo:
\documentclass{memoir}
\usepackage{amsmath}
\setsecnumdepth{subsubsection}
\maxtocdepth{subsubsection}
\numberwithin{figure}{subsubsection}
\numberwithin{table}{subsubsection}
\makeatletter
\renewcommand\@memmain@floats{%
\counterwithin{figure}{subsubsection}
\counterwithin{table}{subsubsection}
}
\makeatother
\begin{document}
\mainmatter
\chapter{Test chapter}
\vfill% just for the example
\section{Test section}
\subsection{Test subsection}
\subsubsection{Test subsubsection}
\begin{figure}
\caption{test}
\end{figure}
\end{document}
A propósito, como memoir
usa internamente chngcntr
, você pode usar diretamente \counterwithin
em vez de \numberwithin
:
\counterwithin{figure}{subsubsection}
\counterwithin{table}{subsubsection}
Como observação pessoal, sugiro que você reconsidere esse esquema de numeração; ter uma string tão longa para os números não é muito fácil de ler.