编辑:

编辑:

我设计了一个长表格,问题是这个表格显示在文档底部,即使将段落设置为显示在表格之后,它也会显示在表格之前。我也使用 [!ht] 将表格保持在我想要的位置,但似乎对它没有影响。

\documentclass[review]{elsarticle}
\DeclareGraphicsExtensions{.pdf,.gif,.jpg}
\usepackage{lineno}
\modulolinenumbers[5]
\usepackage{graphicx}
\usepackage{amssymb,amsmath,nccmath}
\usepackage{cclicenses}
%%\usepackage{caption} % is loaded automatically by 'subcaption'
\usepackage{lscape,array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} % centered 'p' col.
%%\usepackage{natbib} % is loaded automatically by elsarticle doc class
\usepackage{subcaption}
\usepackage{framed}  % Framing content
\usepackage{nomencl} % Nomenclature package
\makenomenclature
\setlength{\nomitemsep}{-\parskip}\usepackage{booktabs,multirow}

%% Load the next two packages *last*:
\usepackage[colorlinks]{hyperref}
\usepackage[nameinlink]{cleveref}

\journal{Journal of \LaTeX\ Templates}

\bibliographystyle{elsarticle-num}

\begin{document}


\section{Introduction} 


 blablablablablablablablablablablablablabllabl\\blablablablabl\\
\begin{table}[!h]
\centering
\begin{tabular}{@{} c *{3}{C{0.45cm}} *{2}{C{1.69cm}} c c @{}} 
\toprule
Voltage N\textsuperscript{o} & \multicolumn{3}{c}{Switching states} & 
\multicolumn{2}{c}{Voltage output} & Magnitude & Phase \\   
\cmidrule(lr){2-4} \cmidrule(lr){5-6}
$V_n$ & $S_a$ & $S_b$ & $S_c$ & $V_{\alpha}$ & $V_{\beta}$ & 
$U_{\mathrm{ref}}$ & $\alpha$ \\ 
\midrule
$V_{0o}$ & 0 & 0    & 0    & 0 & 0                    & 0 & 0 \\
$V_{0p}$ & 1 & 1    & 1   & 0 & 0                    & 0 & 0 \\
$V_{0n}$ &  -1 &  -1    & -1    & 0 & 0                    & 0 & 0 \\
$V_{1p}$ & 1 & 0    & 0    & $U_{dc}/3$ & 0                    & $U_{dc}/3$ 
& 0 \\
$V_{1n}$ & 0 & -1 & -1 & $U_{dc}/3$ & 0                    & $U_{dc}/3$ & 0 
\\
$V_{2p}$ & 1 & 1    & 0    & $U_{dc}/6$ & $\sqrt{3}\,U_{dc}/6$ & $U_{dc}/3$ 
& $\pi/3$ \\
$V_{2n}$  &  0 &  0 &  -1 &  $U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &  
$U_{dc}$/3 & $\pi/3$ \\
$V_{3p}$  &   0 & 1 &  0 &  -$U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &  
$U_{dc}$/3 & 2$\pi/3$ \\
$V_{3n}$  &   -1 &  0 &  -1 &  -$U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &   
$U_{dc}$/3 & 2$\pi/3$ \\
$V_{4p}$  &   0 & 1 &  1 &  -$U_{dc}$/3  & 0 &   $U_{dc}$/3 & $\pi$ \\
$V_{4n}$  &   -1 & 0 &  0 &  -$U_{dc}$/3  & 0 &   $U_{dc}$/3 & $\pi$ \\
$V_{5p}$  &   0 &  0 &  1 &  -$U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 4$\pi$/3 \\
$V_{5n}$  &   -1 &  -1 &  0 &  -$U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 4$\pi$/3 \\
$V_{6p}$  &   1 &  0 &  1 &  $U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 5$\pi$/3 \\
$V_{6n}$  &   0 &  -1 &  0 &  $U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 5$\pi$/3 \\
$V_{7}$  &   1 &  0 &  -1 &  $U_{dc}$/2 & $\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & $\pi$/6 \\
$V_{8}$  &   0 &  1 &  -1 &  0 & $\sqrt{3}$ $U_{dc}/3$ &  $\sqrt{3}$ 
$U_{dc}$/3 & $\pi$/2 \\
$V_{9}$  &   -1 &  1 &  0 &  -$U_{dc}$/2 & $\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 5$\pi$/6 \\
$V_{10}$  &   -1 &  0 &  1 &  -$U_{dc}$/2 & -$\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 7$\pi$/6 \\
$V_{11}$  &   0 &  -1 &  1 &  0 & -$\sqrt{3}$ $U_{dc}/3$ &  $\sqrt{3}$ 
$U_{dc}$/3 & 3$\pi$/2 \\
$V_{12}$  &   1 &  -1 &  0 &  $U_{dc}$/2  & -$\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 11$\pi$/6 \\
$V_{13}$  &   1 &  -1 &  -1 &  2$U_{dc}$/3  & 0 &  2 $U_{dc}$/3 & 0 \\
$V_{14}$  &   1 &  1 &  -1 &  $U_{dc}$/3  & $\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & $\pi$/3 \\
$V_{15}$  &   -1 &  1 &  -1 &  -$U_{dc}$/3  & $\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 2$\pi$/3 \\
$V_{16}$  &   -1 &  1 &  1 &  -2$U_{dc}$/3  & 0 & 2$U_{dc}$/3 & $\pi$ \\
$V_{17}$  &   -1 &  -1 &  1 &  -$U_{dc}$/3  & -$\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 4$\pi$/3 \\
$V_{18}$  &   1 &  -1 &  1 &  $U_{dc}$/3  & -$\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 5$\pi$/3 \\
\bottomrule
\end{tabular}
\end{table} 




  trtrtrtrtrtrtrtrtrtrttaatatatatatatatatat \\

\end{document}

这是图片在此处输入图片描述

答案1

好了,您的表格填满了整个页面!

为了向您展示这一点,我添加了一个包showframe,它可视化了文档的最终打字区域和边距。使用这个包,blindtext我向您的代码添加了一些虚拟文本。

使用以下 MWE

\documentclass[review]{elsarticle}
\DeclareGraphicsExtensions{.pdf,.gif,.jpg}
\usepackage{lineno}
\modulolinenumbers[5]
\usepackage{graphicx}
\usepackage{showframe,blindtext}
\usepackage{amssymb,amsmath,nccmath}
\usepackage{cclicenses}
%%\usepackage{caption} % is loaded automatically by 'subcaption'
\usepackage{lscape,array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} % centered 'p' col.
%%\usepackage{natbib} % is loaded automatically by elsarticle doc class
\usepackage{subcaption}
\usepackage{framed}  % Framing content
\usepackage{nomencl} % Nomenclature package
\makenomenclature
\setlength{\nomitemsep}{-\parskip}\usepackage{booktabs,multirow}

%% Load the next two packages *last*:
\usepackage[colorlinks]{hyperref}
\usepackage[nameinlink]{cleveref}

\journal{Journal of \LaTeX\ Templates}

\bibliographystyle{elsarticle-num}

\begin{document}
\section{Introduction} 


 blablablablablablablablablablablablablabllabl\\blablablablabl\\
