6

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.

enter image description here

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;}$$
Ziyuan
  • 4,215
  • 6
  • 48
  • 77
  • 1
    I will check this out. Slidify uses the `markdown` package to convert markdown into html. I have never used `\begin{align*}` in my equations and am not sure what breaks it. I will check and post back if I have an answer. – Ramnath Dec 12 '12 at 03:27
  • I am unable to reproduce your error. Here is a slide deck using the math you used http://rpubs.com/ramnathv/slidify-mathjax. It is rendering nicely for me. – Ramnath Dec 12 '12 at 15:36
  • @Ramnath , just now the `^`s turn into ``s, which didn't happen yesterday. I think it is because the command `options(markdown.extensions = c("no_intra_emphasis", "tables", "fenced_code", "autolink", "strikethrough", "lax_spacing", "space_headers", "latex_math"))` has not been executed when my RStudio starts up. So am I missing some options? Thank you. – Ziyuan Dec 12 '12 at 19:51
  • I am not sure what is happening at your end. I tried your equations and they work fine for me. Post an issue on github with more details about your `sessionInfo()` and I can take a look. – Ramnath Dec 19 '12 at 02:56
  • @Ramnath: The link you posted doesn't render well in my browser, either: see [screenshot](http://i.stack.imgur.com/XQIgW.png) (let's see how long it's available...) – krlmlr Dec 03 '13 at 22:09
  • That is interesting that Chrome is not rendering the Math for you correctly on the same site. I am puzzled. – Ramnath Dec 03 '13 at 22:57
  • @Ramnath - still happening with the latest github release - `^` and `*` get converted into `` and `` tags. – Deer Hunter Oct 24 '14 at 09:39
  • Post your `sessionInfo()` on the github repo for slidify. I checked just now and it works perfectly for me. – Ramnath Oct 24 '14 at 15:25
  • @Ramnath - http://pastebin.com/apgT9tkK - will post an issue as soon as I get to my desk. – Deer Hunter Oct 24 '14 at 18:24

0 Answers0