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:

a & b\\\hhline{:=::=:}
c & d\\\hhline{|-||-|}

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?

  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Do you need dashed lines in the very same tabulars? Not all of those questions have answers which use tikz. The very first one has an accepted answer which does something else entirely! The solutions in to the second question don't depend on tikz either, even though the MWE is in the context of a tikzpicture. The non-accepted answer in the third thread doesn't use tikz...
    – cfr
    Jul 19 '14 at 22:27
  • If you're doing a lot of this you might want to check out OTtablx a package designed for OT tableaux. Requires PSTricks.
    – Alan Munn
    Jul 20 '14 at 1:15
  • @AlanMunn: I had seen that, but I can't get it to work under xelatex (even though other pstricks packages, i.c. pst-vowel, do work for me). When compiling any of the examples in the documentation for OTtablx: ! Undefined control sequence. <recently read> \c@lor@to@ps l.13 \end{OTtableau}
    – user59366
    Jul 20 '14 at 7:10
  • @user59366 I suspect that this is due to some problem with your distribution. A quick test shows that the basic examples compile properly for me. (I'm not saying that it will be completely trouble free, since there are some PSTricks things that don't work with XeLaTeX but the basic examples seem to work.) One issue is that OTtablx loads TIPA by default, which can pose some problems. But this should be solvable.
    – Alan Munn
    Jul 20 '14 at 15:15
  • Yes, I thought as much - that the problem was on my end (a x86 computer running a fully up-to-date Fedora Linux). It looks like a problem with pstricks, but I am not experienced enough to be able to figure out what exact package might be missing or broken. If you happen to know just from the error message I'd appreciate the pointer, but otherwise I think I'll just let the matter rest, as cfr's tabu solution works for me.
    – user59366
    Jul 20 '14 at 17:05

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

  \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}{-|}}

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

  • the paired horizontal lines and the bottom line are thinner than the others. i doubt that this is intended. Jul 21 '14 at 16:32
  • @barbarabeeton They aren't really. It is an artefact of the PDF viewer on a small screen. TeX-produced lines always look like this on my screen. If I zoom in for higher resolution, they look OK but then I can only see a tiny bit at a time. The compiled code will look fine for anybody with a happier screen/viewer combo.
    – cfr
    Jul 21 '14 at 18:50
  • okay, i was wondering about that. thanks for explanation. Jul 21 '14 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.