Springer Nature 中的 Tabularx 表格边框线无法在角落处相接

Springer Nature 中的 Tabularx 表格边框线无法在角落处相接

我正在尝试创建一个带有水平线和垂直线的表格,但这些线在角落处没有相交,我不知道为什么。有人能指出我做错了什么吗?这是 Springer Nature 的模板:https://www.overleaf.com/latex/templates/springer-nature-latex-template/gsvvftmrppwq 我正在使用这个包:

   \documentclass[pdflatex,sn-basic]{sn-jnl}
\usepackage[T1]{fontenc}% optional T1 font encoding
\usepackage{amsmath}
\usepackage{rotating}
\setlength{\rotFPtop}{0pt plus 1fil}
\usepackage{afterpage}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{flafter}
\usepackage{multirow}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\usepackage{array}
\usepackage{hyperref}
\usepackage{amsmath}
\usepackage{upgreek}

\usepackage{multicol}
\usepackage{hyperref} %<--- Load after everything else
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{booktabs,array,enumitem,ragged2e}
\usepackage{titlesec}
\setcounter{secnumdepth}{4}

\newcommand{\tablistcommand}{%
  \leavevmode\par\vspace{-\baselineskip}%
}


\newlist{tabitemize}{itemize}{1}
\setlist[tabitemize]{%
  leftmargin = *               ,
  label      = \textbullet     ,
  nosep                        ,
  before     = \tablistcommand ,
  after      = \tablistcommand
}
\usepackage{ragged2e}
\usepackage{makecell, multirow, tabularx}
\newcolumntype{L}{>{\RaggedRight}X}

\newcommand\Tstrut{\rule{0pt}{2.6ex}}         % = `top' strut
\newcommand\Bstrut{\rule[-0.9ex]{0pt}{0pt}}   % = `bottom' strut

