Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
713 views
in Technique[技术] by (71.8m points)

latex - R Markdown Math Equation Alignment

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.

enter image description here

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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}
$$

produces this:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...