# How to get Subcaption outside float working for landscape tables?

I use the nice MWE displayed below to display a landscape table (found here: Tex: How to place table on new page.)

I have one big table (that's why landscape) which I want to split across multiple pages. So I want to split them in multiple tables with subcaption (I did not get longtable working as desired).

This MWE outputs:

Table 1: This should be table 1A

Table 2: This should be table 1B

(subcaption in alfabet, roman etc)

So my question is how to get subcaptions working outside floats.

I found this solution: Tex: Change caption in table from Table 2 to Table 1A => however if I combine both snippets it start to complain that subcaptions cannot be used outside floats.

    \documentclass{article}
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{capt-of}
\usepackage{lipsum}
\begin{document}
\lipsum
\afterpage{%
\clearpage
\thispagestyle{empty}
\begin{landscape}
\centering
\begin{tabular}{llll}
A & B & C & D \\
\end{tabular}
\captionof{table}{This should be table 1A}
\end{landscape}
\clearpage
}
\afterpage{
\clearpage
\thispagestyle{empty}
\begin{landscape}
\centering
\begin{tabular}{llll}
E & F & G & H \\
\end{tabular}
\captionof{table}{This should be table 1B}
\end{landscape}
\clearpage
}
\lipsum
\end{document}

• Could you please post your try to combine the snippets, so we can make modifications of it? The "out-of-float" message could be avoided by using \setcaptiontype{table} right after \begin{landscape} (and using regular \caption instead of \captionof{table}).
– user2574
Sep 15 '15 at 21:56