Trying to make a table with the following code
\begin{table}[h]
\caption{Different scans conducted with the Catphan.}
\begin{tabularx}{\linewidth}{|l|X|X|c|X|}
\hline
\rowcolor{slightgray}
\T Phantoms &Mode &Position &Times Scanned &mAs\B\\
\hline
\cellcolor{slightgray}\T Catphan &Head-Slow &Centered &1 &60\B\\
\hline
\cellcolor{slightgray}\T Catphan &Head &Centered &10 &60\B\\
\hline
\cellcolor{slightgray}\T Catphan &Pelvis &Centered &1 &60\B\\
\hline
\cellcolor{slightgray}\T Catphan and Annulus &Pelvis &Centered &1 &60\B\\
\hline
\cellcolor{slightgray}\T Catphan and Annulus &Pelvis &Centered &1 &100\B\\
\hline
\end{tabularx}
\label{tab:example}
\end{table}
The table that I get looks like :
I cannot figure out why there is a horizontal line under the first Catphan and a vertical line before and after Times Scanned column heading.
I am using a latex template. First I thought \T and \B are part or tabularx but upon inspection could not find them. In the example with the template \T and \B are mentioned to increase the cell size slightly. I removed all \T and \B from the code and the result looks like:
The vertical lines seem to go away and the horizontal line moves down a row.
@David Thanks for the reply. I moved the caption down and it seems to be working fine. I guess I should look into the backend before posting here. Anyway thanks for the help!
Best Answer
Even after your edit of question it is still cryptic to me. So on basis of guessing and a bit of considering, how I will wrote similar table, I made the following example:
Edit: With use of package
caption
the distance between caption and table is bigger (as mentioned Bernard in his comment). Also without horizontal lines the table look better:Modified code is: