2

When I use specialrule with longtable, there is a white vertical line in the last row.

I have tested, if I don't use arydshln packages, it is good. (But I want to dashed line, so I need to add arydshln)

\documentclass[]{article}

\usepackage[table]{xcolor}
\usepackage{longtable}
\usepackage{arydshln}
\usepackage{booktabs}

\begin{document}

\arrayrulecolor{green}
\rowcolors{1}{gray}{gray}
\begin{longtable}{c|c|c}
    \specialrule{10pt}{0pt}{0pt}
    XXX  & XXX  & XXXXXXX \\
    \hline
    XXXX  & XXX & XXXXXXX \\
    \hline
    XXXXX  & XXX& XXX\\
    \hline
    XXX & XXXXX  & XXXXX \\
    \hline
    XXXXX & XXX & XXX \\
    \hline
\end{longtable}

\end{document}

enter image description here

  • The example can be further simplified by removing the code related to the xcolor package. Apart from that, there seems to be an interaction between the specialrule command and the arydshln as you can get the desired result by removing one of them. – leandriis Jul 10 '18 at 16:10
0

You only need to modify one line.

\specialrule{10pt}{-10pt}{0pt}

The first parameter of the \specialrule means the thickness of the line, and the second indicates to the starting point of the connected vertical line. The starting point has been raised by thickness, so you have to lower it again.

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.