[英]How to justify the text to both sides when knitting html in rmarkdown
---
title: '1'
author: "A"
date: "April 4, 2017"
output: html_document
---
Figure 3 includes the residual plot and QQ-plot. The residual plot have no obvious pattern: the expect value of residuals is close to 0 and the variances are approximately equal. The QQ-plot shows the standardized residuals are close to the theoretical quantiles. Thus, **the residuals are normally distributed and homoscedastic, and the assumption of the liner model is satisfied**. The VIF values for each variable in the best model is small, indicating **there are no obvious multicolinearity**.
Use the above code for example, as it shows in the picture, the second line and third line are aligned to the left by default. 例如,使用上面的代码,如图所示,默认情况下第二行和第三行对齐。
What should I do if I want to align to both sides ? 如果我想要与两侧对齐,我该怎么办? (Notice: not align to the center!) (注意:不要与中心对齐!)
Text Justification in Rmarkdown word document gives the solution for word output case, but I haven't found a good reference for html case. Rmarkdown word文档中的文本对齐给出了单词输出大小写的解决方案,但我还没有找到html大小写的好参考。
Just overwrite the alignment right after the YAML: 只需在YAML之后覆盖对齐:
---
title: '1'
author: "A"
date: "April 4, 2017"
output: html_document
---
<style>
body {
text-align: justify}
</style>
Figure 3 includes the residual plot and QQ-plot. The residual plot have no obvious pattern: the expect value of residuals is close to 0 and the variances are approximately equal. The QQ-plot shows the standardized residuals are close to the theoretical quantiles. Thus, **the residuals are normally distributed and homoscedastic, and the assumption of the liner model is satisfied**. The VIF values for each variable in the best model is small, indicating **there are no obvious multicolinearity**.
Credits to Guilherme Parreira, here 归功于Guilherme Parreira, 这里
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.