LaTeX换行的几种方法
方法一:输入 \\
结果即只进行单纯换行,并无缩进
方法二:输入 \par
显示结果为自动换行加缩进
公式换行等号对齐
用\\ 进行换行,然后用& 可以对齐每行。
代码示例
\begin{equation*} %加*表示不对公式编号
\begin{split}
Adv^{Fed}
& = Pr^{Fed}\left ( A=1\mid x\in D_{T} \right ) - Pr^{Fed}\left ( A=1\mid x\in D_{N} \right ) \\
& = \underset{x\in D_{T}}{E^{Fed}}\left ( P\left ( A=1\mid x \right ) \right )-\underset{x\in D_{N}}{E^{Fed}}\left ( P\left ( A=1\mid x \right ) \right ) \\
& = \underset{x\in D_{T}}{E^{Fed}}\left ( 1-\frac{L\left ( \left ( x,y \right ),F \right )}{A} \right )-\underset{x\in D_{N}}{E^{Fed}}\left ( 1-\frac{L\left ( \left ( x,y \right ),F \right )}{A} \right )\\
& = \frac{1}{A}\cdot \left [ \underset{x\in D_{N}}{E^{Fed}}\left ( L\left ( \left ( x,y \right ),F \right )\right )-\underset{x\in D_{T}}{E^{Fed}}\left ( L\left ( \left ( x,y \right ),F \right ) \right ) \right ] \\
\end{split}
\end{equation*}
结果演示