I want to create a table which marks some cells either with $\times$
or they simply stay empty.
I have two header rows of which I would like to separate the first header row visually. I use \hhline{~======}
to get this visual separation. I resorted to using this additinoal package because I found, that a double \hline
does not seem to work correctly with \multicolumn{1}{c|}{}
.
After finally having found a solution, I now get the problem, that the horizontal lines produced by \hhline
are weirdly distorted:
Here's my minimal working example:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{hhline}
\begin{document}
\begin{table}[h]
\centering
\begin{tabular}{|l|c|c|c|c|c|c|c|c|}
\cline{2-7}
\multicolumn{1}{c|}{}
& $T_1$ & $T_2$ & $T_3$ & $T_4$ & $T_5$ & $T_6$ \\
\hhline{~ = = = = = =}
\multicolumn{1}{c|}{}
& $r_1$ & $r_2$ & $r_3$ & $r_4$ & $r_5$ & $r_6$ \\
\hline
$t_1$ & & $\times$ & & $\times$ & $\times$ & \\
\hline
$t_2$ & $\times$ & & $\times$ & & & \\
\hline
$t_3$ & & $\times$ & & & & \\
\hline
$t_4$ & $\times$ & & & $\times$ & $\times$ & $\times$ \\
\hline
$t_5$ & & $\times$ & $\times$ & & & $\times$ \\
\hline
$t_6$ & & & & $\times$ & $\times$ & $\times$ \\
\hline
\end{tabular}
\end{table}
\end{document}
For me, it seems like an anti aliasing issue but I'm probably doing something wrong on my side. I would be glad if someone could point me to a fix or to an alternative solution that looks the same as it does now. Thank you.
tikz
, cf. tex.stackexchange.com/q/204358/15925 for example. The other extreme is to drop the vertical rules as suggested by thebookmarks
package.\hhline{~ :=:=:=:=:=:=:}
and I measure the distance between the two horizontal lines at several points, I find exactly 2pt at each point. Maybe what you observe is just an optical effect? Or a problem with the pdf viewer? B.t.w., you should use \hhline also for the following lines, to avoid holes in the outer vertical lines.