\midrule ->\noalign 已知错误,但无法为我的表解决该错误

\midrule ->\noalign 已知错误,但无法为我的表解决该错误

我在下面的程序中有两个表。第一个表生成\midrule->\noalign等错误,但第二个表不会。我想知道为什么,我希望第一个表的输出与第二个表一样。请帮忙,我已经搜索过了,但无法解决。

\documentclass[12pt, a4paper]{book}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[utf8x]{inputenc}
\usepackage{lmodern}
\usepackage{xtab}
\usepackage{ctable}
\usepackage{booktabs}
\usepackage{array}

\begin{document}
%
\newcommand{\otoprule}{\toprule}
\newcolumntype{M}{>{$}c<{$}} %
%
\begin{table}[tp]
\caption{VANET Infotainment Applications Requirements}
\label{tab:ch-3-infotainapp-req}
\centering
\begin{tabularx}{\columnwidth}{@{}>{\bfseries}Xp{3cm}p{2cm}MM}
\toprule
\textbf{Applications} & \textbf{Comm. Mode} & \textbf{Tx Mode} & \textbf{Critical} & \textbf{Tx} \\ 
 & & &  \textbf{Latency} & \textbf{Range} \\
 & & & (ms) & (m) \\ \otoprule

Point Of Interest & Broadcast & Periodic & < 1000 & 400+ \\ \midrule
Electronic Commerce & FullDuplex & Periodic & < 500 & 500+ \\ \midrule
Media Streaming & Internet Access & Unicast & < 500 & 500+ \\ \midrule
Insurance Financial Services & Internet Access & Unicast & < 500 & 500+ \\ \midrule
Fleet Management & Internet Access & Unicast & < 500 & 500+ \\ \bottomrule
\end{tabularx}
\end{table}
%
%
\begin{table}[tp] %
\caption{VANET High Priority Applications Requirements}
\label{tab:ch-3-high-priorapp-req}
\centering
\begin{tabularx}{\columnwidth}{@{}>{\bfseries}Xp{2cm}p{2cm}MM}
\toprule
\textbf{Applications} & \textbf{Comm.} & \textbf{Tx} & \textbf{Critical} & \textbf{Tx} \\
                                 & \textbf{Type} & \textbf{Frequency} & \textbf{Latency} & \textbf{Range} \\
 & & (Hz) & (ms) & (m) \\ \otoprule

Traffic Signal Violation & I2V & 10 & < 100 & < 250 \\ \midrule
Curve Speed Warning & I2V & 1 & < 1000 & < 200 \\ \midrule
Emergency Brake Lights & V2V & 10 & < 100 & < 200 \\ \midrule
Pre-Crash Sensing & V2V & 10 & < 100 & < 200 \\ \midrule
Forward Collision Warning & V2V & 10 & < 100 & < 150 \\ \midrule
Left Turn Assistance & V2V / I2V & 10 & < 100 & < 300  \\ \midrule
Lane Change Warning & V2V & 10 & < 100 & < 150 \\ \midrule
Stop Sign Assistance & V2V / I2V & 10 & < 100 & < 300  \\ \bottomrule
\end{tabularx}
\end{table}
%
\end{document}

