tabulary:溢出和列压缩

tabulary:溢出和列压缩

我在 2 列表格中使用制表符时遇到了问题。如果列 2 有多行文本,则会导致列 1 被挤压到非常小的宽度。列 1 有时会溢出到列 2 中。基本标记:

 \usepackage{tabulary}
    ...
    begin{table}[H]
begin{tabulary}{.9\textwidth}[]{|L|L|}
...
\end{tabulary}
    \end{table}

更多详情:

    {\small\begin{table}[H]
\caption{Conventions Used in This Document}
\begin{tabulary}{.9\textwidth}[]{|L|L|}
\hline
\textbf{Convention}
 & \textbf{
                            Meaning
                        }

\\ \hline



                            \textbf{boldface}
                         & 

Boldface type indicates graphical user interface elements associated with an action, or terms
                            defined in text or the glossary.
\\ \hline



                            \textit{italic}
                         & 

 Italic type indicates book titles, emphasis, or placeholder variables for which you supply
                            particular values. 
\\ \hline



                            \texttt{monospace}
                         & 

 Monospace type indicates commands within a paragraph, URLs, code in examples, text that
                            appears on the screen, or text that you enter. 
\\ \hline

\end{tabulary}
\end{table}

建议将 {|L|L|} 替换为 {|1L|},但修复失败并出现以下错误:

! Package array Error:  Illegal pream-token (1): `c' used.

答案1

没有提供可用的示例,因此这是未经测试的,但由于第一列不应有换行符,因此它应该是一个标准l列,而不是像某些计算宽度L那样的 parbox 列。>\raggedright}p{...}

因此使用

\begin{tabulary}{\textwidth}{|l|L|}

请注意,使用.9\textwidth会强制表格偏离中心,并在右侧出现奇怪的 10% 边距。

相关内容