avatar
o*e
1
I have a table with the following tex code
\begin{tabular*}{1\textwidth}{ccc}
1 & 2 & 3 \\
1 & 2 & 3 \\
\end{tabular*}
i.e., I want to format the table so that the width of the table is equal to
1 textwidth.
Now I use windows lyx. How can I format this in lyx?
Thanks
avatar
o*e
2
sorry, I meant
\begin{tabular*}{1\textwidth}{@{\extracolsep{\fill}}ccc}
1 & 2 & 3 \\
1 & 2 & 3 \\
\end{tabular*}

to

【在 o******e 的大作中提到】
: I have a table with the following tex code
: \begin{tabular*}{1\textwidth}{ccc}
: 1 & 2 & 3 \\
: 1 & 2 & 3 \\
: \end{tabular*}
: i.e., I want to format the table so that the width of the table is equal to
: 1 textwidth.
: Now I use windows lyx. How can I format this in lyx?
: Thanks

avatar
s*n
3
p{.33\textwidth} for each column
avatar
o*e
4
Thanks.
I have figured out an easier way.
I redefine the tabular environment in the preamble. Most of the times I want
the table to be as wide as 1\textwidth;
\renewenvironment{tabular}
{%
\begin{tabular*}{1\textwidth}
}
{%
\end{tabular*}%
}
Then add the \extracolsep{\fill}} to the tex argument in the first column of
each table. This way, I don't have to manually assign the width of a column
. The rubber space should take care of it.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。