如何在RMarkdown的公式中输入波浪号 [英] How to type tilde in formulas in RMarkdown

查看:5517
本文介绍了如何在RMarkdown的公式中输入波浪号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在RMarkdown上键入方程式以创建PDF,并且我想使用代字号,我该如何处理.我正在尝试此操作,但抛出pandoc.exe: Error producing PDF from TeX source ....

I am trying to type equations on RMarkdown to create a PDF and I want to use a tilde, how can I go about it. I am trying this but throws back a pandoc.exe: Error producing PDF from TeX source ....

---
title: "See"
date: "24 September 2016"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

follows a Bernouli distribution 
$$y_i \~ Bernouli(p_i)$$

推荐答案

我相信如果您这样做

$$
\sim
$$

这会产生您要放在公式中的~.

This should produce the ~ you are attempting to place in your formula.

这篇关于如何在RMarkdown的公式中输入波浪号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