I am writing my thesis in LaTeX, document class article. I experience the following issue in adding an appendix to my thesis.
\documentclass[11pt,a4paper]{article}
\usepackage[titletoc]{appendix}
\begin{document}
\input{9-Appendix.tex}
9-Appendix.tex
\begin{appendices}
\section{Tables and figures}\label{appendix:A}
\subsection{...}
\begin{table}[h]
\resizebox{\textwidth}{!}{%
\begin{tabular}{@{}|l|l|l|@{}}
\end{tabular}%
}
\caption{First table caption}
\end{table}
\pagebreak
\begin{landscape}
\subsection{...}
\begin{longtable}{lllllll}
\caption{Second table caption}
\label{tab:my-table}\
\end{longtable}
\end{landscape}
\pagebreak
\begin{table}[h]
\scriptsize
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{llll}
\end{tabular}%
}
\caption{Third table caption}
\label{tab:my-table}
\end{table}
\begin{table}[h]
\scriptsize
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{llll}
\end{tabular}%
}
\caption{Fourth table caption}
\label{tab:my-table}
\end{table}
\begin{table}[h]
\scriptsize
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{llll}
\end{tabular}%
}
\caption{Fifth table caption}
\label{tab:my-table}
\end{table}
\begin{table}[h]
\scriptsize
\centering
\resizebox{\textwidth}{!}{%
\begin{tabular}{llll}
\end{tabular}%
}
\caption{Sixth table caption}
\label{tab:my-table}
\end{table}
\section{Historical series on ...} \label{appendix:B}
\par Text
\end{appendices}
\end{document}
Now the issue is that my appendix B is appearing somewhere between the first/second subsection of Appendix A, instead of right after the last subsection.
Any ideas on how to solve this? Using \begin{subappendices} \end{subappendices} does not resolve the issue.

\documentclass{...}and ending with\end{document}. Putting together the snippet you gave does not show the problem, so there is something else going on. – campa Aug 10 '20 at 09:08[h]float placement is not working like you expect. See https://tex.stackexchange.com/questions/8625/force-figure-placement-in-text – Donald Arseneau Aug 10 '20 at 10:21\usepackage{placeins}would fix it too. – Donald Arseneau Aug 10 '20 at 10:22