2

I need to draw a table in Latex with a dashed line between the columns Dep and No Coda. I've tried with arydshln, but it doesn't work.

\documentclass[12pt]{article}

\usepackage{dingbat}
\usepackage{enumitem}
\usepackage{tipa}
\usepackage{multicol}
\usepackage{qtree}
\setlength\parindent{0pt}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage[bottom]{footmisc}
\usepackage{times}
\usepackage{lipsum}
\usepackage[margin=2cm,left=2cm,includefoot]{geometry} \linespread{1.5}
\usepackage{apacite}
\usepackage{caption}
%\captionsetup[table]{position=bottom}
\usepackage{array}
\usepackage{tabulary}
\newcolumntype{K}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{multirow}
\usepackage{gb4e}
\usepackage{ulem}
\usepackage{graphicx} 
\tikzset{every tree node/.style={align=center, anchor=north}}

\begin{document}

\begin{table}[htb]
\centering
\begin{tabular}{ll|cc|cc}
   & /weroh/  & {\sc Dep} & {\sc No Coda} & {\sc Max} & {\sc Onset} \\ \cline{2-6} 
   & we.roh   &     & *W & L   &       \\
\leftpointright & we.ro    &     &    & *   &       \\
   & we.ro.hi & *W  &    & L   &       \\ \cline{2-6} 
   & /arum/   & {\sc Dep} & {\sc No Coda} & {\sc Max} & {\sc Onset} \\ \cline{2-6} 
   & a.rum    &     & *W & L   & *     \\
\leftpointright & a.ru     &     &    & *   & *     \\
   & ru       &     &    & **W & L     \\
   & a.ru.mi  & *W  &    & L   & *     \\ \cline{2-6} 
   & /maur/   & {\sc Dep} & {\sc No Coda} & {\sc Max} & {\sc Onset} \\ \cline{2-6} 
   & maur     &     & *W & L   &       \\
\leftpointright& mau      &     &    & *   &       \\
   & mau.ri   & *W  &    & L   &       \\ \cline{2-6} 
   & /afit/   & {\sc Dep} & {\sc No Coda} & {\sc Max} & {\sc Onset} \\ \cline{2-6} 
   & a.fit    &     & *W & L   & *     \\
\leftpointright & a.fi     &     &    & *   & *     \\
   & fi       &     &    & **W & L     \\
   & a.fi.ti  & *W  &    & L   & *    
\end{tabular}
\caption{Tableau According to the Rough Ranking}
\label{tab1}
\end{table}

\end{document}
  • 1
    Look at the arraydshln package. – Schrödinger's cat Sep 17 at 4:09
  • 1
    The name of the package is arydshln and not arraydshln. – F. Pantigny Sep 17 at 4:30
2

(too long for a comment, hence posted as an answer)

You wrote,

I've tried with arydshln, but it doesn't work.

Not sure what you tried, but the following does work.

enter image description here

Some additional comments and suggestions:

  • Don't use the plain-TeX \sc directive in a LaTeX document; use \textsc instead.

  • Don't modify the low-level command \linespread directly. Instead, load the setspace package and issue a \setstetch directive.

  • Don't use the nearly-obsolete times package. If you need Times Roman as your text font, load a newer package such as newtxtext.

  • To give the table a slightly more open look, I set the length parameter \extrarowheight to 2pt.

  • I can't help but remark that it makes no sense to load the apacite package without issuing the directive \bibliographystyle{apacite} as well.


\documentclass[12pt]{article}

\usepackage{dingbat}
\usepackage{enumitem}
\usepackage{tipa}
\usepackage{multicol}
\usepackage{qtree}
\setlength\parindent{0pt}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage[bottom]{footmisc}

%%\usepackage{times}
\usepackage{newtxtext}

\usepackage{lipsum}
\usepackage[margin=2cm,left=2cm,includefoot]{geometry} 

%%\linespread{1.5}
\usepackage{setspace}
\setstretch{1.5}

\usepackage{apacite} % <-- make sure this is really needed

\usepackage{caption}
%\captionsetup[table]{position=bottom}
\usepackage{array}
\usepackage{tabulary}
\newcolumntype{K}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{multirow}
\usepackage{gb4e}
\usepackage{ulem}
\usepackage{graphicx} 
\tikzset{every tree node/.style={align=center, anchor=north}}

\usepackage{arydshln} % <-- new

\begin{document}

\begin{table}[htb]
\setlength\extrarowheight{2pt}
\centering
\begin{tabular}{ll|c:c|cc}\cline{2-6} 
                & /weroh/  & \textsc{Dep} & \textsc{No Coda} & \textsc{Max}  & \textsc{Onset} \\ \cline{2-6} 
                & we.roh   &     & *W & L   &       \\
\leftpointright & we.ro    &     &    & *   &       \\
                & we.ro.hi & *W  &    & L   &       \\ \cline{2-6} 
                & /arum/   & \textsc{Dep} & \textsc{No Coda} & \textsc{Max} & \textsc{Onset} \\ \cline{2-6} 
                & a.rum    &     & *W & L   & *     \\
\leftpointright & a.ru     &     &    & *   & *     \\
                & ru       &     &    & **W & L     \\
                & a.ru.mi  & *W  &    & L   & *     \\ \cline{2-6} 
                & /maur/   & \textsc{Dep} & \textsc{No Coda} & \textsc{Max} & \textsc{Onset} \\ \cline{2-6} 
                & maur     &     & *W & L   &       \\
\leftpointright & mau      &     &    & *   &       \\
                & mau.ri   & *W  &    & L   &       \\ \cline{2-6} 
                & /afit/   & \textsc{Dep} & \textsc{No Coda} & \textsc{Max} & \textsc{Onset} \\ \cline{2-6} 
                & a.fit    &     & *W & L   & *     \\
\leftpointright & a.fi     &     &    & *   & *     \\
                & fi       &     &    & **W & L     \\
                & a.fi.ti  & *W  &    & L   & *     \\ \cline{2-6} 
\end{tabular}
\caption{Tableau According to the Rough Ranking}
\label{tab1}
\end{table}

\end{document}
  • 1
    Thanks for you comments and suggestions! – Erda Sep 17 at 17:43
  • 1
    I've changed my preamble as the one you have here, and it works! Thanks! – Erda Sep 17 at 17:52

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.