编织 LaTex 数学表达式的问题作为 Beamer 演示文稿

Problem knitting LaTex maths expression as Beamer Presentation

我想编织一些数学表达式和一些希腊字母(数学)作为 R 中的 Beamer 演示文稿。虽然数学公式编织成功,但我不知道为什么 R 无法编织所有希腊字母字母.
您可以使用此重现结果:

---
title: "Untitled"
author: "John Doe"
date: "11/1/2021"
output: beamer_presentation
---

## THIS WORKS

- Standalone equation.
\[
\frac{-b\pm\sqrt{b^2-4ac}}{2a}
\]

- In an aligned environment.
$$
\begin{aligned}
e^{i\pi} + 1 &= 0 \
\frac{1}{\sigma\sqrt{2\pi}} \int^{\infty}_{-\infty}
e^{-\frac{1}{2}\left(x-\mu\right)^2/\sigma^2}\,\mathrm{d}x &= 1\
\int^{\sqrt[3]{3}}_1 z^2 \, \mathrm{d}z \times \cos\left(\frac{3\pi}{9}\right) &= \log\left(\sqrt[3]{e}\right)
\end{aligned}
$$

## THIS DOESN'T WORK

\[H_o: \mu_1 = \mu_2 \]
\[H_1: \mu_1 \gt \mu_2 \]

有人可以建议我如何解决这个问题吗?谢谢!!!

与希腊字母无关,\gt 是问题所在。使用 > :

---
title: "Untitled"
author: "John Doe"
date: "11/1/2021"
output: 
  beamer_presentation:
    keep_tex: true
---

## THIS WORKS

- Standalone equation.
\[
\frac{-b\pm\sqrt{b^2-4ac}}{2a}
\]

- In an aligned environment.
$$
\begin{aligned}
e^{i\pi} + 1 &= 0 \
\frac{1}{\sigma\sqrt{2\pi}} \int^{\infty}_{-\infty}
e^{-\frac{1}{2}\left(x-\mu\right)^2/\sigma^2}\,\mathrm{d}x &= 1\
\int^{\sqrt[3]{3}}_1 z^2 \, \mathrm{d}z \times \cos\left(\frac{3\pi}{9}\right) &= \log\left(\sqrt[3]{e}\right)
\end{aligned}
$$

## THIS DOESN'T WORK

\[H_o: \mu_1 = \mu_2 \]
\[H_1: \mu_1 > \mu_2 \]