Aqui está omodeloEu uso para o seguinte Diário. Tenho problemas com todas as tabelas que são perfeitas em documentos regulares de látex. Aqui está a página com todas as tabelas:
Aqui estão os pacotes que adicionei e as tabelas:
% *** MATH PACKAGES ***
%
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{algorithm}
\usepackage{textcomp}
\usepackage{filecontents}
\usepackage{microtype}
\usepackage{float}
\usepackage{adjustbox}
\usepackage{booktabs,makecell,tabularx}
\usepackage{url}
\usepackage{booktabs}
\usepackage{subfigure}
\newcommand{\tvar}[2]{%
\mathrm{#1}_{\mathrm{#2}}%
}
\renewcommand\theadfont{\small}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\usepackage{siunitx}
\usepackage[utf8]{inputenc}
\renewcommand{\thetable}{\arabic{table}}
\usepackage{etoolbox}
\usepackage{xparse}
\makeatletter
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\begin{document}
\begin{table}[!htb]
\centering
\setlength{\tabcolsep}{2pt}
\small
\begin{tabularx}{0.6\columnwidth}{@{}c L S[table-format=7.0]*{2}{S[table-format=2.0]}@{}}
\toprule
\thead{ID} & \thead{UCI Dataset Name}
& {\thead{Samples}}
& {\thead{Attributes}}
& {\thead{Classes}} \\
\midrule
DS2 & \textbf {Pfsddfs}- cdfsads dfsdffdss & 2222222 & 22 & 5 \\
DS2 & \textbf {ESSSS} - cdfsads dfsdffdss cdfsads dfsdffdss cdfsads dfsdffdss cdfsads dfsdffdss
& 45555 & 9 & 2 \\
DS3 & \textbf {AAAA} - cdfsads dfsdffdss cdfsads dfsdffdss cdfsads dfsdffdss & 22222 & 54 & 7 \\
DS4 & \textbf {ABBB} - cdfsads dfsdffdss cdfsads dfsdffdss cdfsads dfsdffdss & 539383 & 28 & 2 \\
DS5 & \textbf {SSSS} & 60000 & 3 & 3 \\
\bottomrule
\end{tabularx}
\caption{Ssdfsdfsddgs dgfgdsg gsdgsfggdfsfgd sdfgfgsd}
\label{table:2}
\end{table}
\begin{table}[!htb]
\centering
\sisetup{table-format=2.3, table-number-alignment=center, tight-spacing,}% table-column-width =2.5cm
\setlength{\tabcolsep}{3pt}
\small
\centering
\sisetup{detect-weight,mode=text}
\renewrobustcmd{\bfseries}{\fontseries{b}\selectfont}
\renewrobustcmd{\boldmath}{}
% abbreviation
\newrobustcmd{\B}{\bfseries}
% shorten the intercolumn spaces
\setlength{\tabcolsep}{4pt}
\begin{tabular}{l>{\centering}lSSSS}
\toprule
\thead {Dataset \\ Name} & {\thead{No. of processed \\ records} }& {\thead{fsad fsd Trfsdee\\ Acc }} & {\thead{fsdd\\ Acc} }
& {\thead{dfsadf Alg\\Acc} } & {\thead{dfsfds fsd\\ J48}} \\ [0.5ex]
\midrule
Pfds fssdf & 200K to 900K & 0.504 & 0.504 & \B 0.504 & 0.504 \\
Pfds fssd & 200K to 900K & 0.524 & \B 0.546 & \B 0.546 & 0.498\\
dfsfs & 200K to 900K & 0.504 & \B0.832 & \B 0.504 & 0.504 \\
fssdf & 200K to 900K & 0.504 & \B0.754 & \B 0.754& 0.702 \\
Codsffdspe & 200K to 900K & 0.622 & 0.504 & \B 0.504 & 0.676 \\
Codsffdspe & 200K to 900K & 0.563 & \B0.674 & 0.665 & 0.686 \\
sdfdf & 200K to 900K & 0.956 & \B 0.957 & 0.956 & 0.945\\
sdfdf & 200K to 900K & 0.949 & \B0.504 & \B 0.955 & 0.952\\
dsa & 20K to 90K & 0.895 & 0.798 & \B 0.504 & 0.853\\
dsa & 20K to 90K & 0.924 & 0.834 & \B 0.932
& 0.927\\
dsa-2 & 20K to 90K & 0.899 & 0.906 & \B 0.943 & 0.942\\
SdsaA-2 & 20K to 90K & 0.892 & \B0.947 & \B 0.947 & 0.942\\
SEdsaA-3 & 20K to 90K & 0.884 & 0.832 & \B 0.897 & 0.846\\
[2ex]
\bottomrule
\end{tabular}
\caption{Csdfdfsdfs CsdfdfsdfsCsdfdfsdfsCsdfdfsdfsCsdfdfsdfs)}
\label{table:2a}
\end{table}
\begin{table}[!htb]
\centering
\sisetup{table-format=2.3, table-number-alignment=center, tight-spacing,}% table-column-width =2.5cm
\setlength{\tabcolsep}{3pt}
\small
\centering
\sisetup{detect-weight,mode=text}
\renewrobustcmd{\bfseries}{\fontseries{b}\selectfont}
\renewrobustcmd{\boldmath}{}
% abbreviation
\newrobustcmd{\B}{\bfseries}
% shorten the intercolumn spaces
\setlength{\tabcolsep}{4pt}
\begin{tabular}{l>{\centering}lSSSS}
\toprule
\thead {Dataset \\ Name} & {\thead{fsddsf \\ records} }& {\thead{Hsfd\\ Acc }} & {\thead{fsdsf\\ Acc} }
& {\thead{sfdfsd sfdf\\Acc} } & {\thead{fsd fs\\ fsd}} \\ [0.5ex]
\midrule
fsdfs fsd & 100K to 900K & 0.504 & 0.547 & \B 0.548 & 0.503 \\
fsdfs fsd & 200K to 900K & 0.524 & 0.548 & \B 0.550 & 0.498\\
sfddfs& 200K to 900K & 0.788 & \B0.833 & 0.832 & 0.824 \\
fddfs& 200K to 900K & 0.680 & 0.757 & \B 0.758& 0.702 \\
Cosdfype & 200K to 900K & 0.622 & 0.735 & \B 0.735 & 0.676 \\
Cdfspe & 200K to 900K & 0.563 & 0.677 & \B 0.678 & 0.686 \\
Airfsd & 200K to 900K & 0.956 & 0.959 & \B 0.962 & 0.945\\
dfsf & 200K to 500K & 0.949 & \B0.958 & \B 0.958 & 0.952\\
SfdsEA & 20K to 90K & 0.895 & 0.802 & \B 0.899 & 0.853\\
SEfdsA & 20K to 90K & 0.924 & 0.836 & \B 0.934 & 0.927\\
fds-2 & 20K to 90K & 0.899 & 0.935 & \B 0.943 & 0.942\\
fds-2 & 20K to 90K & 0.892 & 0.952 & \B 0.954 & 0.942\\
Sfds3 & 20K to 90K & 0.884 & 0.853 & \B 0.897 & 0.846\\
[2ex]
\bottomrule
\end{tabular}
\caption{fgdfgdsgsf (In \textbf{Bold} thedfgsdfggf)}
\label{table:2b}
\end{table}
\begin{table}[!htb]
\centering
\sisetup{table-format=2.3, table-number-alignment=center, tight-spacing,}% table-column-width =2.5cm
\setlength{\tabcolsep}{3pt}
\small
\centering
\sisetup{detect-weight,mode=text}
\renewrobustcmd{\bfseries}{\fontseries{b}\selectfont}
\renewrobustcmd{\boldmath}{}
% abbreviation
\newrobustcmd{\B}{\bfseries}
% shorten the intercolumn spaces
\setlength{\tabcolsep}{4pt}
\begin{tabular} {l c c} %{l>{\centering}lSSSS}
\toprule
\thead {Dataset \\ Name} & {\thead{dsaasd add dada (sec) \\ 1000 dsad} } & {\thead{adsdas das ddsa Time (sec) \\ 2000 fdsfds}} \\ [0.5ex]
\midrule
dfg gdfs & 22.222 & 4.4222\\
sdfgg& 22.222 & 4.0222 \\
sdfggsd & 22.222 & 22.2226\\
dsfggfd & 32.355 & 2.277 \\
dfd & 20.254 & 2.238 \\
[2ex]
\bottomrule
\end{tabular}
% \end{tabular}
\caption{fgdfgsd}
\label{table:3}
\end{table}
\end{document}
Responder1
Fora do assunto:
- No seu MWE está faltando classe de documento. Para meu MWE eu uso
IEEEtran
. - Do seu preâmbulo considerei apenas pacotes relevantes para suas tabelas (outros removo do meu MWE, porém verifique novamente, se você realmente precisa de todos esses pacotes e se alguns deles são carregados duas vezes).
- Se o artigo for destinado a algum periódico do IEEE, não reformate as configurações padrão para legenda, etc.
Tabelas:
- Sugiro mover todas as novas definições de comandos das tabelas para o preâmbulo (por exemplo
\newrobustcmd{\B}{\bfseries}
, . - Remova todas as configurações repetidas da tabela (por exemplo
\centering
,\tabcolsep
etc). - Não está claro por que a largura da primeira tabela selecionada é muito menor que a largura da coluna.
- No MWE abaixo eu limpei os códigos da tabela e tentei projetá-los de maneira uniforme.
Seu problema:
- Não está claro (para mim) qual é o seu problema. Projeto de mesa?
\documentclass{IEEEtran}
%\usepackage{amsmath} is supersede by mathtools,
\usepackage{mathtools}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\usepackage{textcomp}
\usepackage{microtype}
\usepackage{booktabs,makecell,tabularx}
\renewcommand\theadfont{\small}
\renewcommand\theadgape{}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\usepackage{siunitx}
\usepackage{etoolbox}
\newrobustcmd{\B}{\bfseries}
\begin{document}
\begin{table}[!htb]
\small
\setlength{\tabcolsep}{3pt}
\caption{Ssdfsdfsddgs dgfgdsg gsdgsfggdfsfgd sdfgfgsd}
\label{table:2}
\begin{tabularx}{\linewidth}{@{} c L S[table-format=7.0]*{2}{S[table-format=2.0]} @{}}
\toprule
\thead{ID} & \thead{UCI Dataset Name} & {\thead{Samples}} & {\thead{Attributes}} & {\thead{Classes}}\\
\midrule
DS2 & \textbf{Pfsddfs}- cdfsads dfsdffdss & 2222222 & 22 & 5 \\
DS2 & \textbf{ESSSS} - cdfsads dfsdffdss cdfsads dfsdffdss cdfsads dfsdffdss cdfsads dfsdffdss
& 45555 & 9 & 2 \\
DS3 & \textbf{AAAA} - cdfsads dfsdffdss cdfsads dfsdffdss cdfsads dfsdffdss & 22222 & 54 & 7 \\
DS4 & \textbf{ABBB} - cdfsads dfsdffdss cdfsads dfsdffdss cdfsads dfsdffdss & 539383 & 28 & 2 \\
DS5 & \textbf{SSSS} & 60000 & 3 & 3 \\
\bottomrule
\end{tabularx}
\end{table}
\begin{table}[!htb]
\sisetup{detect-weight,
mode=text,
table-format=2.3}
\setlength{\tabcolsep}{0pt}
\caption{Csdfdfsdfs Csdfdf sdfsCsdf dfsdfs CsdfdfsdfsCs dfdfsdfs)}
\label{table:2a}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} l c SSSS}
\toprule
\thead[b]{Dataset \\ Name}
& {\thead[b]{No. of\\ processed \\ records} }
& {\thead[b]{fsad fsd\\ Trfsdee\\ Acc }}
& {\thead[b]{fsdd\\ Acc} }
& {\thead[b]{dfsadf\\ Alg\\Acc} }
& {\thead[b]{dfsfds fsd\\ J48}} \\
\midrule
Pfds fssdf & 200K to 900K & 0.504 & 0.504 & \B 0.504 & 0.504 \\
Pfds fssd & 200K to 900K & 0.524 & \B 0.546 & \B 0.546 & 0.498 \\
dfsfs & 200K to 900K & 0.504 & \B 0.832 & \B 0.504 & 0.504 \\
fssdf & 200K to 900K & 0.504 & \B 0.754 & \B 0.754 & 0.702 \\
Codsffdspe & 200K to 900K & 0.622 & 0.504 & \B 0.504 & 0.676 \\
Codsffdspe & 200K to 900K & 0.563 & \B 0.674 & 0.665 & 0.686 \\
sdfdf & 200K to 900K & 0.956 & \B 0.957 & 0.956 & 0.945 \\
sdfdf & 200K to 900K & 0.949 & \B 0.504 & \B 0.955 & 0.952 \\
dsa & 20K to 90K & 0.895 & 0.798 & \B 0.504 & 0.853 \\
dsa & 20K to 90K & 0.924 & 0.834 & \B 0.932 & 0.927 \\
dsa-2 & 20K to 90K & 0.899 & 0.906 & \B 0.943 & 0.942 \\
SdsaA-2 & 20K to 90K & 0.892 & \B 0.947 & \B 0.947 & 0.942 \\
SEdsaA-3 & 20K to 90K & 0.884 & 0.832 & \B 0.897 & 0.846 \\
\bottomrule
\end{tabular*}
\end{table}
\begin{table}[!htb]
\sisetup{table-format=2.3,
detect-weight,
mode=text}% table-column-width =2.5cm
\setlength{\tabcolsep}{3pt}
\small
\caption{fgdfgdsgsf (In \textbf{Bold} thedfgsdfggf)}
\label{table:2b}
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}l c SSSS}
\toprule
\thead {Dataset \\ Name}
& {\thead{fsddsf \\ records} }
& {\thead{Hsfd\\ Acc }}
& {\thead{fsdsf\\ Acc} }
& {\thead{sfdfsd sfdf\\Acc} }
& {\thead{fsd fs\\ fsd}} \\ [0.5ex]
\midrule
fsdfs fsd & 100K to 900K & 0.504 & 0.547 & \B 0.548 & 0.503 \\
fsdfs fsd & 200K to 900K & 0.524 & 0.548 & \B 0.550 & 0.498 \\
sfddfs & 200K to 900K & 0.788 & \B 0.833 & 0.832 & 0.824 \\
fddfs & 200K to 900K & 0.680 & 0.757 & \B 0.758 & 0.702 \\
Cosdfype & 200K to 900K & 0.622 & 0.735 & \B 0.735 & 0.676 \\
Cdfspe & 200K to 900K & 0.563 & 0.677 & \B 0.678 & 0.686 \\
Airfsd & 200K to 900K & 0.956 & 0.959 & \B 0.962 & 0.945 \\
dfsf & 200K to 500K & 0.949 & \B 0.958 & \B 0.958 & 0.952 \\
SfdsEA & 20K to 90K & 0.895 & 0.802 & \B 0.899 & 0.853 \\
SEfdsA & 20K to 90K & 0.924 & 0.836 & \B 0.934 & 0.927 \\
fds-2 & 20K to 90K & 0.899 & 0.935 & \B 0.943 & 0.942 \\
fds-2 & 20K to 90K & 0.892 & 0.952 & \B 0.954 & 0.942 \\
Sfds3 & 20K to 90K & 0.884 & 0.853 & \B 0.897 & 0.846 \\
\bottomrule
\end{tabular*}
\end{table}
\begin{table}[!htb]
\caption{fgdfgsd}
\label{table:3}
\sisetup{table-format=2.4}% table-column-width =2.5cm
\centering
\small
\begin{tabular} {l S S }
\toprule
\thead {Dataset \\ Name}
& {\thead{dsaasd add dada (sec) \\ 1000 dsad} }
& {\thead{adsdas das ddsa Time (sec) \\ 2000 fdsfds}} \\
\midrule
dfg gdfs & 22.222 & 4.4222 \\
sdfgg & 22.222 & 4.0222 \\
sdfggsd & 22.222 & 22.2226 \\
dsfggfd & 32.355 & 2.277 \\
dfd & 20.254 & 2.238 \\
\bottomrule
\end{tabular}
\end{table}
\end{document}