# Using afterpage with IEEEtran documentclass

I have got an issue with using the \afterpage command in combination with the IEEEtran document class. I have got a large table that I want to put on a landscape page and let the other text 'wrap around' that table as suggested here on stack exchange. However, using \afterpage{\input{table.tex}} does not put the landscape page with the table after a page is done, but after the first 'column' is done, so to say. For clarification I added an image

My desired formatting is shown in this picture, where the table is put after a fully filled page

Other variantions of the commands that I have tried

• \afterpage{\clearpage \input{table.tex}}
• \afterpage{\newpage\input{table.tex}}
• \afterpage{\clearpage} \afterpage{\input{table.tex}}

I think I am unaware of how some aspects of the IEEE and afterpage package work.

This is my file in which I include all packages

\documentclass[a4paper, 10 pt]{IEEEtran}

\bibliographystyle{IEEEtran}

\usepackage{fancyhdr}

\usepackage{psfrag}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{units}

\usepackage{dsfont,latexsym,cite, comment, graphicx,color}
\usepackage[latin9]{inputenc}
\usepackage{url, hyperref}

\usepackage{subfigure}
\newcommand{\goodgap}{%for subfigure package
\hspace{\subfigtopskip}%
\hspace{\subfigbottomskip}}

\usepackage{float}
\usepackage{threeparttable,booktabs,makecell}
\usepackage{xargs}
\usepackage{todonotes}
\usepackage{siunitx}
\usepackage{pdflscape,afterpage}

\newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}

\input{tikz_layout}

\def\sectionautorefname{Section}
\def\subsectionautorefname{Subsection}
\def\subsubsectionautorefname{Subsubsection}

This is my file in which I have the table that I want to put on a landscape page. Note, I have removed the contents

\begin{landscape}

\begin{center}

\begin{table}[t]
\resizebox{1\linewidth}{!}{
\begin{threeparttable}

\begin{tabular}{M{2.5cm} M{3cm} M{4cm} M{3.5cm} M{2.5cm} M{3.5cm} M{4cm} M{1.2cm} M{1.0cm}} \toprule

%% TABLE CONTENTS %%
\bottomrule
\end{tabular}

\begin{tablenotes}\footnotesize

%% ITEMS %%

\end{tablenotes}
\end{threeparttable}
}

\end{table}

\end{center}
\end{landscape}