\usepackage{longtable}
\usepackage{pdflscape}
\usepackage[utf8]{inputenc}
\usepackage{lscape} 
\usepackage{ragged2e}
\usepackage{xtab}
\usepackage{pdflscape}
\sloppy
%\usepackage[figuresright]{rotating}
\usepackage{lipsum}
\newcommand\captionof[1]{\def\@captype{#1}\caption}
\usepackage{amsmath} %=============>
\interdisplaylinepenalty=2500
\usepackage[cmintegrals]{newtxmath}
\hyphenation{op-tical net-works semi-conduc-tor}






\theoremstyle{thmstyleone}%
\newtheorem{theorem}{Theorem}%  meant for continuous numbers
\newtheorem{proposition}[theorem]{Proposition}% 


\theoremstyle{thmstyletwo}%
\newtheorem{example}{Example}%
\newtheorem{remark}{Remark}%
\usepackage{xcolor}
    \usepackage{mathtools}

\theoremstyle{thmstylethree}%
\newtheorem{definition}{Definition}%

\raggedbottom
    \begin{document}
       \begin{table}
        \setcellgapes{0.5pt}
        \centering
        \makegapedcells
        \setlength  \tabcolsep{0.05pt}
    \begin{tabularx}{\linewidth}{ 
            *{2}{|p{0.08\textwidth}}
            *{6}{|L}
                |p{0.08\textwidth}|}
        \Xhline{0.2pt}
    A 
        &   AA
            &   ZZ 
                &   EEE
                    &   ZA   
                        & EZ   
                            & AZ  
                                & ZE  
                                    & ZE     \\ 
    \hline
    \multirow{8}{=}{\centering\rotatebox{90}{ Feedforward }}  
        &   \multirow{12}{=}{\centering\rotatebox{90}{ Regression }}
            &   traffic traffic. 
                &  traffic traffic.
                    &   \begin{tabitemize}
                    \item   A.
                    \item traffictraffic.
                    \item traffictraffictraffic. 
                        \end{tabitemize}
                        &   \begin{tabitemize}
                        \item traffic . 
                        \item traffic traffic. 
                        \item traffic traffic.
                            \end{tabitemize}
                            &  traffic traffictraffic traffic.  
                                &   traffic traffictraffic traffic.
                                    &   traffic traffic   
    \\     \cline{3-9} 
        &   &   traffic traffictraffic traffic
                &   traffic traffic).
                    &   \begin{tabitemize}
                    \item traffic traffic.
                    \item traffic traffic.
                    \item traffic traffic.
                        \end{tabitemize}
                        &   traffic traffictraffic traffic.
                            &   traffic traffic.
                                &   traffic traffic.
                                    &  traffic traffic \\
    %%% Neeeeeeeeeeeeeew 
       \cline{3-9}
        &   &   traffic traffic
                &   traffic traffictraffic traffic
                    &   \begin{tabitemize}
                    \item traffic traffic
                    \item traffic traffic
                    \item traffic traffictraffic traffic
                    \item traffic traffic.
                    \item Bit traffic traffic.
                    \item traffic traffic
                        \end{tabitemize}
                        &   traffic traffic traffic.
                            &   traffic traffictraffic traffic
                                &   //
                                    &  traffic traffic  \\
        \cline{1-1} \cline{3-9}
    \multirow{3}{=}{\centering\rotatebox[origin=c]{90}{ Feedback }}  
        &   &   traffic traffic
                &   traffic traffic.
                    &   traffic traffic
                        &   traffic traffic
                            &   traffic traffic
                                &  // &  traffic traffic    \\
        \hline
    \multirow{7}{=}{\centering\rotatebox[origin=c]{90}{ Feedforward }} 
        &   \multirow{7}{=}{\centering\rotatebox[origin=c]{90}{ Classification }}
            &   Back-propagation 
                &   One hidden layer.
                    &   \begin{tabitemize}
                    \item traffic traffic
                    \item traffic traffic
                    \item traffic traffic
                    \item traffic traffic
                    \item traffic traffic
                    \item traffic traffic
                        \end{tabitemize}
                        &  traffic traffic
                            &   traffic traffic
                                &   traffic traffic
                                    &  traffic traffic \\ 
        \Xhline{1pt}
    \end{tabularx}
    \caption{AAA}
    \label{Summary_of_Neural_network_based_on_Network_Interface_selection}   
        \end{table}

在 Acrobat Reader 和 evince 中,通过几个不同版本的 pdflatex 运行此程序始终会产生此输出:

在此处输入图片描述

答案1

您可能应该尊重期刊的表格风格,也就是说,表格没有垂直规则booktabs

{NiceTabular}但是,如果您确实想添加垂直规则,这里有一种方法。在的环境下nicematrix,垂直规则永远不会被破坏。

\RequirePackage{tikz}
\documentclass[pdflatex,sn-basic]{sn-jnl}
\usepackage[T1]{fontenc}% optional T1 font encoding
\usepackage{rotating}
\setlength{\rotFPtop}{0pt plus 1fil}
\usepackage{afterpage}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{flafter}
\newcommand{\tabitem}{~~\llap{\textbullet}~~}

\usepackage{amsmath}
\usepackage{upgreek}

\usepackage{multicol}
\usepackage{hyperref} %<--- Load after everything else
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{booktabs,array,ragged2e}
\usepackage{titlesec}
\setcounter{secnumdepth}{4}

\newcommand{\tablistcommand}{%
  \leavevmode\par\vspace{-\baselineskip}%
}


\newlist{tabitemize}{itemize}{1}
\setlist[tabitemize]{%
  leftmargin = *               ,
  label      = \textbullet     ,
  nosep                        ,
  before     = \tablistcommand ,
  after      = \tablistcommand
}

\usepackage{makecell, multirow}
\newcolumntype{L}{>{\RaggedRight}X}
\usepackage{pdflscape}
\usepackage{lscape} 
\usepackage{ragged2e}
% \usepackage{xtab}
\usepackage{xcolor}
\usepackage{mathtools}


\usepackage{nicematrix}
    
\begin{document}

\begin{table}
\setcellgapes{0.5pt}
\centering
\makegapedcells
\setlength{\tabcolsep}{0.05pt}
\begin{NiceTabularX}{\linewidth}{
        *{2}{|p{0.08\textwidth}}
        *{6}{|L}
            |p{0.08\textwidth}|}
    \Xhline{0.2pt}
A 
    &   AA
        &   ZZ 
            &   EEE
                &   ZA   
                    & EZ   
                        & AZ  
                            & ZE  
                                & ZE     \\ 
\hline
\Block{3-1}{\rotate Feedforward}
    &   \Block{3-1}{\rotate Regression}
        &   traffic traffic. 
            &  traffic traffic.
                &   \begin{tabitemize}
                    \item A.
                    \item traffic traffic.
                    \item traffic traffic traffic. 
                    \end{tabitemize}
                    &   \begin{tabitemize}
                        \item traffic . 
                        \item traffic traffic. 
                        \item traffic traffic.
                        \end{tabitemize}
                        &  traffic traffic traffic traffic.  
                            &   traffic traffictraffic traffic.
                                &   traffic traffic   
\\     \cline{3-9} 
    &   &   traffic traffictraffic traffic
            &   traffic traffic).
                &   \begin{tabitemize}
                    \item traffic traffic.
                    \item traffic traffic.
                    \item traffic traffic.
                    \end{tabitemize}
                    &   traffic traffic traffic traffic.
                        &   traffic traffic.
                            &   traffic traffic.
                                &  traffic traffic \\
   \cline{3-9}
    &   &   traffic traffic
            &   traffic traffictraffic traffic
                &   \begin{tabitemize}
                \item traffic traffic
                \item traffic traffic
                \item traffic traffic traffic traffic
                \item traffic traffic.
                \item Bit traffic traffic.
                \item traffic traffic
                    \end{tabitemize}
                    &   traffic traffic traffic.
                        &   traffic traffic traffic traffic
                            &   //
                                &  traffic traffic  \\
    \cline{1-1} \cline{3-9}
\Block{1-1}{\rotate Feedback}
    &   &   traffic traffic
            &   traffic traffic.
                &   traffic traffic
                    &   traffic traffic
                        &   traffic traffic
                            &  // &  traffic traffic    \\
    \hline
\Block{}{\rotate Feedforward}
    &   \Block{}{\rotate Classification}
        &   Back-propagation 
            &   One hidden layer.
                &   \begin{tabitemize}
                \item traffic traffic
                \item traffic traffic
                \item traffic traffic
                \item traffic traffic
                \item traffic traffic
                \item traffic traffic
                    \end{tabitemize}
                    &  traffic traffic
                        &   traffic traffic
                            &   traffic traffic
                                &  traffic traffic \\ 
    \Xhline{1pt}
\end{NiceTabularX}
\caption{AAA}
\label{Summary_of_Neural_network_based_on_Network_Interface_selection}   
\end{table}
\end{document}

您需要多次编译(因为nicematrix在后台使用 PGF/Tikz 节点)。

上述输出

相关内容