有人能帮我纠正表格中形成的空白间隙吗?或者如何定义单元格大小以避免这种情况发生?抱歉我的英语不好。这是我的代码:
\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}
我用作xelatex
引擎。
答案1
嗯,奇怪,如果你定义一个更简单的版本,\makecell
直接差距就消失了,在你的表格之前添加这个
\def\makecell#1{\begin{tabular}{@{}c@{}}#1\end{tabular}}
我会看看是否可以看到makecell
软件包版本正在做什么......