这是.log 文件的内容。

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=latex 2014.1.16)  16 JAN 2014 23:45
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**chapter2.tex
(./chapter2.tex
LaTeX2e <2011/06/27>
Babel <3.9f> and hyphenation patterns for 78 languages loaded.
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/book.cls
Document Class: book 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/bk12.clo
File: bk12.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@chapter=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsmath.sty
Package: amsmath 2013/01/14 v2.14 AMS math features
\@mathmargin=\skip43

For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01

(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0
\@emptytoks=\toks14
\ex@=\dimen103
))
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsbsy.sty
Package: amsbsy 1999/11/29 v1.2d
\pmbraise@=\dimen104
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsmath/amsopn.sty
Package: amsopn 1999/12/14 v2.01 operator names
)
\inf@bad=\count88
LaTeX Info: Redefining \frac on input line 210.
\uproot@=\count89
\leftroot@=\count90
LaTeX Info: Redefining \overline on input line 306.
\classnum@=\count91
\DOTSCASE@=\count92
LaTeX Info: Redefining \ldots on input line 378.
LaTeX Info: Redefining \dots on input line 381.
LaTeX Info: Redefining \cdots on input line 466.
\Mathstrutbox@=\box26
\strutbox@=\box27
\big@size=\dimen105
LaTeX Font Info:    Redeclaring font encoding OML on input line 566.
LaTeX Font Info:    Redeclaring font encoding OMS on input line 567.
\macc@depth=\count93
\c@MaxMatrixCols=\count94
\dotsspace@=\muskip10
\c@parentequation=\count95
\dspbrk@lvl=\count96
\tag@help=\toks15
\row@=\count97
\column@=\count98
\maxfields@=\count99
\andhelp@=\toks16
\eqnshift@=\dimen106
\alignsep@=\dimen107
\tagshift@=\dimen108
\tagwidth@=\dimen109
\totwidth@=\dimen110
\lineht@=\dimen111
\@envbody=\toks17
\multlinegap=\skip44
\multlinetaggap=\skip45
\mathdisplay@stack=\toks18
LaTeX Info: Redefining \[ on input line 2665.
LaTeX Info: Redefining \] on input line 2666.
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsfonts/amssymb.sty
Package: amssymb 2013/01/14 v3.01 AMS font symbols

(/usr/local/texlive/2013/texmf-dist/tex/latex/amsfonts/amsfonts.sty
Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
\symAMSa=\mathgroup4
\symAMSb=\mathgroup5
LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
(Font)                  U/euf/m/n --> U/euf/b/n on input line 106.
))
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2008/03/30 v1.1d Input encoding file
\inpenc@prehook=\toks19
\inpenc@posthook=\toks20

