luc*_*ano 5 latex r sweave knitr stargazer
在LaTeX中,可以使用以下代码制作一个简短的标题(将出现在图表列表中):
\caption[Short caption.]{Long caption.}
Run Code Online (Sandbox Code Playgroud)
随着stargazer在RI试过这样:
stargazer(mtcars, summary = FALSE, title="[Short caption]Long caption")
Run Code Online (Sandbox Code Playgroud)
这会为字幕生成此输出:
\caption{[Short caption]Long caption}
Run Code Online (Sandbox Code Playgroud)
我怎样才能制作一个简短的标题stargazer?
小智 0
使用 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}
Run Code Online (Sandbox Code Playgroud)