R Markdown数学方程式对齐 [英] R Markdown Math Equation Alignment

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

问题描述

我正在Rstudio中的R Markdown中编写一堆数学方程式.我想将内容左对齐或居中对齐.但是,好像align会将它们默认对齐到右侧.

I am writing a bunch of math equations in R Markdown inside Rstudio. And I want to align the content either to the left or center. However, seems like the align will align them to the right as default.

我做了一些Google,其中一些告诉我要使用名为ragged2e的程序包,但是当我将其添加时却无法正常工作.我想知道这应该是乳胶问题还是rmarkdown问题.

I did some google and some of them told me to use a package called ragged2e, but it did not work when I added it in. I am wondering if this should be a latex question or rmarkdown question.

推荐答案

我不太确定您要在这里做什么,但是换行符,\\在行的末尾,而不是开始,且符合条件的运算符为&.因此:

I'm not quite sure what you're going for here, but line breaks, \\ go at the end of tthe line, not the beginning, and the aligmnent operator is &. So this:

$$
\begin{aligned}
 AR(p): Y_i &= c + \epsilon_i + \phi_i Y_{i-1} \dots \\
 Y_{i} &= c + \phi_i Y_{i-1} \dots
\end{aligned}
$$

产生此:

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

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