簡體   English   中英

觀星者筆記換行?

[英]Stargazer notes line wrap?

有沒有辦法讓觀星者的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} 

我在手冊中找不到任何用於調整它的內容。

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?"))

我個人推薦更乳膠的解決方案。 基本上,在您的 tex 文件中創建表格環境,添加標題等。然后,在表格環境中的小型環境中粘貼或 \\input 您的觀星者輸出(浮動 = 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

發布一個完全可重現的示例也很有幫助。 我知道這很舊,但該帖子仍會出現在 Google 搜索中。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM