Search code examples
latexpdflatex

avoid latex table thicker line


I make a table like this one :

\documentclass[pdfa,sl,draft,english]{letter}
\usepackage[flushleft]{threeparttable}
\begin{document}
\begin{table}
\begin{center}
\begin{threeparttable}
\caption{Table caption}
\begin{tabular}{ | c | c| c | c |}
\hline
a 
& \multicolumn{1}{|p{3cm}|}{\centering b \\  (unit) } 
& c  ${}^{a}$
& d ${}^{b}$ \\ \hline
1 & 1b &  1c & 1d \\
2 & 2b &  2c & 2d \\ \hline
\end{tabular}
\begin{tablenotes}
\small
\item   ${}^{a}$ Note for c column
\item  ${}^{b}$ Note for d column
\end{tablenotes}
\end{threeparttable}
\end{center}
\end{table}
\end{document}

The compilation make a thicker right line on the first column and first row. Do you have an idea to avoid this?


Solution

  • This works. It is a bit of a hack, but essentially you set the columns to a width that you predefine. It seems to look okay like this.

    \documentclass[pdfa,sl,draft,english]{letter}
    \usepackage[flushleft]{threeparttable}
    \usepackage{makecell}
    \newcolumntype{?}{!{\vrule width 0.1pt}}
    
    \begin{document}
    
    Table With Bold Line
    \begin{tabular}{ | c | c | c | c |}
    \hline
    a 
    & \multicolumn{1}{|p{3cm}|}{\centering b \\  (unit) } 
    & c  ${}^{a}$
    & d ${}^{b}$ \\ \hline
    1 & 1b &  1c & 1d \\
    2 & 2b &  2c & 2d \\ \hline
    \end{tabular}
    
    Table Without Bold Line
    \begin{tabular}{ ? c ? c ? c ? c ?}
    \hline
    a 
    & \multicolumn{1}{|p{3cm}|}{\centering b \\  (unit) } 
    & c  ${}^{a}$
    & d ${}^{b}$ \\ \hline
    1 & 1b &  1c & 1d \\
    2 & 2b &  2c & 2d \\ \hline
    \end{tabular}
    
    \end{document}