\begin{table}[!h]
\centering
\begin{tabular}{@{} c *{3}{C{0.45cm}} *{2}{C{1.69cm}} c c @{}} 
\toprule
Voltage N\textsuperscript{o} & \multicolumn{3}{c}{Switching states} & 
\multicolumn{2}{c}{Voltage output} & Magnitude & Phase \\   
\cmidrule(lr){2-4} \cmidrule(lr){5-6}
$V_n$ & $S_a$ & $S_b$ & $S_c$ & $V_{\alpha}$ & $V_{\beta}$ & 
$U_{\mathrm{ref}}$ & $\alpha$ \\ 
\midrule
$V_{0o}$ & 0 & 0    & 0    & 0 & 0                    & 0 & 0 \\
$V_{0p}$ & 1 & 1    & 1   & 0 & 0                    & 0 & 0 \\
$V_{0n}$ &  -1 &  -1    & -1    & 0 & 0                    & 0 & 0 \\
$V_{1p}$ & 1 & 0    & 0    & $U_{dc}/3$ & 0                    & $U_{dc}/3$ 
& 0 \\
$V_{1n}$ & 0 & -1 & -1 & $U_{dc}/3$ & 0                    & $U_{dc}/3$ & 0 
\\
$V_{2p}$ & 1 & 1    & 0    & $U_{dc}/6$ & $\sqrt{3}\,U_{dc}/6$ & $U_{dc}/3$ 
& $\pi/3$ \\
$V_{2n}$  &  0 &  0 &  -1 &  $U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &  
$U_{dc}$/3 & $\pi/3$ \\
$V_{3p}$  &   0 & 1 &  0 &  -$U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &  
$U_{dc}$/3 & 2$\pi/3$ \\
$V_{3n}$  &   -1 &  0 &  -1 &  -$U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &   
$U_{dc}$/3 & 2$\pi/3$ \\
$V_{4p}$  &   0 & 1 &  1 &  -$U_{dc}$/3  & 0 &   $U_{dc}$/3 & $\pi$ \\
$V_{4n}$  &   -1 & 0 &  0 &  -$U_{dc}$/3  & 0 &   $U_{dc}$/3 & $\pi$ \\
$V_{5p}$  &   0 &  0 &  1 &  -$U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 4$\pi$/3 \\
$V_{5n}$  &   -1 &  -1 &  0 &  -$U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 4$\pi$/3 \\
$V_{6p}$  &   1 &  0 &  1 &  $U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 5$\pi$/3 \\
$V_{6n}$  &   0 &  -1 &  0 &  $U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 5$\pi$/3 \\
$V_{7}$  &   1 &  0 &  -1 &  $U_{dc}$/2 & $\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & $\pi$/6 \\
$V_{8}$  &   0 &  1 &  -1 &  0 & $\sqrt{3}$ $U_{dc}/3$ &  $\sqrt{3}$ 
$U_{dc}$/3 & $\pi$/2 \\
$V_{9}$  &   -1 &  1 &  0 &  -$U_{dc}$/2 & $\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 5$\pi$/6 \\
$V_{10}$  &   -1 &  0 &  1 &  -$U_{dc}$/2 & -$\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 7$\pi$/6 \\
$V_{11}$  &   0 &  -1 &  1 &  0 & -$\sqrt{3}$ $U_{dc}/3$ &  $\sqrt{3}$ 
$U_{dc}$/3 & 3$\pi$/2 \\
$V_{12}$  &   1 &  -1 &  0 &  $U_{dc}$/2  & -$\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 11$\pi$/6 \\
$V_{13}$  &   1 &  -1 &  -1 &  2$U_{dc}$/3  & 0 &  2 $U_{dc}$/3 & 0 \\
$V_{14}$  &   1 &  1 &  -1 &  $U_{dc}$/3  & $\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & $\pi$/3 \\
$V_{15}$  &   -1 &  1 &  -1 &  -$U_{dc}$/3  & $\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 2$\pi$/3 \\
$V_{16}$  &   -1 &  1 &  1 &  -2$U_{dc}$/3  & 0 & 2$U_{dc}$/3 & $\pi$ \\
$V_{17}$  &   -1 &  -1 &  1 &  -$U_{dc}$/3  & -$\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 4$\pi$/3 \\
$V_{18}$  &   1 &  -1 &  1 &  $U_{dc}$/3  & -$\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 5$\pi$/3 \\
\bottomrule
\end{tabular}
\end{table} 
\Blindtext
\end{document}

您将获得以下带有表格的页面,显示它完全填满了整个页面:

在此处输入图片描述

编辑:

使用以下 MWE,您的表格将打印longtable超过两页:

\documentclass[review]{elsarticle}
\DeclareGraphicsExtensions{.pdf,.gif,.jpg}
\usepackage{lineno}
\modulolinenumbers[5]
\usepackage{graphicx}
\usepackage{showframe,blindtext}
\usepackage{longtable} % <==============================================
\usepackage{amssymb,amsmath,nccmath}
\usepackage{cclicenses}
%%\usepackage{caption} % is loaded automatically by 'subcaption'
\usepackage{lscape,array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} % centered 'p' col.
%%\usepackage{natbib} % is loaded automatically by elsarticle doc class
\usepackage{subcaption}
\usepackage{framed}  % Framing contents
\usepackage{nomencl} % Nomenclature package
\makenomenclature
\setlength{\nomitemsep}{-\parskip}\usepackage{booktabs,multirow}

%% Load the next two packages *last*:
\usepackage[colorlinks]{hyperref}
\usepackage[nameinlink]{cleveref}

\journal{Journal of \LaTeX\ Templates}

\bibliographystyle{elsarticle-num}

\begin{document}
\section{Introduction} 


 blablablablablablablablablablablablablabllabl\\blablablablabl\\

