The following code works fine on linux:
---
title: "LaTeX test"
author: "Ignacio"
output: html_document
---
## Latex
$$
\begin{aligned}
y_j \sim N(\theta_j , \sigma_j^2) \\
\sigma_j = \nu/\sqrt{n_j} \\
\theta = \mu +\tau \times \eta \\
\eta \sim N(0,1) \\
\mu + \tau\times\eta = \theta \sim N(\mu , \tau^2)
\end{aligned}
$$
On Windows, rstudio renders the equations correctly:
But, when I Knit the file and open the HTML with chrome or ie the latex is not rendered correctly:
Is there a way to fix this?
$$
. – Yihui Xieknit
using Rstudio on a windows machine. The second screenshot shows the preview that I get on Rstudio before pressing knit. I tried removing$$
and `\` but that did not make a difference. Thanks for the help @YihuiXie – Ignacio