
\documentclass{amsart}
\newtheorem{theorem}{Theorem}[section]
\begin{document}
\subsection*{1}
\begin{theorem}
blah is blah
\end{theorem}
\begin{theorem}
bloo is bloo
\end{theorem}
\subsection*{2}
\begin{theorem}
bleh is bleh
\end{theorem}
\begin{theorem}
blih is blih
\end{theorem}
\end{document}
이는 다음과 같이 표시됩니다.
1.
Theorem 0.1. blah is blah
Theorem 0.2. bloo is bloo
2.
Theorem 0.3. bleh is bleh
Theorem 0.4. blih is blih
번호가 지정되지 않은 두 번째 하위 섹션에서 정리 0.3이 정리 0.1로 재설정되도록(또한 정리 0.4를 정리 0.2로 만들도록) 카운터를 재설정하려면 어떻게 해야 합니까?
(이 특정 문서 클래스의 경우 섹션이 마음에 들지 않는 가운데에 있기 때문에 번호가 없는 하위 섹션을 넣었습니다. 그래서 하위 섹션을 사용하여 시작하지만 하위 섹션 번호는 0.1부터 시작하므로 1로 시작하고 싶습니다. 하위 섹션의 번호를 풀고 내 번호를 넣었습니다.)
답변1
두 정리 0.1s와 두 정리 0.2s를 원한다고 말하는 것 같아서 무엇을 요구하는지 잘 모르겠습니다. 이것은 나에게 이해가 되지 않으므로 아마도 다음과 같은 것을 원할 것이라고 생각합니다.
이를 위해 정리 번호를 매기는 데에도 사용되는 카운터를 \section
사용하는 가짜 명령을 정의했습니다 .mysection
\documentclass{amsart}
\newcounter{mysection}
\let\realsection=\section
\renewcommand\section[1]{\refstepcounter{mysection}%
\subsection*{\themysection.\space #1}
}
\newtheorem{theorem}{Theorem}[mysection]
\begin{document}
\section{First section}
\begin{theorem}
blah is blah
\end{theorem}
\begin{theorem}
bloo is bloo
\end{theorem}
\section{Second section}
\begin{theorem}
bleh is bleh
\end{theorem}
\begin{theorem}
blih is blih
\end{theorem}
\end{document}
답변2
명령 형식을 변경하는 \section
것은 쉽지 않으며 해당 수준을 건너뛰고 \subsection
.
\section
이것이 in 의 정의입니다 amsart.cls
:
\def\section{\@startsection{section}{1}%
\z@{.7\linespacing\@plus\linespacing}{.5\linespacing}%
{\normalfont\scshape\centering}}
다음 명령 을 제거하십시오 \centering
.
\makeatletter
\def\section{\@startsection{section}{1}%
\z@{.7\linespacing\@plus\linespacing}{.5\linespacing}%
{\normalfont\scshape}}
\makeatother
작은 대문자가 아닌 다른 글꼴 스타일을 원한다면 동시에 변경할 수 있습니다 \bfseries
.
명령 정의의 일부만 변경하는 대체 방법은 \patchcmd
패키지의 명령에 의해 제공됩니다 etoolbox
. 자세한 내용은 설명서를 참조하세요.