When I reduce the table's horizontal padding using @{}, the \cline command does not work properly anymore. It is shown in the MWE below.

\documentclass{article}
\begin{document}
\begin{tabular}{|c|c|c|}
\hline
Text & Text & Text \\ \cline{2-3}
Text & Text & Text \\ \hline
\end{tabular}
\vspace{1cm}
\begin{tabular}{|@{\hspace{1mm}}c@{\hspace{1mm}}|@{\hspace{1mm}}c@{\hspace{1mm}}|@{\hspace{1mm}}c@{\hspace{1mm}}|}
\hline
Text & Text & Text \\ \cline{2-3}
Text & Text & Text \\ \hline
\end{tabular}
\end{document}

enter image description here

up vote 4 down vote accepted

Instead of specifying (half the) intercolumn whitespace by hand in each and every case, you may want to simply redefine the parameter \tabcolsep. That way, the issue with the misaligned \cline will take care of itself automatically, and I dare say the code becomes a lot more readable to boot.

enter image description here

\documentclass{article}
\usepackage{array}
\begin{document}
\begin{tabular}{|@{\hspace{1mm}}c@{\hspace{1mm}}|
                 @{\hspace{1mm}}c@{\hspace{1mm}}|
                 @{\hspace{1mm}}c@{\hspace{1mm}}|}
\hline
Text & Text & Text \\ \cline{2-3}
Text & Text & Text \\ \hline
\end{tabular}

\smallskip 
\renewcommand{\tabcolsep}{1mm}
\begin{tabular}{|c|c|c|}
\hline
Text & Text & Text \\ \cline{2-3}
Text & Text & Text \\ \hline
\end{tabular}
\end{document}
  • Easy fix! Thank you so much Mico! :) – Salman Nov 6 '13 at 22:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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