0

Can someone help me to correct the blank gaps that are formed in the table or how to define the cell sizes so that does not happen? Sorry for my bad English. This is my code:

\documentclass[twoside,spanish,10pt, letterpaper]{memoir}
\usepackage{pgfplotstable}
\usepackage{eso-pic}
\usepackage[many]{tcolorbox}
\usepackage{picture}
\usepackage{multicol}
\usepackage{booktabs}
\usepackage{color} 
\usepackage{makecell}
\definecolor{logo}{HTML}{8A0808}
\definecolor{logo2}{HTML}{FFFF10}
\definecolor{tableheadcolor}{gray}{0.92} 
\usepackage{colortbl, array}
\usepackage{unicode-math}
\pgfplotsset{compat=1.8}


\newcommand{\topline}{ %
        \arrayrulecolor{logo}\specialrule{0.1em}{\abovetopsep}{0pt}%
        \arrayrulecolor{tableheadcolor}\specialrule{\belowrulesep}{0pt}{0pt}%
        \arrayrulecolor{logo}}

\newcommand{\midtopline}{ %
        \arrayrulecolor{tableheadcolor}\specialrule{\aboverulesep}{0pt}{0pt}%
        \arrayrulecolor{logo}\specialrule{\lightrulewidth}{0pt}{0pt}%
        \arrayrulecolor{white}\specialrule{\belowrulesep}{0pt}{0pt}%
        \arrayrulecolor{logo}}

\newcommand{\bottomline}{        
\arrayrulecolor{tableheadcolor}\specialrule{\aboverulesep}{0pt}{0pt}%
        \arrayrulecolor{logo}\specialrule{\lightrulewidth}{0pt}{0pt}%
        \arrayrulecolor{logo}\specialrule{0.1em}{\abovetopsep}{0pt}}

\newcommand{\midheader}[2]{%
        \midrule\topmidheader{#1}{#2}}
\newcommand\topmidheader[2]{\multicolumn{#1}{c}{\textsc{#2}}\\%
                \addlinespace[0.5ex]}

\pgfplotstableset{normal/.style ={%
        header=true,
        string type,
        font=\addfontfeature{Numbers={Monospaced}}\small,
        column type=l,
        every odd row/.style={
            before row=
        },
        every head row/.style={
            before row={\topline\rowcolor{tableheadcolor}},
            after row={\midtopline}
        },
        every last row/.style={
            after row=\bottomline
        },
        col sep=&,
        row sep=\\
    }
}

\begin{document}
\begin{table}[!htb]
\begin{center}
\begin{tabular}{cccccc}
\topline
 \rowcolor{tableheadcolor}  Controlador  &  \makecell{Tiempo\\de subida}& \makecell{Tiempo de \\asentamiento} & Overshoot &\makecell{\phantom{1} Error de estado \phantom{1}\\ estacionario} & Estabilidad \\
\hline
Proporcional & Disminuye  &\makecell{Variación\\ menor} & Aumenta & \makecell{Disminuye} & Aumenta\\ \rowcolor{tableheadcolor}
\makecell{Proporcional \\Integral} & Disminuye & Aumenta & Aumenta &\makecell{\phantom{111} Se hace cero} \phantom{111}  & Aumenta \\
\makecell{Proporcional \\Derivativo} &\makecell{Variación\\ menor} & Disminuye & Disminuye &\makecell{Variación\\ menor}& Disminuye \\
\hline
\end{tabular}
\end{center}
\end{table}

\end{document}

enter image description here

I use xelatex as engine.

2

Hmm odd, if you define a simpler version of \makecell directly the gap goes, adding this before your table

\def\makecell#1{\begin{tabular}{@{}c@{}}#1\end{tabular}}

I'll see if I can see what the makecell package version is doing....

  • makecell has problems with coloured tables. Don why, but I've already noticed it. In particular, using \makegapedcells (to add some vertical padding) make any colour specification ineffective. – Bernard Sep 1 '17 at 19:53

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.