[Tex/LaTex] Making hhline work together with arydshln

arydshlnincompatibilitylinguisticstables

I am trying to create Optimality Theory tableaux (a specific type of tables used in linguistics). These tableaux generally look like the following – the important thing is that both the first column and the first row are "separated" from the rest of the table:

The compiled MWE without loading the arydshln package

(note that in larger tables, the 2nd to nth columns and rows look like in any other table; that is, they are separated by a single line only)

MWE that works:

\documentclass{scrartcl}
%\usepackage{arydshln}
\usepackage{hhline}
%\usepackage{arydshln}
\begin{document}
\begin{tabular}{|r||c|}\hhline{|-||-|}
a & b\\\hhline{:=::=:}
c & d\\\hhline{|-||-|}
\end{tabular}
\end{document}

The problem is that I also require the ability to use a dashed vertical line in my tables instead of the regular |. The arydshln package provides this; it allows you to use : in your tabular spec to get a dashed line.

The problem is that even loading this package (before or after hhline) screws up the table — the below is just with either of the commented lines in the MWE uncommented:

The compiled MWE with arydshln loaded

I have been able to find three references that have a samilar problem, in that their posters were attempting to use arydshln and hhline together:

But these problems were all solved by using a different approach, e.g. using TikZ to draw the "table". This is not an option for me; I really wish to use the tabular environment here. Is it in any way possible to have both dashed vertical lines (what I need arydshln for) and to be able to "separate" the first column and the first row from the rest of the table as in the first picture?

Best Answer

tabu seems very powerful but I guess you would only need something fairly simple in this case:

\documentclass{article}
\usepackage{hhline,tabu}
\begin{document}
  \newtabulinestyle { mystyle=.5pt on 1.5pt  off 1.5pt }
  \begin{tabu}{| r || *{3}{c|} c |[mystyle] c |}\hhline{|-||*{5}{-|}}
    a & b & e & f & i & j\\\hhline{:=::*{5}{=:}}
    c & d & g & h & k & l\\\hhline{|-||*{5}{-|}}
    m & n & o & p & q & r\\\hhline{|-||*{5}{-|}}
  \end{tabu}
\end{document}

dashes and gaps with <code>hhline</code> and <code>tabu</code>