您正在使用$$,它会在方程式周围强制换行。使用单个 $ 创建一个内联表达式,这正是您想要的。所以把代码改成:
$$
(x)\approx\frac{\phi\prime (x)\times(1-p\prime)\times p}
{\phi\prime(x)\times(1-p\prime)\times p +(1-\phi\prime(x)\times
p\prime\times(1-p)}\\
$$
$p$: notation1
$p\prime$: notation2
$\phi$: notation3
$\phi\prime$: notation4
或者,为了更好地打破线条,您可以使用<br/> 标签
$$
(x)\approx\frac{\phi\prime (x)\times(1-p\prime)\times p}
{\phi\prime(x)\times(1-p\prime)\times p +(1-\phi\prime(x)\times
p\prime\times(1-p)}\\
$$
$p$: notation1<br/>
$p\prime$: notation2<br/>
$\phi$: notation3<br/>
$\phi\prime$: notation4<br/>
您还提到了右对齐 - 为此您需要使用 div 并对齐它,如下所示:
$$
(x)\approx\frac{\phi\prime (x)\times(1-p\prime)\times p}
{\phi\prime(x)\times(1-p\prime)\times p +(1-\phi\prime(x)\times
p\prime\times(1-p)}\\
$$
<div align="right">
$p$: notation1<br/>
$p\prime$: notation2<br/>
$\phi$: notation3<br/>
$\phi\prime$: notation4<br/>
</div>
请注意,后两种解决方案只能在实时笔记本中真正起作用,我认为是 HTML 输出(Markdown 也可能起作用)。如果您打算之后转换为latex/pdf,那么您将需要第一个解决方案或以下解决方案:
$$
(x)\approx\frac{\phi\prime (x)\times(1-p\prime)\times p}
{\phi\prime(x)\times(1-p\prime)\times p +(1-\phi\prime(x)\times
p\prime\times(1-p)}\\
$$
$\begin{align}
p: notation1
\newline
p\prime: notation2
\newline
\phi: notation3
\newline
\phi\prime: notation4
\end{align}
$
使用此解决方案,您可以左对齐(在align 环境周围使用单个$)或居中对齐(在align 环境周围使用$$),但我认为您不能有右对齐结盟。另外,notations 采用数学字体而不是常规字体,这可能不是我们所希望的。