R Markdown 数学方程对齐 [英] R Markdown Math Equation Alignment
问题描述
我正在 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.
我做了一些谷歌,一些告诉我使用包名为 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.
推荐答案
我不太确定你在这里要做什么,但是换行符,\
出现在 tthe 的末尾行,而不是开头,并且对齐运算符是 &
.所以这个:
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:
$$
egin{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屋!