有没有办法用单独的子索引来标记多线方程的每一行?
例如,我想获得类似的东西(在输出中)
a = b (1.23.1)
c = d (1.23.2)
= f (1.23.3)
然后能够引用整个多行方程(“如 1.23 bla bla bla... 中所示”)或特定行(“在 1.23.3 中我们重新定义了 d...”)。
小智 6
对于任何想要此查询答案的人,这里有一个有用的 tex.stackexchange 答案:https://tex.stackexchange.com/questions/118086/numbering-all-lines-of-an-array
要点如下:
%% in your preable
\usepackage{amsmath}
%% in your document
\begin{subequations}
\begin{align}
% YOUR MULTILINE MATHEMATICS WITH & ALIGNMENT CHARACTERS AND \\ NEWLINE MARKERS
% place \label{THIS-LINE} on each line, and you can cross-reference the line using \ref{THIS-LINE}
\end{align}
% place a \label{WHOLE-THING} here, and you can cross-reference the whole thing using \ref{WHOLE-THING}
\end{subequations}
Run Code Online (Sandbox Code Playgroud)
这是一个例子:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
\begin{subequations}
\begin{align}
\frac{\mathrm{d} x}{\mathrm{d} t} &=\sigma(y-x)\label{eqn:line-1} \\
\frac{\mathrm{d} y}{\mathrm{d} t} &=x(\rho-z)-y\label{eqn:line-2} \\
\frac{\mathrm{d} z}{\mathrm{d} t} &=x y-\beta z
\end{align}
\label{eqn:all-lines}
\end{subequations}
Look at the first line \ref{eqn:line-1}, and now look at the second line \ref{eqn:line-2}. They are both part of the whole system \ref{eqn:all-lines}.
\end{document}
Run Code Online (Sandbox Code Playgroud)