RMarkdown中的多线方程 [英] multi-line equation in RMarkdown

查看:150
本文介绍了RMarkdown中的多线方程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在RMarkdown中创建多线方程.我已尝试从 http://www.rstudio.com/ide/提取的以下代码docs/authoring/using_markdown_equations

I am trying to create a multi-line equation in RMarkdown. I have tried the following code, extracted from http://www.rstudio.com/ide/docs/authoring/using_markdown_equations,

$$
\begin{aligned}
  \dot{x} & = \sigma(y-x) \\
  \dot{y} & = \rho x- y - xz 
\end{aligned}
$$

但是,经过编织的HTML文档给出了单行公式:

however the knitred HTML document gives a single-line equation:

单行方程的屏幕截图

推荐答案

当使用knitr剪切并粘贴到Windows 7中的RStudio中时,此代码可根据需要生成2条HTML行.如果删除了第三行末尾的第二个斜杠,则会产生示例中所示的结果.

This code produced 2 HTML lines, as desired, when cut and paste into RStudio in Windows 7 with knitr. If the second slash at the end of the 3rd line was removed, it produced the result shown in example.

这篇关于RMarkdown中的多线方程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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