
최근에 내 그림과 표에 대한 설정 과 함께 , 등을 \frontmatter
문서 에 추가했지만 이제 내보내기 시 내 그림에 더 이상 하위 섹션의 번호가 매겨지지 않습니다. LyX 내부에서는 여전히 올바른 번호가 표시되지만 내보낼 때 하위 섹션 번호가 손실됩니다. 메모어 패키지를 사용하고 있습니다. 다음은 내 서문의 일부입니다.\mainmatter
\numberwithin
\setsecnumdepth{subsubsection}
\maxtocdepth{subsubsection}
\numberwithin{figure}{subsubsection}
\numberwithin{table}{subsubsection}
문을 삽입하기 전에 모든 번호 매기기가 작동했습니다 \...matter
.
답변1
내부적으로 memoir
는
\newcommand\@memmain@floats{%
\counterwithin{figure}{chapter}
\counterwithin{table}{chapter}
}
이는 주요 내용의 그림과 표가 카운터에 종속되어 번호가 매겨진다는 것을 의미합니다 chapter
. 이를 무시하려면 서문에 추가하면 됩니다.
\makeatletter
\renewcommand\@memmain@floats{%
\counterwithin{figure}{subsubsection}
\counterwithin{table}{subsubsection}
}
\makeatother
완전한 예:
\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}
그런데 memoir
내부적으로 를 사용하므로 다음 대신 chngcntr
직접 사용할 수 있습니다 .\counterwithin
\numberwithin
\counterwithin{figure}{subsubsection}
\counterwithin{table}{subsubsection}
참고로, 개인적으로 이 번호 매기기 방식을 다시 고려해 보시기 바랍니다. 숫자에 비해 너무 긴 문자열을 사용하는 것은 독자에게 친숙하지 않습니다.