有没有办法让stargazer中的notes换行,而不是跑出页面?
stargazer(fit.1, notes="A very very long note that I would like to put below the table, but currently runs off the side of the page when I compile my document. How do I get this to wrap into paragraph form?")这会产生:
\hline \\[-1.8ex]
\textit{Notes:} & \multicolumn{2}{l}{$^{*}$P $<$ .05} \\
& \multicolumn{2}{l}{$^{**}$P $<$ .01} \\
& \multicolumn{2}{l}{$^{***}$P $<$ .001} \\
& \multicolumn{2}{l}{A very very long note that I would like to put below the table, but currently runs off the side of the page when I compile my document. How do I get this to wrap into paragraph form?} \\
\normalsize
\end{tabular}
\end{table} 我在手册里找不到任何可以调整这个的东西。
发布于 2014-02-18 05:16:13
notes参数接受字符串的向量,并将每个字符串放在新行上。在您的示例中,应执行以下操作:
stargazer(linear.1, notes=c("A very very long note that I would like to put below the table,",
"but currently runs off the side of the page",
"when I compile my document.",
"How do I get this to wrap into paragraph form?"))发布于 2019-12-02 07:58:21
我个人推荐一个更具Latex-y风格的解决方案。基本上,在tex文件中创建表格环境,添加标题等。然后,在表格环境中的小型页面环境中粘贴或\输入stargazer输出( float = FALSE),然后输入备注。
例如:
\documentclass{article}
\begin{document}
\begin{table}
\caption{Your Caption}
\begin{minipage}{0.85\textwidth}
\begin{tabular}{|l|l|l|}
\hline
999 & 888 & 777 \\
\hline
\end{tabular}
\\
\\
{ \footnotesize Note: A very very long note that I would like to put below the table, but currently runs off the side of the page when I compile my document. How do I get this to wrap into paragraph form? \par}
\end{minipage}
\end{table}
\end{document}产品:https://i.stack.imgur.com/eCYy9.png
发布一个完全可重现的例子也很有帮助。我知道这很古老,但这篇文章仍然出现在谷歌搜索中。
https://stackoverflow.com/questions/21720264
复制相似问题