(/usr/local/texlive/2013/texmf-dist/tex/latex/ucs/utf8x.def
File: utf8x.def 2004/10/17 UCS: Input encoding UTF-8
))
(/usr/local/texlive/2013/texmf-dist/tex/latex/ucs/ucs.sty
Package: ucs 2013/05/11 v2.2 UCS: Unicode input support

(/usr/local/texlive/2013/texmf-dist/tex/latex/ucs/data/uni-global.def
File: uni-global.def 2013/05/13 UCS: Unicode global data
)
\uc@secondtry=\count100
\uc@combtoks=\toks21
\uc@combtoksb=\toks22
\uc@temptokena=\toks23
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/lm/lmodern.sty
Package: lmodern 2009/10/30 v1.6 Latin Modern Fonts
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> OT1/lmr/m/n on input line 22.
LaTeX Font Info:    Overwriting symbol font `letters' in version `normal'
(Font)                  OML/cmm/m/it --> OML/lmm/m/it on input line 23.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `normal'
(Font)                  OMS/cmsy/m/n --> OMS/lmsy/m/n on input line 24.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `normal'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 25.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 26.
LaTeX Font Info:    Overwriting symbol font `letters' in version `bold'
(Font)                  OML/cmm/b/it --> OML/lmm/b/it on input line 27.
LaTeX Font Info:    Overwriting symbol font `symbols' in version `bold'
(Font)                  OMS/cmsy/b/n --> OMS/lmsy/b/n on input line 28.
LaTeX Font Info:    Overwriting symbol font `largesymbols' in version `bold'
(Font)                  OMX/cmex/m/n --> OMX/lmex/m/n on input line 29.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 31.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> OT1/lmss/m/n on input line 32.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> OT1/lmr/m/it on input line 33.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 34.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `bold'
(Font)                  OT1/cmr/bx/n --> OT1/lmr/bx/n on input line 35.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> OT1/lmss/bx/n on input line 36.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> OT1/lmr/bx/it on input line 37.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> OT1/lmtt/m/n on input line 38.
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/xtab/xtab.sty
Package: xtab 2011/07/31 v2.3f Extended supertabular package
\c@tracingst=\count101
\PWSTcapht=\dimen112
\ST@wd=\dimen113
\ST@rightskip=\skip46
\ST@leftskip=\skip47
\ST@parfillskip=\skip48
\c@PWSTtable=\count102
\PWSTlastpage=\count103
\PWSTpenultimate=\count104
\PWSTcurpage=\count105
\PWSTtempc=\count106
\PWSTlines=\count107
\PWST@lastht=\dimen114
\PWST@generalht=\dimen115
\PWST@ht=\dimen116
\ST@pageleft=\dimen117
\ST@headht=\dimen118
\ST@tailht=\dimen119
\ST@pagesofar=\dimen120
\ST@pboxht=\dimen121
\ST@lineht=\dimen122
\ST@stretchht=\dimen123
\ST@prevht=\dimen124
\ST@toadd=\dimen125
\ST@dimen=\dimen126
\ST@pbox=\box28
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/ctable/ctable.sty
Package: ctable 2013/12/19 v1.27 ctable package for \ flexible typesetting of t
able and figure floats using key/value directives

(/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is not detected.
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/xcolor/xcolor.sty
Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK)

(/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/color.cfg
File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive
)
Package xcolor Info: Driver file: dvips.def on input line 225.

(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/dvips.def
File: dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
)
Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337.
Package xcolor Info: Model `RGB' extended on input line 1353.
Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355.
Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356.
Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357.
Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358.
Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359.
Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360.
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2012/10/14 v2.6b package option processing (HA)

(/usr/local/texlive/2013/texmf-dist/tex/generic/xkeyval/xkeyval.tex
\XKV@toks=\toks24
\XKV@tempa@toks=\toks25
\XKV@depth=\count108
File: xkeyval.tex 2012/10/14 v2.6b key=value parser (HA)

(/usr/local/texlive/2013/texmf-dist/tex/generic/xkeyval/keyval.tex)))
(/usr/local/texlive/2013/texmf-dist/tex/latex/tools/array.sty
Package: array 2008/09/09 v2.4c Tabular extension package (FMi)
\col@sep=\dimen127
\extrarowheight=\dimen128
\NC@list=\toks26
\extratabsurround=\skip49
\backup@length=\skip50
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/tools/tabularx.sty
Package: tabularx 1999/01/07 v2.07 `tabularx' package (DPC)
\TX@col@width=\dimen129
\TX@old@table=\dimen130
\TX@old@col=\dimen131
\TX@target=\dimen132
\TX@delta=\dimen133
\TX@cols=\count109
\TX@ftn=\toks27
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/booktabs/booktabs.sty
Package: booktabs 2005/04/14 v1.61803 publication quality tables
\heavyrulewidth=\dimen134
\lightrulewidth=\dimen135
\cmidrulewidth=\dimen136
\belowrulesep=\dimen137
\belowbottomsep=\dimen138
\aboverulesep=\dimen139
\abovetopsep=\dimen140
\cmidrulesep=\dimen141
\cmidrulekern=\dimen142
\defaultaddspace=\dimen143
\@cmidla=\count110
\@cmidlb=\count111
\@aboverulesep=\dimen144
\@belowrulesep=\dimen145
\@thisruleclass=\count112
\@lastruleclass=\count113
\@thisrulewidth=\dimen146
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/rotating/rotating.sty
Package: rotating 2009/03/28 v2.16a rotated objects in LaTeX

(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)

(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)

(/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/graphics.cfg
File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
)
Package graphics Info: Driver file: dvips.def on input line 91.
)
\Gin@req@height=\dimen147
\Gin@req@width=\dimen148
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
)
\c@r@tfl@t=\count114
\rotFPtop=\skip51
\rotFPbot=\skip52
\rot@float@box=\box29
\rot@mess@toks=\toks28
)

Package ctable Warning: 
(ctable)                Transparency disabled: pdfTeX is not running in PDF mod
e .

\@ctblframesep=\dimen149
\@defaultctblframesep=\dimen150
\@ctblframerule=\dimen151
\@defaultctblframerule=\dimen152
\@ctblwidth=\dimen153
\@defaultctblwidth=\dimen154
\@ctblcaptionskip=\dimen155
\@defaultctblcaptionskip=\dimen156
\@ctblmaxwidth=\dimen157
\@defaultctblmaxwidth=\dimen158
\@ctblmincapwidth=\dimen159
\@defaultctblmincapwidth=\dimen160
\@ctblfooterwidth=\dimen161
\@defaultctblfooterwidth=\dimen162
\@ctblw=\dimen163
\@ctblfloatwidth=\dimen164
\@ctbloldsep=\dimen165
\@ctbloldrule=\dimen166
\ctbl@t=\box30
\@ctblcurftwidth=\dimen167
) (/usr/local/texlive/2013/texmf-dist/tex/latex/tools/longtable.sty
Package: longtable 2004/02/01 v4.11 Multi-page Table package (DPC)
\LTleft=\skip53
\LTright=\skip54
\LTpre=\skip55
\LTpost=\skip56
\LTchunksize=\count115
\LTcapwidth=\dimen168
\LT@head=\box31
\LT@firsthead=\box32
\LT@foot=\box33
\LT@lastfoot=\box34
\LT@cols=\count116
\LT@rows=\count117
\c@LT@tables=\count118
\c@LT@chunks=\count119
\LT@p@ftn=\toks29
)
(./chapter2.aux)
\openout1 = `chapter2.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 14.
LaTeX Font Info:    ... okay on input line 14.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 14.
LaTeX Font Info:    ... okay on input line 14.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 14.
LaTeX Font Info:    ... okay on input line 14.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 14.
LaTeX Font Info:    ... okay on input line 14.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 14.
LaTeX Font Info:    ... okay on input line 14.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 14.
LaTeX Font Info:    ... okay on input line 14.
LaTeX Font Info:    Try loading font information for OT1+lmr on input line 14.
 (/usr/local/texlive/2013/texmf-dist/tex/latex/lm/ot1lmr.fd
File: ot1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/ucs/ucsencs.def
File: ucsencs.def 2011/01/21 Fixes to fontencodings LGR, T3
)
(/usr/local/texlive/2013/texmf-dist/tex/latex/lm/omllmm.fd)
(/usr/local/texlive/2013/texmf-dist/tex/latex/lm/omslmsy.fd)
(/usr/local/texlive/2013/texmf-dist/tex/latex/lm/omxlmex.fd)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/local/texlive/2013/texmf-dist/tex/latex/amsfonts/umsb.fd)
(/usr/local/texlive/2013/texmf-dist/tex/latex/ucs/data/uni-0.def)
! Misplaced \noalign.
\midrule ->\noalign 
                    {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global \@...
l.35 \end{tabularx}

? 
! Misplaced \noalign.
\midrule ->\noalign 
                    {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global \@...
l.35 \end{tabularx}

? 
! Misplaced \noalign.
\bottomrule ->\noalign 
                       {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global...
l.35 \end{tabularx}

? 
! Misplaced \noalign.
\midrule ->\noalign 
                    {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global \@...
l.35 \end{tabularx}

? 
! Misplaced \noalign.
\midrule ->\noalign 
                    {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global \@...
l.35 \end{tabularx}

? 
! Misplaced \noalign.
\bottomrule ->\noalign 
                       {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global...
l.35 \end{tabularx}

? 

Underfull \hbox (badness 10000) in paragraph at lines 35--35
[]|\OT1/lmr/bx/n/12 Electronic Com-
 []

! Misplaced \noalign.
\midrule ->\noalign 
                    {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global \@...
l.35 \end{tabularx}

? 

Underfull \hbox (badness 10000) in paragraph at lines 35--35
[]\OT1/lmr/bx/n/12 Insurance Fi-nan-
 []

! Misplaced \noalign.
\midrule ->\noalign 
                    {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global \@...
l.35 \end{tabularx}

? 
! Misplaced \noalign.
\bottomrule ->\noalign 
                       {\ifnum 0=`}\fi \@aboverulesep =\aboverulesep \global...
l.35 \end{tabularx}

? 

Overfull \hbox (3.57578pt too wide) in paragraph at lines 57--57
[]|\OT1/lmr/bx/n/12 Frequency| 
 []


Underfull \hbox (badness 10000) in paragraph at lines 57--57
[]|\OT1/lmr/bx/n/12 Emergency Brake
 []


Underfull \hbox (badness 10000) in paragraph at lines 57--57
[]|\OT1/lmr/bx/n/12 Forward Col-li-sion
 []

[1] (./chapter2.aux)

 *File List*
    book.cls    2007/10/19 v1.4h Standard LaTeX document class
    bk12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 amsmath.sty    2013/01/14 v2.14 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
 amssymb.sty    2013/01/14 v3.01 AMS font symbols
amsfonts.sty    2013/01/14 v3.01 Basic AMSFonts support
inputenc.sty    2008/03/30 v1.1d Input encoding file
   utf8x.def    2004/10/17 UCS: Input encoding UTF-8
     ucs.sty    2013/05/11 v2.2 UCS: Unicode input support
uni-global.def    2013/05/13 UCS: Unicode global data
 lmodern.sty    2009/10/30 v1.6 Latin Modern Fonts
    xtab.sty    2011/07/31 v2.3f Extended supertabular package
  ctable.sty    2013/12/19 v1.27 ctable package for \ flexible typesetting of t
able and figure floats using key/value directives
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
   dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
 xkeyval.sty    2012/10/14 v2.6b package option processing (HA)
 xkeyval.tex    2012/10/14 v2.6b key=value parser (HA)
   array.sty    2008/09/09 v2.4c Tabular extension package (FMi)
tabularx.sty    1999/01/07 v2.07 `tabularx' package (DPC)
booktabs.sty    2005/04/14 v1.61803 publication quality tables
rotating.sty    2009/03/28 v2.16a rotated objects in LaTeX
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
longtable.sty    2004/02/01 v4.11 Multi-page Table package (DPC)
  ot1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern
 ucsencs.def    2011/01/21 Fixes to fontencodings LGR, T3
  omllmm.fd    2009/10/30 v1.6 Font defs for Latin Modern
 omslmsy.fd    2009/10/30 v1.6 Font defs for Latin Modern
 omxlmex.fd    2009/10/30 v1.6 Font defs for Latin Modern
    umsa.fd    2013/01/14 v3.01 AMS symbols A
    umsb.fd    2013/01/14 v3.01 AMS symbols B
   uni-0.def    2013/05/13 UCS: Unicode data U+0000..U+00FF
 ***********

 ) 
Here is how much of TeX's memory you used:
 3611 strings out of 493316
 46553 string characters out of 6137930
 122212 words of memory out of 5000000
 7003 multiletter control sequences out of 15000+600000
 28007 words of font info for 35 fonts, out of 8000000 for 9000
 957 hyphenation exceptions out of 8191
 39i,12n,53p,328b,733s stack positions out of 5000i,500n,10000p,200000b,80000s

Output written on chapter2.dvi (1 page, 2784 bytes).

我需要表 1 的输出像表 2 一样,如下图所示。 在此处输入图片描述

答案1

我也遇到了同样的问题。对我有帮助的解决方案是在表格中使用\tabularnewline而不是。\\

此示例:

\usepackage{tabularx}
\usepackage{ctable}
...
\begin{tabularx}{1\textwidth}{>{\setlength\hsize{1\hsize}\centering}X}
Some text... \\ \hline
\end{tabularx}

给出错误:

! Misplaced \noalign.
\hline ->\noalign 
                   {\ifnum 0=`}\fi \hrule \@height \arrayrulewidth \futurelet...```

但这个例子运行得很好:

\usepackage{tabularx}
\usepackage{ctable}
...
\begin{tabularx}{1\textwidth}{>{\setlength\hsize{1\hsize}\centering}X}
Some text... \tabularnewline \hline
\end{tabularx}

相关内容