如何将表格向左移动?

如何将表格向左移动?

我正在将我的论文发给 mdpi.com。他们有自己的论文格式标准。我的一张表格非常宽,超出了论文的宽度

在此处输入图片描述

左侧有很大空间。有什么方法可以将表格仅向左移动,使其看起来像这样吗?

在此处输入图片描述

这是我的脚本:

    \caption{ML algorithms and evaluation methods used for clinical notes.}
    \begin{center}
        \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
            \hline
            
            \multirow{2}{*}{\textbf{\thead{Research}}}  
            & \multicolumn{6}{c|}{\textbf{\thead{Statistical Algorithms}}} 
            & \multicolumn{4}{c|}{\textbf{\thead{Neural Networks}}}
            & \multicolumn{5}{c|}{\textbf{\thead{Evaluation Methods}}}  
            \\
            \cline{2-16} 
            
            &\textbf{\thead{RF}}&\textbf{\thead{LR}}&\textbf{\thead{DT}}&\textbf{\thead{SVM}}&\textbf{\thead{NB}}&\textbf{\thead{KNN}}&\textbf{\thead{CNN}}&\textbf{\thead{RNN}}&\textbf{\thead{LSTM}}&\textbf{\thead{GRU}}
            &\textbf{\thead{Recall}}&\textbf{\thead{Precision}}&\textbf{\thead{F1\\Score}}&\textbf{\thead{Accuracy}}&\textbf{\thead{AUC}}
            \\
            
            \hline
            
            \thead{\cite{426}}
            &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{red}{\ding{53}}} 
            &\thead{\textcolor{red}{\ding{53}}} 
            &\thead{\textcolor{red}{\ding{53}}} 
            &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{red}{\ding{53}}} \\
            
            \cline{1-16}                
            \thead{\cite{473}}  
            &\thead{\textcolor{red}{\ding{53}}} 
            &\thead{\textcolor{red}{\ding{53}}} 
            &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{red}{\ding{53}}} 
            &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{red}{\ding{53}}} \\
            
            
            \cline{1-16}
            
        \end{tabular}
        \label{table_Algorithms}
    \end{center}
\end{table}

手动测试所有这些算法需要数据科学专业知识以及大量

这是脚本头

\documentclass[computers,article,submit,moreauthors,pdftex]{Definitions/mdpi} 
\maxdeadcycles=10000
\usepackage{amsmath,amssymb,pifont,amsfonts,makecell,ulem}

\usepackage{xcolor}

\usepackage{acronym}

\acrodef{AutoML}[AutoML]{automated machine learning}
\acrodef{ML}[ML]{machine learning}
\acrodef{AI}[AI]{artificial intelligence}
\acrodef{EHR}[EHR]{electronic health record}
\acrodef{NLP}[NLP]{natural language processing}
\acrodef{SVM}[SVM]{support vector machine}
\definecolor{mygreen}{RGB}{30, 155, 30}

\firstpage{1} 
\makeatletter 
\setcounter{page}{\@firstpage} 
\makeatother
\pubvolume{1}
\issuenum{1}
\articlenumber{0}
\pubyear{2021}
\copyrightyear{2020}
%\externaleditor{Academic Editor: Firstname Lastname}
\datereceived{} 
\dateaccepted{} 
\datepublished{} 

编辑:

我垂直旋转了它们,但标题文本触及了上面的线

    \begin{table}[!htb]
        \caption{ML algorithms and evaluation methods used for clinical notes.}
    \centering  % <---
\setlength\tabcolsep{3pt}


        \begin{center}

            \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
                \hline
                
                \multirow{2}{*}{\textbf{\thead{Research}}}  
                & \multicolumn{6}{c|}{\textbf{\thead{Statistical Algorithms}}} 
                & \multicolumn{4}{c|}{\textbf{\thead{Neural Networks}}}
                & \multicolumn{5}{c|}{\textbf{\thead{Evaluation Methods}}}  
                \\
                \cline{2-16} 
                
                &\rot{\textbf{\thead{RF}}}
                &\rot{\textbf{\thead{LR}}}
                &\rot{\textbf{\thead{DT}}}
                &\rot{\textbf{\thead{SVM}}}
                &\rot{\textbf{\thead{NB}}}
                &\rot{\textbf{\thead{KNN}}}
                &\rot{\textbf{\thead{CNN}}}
                &\rot{\textbf{\thead{RNN}}}
                &\rot{\textbf{\thead{LSTM}}}
                &\rot{\textbf{\thead{GRU}}}
                &\rot{\textbf{\thead{Recall}}}
                &\rot{\textbf{\thead{Precision}}}
                &\rot{\textbf{\thead{F1 Score}}}
                &\rot{\textbf{\thead{Accuracy}}}
                &\rot{\textbf{\thead{AUC}}}
                \\
                
                \hline
                
                \thead{\cite{426}}
                &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{red}{\ding{53}}} 
                &\thead{\textcolor{red}{\ding{53}}} 
                &\thead{\textcolor{red}{\ding{53}}} 
                &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{mygreen}{\checkmark}}    &\thead{\textcolor{red}{\ding{53}}} &\thead{\textcolor{red}{\ding{53}}} \\
                
                

