我需要输入一个数学公式及其符号。公式有效,但符号格式不正确。你能帮我吗?谢谢。
$$
(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发布于 2017-08-08 17:03:33
您正在使用$$,它会强制在方程式周围加上一条新线。使用单个$创建一个内联表达式,这正是您想要的。因此,将代码更改为:
$$
(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/>您还提到了right align -为此,您需要使用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环境中使用$$ ),但我不认为您可以进行右对齐。此外,通过这种方式,notation使用的是数学字体,而不是常规字体,这可能并不是我们所希望的。
https://stackoverflow.com/questions/45550686
复制相似问题