1

I have a pretty complicated table that gathers some decisions inside of it. I recently added a new column to the table, which did not disrupt it, but some of the rows filled with the data for the new column behave in a strange way:

enter image description here

Take a look at the last column. You can see it doesn't have a "+" for the "Linear" entry. The problem arise when I add a "+" there:

enter image description here

As you can see, the "+" for the last column is not aligned correctly with the rest of the "+"s. The important thing to notice is that I did not change the code of the table, I simply added a new column as I always do when I need to add a new column entry.

As you can imagine the code of this table is simply huge, thus I don't think it is feasible to paste it here. If you need me to paste a small portion of it I can modify this post and add it.

Thanks!

EDIT:

\documentclass[10pt, conference, compsocconf]{IEEEtran}

% Package to generate and customize Algorithm as per ACM style
\usepackage[ruled]{algorithm2e}
\usepackage{tabularx}
\usepackage{longtable}
\usepackage{color}
\usepackage{rotating}
\usepackage[table]{xcolor}

\definecolor{lightgray}{rgb}{.9,.9,.9}
\definecolor{darkgray}{rgb}{.4,.4,.4}
\definecolor{purple}{rgb}{0.65, 0.12, 0.82}


\renewcommand{\algorithmcfname}{ALGORITHM}
\SetAlFnt{\small}
\SetAlCapFnt{\small}
\SetAlCapNameFnt{\small}
\SetAlCapHSkip{0pt}
\IncMargin{-\parindent}
\hyphenation{op-tical net-works semi-conduc-tor}

\clubpenalty=10000 
\widowpenalty = 10000

% Document starts
\begin{document}

\title{title something}
\maketitle
\newcolumntype{x}[1]{>{\centering\hspace{0pt}}b{#1}}
\newcolumntype{?}[1]{!{\vrule width #1}}
\begin{table*}
\centering
\small

    \definecolor{light-gray}{gray}{0.90}
    \rowcolors{1}{white}{light-gray}
    \begin{tabularx}{0.504\textwidth}{c|l%b{23mm}
            %|c
            %|l
            |x{2.2mm}
            %|c
            %|l
            %|x{2.2mm}
            |c?{0.3mm}
            %|c
            %|l
            x{2.2mm}
            %|c
            %|l
            |x{2.2mm}
            %|c
            %|l
            |x{2.2mm}
            %|c
            %|l
            |x{2.2mm}
            %|c
            %|l
            %|x{2.2mm}
            |c?{0.3mm}
            %|c
            %|l
            x{2.2mm}
            %|c
            %|l
            |x{2.2mm}
            %|c
            %|l
            |x{2.2mm}
            %|c
            %|l
            |x{2.2mm}
            %|c
            %|l
            |x{2.2mm}
            %|c
            %|l
            |x{2.2mm}
            %|c
            %|l
            |x{2.2mm}
        |
    }
    &
    \textbf{something}, something 
        & \begin{sideways}
        b
            (2003)
        \end{sideways} 
        & \begin{sideways}
        c
            (2003)
        \end{sideways} 
        & \begin{sideways}
        d
            (2005)
        \end{sideways} 
        & \begin{sideways}
        e
            (2006)
        \end{sideways}
        & \begin{sideways}
        f
            (2007)
        \end{sideways}
         & \begin{sideways}
        g
            (2008)
        \end{sideways}
        & \begin{sideways}
        h
            (2010)
        \end{sideways}
        & \begin{sideways}
        i
            (2011)
       \end{sideways}
    \tabularnewline

    \hline 
    \hline
 &
%\multirow{9}{1cm}{Design Time Issues} &
        \textbf{something}  


                & 
                & 
                & 
                &
                &

                &
                &
                &





            \tabularnewline &
            \hspace{0.5mm} something



                                    &
                    +               &
                    +               &
                    +               &
                    +               &
                    +               &
                    +               &
                    +               &
                    +

            \tabularnewline &
            \hspace{0.5mm} something

                                    & %g
                    +               & %h
                    +               & %i
                    +               & %j
                    +               & %k
                    +               & %l
                    +               & %m
                    +               & %n
                    +                %o
            \tabularnewline &
            \hspace{0.5mm} something

                                    & %g
                    +               & %h
                    +               & %i
                    +               & %j
                    +               & %k
                                    & %l
                    +               & %m
                    +               & %n
                    +                %o
            \tabularnewline &
            \hspace{0.5mm} something

                                    & %g
                                    & %h
                                    & %i
                    +               & %j
                                    & %k
                                    & %l
                                    & %m
                                    & %n
                                     %o
        \tabularnewline    
\hline 

    \hline
    \end{tabularx}
    \vspace{0.4cm}
    \caption{something}
    \vspace{-0.5cm}
\end{table*}
\end{document}
5
  • 3
    Please provide a minimal working example (MWE) so we can reproduce your problem. – Hackbard_C Aug 7 '14 at 9:57
  • Thanks for updating your post, but please make your code compilable (begining with \documentclass and ending with \end{document}). Also it would be good, if you can shorten your table as far as possible (so that your layout problem still occurs). – Hackbard_C Aug 7 '14 at 11:43
  • Edited and reduced! – Masiar Aug 7 '14 at 11:50
  • Try to further shorten your MWE, for example by removing all unnecessary columns. Also many of the packages, the title page etc. are superfluous. – samcarter_is_at_topanswers.xyz Aug 7 '14 at 12:29
  • Edited! Smaller than this in terms of number of columns, the error solves itself. – Masiar Aug 7 '14 at 13:25
2

Your problem is caused by superfluous empty lines in your tabular. Just delete them

\documentclass[10pt, conference, compsocconf]{IEEEtran}
\usepackage{tabularx}

\begin{document}

    \newcolumntype{x}[1]{>{\centering\hspace{0pt}}b{#1}}

    \begin{table*}
        \begin{tabularx}{0.761\textwidth}{x{2.2mm}|x{2.2mm}}
            + & + 
        \end{tabularx}
        \caption{without empty line}
    \end{table*}



    \begin{table*}
        \begin{tabularx}{0.761\textwidth}{x{2.2mm}|x{2.2mm}}
            + & + 

        \end{tabularx}
        \caption{with empty line}
    \end{table*}

\end{document}

enter image description here enter image description here

2
  • Thanks for the reply, which empty lines are you addressing exactly? – Masiar Aug 7 '14 at 13:25
  • The one after the line which is not displayed correctly. Or simply delete all. – samcarter_is_at_topanswers.xyz Aug 7 '14 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.