在此处输入图片描述

答案1

看看以下内容是否适合您的需求:

\documentclass{article}
\usepackage{geometry}

\usepackage{amsmath,amssymb,pifont,ulem}
\newcommand\Yes{\textcolor{red}{\ding{53}}}     % <---
\newcommand\No{\textcolor{teal}{\checkmark}}    % <---
\usepackage{makecell, multirow, rotating}       % <---
\renewcommand\theadfont{\bfseries}              % <---
\renewcommand\theadgape{}                       % <---
\usepackage{xcolor}

\begin{document}
    \begin{table}
\caption{ML algorithms and evaluation methods used for clinical notes.}
    \centering  % <---
    \setlength\tabcolsep{3pt}  % <---
    \settowidth\rotheadsize{\theadfont Accuracy}
        \begin{tabular}{|c| *{15}{>{\centering\arraybackslash}p{1.8em}|} }
            \hline
        \multirow{2}{*}{\thead{Research}}
            & \multicolumn{6}{c|}{\thead{Statistical Algorithms}}
            & \multicolumn{4}{c|}{\thead{Neural Networks}}
            & \multicolumn{5}{c|}{\thead{Evaluation Methods}}
            \\
            \cline{2-16}

            & \rothead{RF}      & \rothead{LR}  & \rothead{DT}      & \rothead{SVM}
            & \rothead{NB}      & \rothead{KNN} & \rothead{CNN}     & \rothead{RNN}
            & \rothead{LSTM}    & \rothead{GRU} & \rothead{Recall}  &\rothead{Precision} &\rothead{F1 Score} &\rothead{Accuracy}     & \rothead{AUC}   \\
            \hline
            \thead{\cite{426}}
            & \No   & \Yes  & \No   & \No   & \No   & \No   & \Yes  & \No
            & \Yes  & \No   & \No   & \No   & \Yes  & \No   & \No   \\

            \cline{1-16}
            \thead{\cite{473}}
            & \No   & \No   & \No   & \Yes  & \No   & \No   & \Yes  & \Yes
            & \Yes  & \No   & \No   & \No   & \Yes  & \No   & \No   \\
            \cline{1-16}
        \end{tabular}
        \label{table_Algorithms}
\end{table}
\end{document}

我使用上面 MWQE 中的前两行,因为我没有使用过\documentclass。如果表格仍然太宽,请尝试将字体大小减小到\small

在此处输入图片描述

答案2

你写了,

“我无法让[桌子]变窄”

是的,您可以这样做——例如,删除所有\textbf指令和\thead标题单元格中的几乎所有指令,省略所有 17 条垂直线,设置\tabcolsep0pt并使用tabular*环境,使用\small字体大小指令。另外,您可以使用包的线条绘制宏booktabs—— \toprule、、、和——代替和,以使表格具有更开放和更吸引人的“外观” \midrule\cmidrule\addlinespace\bottomrule\hline\cline

在此处输入图片描述

\documentclass[computers,article,submit,moreauthors,pdftex]{Definitions/mdpi} 

%% [preamble]

%% new:
\usepackage{booktabs,lipsum}
\newcommand\redcross{\textcolor{red}{\footnotesize\ding{53}}}
\newcommand\greencheck{\textcolor{mygreen}{\checkmark}}

\begin{document}

\begin{table}
\setlength\tabcolsep{0pt}
    \caption{ML algorithms and evaluation methods used for clinical notes.}
    \label{table_Algorithms}

    \small
        \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} l *{15}{c} }
            \toprule
            
            Research
            & \multicolumn{6}{c}{Statistical Algorithms} 
            & \multicolumn{4}{c}{Neural Networks}
            & \multicolumn{5}{c}{Evaluation Methods}  
            \\
            \cmidrule{2-7} \cmidrule{8-11} \cmidrule{12-16} 
            &RF&LR&DT&SVM&NB&KNN
            &CNN&RNN&LSTM&GRU
            &Recall&Prec.&\thead{F1\\Score}&Acc.&AUC
            \\
            \midrule
            \cite{426}
            & \redcross & \greencheck & \redcross   & \redcross   & \redcross 
            & \redcross & \greencheck & \redcross   & \greencheck & \redcross 
            & \redcross & \redcross   & \greencheck & \redcross   & \redcross \\
            \addlinespace                 
            \cite{473} 
            & \redcross & \redcross   & \redcross   & \greencheck & \redcross   
            & \redcross & \greencheck & \greencheck & \greencheck & \redcross    
            & \redcross & \redcross   & \greencheck & \redcross   & \redcross \\     
            \bottomrule           
        \end{tabular*}
\end{table}

\lipsum[2] % filler text
\end{document}

相关内容