【问题标题】:Short captions for LaTeX tables with stargazer带有 stargazer 的 LaTeX 表格的简短标题
【发布时间】:2015-09-03 06:59:27
【问题描述】:

在 LaTeX 中,可以使用以下代码制作短标题(将出现在图形列表中):

  \caption[Short caption.]{Long caption.}

在 R 中使用stargazer 我试过这个:

stargazer(mtcars, summary = FALSE, title="[Short caption]Long caption")

为字幕生成此输出:

  \caption{[Short caption]Long caption} 

如何使用stargazer 制作短标题?

【问题讨论】:

标签: r latex knitr sweave stargazer


【解决方案1】:

使用 stargazer 可以禁用它的浮动选项。将 stargazer 块嵌套在手动提供的表格环境中,然后您可以手动自定义任何标题或标签,即

\begin{table}
\caption[Short caption]{The main caption of the table.}
\label{tab:mtcars}
\centering

<<results="asis",echo=F>>=
stargazer(mtcars[1:5, 1:3], summary = FALSE,float=F)
@

\end{table}

【讨论】:

    猜你喜欢
    • 2023-03-18
    • 2014-11-06
    • 2021-09-07
    • 2012-09-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多