When I draw the following table, a vertical line appears between the head of the table and the bottom of the caption. (When I don't insert the caption the line disappears)
I use longtabu because this table spans multiple pages in my thesis
\documentclass[10pt]{report}
\usepackage{caption}
\usepackage[table]{xcolor}
\usepackage{tabu}
\usepackage{lipsum}
\usepackage{longtable}
\begin{document}
\lipsum[1]
\begin{longtabu} to \textwidth {X[2.0] | X[0.3]}
\caption{\textit{The caption of this table}}\\
\label{test-table}\\
\hline
\rowcolor{lightgray} \textbf{Title 1} & \textbf{Title 2}\\
\hline
\endfirsthead
\hline
\endlastfoot
\multicolumn{2}{l} {{\cellcolor{lightgray!20}\textbf{Subtitle 1}}} \\
\hline
test 1 & 1 \\
test 2 & 2 \\
test 3 & 3 \\
test 4 & 4 \\
test 5 & 5 \\
test 6 & 6 \\
\end{longtabu}
\end{document}
The result is as follows:
Is there a way to remove this vertical line? Or is there another way to create these vertical lines in the table?


