如何将此表达式左对齐?以及字母y
也左对齐?
\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\begin{document}
\begin{flalign}
\dfrac{\partial\hat F}{\partial w_{i,j}^m}
& =
\dfrac{\partial\hat F}{\partial n_{i}^m}\cdot \dfrac{\partial n_i^m}{\partial w_{i,j}^m}\label{partialF/w}
& =
\dfrac{\partial\hat F}{\partial n_{i}^m}\cdot
a_j^{m-1}
& =
\left(\dfrac{\partial n_i^{m+1} }{\partial n_{i}^m}\right)^T\dfrac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot
a_j^{m-1}& =
% \letf(
w_{i,j}^{m+1}\dfrac{\partial f^m(n_j^m)}{\partial n_j^m}%\right)
\dfrac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot
a_j^{m-1}\\
\implies
\dfrac{\partial\hat F}{\partial w_{i,j}^m}=\dfrac{\partial\hat F}{\partial n_{i}^m}\cdot
a_j^{m-1}= w_{i,j}^{m+1}\dfrac{\partial f^m(n_j^m)}{\partial n_j^m}%\right)
\dfrac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot
a_j^{m-1} \label{F/w simp}
\\
y \nonumber
\end{flalign}
\end{document}
请注意,出于某种原因,在上图中(与上面的代码相对应),它\implies
在左侧(如预期的那样),而在下图中则居中,我不知道为什么。我拥有的原始文档是下图。
我检查过另一篇文章如何将方程式左对齐?我遵循了这个答案的建议https://tex.stackexchange.com/a/467116/,但正如您所见,它对我来说不起作用。
有人可以帮忙吗?
提前致谢
答案1
我认为强制对齐不会让事情变得更清晰。而且,既然“暗示”符号可以用文字代替,那就应该这样做。
\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\newcommand{\pder}[2]{\frac{#1}{#2}}
\begin{document}
\begin{align*}
%\label{partialF/w}
\pder{\hat{F}}{w_{i,j}^m}
& = \pder{\hat{F}}{n_{i}^m}\cdot \pder{n_i^m}{w_{i,j}^m}
\\
& = \pder{\hat{F}}{n_{i}^m}\cdot a_j^{m-1}
\\
& = \left(\pder{n_i^{m+1}}{n_{i}^m}\right)^{\!T}\pder{\hat{F}}{n_{i}^{m+1}}\cdot a_j^{m-1}
\\
& = w_{i,j}^{m+1}\pder{f^m(n_j^m)}{n_j^m}\pder{\hat{F}}{n_{i}^{m+1}}\cdot a_j^{m-1}
\end{align*}
or, in summary,
\begin{equation}\label{F/w simp}
\pder{\hat{F}}{w_{i,j}^m}
= \pder{\hat{F}}{n_{i}^m}\cdot a_j^{m-1}
= w_{i,j}^{m+1}\pder{f^m(n_j^m)}{n_j^m} \pder{\hat{F}}{n_{i}^{m+1}}\cdot a_j^{m-1}
\end{equation}
\end{document}
我定义了偏导数的简写,使得输入不那么麻烦。
推导中的方程编号已被删除,因为这只是一个技术论点,并且最后一个方程包含相同的信息。
答案2
这可能与 Zarko 的类似,它适合页面,但我猜不出您想用最后的浮动 y 做什么。
\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}
\begin{document}
\begin{flalign}
\dfrac{\partial\hat F}{\partial w_{i,j}^m}
& =
\dfrac{\partial\hat F}{\partial n_{i}^m}\cdot \dfrac{\partial n_i^m}{\partial w_{i,j}^m}\label{partialF/w}\\
& =
\dfrac{\partial\hat F}{\partial n_{i}^m}\cdot
a_j^{m-1}\\
& =
\left(\dfrac{\partial n_i^{m+1} }{\partial n_{i}^m}\right)^T\dfrac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot
a_j^{m-1}\\
& =
% \letf(
w_{i,j}^{m+1}\dfrac{\partial f^m(n_j^m)}{\partial n_j^m}%\right)
\dfrac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot
a_j^{m-1}\\
&\implies\\
\dfrac{\partial\hat F}{\partial w_{i,j}^m}
&=\dfrac{\partial\hat F}{\partial n_{i}^m}\cdot
a_j^{m-1}\\
&= w_{i,j}^{m+1}\dfrac{\partial f^m(n_j^m)}{\partial n_j^m}%\right)
\dfrac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot
a_j^{m-1} \label{F/w simp}
\\
y \nonumber
\end{flalign}
\end{document}
或者可能是两个对齐
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
\frac{\partial\hat F}{\partial w_{i,j}^m}
& =
\frac{\partial\hat F}{\partial n_{i}^m}\cdot \frac{\partial n_i^m}{\partial w_{i,j}^m} \label{partialF/w} \\
& =
\frac{\partial\hat F}{\partial n_{i}^m}\cdot
a_j^{m-1} \nonumber\\
& =
\left(\frac{\partial n_i^{m+1} }{\partial n_{i}^m}\right)^T\frac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot
a_j^{m-1} \nonumber\\
& =
w_{i,j}^{m+1}\frac{\partial f^m(n_j^m)}{\partial n_j^m}%\right)
\frac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot a_j^{m-1} \nonumber
\end{align}
This implies
\begin{align}
\frac{\partial\hat F}{\partial w_{i,j}^m}
&=\frac{\partial\hat F}{\partial n_{i}^m}\cdot
a_j^{m-1}\label{F/w simp} \\
&= w_{i,j}^{m+1}\frac{\partial f^m(n_j^m)}{\partial n_j^m}%\right)
\frac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot
a_j^{m-1} \nonumber
\end{align}
something about $y$
\end{document}
答案3
编辑: 已更正的是 MWE——添加了遗漏的代码行并考虑了 OP 在下面的评论中给出的更改:。
您正在寻找这样的东西吗?
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
\frac{\partial\hat F}{\partial w_{i,j}^m}
& = \frac{\partial\hat F}{\partial n_{i}^m}\cdot \frac{\partial n_i^m}{\partial w_{i,j}^m} \label{partialF/w} \\
& =
\frac{\partial\hat F}{\partial n_{i}^m}\cdot
a_j^{m-1} \\
& =
\left(\frac{\partial n_i^{m+1} }{\partial n_{i}^m}\right)^T\frac{\partial\hat{ F}}{\partial n_{i}^{m+1}}\cdot
a_j^{m-1} \\
& = w_{i,j}^{m+1}\frac{\partial f^m(n_j^m)}{\partial n_j^m}%\right)
\frac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot
a_j^{m-1} \\
\implies \frac{\partial\hat F}{\partial w_{i,j}^m}
& = \frac{\partial\hat F}{\partial n_{i}^m}\cdot a_j^{m-1}
= w_{i,j}^{m+1}\frac{\partial f^m(n_j^m)}{\partial n_j^m}
\frac{\partial\hat{F}}{\partial n_{i}^{m+1}}\cdot a_j^{m-1}
\label{partialF/w simp}
\end{align}
y
\end{document}
或这个?
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align}
\frac{\partial\hat F}{\partial w_{i,j}^m}
& = \frac{\partial\hat F}{\partial n_{i}^m}\cdot \frac{\partial n_i^m}{\partial w_{i,j}^m}
\label{partialF/w} \\
& = \frac{\partial\hat F}{\partial n_{i}^m}\cdot a_j^{m-1}
= \left(\frac{\partial n_i^{m+1} }{\partial n_{i}^m}\right)^T
\frac{\partial\hat{ F}}{\partial n_{i}^{m+1}}\cdot a_j^{m-1}
\notag \\
& = w_{i,j}^{m+1}\frac{\partial f^m(n_j^m)}{\partial n_j^m}
\frac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot
a_j^{m-1}
\\
\implies \frac{\partial\hat F}{\partial w_{i,j}^m}
& = \frac{\partial\hat F}{\partial n_{i}^m}\cdot a_j^{m-1}
= w_{i,j}^{m+1}\frac{\partial f^m(n_j^m)}{\partial n_j^m}
\frac{\partial\hat F}{\partial n_{i}^{m+1}}\cdot a_j^{m-1}
\label{F/w simp}
\shortintertext{y}
\frac{\partial\hat F}{\partial w_{i,j}^m}
& = \text{continuation of derivation}
\label{partialF/extra}
\end{align}
\end{document}