여러 행으로 인해 테이블 ​​테두리가 누락되었습니다.

여러 행으로 인해 테이블 ​​테두리가 누락되었습니다.

아래 표시된 테이블의 적절한 테이블 테두리를 어떻게 얻을 수 있습니까? 내 코드를 좀 봐주세요 여기에 이미지 설명을 입력하세요

\documentclass[journal]{IEEEtran}
\usepackage{multirow}
\usepackage{array}
\usepackage{tabu} 
\usepackage{multicol,graphicx}
\usepackage{makecell}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>
{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\begin{document}
\begin{table*}
\renewcommand{\arraystretch}{1.3}
\caption{Extreme Learning Machine(ELM) with kernel classifier having reduced dimension of feature vectors individual accuracy}
\begin{tabular}{|l|l|C{0.5cm}|L{2cm}|l|l|l|l|} \hline
Algorithm & Dimension &  \multirow{ 6}{*}{\rotatebox{90}{\thead{ADD THESE\\ DIMENSIONS}}}   & Total after Adding Dimensions &Classifier &\multirow{1}{*}{\thead{ Dimension\\Reduction Technique}}             &\multirow{1}{*}{\thead{ Reduced\\Dimension}}&Accuracy \\ \cline{1-2} \cline{4-8} 
CDF & 4D & & &ELM & \multirow{5}{*}{\thead{Correlation as Dimension\\ Estimator, PCA as \\ Dimension Reduction}} &\multirow{5}{*}{\thead{26 dimensions \\ reduced to\\ 4 dimensions}} &\multirow{5}{*}{\thead{Combine accuracy\\ of 4\\ dimensional reduced\\ Feature Vector\\ is 68\%}} \\ \cline{1-2} \cline{5-5}\cline{5-5}
GO & 4D & &\multirow{3}{*}{\thead{4D + 4D + 4D \\ + 7D + 7D= 26D}} &ELM\\ \cline{1-2} \cline{5-5}
Bilateral & 4D & & &ELM \\ \cline{1-2} \cline{5-5}
SLDFFO & 7D & &  &ELM\\ \cline{1-2} \cline{5-5}
SSGSM & 7D & &  &ELM\\ \hline
\end{tabular}
\end{table*}
\end{document}

답변1

  • 놓친 수직선은 을 사용하면 아무 것도 없습니다 multirow. 앰퍼샌드가 누락되었습니다. 결과적으로 수직선이 누락되었습니다.

    참고로, 각 행에는 열 수만큼 앰퍼샌드가 하나 적어야 했습니다.

  • 각 패키지의 프리앰블 리드는 하나만 있으면 충분합니다.

  • 당신의 테이블은 불필요하게 복잡하고 상징적인 테이블 모양으로 이어집니다. 예를 들어:
    • {|l|l|C{0.5cm}|L{2cm}|l|l|l|l|}에서 열 유형 변경 {|l|l|c|C{2.5cm}|c |C{2.5cm}|C{2cm}|C{2.5cm}|} 및 최근 패키지의 기능 활용 (단, 테이블 본문과 열 헤더에서 multirow모든 항목을 제거할 수 있음 제외)\thead
    • multirow한 줄의 텍스트를 포함하는 모든 셀을 제거하면 높이가 동일해집니다.
  • 위의 제안 테이블 코드를 고려하면 훨씬 짧고 깨끗하며 간결해집니다.

수정된 테이블은 다음과 같습니다.

\documentclass[journal]{IEEEtran}
%\usepackage{array} % loaded twice
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{rotating}% added, for rothead
\usepackage{array, makecell, multirow, tabu}%merged in one line
%\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} % not used
%\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}% in this table is better use this definition

\begin{document}
    \begin{table*}
\settowidth\rotheadsize{DIMENSIONS}
\renewcommand\multirowsetup{\centering}
\renewcommand{\arraystretch}{1.5}
    \centering
\caption{Extreme Learning Machine(ELM) with kernel classifier having reduced dimension of feature vectors individual accuracy}
    \begin{tabular}{|l|l|c|C{2.5cm}|c|C{2.5cm}|C{2cm}|C{2.5cm}|}
    \hline
Algorithm
    & Dimension
        &  \multirow{6}{*}{\rothead{ADD THESE\\ DIMENSIONS}}
            & Total after Adding Dimensions
                & Classifier
                    & Dimension Reduction Technique
                        & Reduced Dimension
                            & Accuracy  \\
    \cline{1-2} \cline{4-8}
CDF & 4D    &
                & \multirow{5}{=}{4D + 4D + 4D\\ + 7D + 7D = 26D}
                    & ELM
                        & \multirow{5}{=}{Correlation as Dimension Estimator,
                                          PCA as Dimension Reduction}
                            & \multirow{5}{=}{26 dimensions reduced to 4 dimensions}
                                & \multirow{5}{=}{Combine accuracy of 4 dimensional
                                                  reduced Feature Vector is 68\%}    \\
    \cline{1-2} \cline{5-5}
GO          & 4D    &   &   & ELM   &   &   &   \\
    \cline{1-2} \cline{5-5}
Bilateral   & 4D    &   &   & ELM   &   &   &   \\
    \cline{1-2} \cline{5-5}
SLDFFO      & 7D    &   &   & ELM   &   &   &   \\
    \cline{1-2} \cline{5-5}
SSGSM       & 7D    &   &   & ELM   &   &   &   \\
    \hline
\end{tabular}
\end{table*}
\end{document}

여기에 이미지 설명을 입력하세요

답변2

&행 끝에 s를 추가하기만 하면 됩니다 . 저는 여러분의 코드를 단순화하고 개선할 기회를 잡았습니다.

\documentclass[journal]{IEEEtran}
\usepackage{multirow}
\usepackage{array}
\usepackage{tabu}
\usepackage{multicol, graphicx, rotating}
\usepackage{makecell, threeparttable, caption}
\usepackage{array}
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\begin{document}

\begin{table*}
\renewcommand{\arraystretch}{1.3}
\settowidth{\rotheadsize}{DIMENSIONS}
\begin{threeparttable}
\caption{Extreme Learning Machine(ELM) with kernel classifier having reduced dimension of feature vectors individual accuracy}
\begin{tabular}{|l|l|C{0.5cm}|L{2cm}|l|l|l|l|} \hline
Algorithm & Dimension &
\multirow{7.5}{*}{\rothead{ADD THESE\\ DIMENSIONS}}
& Total after Adding Dimensions &Classifier &\thead{Dimension\\Reduction Technique} & \thead{ Reduced\\Dimension} & Accuracy \\ \cline{1-2} \cline{4-8}
CDF & 4D & & &ELM & \multirowthead{3.8}{\thead{Correlation as Dimension\\ Estimator, PCA as \\ Dimension Reduction}} & \multirowthead{6}{26 dimensions \\ reduced to\\ 4 dimensions} & \multirowthead{6}{\{Combine accuracy\\ of 4 dimensional reduced \\Feature Vector is 68\,\%} \\ %
\cline{1-2} \cline{5-5}\cline{5-5}
GO & 4D & & \multirowthead{3}{4D + 4D + 4D \\ + 7D + 7D= 26D} & ELM & & & \\ %
\cline{1-2} \cline{5-5}
Bilateral & 4D & & &ELM & & & \\ %
\cline{1-2} \cline{5-5}
SLDFFO & 7D & & &ELM & & & \\ %
\cline{1-2} \cline{5-5}
SSGSM & 7D & & &ELM & & & \\ \hline
\end{tabular}
\end{threeparttable}
\end{table*}

\end{document} 

여기에 이미지 설명을 입력하세요

관련 정보