\begin{longtable}{@{} c *{3}{C{0.45cm}} *{2}{C{1.69cm}} c c @{}} % <====================
\toprule
Voltage N\textsuperscript{o} & \multicolumn{3}{c}{Switching states} & 
\multicolumn{2}{c}{Voltage output} & Magnitude & Phase \\   
\cmidrule(lr){2-4} \cmidrule(lr){5-6}
$V_n$ & $S_a$ & $S_b$ & $S_c$ & $V_{\alpha}$ & $V_{\beta}$ & 
$U_{\mathrm{ref}}$ & $\alpha$ \\ 
\midrule
$V_{0o}$ & 0 & 0    & 0    & 0 & 0                    & 0 & 0 \\
$V_{0p}$ & 1 & 1    & 1   & 0 & 0                    & 0 & 0 \\
$V_{0n}$ &  -1 &  -1    & -1    & 0 & 0                    & 0 & 0 \\
$V_{1p}$ & 1 & 0    & 0    & $U_{dc}/3$ & 0                    & $U_{dc}/3$ 
& 0 \\
$V_{1n}$ & 0 & -1 & -1 & $U_{dc}/3$ & 0                    & $U_{dc}/3$ & 0 
\\
$V_{2p}$ & 1 & 1    & 0    & $U_{dc}/6$ & $\sqrt{3}\,U_{dc}/6$ & $U_{dc}/3$ 
& $\pi/3$ \\
$V_{2n}$  &  0 &  0 &  -1 &  $U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &  
$U_{dc}$/3 & $\pi/3$ \\
$V_{3p}$  &   0 & 1 &  0 &  -$U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &  
$U_{dc}$/3 & 2$\pi/3$ \\
$V_{3n}$  &   -1 &  0 &  -1 &  -$U_{dc}$/6  & $\sqrt{3}$ $U_{dc}/6$  &   
$U_{dc}$/3 & 2$\pi/3$ \\
$V_{4p}$  &   0 & 1 &  1 &  -$U_{dc}$/3  & 0 &   $U_{dc}$/3 & $\pi$ \\
$V_{4n}$  &   -1 & 0 &  0 &  -$U_{dc}$/3  & 0 &   $U_{dc}$/3 & $\pi$ \\
$V_{5p}$  &   0 &  0 &  1 &  -$U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 4$\pi$/3 \\
$V_{5n}$  &   -1 &  -1 &  0 &  -$U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 4$\pi$/3 \\
$V_{6p}$  &   1 &  0 &  1 &  $U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 5$\pi$/3 \\
$V_{6n}$  &   0 &  -1 &  0 &  $U_{dc}$/6 & - $\sqrt{3}$ $U_{dc}/6$ &  
$U_{dc}$/3 & 5$\pi$/3 \\
$V_{7}$  &   1 &  0 &  -1 &  $U_{dc}$/2 & $\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & $\pi$/6 \\
$V_{8}$  &   0 &  1 &  -1 &  0 & $\sqrt{3}$ $U_{dc}/3$ &  $\sqrt{3}$ 
$U_{dc}$/3 & $\pi$/2 \\
$V_{9}$  &   -1 &  1 &  0 &  -$U_{dc}$/2 & $\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 5$\pi$/6 \\
$V_{10}$  &   -1 &  0 &  1 &  -$U_{dc}$/2 & -$\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 7$\pi$/6 \\
$V_{11}$  &   0 &  -1 &  1 &  0 & -$\sqrt{3}$ $U_{dc}/3$ &  $\sqrt{3}$ 
$U_{dc}$/3 & 3$\pi$/2 \\
$V_{12}$  &   1 &  -1 &  0 &  $U_{dc}$/2  & -$\sqrt{3}$ $U_{dc}/6$ &  
$\sqrt{3}$ $U_{dc}$/3 & 11$\pi$/6 \\
$V_{13}$  &   1 &  -1 &  -1 &  2$U_{dc}$/3  & 0 &  2 $U_{dc}$/3 & 0 \\
$V_{14}$  &   1 &  1 &  -1 &  $U_{dc}$/3  & $\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & $\pi$/3 \\
$V_{15}$  &   -1 &  1 &  -1 &  -$U_{dc}$/3  & $\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 2$\pi$/3 \\
$V_{16}$  &   -1 &  1 &  1 &  -2$U_{dc}$/3  & 0 & 2$U_{dc}$/3 & $\pi$ \\
$V_{17}$  &   -1 &  -1 &  1 &  -$U_{dc}$/3  & -$\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 4$\pi$/3 \\
$V_{18}$  &   1 &  -1 &  1 &  $U_{dc}$/3  & -$\sqrt{3}$ $U_{dc}/3$ & 
2$U_{dc}$/3 & 5$\pi$/3 \\
\bottomrule
\end{longtable} 

\Blindtext
\end{document}

这会给你你想要的东西:

在此处输入图片描述

相关内容