One way is to shift up the skip prior to the mid-height \tabucline
with a \\[-1pt]
. See below for 2nd approach.
%Dokumentclass
\documentclass[landscape]{letter}
%Packages
\usepackage[landscape]{geometry}
\usepackage[utf8] {inputenc}
\usepackage {multirow}
\usepackage {tabu}
%Formatting
\pagestyle{empty} %Remove numbering
\begin{document}
\begin{tabu}{ |[1pt] l | l l | l | l |[1pt] }
\tabucline[1 pt]{1-5}
\multicolumn{2}{ |[1pt] l }{ } & \multicolumn{3}{ |[1pt] l |[1pt]}{ } \\ \hline
& & \multicolumn{1}{ |[1pt] l | }{ } & \multicolumn{2}{ l |[1pt] }{ } \\ \hline
y & & \multicolumn{1}{ |[1pt] l | }{ } & \multicolumn{2}{ l |[1pt] }{ } \\[-1pt] \tabucline[1 pt]{3-5}
\hline
x & & \multicolumn{1}{ |[1pt] l | }{ } & & \\ \hline
& & \multicolumn{1}{ |[1pt] l | }{ } & & \\ \hline
& & \multicolumn{1}{ |[1pt] l | }{ } & & \\ \hline
& & \multicolumn{1}{ |[1pt] l | }{ } & & \\ \tabucline[1 pt]{1-5}
\end{tabu}
\end{document}
Alternately, if you want the thin line to bisect the thick line, then the approach: \\[-1pt] \tabucline[1 pt]{3-5}\\[-12.5pt]\hline
works.
%Dokumentclass
\documentclass[landscape]{letter}
%Packages
\usepackage[landscape]{geometry}
\usepackage[utf8] {inputenc}
\usepackage {multirow}
\usepackage {tabu}
%Formatting
\pagestyle{empty} %Remove numbering
\begin{document}
\begin{tabu}{ |[1pt] l | l l | l | l |[1pt] }
\tabucline[1 pt]{1-5}
\multicolumn{2}{ |[1pt] l }{ } & \multicolumn{3}{ |[1pt] l |[1pt]}{ } \\ \hline
& & \multicolumn{1}{ |[1pt] l | }{ } & \multicolumn{2}{ l |[1pt] }{ } \\ \hline
y & & \multicolumn{1}{ |[1pt] l | }{ } & \multicolumn{2}{ l |[1pt] }{ } \\[-1pt] \tabucline[1 pt]{3-5}\\[-12.5pt]
\hline
x & & \multicolumn{1}{ |[1pt] l | }{ } & & \\ \hline
& & \multicolumn{1}{ |[1pt] l | }{ } & & \\ \hline
& & \multicolumn{1}{ |[1pt] l | }{ } & & \\ \hline
& & \multicolumn{1}{ |[1pt] l | }{ } & & \\ \tabucline[1 pt]{1-5}
\end{tabu}
\end{document}
The problem is that the caption
package redefines the threeparttable
environment to set the caption type to table
. caption
uses the caption type to check for inappropriate nesting. In this case, it therefore finds an attempt to set caption type to table
when it is within the subtable
environment. It knows that isn't allowed, so it gives an error.
The simplest solution, especially if some of your threeparttable
s are not of type subtable
, is to use the fact that it works if you put the subtable
inside the threeparttable
. Alternatively, you can just set the caption type within the threeparttable
environment rather than using the subtable
environment at all.
However, as your update points out, this sadly restarts the counter for each sub-table. Here is a solution which avoids this difficulty.
Note that the idea here is that you could change the options for threepartsubtable
specifically, just as you could change them for threeparttable
. I think there must be a way to do this more elegantly, but have not yet found one.
That is, I have precious little clue ...
Caveat emptor.
[Edited in light of comments, although not really in accordance with them.]
\documentclass{article}
\usepackage{threeparttable}
\usepackage{subcaption}
\makeatletter
\newcommand\threepart@subtable{% based on code modified from caption.sty
\caption@setoptions{threepartsubtable}%
\caption@ORI@threeparttable
}
\newenvironment{threepartsubtable}{%
\threepart@subtable
}{%
\endthreeparttable
}
\makeatother
\captionsetup[threepartsubtable]{subtype}
\begin{document}
\begin{table}
\centering
\caption{Standard main caption}
\begin{subtable}{\textwidth}
\caption{Caption}
\begin{tabular}{cc}
a & b
\end{tabular}
\end{subtable}
\end{table}
\begin{table}
\centering
\caption{Main caption}
\begin{threepartsubtable}
\caption{Caption}
\begin{tabular}{ccc}
test 1 & test 1 & test 1
\end{tabular}
\end{threepartsubtable}
\begin{threepartsubtable}
\caption{Caption}
\begin{tabular}{ccc}
test 2 & test 2 & test 2
\end{tabular}
\end{threepartsubtable}
\begin{threepartsubtable}
\caption{Caption}
\begin{tabular}{ccc}
test 3 & test 3 & test 3
\end{tabular}
\end{threepartsubtable}
\begin{threepartsubtable}
\caption{Caption}
\begin{tabular}{ccc}
test 4 & test 4 & test 4
\end{tabular}
\end{threepartsubtable}
\end{table}
\begin{table}
\centering
\caption{Another main caption}
\begin{threepartsubtable}
\caption{Caption}
\begin{tabular}{ccc}
test 5 & test 5 & test 5
\end{tabular}
\end{threepartsubtable}
\begin{threepartsubtable}
\caption{Caption}
\begin{tabular}{ccc}
test 6 & test 6 & test 6
\end{tabular}
\end{threepartsubtable}
\end{table}
\end{document}
Best Answer
In the exact same way as https://tex.stackexchange.com/a/278748/36296 you can use
\ContinuedFloat
to split the subtables in two separate floats:Off-topic, but I suggest to not use vertical lines in your tables and use the
booktabs
package instead: