방정식 번호에 장 번호를 포함하는 방법

방정식 번호에 장 번호를 포함하는 방법

패키지 의 방정식 번호 스타일을 변경하려고 합니다 classicthesis. 나는 주어진 답변을 따랐다.여기그러나 방정식 스타일에는 영향을 미치지 않습니다. 방정식 번호에 장 번호를 포함하고 싶습니다. 누군가 나를 도와줄 수 있나요?

답변1

패키지 를 로드 amsmath하고 해당 \numberwithin명령을 사용하여 목표를 달성할 수 있습니다.

여기에 이미지 설명을 입력하세요

\documentclass{report}
\usepackage{classicthesis}
\usepackage{amsmath}
\numberwithin{equation}{chapter}
\begin{document}
\chapter{First chapter}
\begin{equation}  \label{eq:pyth}
a^2+b^2=c^2
\end{equation}
Here's a cross-reference to equation \eqref{eq:pyth}.
\end{document}

(1--1)부록: 방정식 번호를 처럼 보이게 하려면 (1.1)매크로 \theequation도 수정해야 합니다.

여기에 이미지 설명을 입력하세요

\documentclass{report}
\usepackage{classicthesis}
\usepackage{amsmath}
\numberwithin{equation}{chapter}
\renewcommand{\theequation}{\thechapter--\arabic{equation}}    

\begin{document}
\setcounter{chapter}{2}
\chapter{Third chapter}
\begin{equation}  \label{eq:albert}
E=mc^2
\end{equation}
Here's a cross-reference to equation \eqref{eq:albert}.
\end{document}

답변2

\documentclass[]{}의 옵션에 "floatperchapter"를 추가하세요.

관련 정보