如何控制{longtable}表格列宽?

32 views
Skip to first unread message

yys

unread,
Nov 20, 2009, 8:42:34 AM11/20/09
to thut...@googlegroups.com
薛老师,您好!
 
 
我想用longtable制表格,当把模板中的列增加到6列时,表格乱了,如何固定表格的列宽?
 
 
问候!
 
---------------------------------------------------------------------------------------
我表格的代码如下:
---------------------------------------------------------------------------------------
 
\begin{longtable}[c]{m{.2\linewidth}m{.25\linewidth}m{.15\linewidth}m{.2\linewidth}}
\noalign{\vskip 0.5cm}
\multicolumn{6}{c}{表~\thetable\hskip 1em 4模型小样本精度}
\label{diba:yys26} \\
\noalign{\vskip 0.1cm}
\multicolumn{6}{c}{Tab.~\thetable\hskip 1em Error rate analysis for four small sample sets} \\
\noalign{\vskip 0.2cm}
\toprule[1.5pt]
  \multicolumn{1}{c}{类别} & \multicolumn{1}{c}{对象} & \multicolumn{1}{c}{KNN} & \multicolumn{1}{c}{SVM} & \multicolumn{1}{c}{FSVM} & \multicolumn{1}{c}{FG-LSSVM} \\
\midrule[1pt]
\endfirsthead
\multicolumn{6}{c}{续表~\thetable\hskip 1em 4个模型小样本精度} \\
\multicolumn{6}{c}{Continued Tab.~\thetable\hskip 1em Error rate analysis for four small sample sets} \\
\toprule[1.5pt]
\multicolumn{1}{c}{类别} & \multicolumn{1}{c}{对象} & \multicolumn{1}{c}{KNN} & \multicolumn{1}{c}{SVM} & \multicolumn{1}{c}{FSVM} & \multicolumn{1}{c}{FG-LSSVM} \\
\midrule[1pt]
\endhead
\hline
\multicolumn{6}{r}{续下页}
\endfoot
\endlastfoot
  A     & 6   & 0   & 0     & 0     & 0 \\
  B     & 12  & 0   & 0     & 0     & 0 \\
  C     & 12  & 0   & 0     & 0     & 0 \\
  D     & 9   & 0   & 0     & 0     & 0 \\
  E     & 10  & 0   & 1/10  & 1/10  & 0 \\
  F     &     & 1   & 0.979 & 0.979 & 1 \\  
  A     & 6   & 0   & 0     & 0     & 0 \\
  B     & 12  & 0   & 0     & 0     & 0 \\
  C     & 12  & 0   & 0     & 0     & 0 \\
  D     & 9   & 0   & 0     & 0     & 0 \\
  E     & 10  & 0   & 1/10  & 1/10  & 0 \\
  F     &     & 1   & 0.979 & 0.979 & 1 \\ 
  A     & 6   & 0   & 0     & 0     & 0 \\
  B     & 12  & 0   & 0     & 0     & 0 \\
  C     & 12  & 0   & 0     & 0     & 0 \\
  D     & 9   & 0   & 0     & 0     & 0 \\
  E     & 10  & 0   & 1/10  & 1/10  & 0 \\
  F     &     & 1   & 0.979 & 0.979 & 1 \\ 
  A     & 6   & 0   & 0     & 0     & 0 \\
  B     & 12  & 0   & 0     & 0     & 0 \\
  C     & 12  & 0   & 0     & 0     & 0 \\
  D     & 9   & 0   & 0     & 0     & 0 \\
  E     & 10  & 0   & 1/10  & 1/10  & 0 \\
  F     &     & 1   & 0.979 & 0.979 & 1 \\ 
  A     & 6   & 0   & 0     & 0     & 0 \\
  B     & 12  & 0   & 0     & 0     & 0 \\
  C     & 12  & 0   & 0     & 0     & 0 \\
  D     & 9   & 0   & 0     & 0     & 0 \\
  E     & 10  & 0   & 1/10  & 1/10  & 0 \\
  F     &     & 1   & 0.979 & 0.979 & 1 \\ 
\bottomrule[1.5pt]
\end{longtable}
\end{center}
 
--------------------------------------------------------------------------------------------------------------
 

Ruini Xue

unread,
Nov 21, 2009, 12:45:57 AM11/21/09
to thut...@googlegroups.com


2009/11/20 yys <yys...@sohu.com>

薛老师,您好!
 
 
我想用longtable制表格,当把模板中的列增加到6列时,表格乱了,如何固定表格的列宽?
 
 
问候!
 
---------------------------------------------------------------------------------------
我表格的代码如下:
---------------------------------------------------------------------------------------
 
\begin{longtable}[c]{m{.2\linewidth}m{.25\linewidth}m{.15\linewidth}m{.2\linewidth}}
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                 only 4 columns are defned here, how can you expect 6 columns in the following?
 
Reply all
Reply to author
Forward
0 new messages