Table spacing issue converting to PDF via LaTeX with pandoc

我的梦境 提交于 2019-12-02 04:04:36

Here I gladly quote the great answer I received from Fran at https://tex.stackexchange.com/.

According to him the custom note ends in a \multicolumn in the LaTeX code. Thus we cannot use line break commands like par or \\. But we can achieve the automatic line break with \parbox. If we still want a custom line break we can use four backslashes \\\\. For better formatting we use \\vspace{2pt}. To give even the Coefficients and the GOFs more space we can add \renewcommand\arraystretch{1.3} (default is 1) right before the R chunk:

\renewcommand\arraystretch{1.3}  

```{r results="asis", echo = TRUE, comment = FALSE, message = FALSE}

library(texreg)
texreg(list(lm1, lm2, lm3), custom.note = "\\parbox{.4\\linewidth}
{\\vspace{2pt}Lorem ipsum dolor sit amet, consetetur sadipscing elitr, 
sed diam nonumy eirmod tempor invidunt ut labore et dolore magna 
aliquyam. \\\\ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, 
sed diam nonumy eirmod tempor invidunt ut labore et dolore magna 
aliquyam. \\\\ %stars.}")

```

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!