![插入缺失 $、插入缺失 }、插入缺失{、放错 \crcr](https://linux22.com/image/447249/%E6%8F%92%E5%85%A5%E7%BC%BA%E5%A4%B1%20%24%E3%80%81%E6%8F%92%E5%85%A5%E7%BC%BA%E5%A4%B1%20%7D%E3%80%81%E6%8F%92%E5%85%A5%E7%BC%BA%E5%A4%B1%7B%E3%80%81%E6%94%BE%E9%94%99%20%5Ccrcr.png)
请帮忙,我不知道该如何解决。代码如下:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[big,online]{dgruyter}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage{amsfonts,amssymb,amsmath,amsgen,amsopn,amsbsy,theorem,graphicx,epsfig}
\usepackage[numbers,square,sort&compress]{natbib}
\usepackage{subcaption}
\usepackage{caption}
\begin{document}
\begin{table}[!hbt]
\tiny
\begin{center}
\begin{minipage}{\textwidth}
\caption{Overshoots and undershoots of $\delta_\text{sym}, \omega_\text{syn}, P_\text{dfig}, I_\text{dr}, I_\text{qr}, I_\text{statcom}$ for all cases.\strut}
$\begin{tabular}{cccccccccc}
%\toprule
&\multicolumn{3}{c}{Case 1 (No PSS/No STATCOM)} & \multicolumn{3}{c}{Case 2 (Only PSS)} & \multicolumn{3}{c}{Case 3 (PSS + STATCOM)}\\
\cmidrule(lr){2-4}\cmidrule(lr){5-7}\cmidrule(lr){8-10}
& 0.2 pu & 0.4 pu & 0.6 pu & 0.2 pu & 0.4 pu & 0.6 pu & 0.2 pu & 0.4 pu & 0.6 pu \\
\midrule
\multirow{2}{*}{$\delta_1$ (pu)} &{+1446\%} & \multirow{2}{*}{{Instable}} & \multirow{2}{*}{{Instable}} &{+1616\%} &{+2300\%} &{+5126\%} &{+1000\%} &{+1396\%} &{+3130\%} \\
&{-2676\%} & & &{-1491\%} &{-2110\%} &{-4794\%} &{-438\%} &{-1474\%} &{-2937\%} \\
%\midrule
\multirow{2}{*}{$\delta_2$ (pu)} &{+70\%} & \multirow{2}{*}{{Instable}} & \multirow{2}{*}{{Instable}} &{+70\%} &{+63\%} &{+55.3\%} &{+31\%} &{+46\%} &{+40.26\%} \\
&{-117\%} & & &{-63\%} &{-54\%} &{-51.6\%} &{-17\%} &{-39\%} &{-31.46\%} \\
%\midrule
\multirow{2}{*}{$\delta_3$ (pu)} &{+61\%} & \multirow{2}{*}{{Instable}} & \multirow{2}{*}{{Instable}} &{+78\%} &{+68\%} &{+59.2\%} &{+29\%} &{+51\%} & {+43.6\%} \\
&{-121\%} & & &{-66\%} &{-49\%} &{-41.3\%} &d{-10\%} &{-36\%} &{-27\%} \\
%\midrule
\multirow{2}{*}{$\omega_1$ (pu)} &{+0.4\%} & \multirow{2}{*}{{Instable}} & \multirow{2}{*}{{Instable}} &{+0.3\%} &{+0.3\%} &{+0.3\%} &{+0.3\%} &{+0.3\%} & {+0.3\%} \\
&{-0.34\%} & & &{-0.23\%} &{-0.21\%} &{-0.22\%} &{-0.21\%} &{-0.21\%} &{-0.21\%} \\
%\midrule
\multirow{2}{*}{$\omega_2$ (pu)} &{+0.6\%} & \multirow{2}{*}{{Instable}} & \multirow{2}{*}{{Instable}} &{+0.5\%} &{+0.5\%} &{+0.5\%} &{+0.5\%} &{+0.5\%} &{+0.5\%} \\
&{-0.54\%} & & &{-0.34\%} &{-0.37\%} &{-0.39\%} &{-0.33\%} &{-0.37\%} &{-0.41\%} \\
%\midrule
\multirow{2}{*}{$\omega_3$ (pu)} &{+0.7\%} & \multirow{2}{*}{{Instable}} & \multirow{2}{*}{{Instable}} &{+0.7\%} &{+0.7\%} &{+0.7\%} &{+0.7\%} &{+0.7\%} &{+0.7\%} \\
&{-0.54\%} & & &{-0.32\%} &{-0.3\%} &{-0.31\%} &{-0.31\%} &{-0.3\%} &{-0.34\%} \\
%\midrule
\multirow{2}{*}{$P_\text{dfig}$ (pu)} &{+22\%} & \multirow{2}{*}{{Instable}} & \multirow{2}{*}{{Instable}} &{+27.4\%} &{+12.7\%} &{+7.9\%} &{+13.5\%} &{+6.5\%} &{+4.2\%} \\
&{-16.4\%} & & &{-15.1\%} &{-5.6\%} &{-3.66\%} &{-4\%} &{-4.4\%} &{-2.75\%} \\
%\midrule
\multirow{2}{*}{$I_\text{dr}$ (pu)} &{+17\%} & \multirow{2}{*}{{Instable}} & \multirow{2}{*}{{Instable}} &{+9.7\%} &{+7.9\%} &{+5\%} &{+23\%} &{+19.8\%} &{+17\%} \\
& {$I_{\text{dr}_\text{min}}$} & & & {$I_{\text{dr}_\text{min}}$} &{$I_{\text{dr}_\text{min}}$} &{$I_{\text{dr}_\text{min}}$} & {$I_{\text{dr}_\text{min}}$} & {$I_{\text{dr}_\text{min}}$} & {$I_{\text{dr}_\text{min}}$} \\
%\midrule
\multirow{2}{*}{$I_\text{qr}$ (pu)} &{+56\%} & \multirow{2}{*}{{Instable}} & \multirow{2}{*}{{Instable}} &{+56.5\%} &{+19.3\%} &{+8.5\%} &{+60\%} &{+23\%} &{+12.46\%} \\ &{$I_{\text{qr}_\text{min}}$} & & & {$I_{\text{qr}_\text{min}}$} &{$I_{\text{qr}_\text{min}}$}&{$I_{\text{qr}_\text{min}}$} & {$I_{\text{qr}_\text{min}}$} & {$I_{\text{qr}_\text{min}}$} & {$I_{\text{qr}_\text{min}}$} \\
$I_\text{statc}$ (pu) &--- &--- &--- &--- &--- &--- &{+598\%} &{+748\%} &{+717\%} \\
\noalign
\label{tab1:Table1}
\end{tabular}$
\end{minipage}
\end{center} %vs{-4mm}
\end{table}
\end{document}
这里还有 sytle 文件 https://file.fm/u/gd4cvpeez 提前致谢
答案1
- 抱歉,但您的文档示例很糟糕。代码很容易丢失,它包含很多混乱和错误...
- 除了丢失的包装外,还插入了错误标签(内部
tabular
)等等。 - 使用包
S
中定义的列将使表的可读性大大提高siunitx
无论如何,看看以下(大部分离题的)关于如何编写表格的建议是否可以帮助您:
\documentclass{article}
\usepackage{geometry}
%---------------- Show page layout. Don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}% For dummy text. Don't use in a real document
\usepackage{lmodern}
\usepackage{microtype}
\usepackage[skip=1ex, font=small]{caption} % added
\usepackage{booktabs, makecell, multirow} % added
\usepackage{siunitx} % added
\begin{document}
\begin{table}[!hbt]
\caption{Overshoots and undershoots of $\delta_{\mathrm{sym}}, \omega_{\mathrm{syn}}, P_{\mathrm{dfig}}, I_{\mathrm{dr}}, I_{\mathrm{qr}}, I_{\mathrm{statcom}}$ for all cases.}
\label{tab1:Table1}
\sisetup{table-format=-4.2,
group-minimum-digits=4,
round-mode=places,
round-precision = 2,
round-integer-to-decimal}
\small
\centering
\setlength\tabcolsep{0pt}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}c S cc
*{6}{S}}
\toprule
& \multicolumn{3}{c}{\makecell{Case 1\\ (No PSS/No STATCOM)}}
& \multicolumn{3}{c}{\makecell{Case 2\\ (Only PSS)}}
& \multicolumn{3}{c}{\makecell{Case 3\\ (PSS + STATCOM)}} \\
\cmidrule(lr){2-4}\cmidrule(lr){5-7}\cmidrule(lr){8-10}
& {\makecell{0.2 pu\\ (\%)}}
& 0.4 pu & 0.6 pu
& {\makecell{0.2 pu\\ (\%)}}
& {\makecell{0.4 pu\\ (\%)}}
& {\makecell{0.6 pu\\ (\%)}}
& {\makecell{0.2 pu\\ (\%)}}
& {\makecell{0.4 pu\\ (\%)}}
& {\makecell{0.6 pu\\ (\%)}} \\
\midrule
\multirow{2}{*}{$\delta_1$ (pu)}
& +1446 & \multirow{2}{*}{Instable}
& \multirow{2}{*}{Instable}
& +1616 & +2300 & +5126
& +1000 & +1396 & +3130 \\
& -2676 & &
& -1491 & -2110 & -4794
& -438 & -1474 & -2937 \\
\addlinespace
\multirow{2}{*}{$\delta_2$ (pu)}
& +70 & \multirow{2}{*}{Instable}
& \multirow{2}{*}{Instable}
& +70 & +63 & +55.3
& +31 & +46 & +40.26 \\
& -117 & &
& -63 & -54 & -51.6
& -17 & -39 & -31.46 \\
\addlinespace
\multirow{2}{*}{$\delta_3$ (pu)}
& +61 & \multirow{2}{*}{Instable}
& \multirow{2}{*}{Instable}
& +78 & +68 & +59.2
& +29 & +51 & +43.6 \\
& -121 & &
& -66 & -49 & -41.3
& -10 & -36 & -27 \\
\addlinespace
\multirow{2}{*}{$\omega_1$ (pu)}
& +0.4 & \multirow{2}{*}{Instable}
& \multirow{2}{*}{Instable}
& +0.3 & +0.3 & +0.3
& +0.3 & +0.3 & +0.3 \\
& -0.34 & &
& -0.23 & -0.21 & -0.22
& -0.21 & -0.21 & -0.21 \\
\addlinespace
\multirow{2}{*}{$\omega_2$ (pu)}
& +0.6 & \multirow{2}{*}{Instable}
& \multirow{2}{*}{Instable}
& +0.5 & +0.5 & +0.5
& +0.5 & +0.5 & +0.5 \\
& -0.54 & &
& -0.34 & -0.37 & -0.39
& -0.33 & -0.37 & -0.41 \\
\addlinespace
\multirow{2}{*}{$\omega_3$ (pu)}
& +0.7 & \multirow{2}{*}{Instable}
& \multirow{2}{*}{Instable}
& +0.7 & +0.7 & +0.7
& +0.7 & +0.7 & +0.7 \\
& -0.54 & &
& -0.32 & -0.3 & -0.31
& -0.31 & -0.3 & -0.34 \\
\addlinespace
\multirow{2}{*}{$P_\mathrm{dfig}$ (pu)}
& +22 & \multirow{2}{*}{Instable}
& \multirow{2}{*}{Instable}
& +27.4 & +12.7 & +7.9
& +13.5 & +6.5 & +4.2 \\
& -16.4 & &
& -15.1 & -5.6 & -3.66
& -4 & -4.4 & -2.75 \\
\addlinespace
\multirow{2}{*}{$I_\mathrm{dr}$ (pu)}
& +17 & \multirow{2}{*}{Instable}
& \multirow{2}{*}{Instable}
& +9.7 & +7.9 & +5
& +23 & +19.8 & +17 \\
%
& {$I_{\mathrm{dr}_{\min}}$}
& &
& {$I_{\mathrm{dr}_{\min}}$}
& {$I_{\mathrm{dr}_{\min}}$}
& {$I_{\mathrm{dr}_{\min}}$}
& {$I_{\mathrm{dr}_{\min}}$}
& {$I_{\mathrm{dr}_{\min}}$}
& {$I_{\mathrm{dr}_{\min}}$} \\
\addlinespace
\multirow{2}{*}{$I_{\mathrm{gr}_{\min}}$ (pu)}
& +56 & \multirow{2}{*}{Instable}
& \multirow{2}{*}{Instable}
& +56.5 & +19.3 & +8.5
& +60 & +23 & +12.46 \\
%
& {$I_{\mathrm{gr}_{\min}}$}
& &
& {$I_{\mathrm{gr}_{\min}}$}
& {$I_{\text{qr}_\mathrm{min}}$}
& {$I_{\text{qr}_\mathrm{min}}$}
& {$I_{\mathrm{gr}_{\min}}$}
& {$I_{\text{qr}_\mathrm{min}}$}
& {$I_{\text{qr}_\mathrm{min}}$} \\
$ I_{\mathrm{statc}}$ (pu)
& {---} & --- & ---
& {---} & {---} & {---}
& +598 & +748 & +717 \\
\bottomrule
\end{tabular*}
\end{table}
\end{document}
编辑: MWE 的第一个版本现在扩展为完整的表格:
(红线表示文本边框)