1

there is my code

\documentclass[a4paper,12 pt,adobefonts]{ctexart}
\usepackage{xeCJK}
\usepackage{caption}
\usepackage{multirow}%跨行表格
\usepackage{bigstrut}
\renewcommand{\arraystretch}{1.3}
\usepackage{booktabs}%设置跨列横线的行数
\pagestyle{plain}%版式设置无页眉,页码底部居中
\usepackage{indentfirst}%设置首行缩进
\usepackage[top=2.5 cm, bottom=2.5 cm, left=2.5 cm, right=2.5 cm]{geometry}%设置页边距
\setlength{\parindent}{2.5em}%设置缩进量为相对2.5个字符,\noindent让取消某一段首行缩进取消
\defaultfontfeatures{Mapping=tex-text}
\setmonofont[Scale=MatchLowercase]{Andale Mono}%设置等宽字体
%\usepackage{overcite}%让参考文献引用上标但没有[]
\usepackage{setspace}%设置行间距
\setstretch{1.5}%设置行间距为任意倍数  此处为1倍
\setCJKmainfont[BoldFont={黑体}]{宋体}
\usepackage[center]{titlesec}%让标题居中
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{tabular}{|c|c|c|c|c|}
\hline
Monday&Tuesday&Wednesday&Thursday&Friday\\
\hline
\multirow{2}{c}{微观经济学 \\ 第1-15周 \\ 杨民 \\ D220} & \bigstrut \\ \cline{2-2}& \multirow{2}{c}{毛概 \\ 第1-16周 \\ 杜利平 \\ A124} & \bigstrut \\ \cline{2-2}& \multirow{2}{c}{大学生职业规划 \\ 第1-7周 \\ 常建军 \\ D425}
\hline
\multicolumn{5}{|c|}{中午}\\
\hline
\end{tabular}
\end{document}

and I can't compile, the error is

Missing number, treated as zero.
<to be read again> 
                   c
l.25 ...经济学 \\ 第1-15周 \\ 杨民 \\ D220}
                                                   & \bigstrut \\ \cline{2-2...

?
3
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – user31729
    Commented Sep 13, 2014 at 7:59
  • -1. The code is too complicated and the problem is not related to Chinese. You should simpily your example.
    – Leo Liu
    Commented Sep 22, 2014 at 2:45
  • You may provide an image about your table. I guess the package you need is makecell, in which \multirowcell may help.
    – Leo Liu
    Commented Sep 22, 2014 at 2:52

1 Answer 1

3

There are two syntax errors:

\multirow{2}{c}{...}

The second argument "c" causes your error message, because this should not a column specifier as in \multicolumn but a width, see the documentation of multirow.

Then a \\ (\tabularnewline) is missing before \hline.

2
  • thanks for your help .after I fixing the syntax errors,I can't get the right effect I want . Google Drive
    – Dc Hua
    Commented Sep 14, 2014 at 0:52
  • 2
    @DcHua It would be easier to help, if you could simplify the example and use standard fonts, which are installed by default in TeX Live and MiKTeX. The layout problems do not seem to depend on Chinese fonts or XeTeX. Commented Sep 14, 2014 at 0:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .