여기는주형나는 다음을 위해 사용합니다 신문. 일반 라텍스 문서에서 완벽하게 나오는 모든 표에 문제가 있습니다. 다음은 모든 테이블이 포함된 페이지입니다.
내가 추가한 패키지와 테이블은 다음과 같습니다.
% *** 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}
답변1
주제를 벗어:
- MWE에 문서 클래스가 누락되었습니다. 내 MWE에는
IEEEtran
. - 귀하의 서문에서 나는 귀하의 테이블과 관련된 패키지만 고려했습니다(다른 패키지는 내 MWE에서 제거했지만 해당 패키지가 정말로 필요한지 그리고 그 중 일부가 두 번 로드되는지 다시 확인하십시오).
- 기사가 일부 IEEE 저널을 대상으로 하는 경우 캡션 등에 대한 기본 설정을 다시 형식화하지 마십시오.
테이블:
- 모든 새로운 명령 정의를 테이블에서 프리앰블로 이동하는 것이 좋습니다(예
\newrobustcmd{\B}{\bfseries}
: . - 테이블에서 반복되는 모든 설정(예
\centering
:\tabcolsep
등)을 제거합니다. - 선택한 첫 번째 테이블의 너비가 열의 너비보다 훨씬 작은 이유는 명확하지 않습니다.
- 아래 MWE에서는 테이블 코드를 정리하고 통일된 방식으로 디자인하려고 했습니다.
너의 문제:
- (나에게는) 당신의 문제가 무엇인지 명확하지 않습니다. 테이블 디자인?
\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}