事实上,我曾尝试将这些表格并排放置,我已经检查了 tex.stackexchange 中的一些方法,但它们显示两个表格和一个标题。我希望两个表格都有适当的标题,下面是代码:
\documentclass[10pt]{elsarticle}
\usepackage{lineno}
\modulolinenumbers[5]
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{amssymb,amsmath,nccmath}
\usepackage{cclicenses}
\usepackage{makecell}
\usepackage{lscape,array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage[thin, , thinc]{esdiff}
\usepackage{subcaption}
\usepackage{caption}
\usepackage{framed}
\usepackage[font=small,skip=0pt]{caption}
\begin{document}
\begin{table}[!ht]
\centering
\caption{The parameters 1}
\begin{tabular}{ c c }
\toprule
\makecell{ parameters} & value \\
\midrule
Rated value & 3.5\\
time & 50 s \\
value 1 & 100 \\
value 2 & 200 \\
value 3 & 300 \\
value 4 & 400 \\
value 5 & 500 \\
value 6 & 600 \\
VALUE 7 & 700 \\
\bottomrule
\end{tabular}
\vspace{0.5\baselineskip}\vspace{-\parskip}
\label{tab:The parameters}
\end{table}
\begin{table}[!ht]
\centering
\caption{The parameters 2}
\begin{tabular}{ c c }
\toprule
\makecell{ parameters 2} & Value \\
\midrule
time & 0.2 s\\
value 8 & 800 \\
value 9 & 900 \\
value 10 & 1000 \\
\bottomrule
\end{tabular}
\vspace{0.5\baselineskip}\vspace{-\parskip}
\label{tab:The parameters 2 }
\end{table}
\end{document}
答案1
希望对您有所帮助。这是使用minipage
环境完成的`
\documentclass[10pt]{elsarticle}
\usepackage{lineno}
\modulolinenumbers[5]
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{amssymb,amsmath,nccmath}
\usepackage{cclicenses}
\usepackage{makecell}
\usepackage{lscape,array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage[thin, , thinc]{esdiff}
\usepackage{subcaption}
\usepackage{caption}
\usepackage{framed}
\usepackage[font=small,skip=0pt]{caption}
\begin{document}\begin{table}[!htb]
\begin{minipage}{.5\linewidth}
\centering
\caption{First Table}
\label{tab:first_table}
\medskip
\begin{tabular}{ c c }
\toprule
\makecell{ parameters} & value \\
\midrule
Rated value & 1.5MW\\
time & 50 s \\
value 1 & 100 \\
value 2 & 200 \\
value 3 & 300 \\
value 4 & 400 \\
value 5 & 500 \\
value 6 & 600 \\
VALUE 7 & 700 \\
\bottomrule
\end{tabular}
\end{minipage}\hfill
\begin{minipage}{.5\linewidth}
\centering
\caption{Second Table}
\label{tab:second_table}
\medskip
\begin{tabular}{ c c }
\toprule
\makecell{ parameters 2} & Value \\
\midrule
time & 0.2 s\\
value 8 & 800 \\
value 9 & 900 \\
value 10 & 1000 \\
\bottomrule
\end{tabular}
\end{minipage}
\end{table}
\end{document}
答案2
像这样?
使用两种minipage
环境:
\documentclass[a4paper,twocolumn]{article}
\usepackage[font=small,skip=0pt]{caption}
\usepackage{booktabs}
\begin{document}
\begin{table}[!ht]
\centering
\begin{minipage}[t]{0.48\linewidth}\centering
\caption{The parameters 1}
\begin{tabular}{ c c }
\toprule
parameters & value \\
\midrule
Rated value & 1.5MW\\
time & 50 s \\
value 1 & 100 \\
value 2 & 200 \\
value 3 & 300 \\
value 4 & 400 \\
value 5 & 500 \\
value 6 & 600 \\
VALUE 7 & 700 \\
\bottomrule
\end{tabular}
\end{minipage}\hfill%
\begin{minipage}[t]{0.48\linewidth}\centering
\caption{The parameters 2}
\label{tab:The parameters 2 }
\begin{tabular}{ c c }
\toprule
parameters 2 & Value \\
\midrule
time & 0.2 s\\
value 8 & 800 \\
value 9 & 900 \\
value 10 & 1000 \\
\bottomrule
\end{tabular}
\end{minipage}
\end{table}
\end{document}
笔记:从您的 mwe 中,我删除了解决方案中所有未使用的包。