我想編織一些數學運算式和一些希臘字母(在數學中)作為 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 \]
有人可以建議我如何解決這個問題嗎?謝謝!!!
uj5u.com熱心網友回復:
與希臘字母無關,這\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 \]

轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/343676.html
