多行对齐问题

多行对齐问题

我厌倦了纠正最后两列及其多行的对齐方式

我想

21 dimensions reduced to 9 dimensions

恰好并排

Combine accuracy
of 9 dimensional reduced 
Feature Vector is 80\%

相似地

9 dimensions Further
reduced to 7 dimensions

并肩而立

Combine accuracy
of 7 dimensional reduced    
Feature Vector is 88\%

最后一排也一样

输出图像

\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 accuracy of
  combine reduced feature vectors whose individual classifier accuracy was low}
  \begin{tabular}{|l|l|r|C{1.5cm}|C{1.5cm}|C{1.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}
LBP & 4D    &
              & \multirow{5}{=}{4D + 6D + 4D\\ + 3D + 4D = 21D}
                 & \multirow{5}{=}{ELM with RBF kernel}
                     & \multirow{4}{=}{Eigenvalue as Dimension Estimator,
                                          PCA as Dimension Reduction}
                         & \multirow{4}{=}{21 dimensions reduced to 9 
dimensions}                                        \newline
                               & \multirow{4}{=}{Combine accuracy
                                                 of 9 dimensional reduced 
                                                 Feature Vector is 
80\%}\smallskip\newline \\
    \cline{1-2}
RGLBP  & 6D    &   &   &   &  &\multirow{5}{=}{9 dimensions Further
                                                  reduced to 7 dimensions} 
                                           &\multirow{5}{=}{Combine accuracy
                                                           of 7 dimensional 
reduced    
                                                           Feature Vector is 
88\% } \newline       \\
    \cline{1-2}
BDIP   & 4D    &   &   &   &   &\multirow{7}{=}{7 dimensions Further
                                                  reduced to 6 dimensions}    
                                    &\multirow{7}{=}{Combine accuracy of 6 
                                                   dimensional reduced 
                                                   Feature Vector is 100\% }\newline   \\
    \cline{1-2} 
HOG      & 3D    &   &   &    &   &   &   \\
    \cline{1-2} 
Combine and     & 4D    &   &   &    &   &   &    \\ 
reduced fv of   &       &   &   &       &   &   &  \\ 
poor individual  &       &   &   &       &   &   & \\   
 accuracy algorithms   &       &   &   &       &   &   & \\  
    \hline
\end{tabular}
\label{table:table6}
\end{table*}
\end{document}    

答案1

我认为,您不需要为对齐而烦恼,而是可以通过 s中的 s\multirow更轻松地实现所需的输出。tabulartabular

\documentclass[journal]{IEEEtran}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{array, makecell}
\renewcommand{\arraystretch}{1.5}
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} 
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}% in this table is better use this definition
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}

\begin{document}
\begin{table*}
\centering
\caption{Extreme Learning Machine(ELM) with kernel classifier accuracy of
  combine reduced feature vectors whose individual classifier accuracy was 
  low\label{table:table6}}
\begin{tabular}{|L{2cm}|L{1.3cm}|r|C{2.2cm}|C{1.5cm}|C{1.5cm}|C{2cm}|C{2.5cm}|} 
    \hline 
    Algorithm
    & Dimension
        &   & Total after Adding Dimensions
                & Classifier
                    & Dimension Reduction Technique
                        & Reduced Dimension
                            & Accuracy  \\ 
    \cline{1-2} \cline{4-8}
    \multicolumn{2}{@{}c@{}}{% first "sub"-table
            \begin{tabular}{|L{2cm}|L{1.3cm}|}
                LBP & 4D  \\[4.1pt]
                \hline
                RGLBP  & 6D  \\[4.1pt]
                 \hline
                BDIP   & 4D \\[4.1pt]
                \hline
                HOG      & 3D \\[4.1pt]
                \hline
                Combine and reduced fv of  poor individual accuracy algorithms & 4D \\
            \end{tabular}%
            }
        & \rotatebox[origin=c]{90}{\makecell{ADD THESE\\ DIMENSIONS}}
            & \multicolumn{5}{@{}c@{}}{% second "sub"-table
            \begin{tabular}{C{2.2cm}|C{1.5cm}|C{1.5cm}|C{2cm}|C{2.5cm}|}
                \makecell{4D + 6D + 4D\\ + 3D + 4D = 21D} 
                    & ELM with RBF kernel 
                        & Eigenvalue as Dimension Estimator, PCA as Dimension Reduction
                            & \multicolumn{2}{@{}c@{}}{% third "sub"-table (sub-table of the second sub-table)
                                \begin{tabular}{P{2cm}|P{2.5cm}|}
                                    21 dimensions reduced to 9 dimensions
                                        & Combine accuracy of 9 dimensional reduced Feature Vector is 80\% \\
                                    9 dimensions Further reduced to 7 dimensions
                                        & Combine accuracy of 7 dimensional reduced Feature Vector is 88\% \\
                                    7 dimensions Further reduced to 6 dimensions
                                        & Combine accuracy of 6 dimensional reduced Feature Vector is 100\%  \\
                                \end{tabular}%
                                }
            \end{tabular}
            } \\
   \hline
\end{tabular}
\end{table*}
\end{document}

在此处输入图片描述

相关内容