2

I am looking to typeset the following table in booktabs:

stepped table of the HGCS

I am not sure how to get the steps highlighting the differences between the units in the image. The use of \cmidrule makes the horizontal rules, but leaves quite a bit of space in between the rules. If I then add \belowrulesep=0pt \aboverulesep=0pt, the spaces around the top, mid and bottom rules get messed up. How do I get tight spacing around \cmidrule, but not elsewhere?

Also, the only answer I find about using vertical rules in booktabs is 'don't use vertical rules', which is quite right in general. Still, I think vertical rules in this specific instance are justified. So how do I get these limited vertical rules?

This is what I tried so far:

\documentclass[a4paper,12pt]{article}
\usepackage{booktabs}
\title{HGCS table}
\begin{document}
% \belowrulesep=0pt
% \aboverulesep=0pt
\begin{tabular}{lllllll}
\toprule
   & ich & machen & dorf & das & apfel & pfund \\
\midrule
1  & ik & maken & dorp & dat & appel & pund \\\cmidrule{2-2}
2  & ich & maken & dorp & dat & appel & pund \\\cmidrule{3-3}
3  & ich & machen & dorp & dat & appel & pund \\\cmidrule{4-4}
4  & ich & machen & dorf & dat & appel & pund \\\cmidrule{5-5}
5  & ich & machen & dorf & das & appel & pund \\\cmidrule{6-6}
6  & ich & machen & dorf & das & apfel & pund \\\cmidrule{7-7}
7  & ich & machen & dorf & das & apfel & pfund \\
\bottomrule
\end{tabular}%
\end{document}
  • 4
    Unrelated: I am German and don't get it :) (not even the Low German) – Dr. Manuel Kuehner May 29 '18 at 9:27
6

This seems to be close to the design you want to achieve:

\documentclass[a4paper,12pt]{article}
\usepackage{booktabs}
\usepackage{array}
\title{HGCS table}
\begin{document}

\setlength\extrarowheight{2pt}
\begin{tabular}{lllllll}
\toprule
Dialects & \multicolumn{6}{c}{Lexical Items}\\\cmidrule{2-7}
   & ich & machen & dorf & das & apfel & pfund \\
\midrule
Low German\\
1  & ik & maken & dorp & dat & appel & pund \\\cline{2-2}
2  & ich & \multicolumn{1}{|l}{maken} & dorp & dat & appel & pund \\\cline{3-3}
3  & ich & machen & \multicolumn{1}{|l}{dorp} & dat & appel & pund \\\cline{4-4}
Middle German & & & & \multicolumn{1}{|l}{}\\
4  & ich & machen & dorf & \multicolumn{1}{|l}{dat} & appel & pund \\\cline{5-5}
5  & ich & machen & dorf & das & \multicolumn{1}{|l}{appel} & pund \\\cline{6-6}
6  & ich & machen & dorf & das & apfel & \multicolumn{1}{|l}{pund} \\\cline{7-7}
High German \\
7  & ich & machen & dorf & das & apfel & pfund \\
\bottomrule
\end{tabular}%
\end{document}

enter image description here

Instead of the rules from booktabs I have used normal \clines for the horizontal parts of the separating line. For the vertical parts, I have used the multicolumn command in order to add a | to the definition of the corresponding cells. In order to increase the vertical distance between the table rows, I have added \setlength\extrarowheight{2pt}.

| improve this answer | |

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.