How to use MathJax in Slidify?

痞子三分冷 提交于 2019-12-04 23:30:09

问题


It seems that all that need to do is to claim widget: mathjax in the title page. But I can't get the formulas correctly rendered. Anything missing? Thank you.

UPDATE: I checked the final index.html, and found that many "*"'s have become <em> or </em>. It seems that slidify is mixing the * in LaTeX and the * in markdown.

Here is my LaTeX snippet:

\begin{align*}
&\begin{bmatrix}
\mathbf{y}\\
y_*
\end{bmatrix}
=\mathcal{N}\left(0,\begin{bmatrix}
K & K_*\\
K_*^T & K_{**}
\end{bmatrix}\right)\\
\Longrightarrow & y_*|\mathbf{y}\sim\mathcal{N}\left(K_*K^{-1}\mathbf{y},K_{**}-K_*K^{-1}K_*^T\right)\\
\Longrightarrow & \overline{y_*}=K_*K^{-1}\mathbf{y}
\end{align*}

which is converted to

<li>Inference
$$\begin{align<em>}
&amp;\begin{bmatrix}
\mathbf{y}\
y_</em>
\end{bmatrix}
=\mathcal{N}\left(0,\begin{bmatrix}
K &amp; K<em>*\
K</em><em>^T &amp; K_{</em><em>}
\end{bmatrix}\right)\
\Longrightarrow &amp; y_</em>|\mathbf{y}\sim\mathcal{N}\left(K<em>*K^{-1}\mathbf{y},K</em>{*<em>}-K<em>*K^{-1}K</em></em>^T\right)\
\Longrightarrow &amp; \overline{y<em>*}=K</em><em>K^{-1}\mathbf{y}
\end{align</em>}$$</li>
</ul>

UPDATE 2: I substituted the &#95; for _ and &#42; for *, as well as \\ for some \. And it looks quite good now:

$$\\begin{align&#42;}
&\\begin{bmatrix}
\mathbf{y}\\\\
y&#95;&#42;
\\end{bmatrix}
=\mathcal{N}\left(0,\begin{bmatrix}
K & K&#95;&#42;\\\\
K&#95;&#42;^T & K&#95;{&#42;&#42;}
\\end{bmatrix}\right)\\\\
\Longrightarrow & y&#95;&#42;\big|\mathbf{y}\sim\mathcal{N}\left(K&#95;&#42;K^{-1}\mathbf{y},K&#95;{&#42;&#42;}-K&#95;&#42;K^{-1}K&#95;&#42;^T\right)\\\\
\Longrightarrow & \bar{y}&#95;&#42;=K&#95;&#42;K^{-1}\mathbf{y}
\\end{align&#42;}$$

来源:https://stackoverflow.com/questions/13830580/how-to-use-mathjax-in-slidify

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!