
다음과 같이 새 카운터를 만듭니다.
\newcounter{question}[section]
따라서 각각의 새 섹션은 thequestion
1로 설정됩니다. 다음을 수행하면:
\newcounter{question}[subection]
thequestion
새 섹션이 시작될 때(하위 섹션 없이) 1로 설정되지 않습니다. 섹션과 하위 섹션 모두에 카운터를 연결할 수 있습니까?
감사해요
답변1
chngcntr
패키지를 사용한 다음 쓸 수 있습니다 .
\counterwithin{question}{subsection}
또는 section
효과는 동일해야 합니다.
그렇지 않으면 재설정을 직접 정의할 수 있습니다.
\makeatletter
\@addtoreset{question}{subsection}
\makeatother