
私の質問は次の通りです。同じ方程式の特殊なケースが 2 つあり、enumerate を手動で変更する必要がありますが、\tag{}
その後、方程式のマークが前の自動列挙に従う必要があります。私の主張を説明するために、次の例に従ってください。
\begin{equation} a+b=c \end{equation}
(1.1) マークで参照される人。
次に、この方程式の特殊なケースを示します。
1.
\begin{equation} u(c,n)=log(C_{t})-log(n_{t}) \tag(1.2.1) \end{equation}
\begin{equation} u(c,n)=C_{t}-n_{t} \tag(1.2.2) \end{equation}
しかし、次の式では次の式を使用しました。
\begin{equation} a+b=2x+g \end{equation}
これは (1.2) マークで参照されており、前の列挙に従う必要があるため、正しい番号は (1.3) になります。
ご清聴ありがとうございました。
答え1
明示的なタグを使用してからカウンターを手動でステップ実行することは、番号が変更され、タグも変更される可能性があるため、推奨されません。
パッケージはこの目的のためにamsmath
用意されていますsubequations
。残念ながら、文字によるサブ番号付けはハードワイヤードされていますが、必要に応じて変更することは難しくありません。
\documentclass{article}
\usepackage{amsmath}
\usepackage{etoolbox}
\numberwithin{equation}{section}
\appto\subequations{%
\renewcommand{\theequation}{\theparentequation.\arabic{equation}}%
}
\begin{document}
\section{Title}
One equation with its number
\begin{equation}\label{A}
x^2+y^2=z^2
\end{equation}
and some text after it.
\begin{subequations}\label{B}
Now we state an equation
\begin{equation}\label{B1}
u(c,n)=\log(C_{t})-\log(n_{t})
\end{equation}
and next a variant thereof
\begin{equation}\label{B2}
u(c,n)=C_{t}-n_{t}
\end{equation}
with some text after them.
\end{subequations}
One equation with its number
\begin{equation}\label{C}
x^2+y^2=z^2
\end{equation}
and some text after it.
\end{document}
ちなみに、 では\log
なく を使用する必要がありますlog
。
もちろん、私が使用したラベルは何でも好きなものにすることができます。 の後にラベルも追加したので\begin{subequations}
、必要に応じてテキスト内の式 1.2 を参照できます。