I have several long tables in my document, some of which are in landscape mode. When a table is "landscaped" using sidewaystable, although the table is in the next full page, the text continues as usual until it fills the previous page (see first image). This is the expected behaviour, identical to normal tables or figures --for which Latex finds "the best position" and the text before and after the table/figure continues as usual.
As my tables are long, I need to use landscape from the package pdflscape or lscape. However, when using either of them, the text after the table is not continuing as usual to fill the previous page (see second image).
Is there any way around this? I'd like to be able to obtain the same behaviour of sidewaystable (actually, the usual behaviour) for my long landscaped tables.
MWE (change the comment from the \begin and \end{landscape} to those of sidewaystable to exchange the result):
\documentclass[11pt, a4paper, oneside]{report}
\usepackage[left=4cm,right=2cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{xltabular}
\usepackage{pdflscape}
\usepackage{lipsum}
\usepackage{rotating}
\begin{document}
\setlength{\parskip}{6pt}
\lipsum[23]
\begin{sidewaystable}
% \begin{landscape}
\setlength\LTcapwidth{\linewidth} % I need that for long captions
{\small
\begin{xltabular}{\linewidth}{@{} XXXX @{}}
\caption{{\normalsize This is a caption.\label{table:bla}}}\\
\hline
Column 1 & Column 2 & Column 3 & Column 4 \\
\hline
\endfirsthead
\multicolumn{4}{c}%
{\footnotesize{\tablename\ \thetable\ -- \textit{Continued from previous page}}} \\ \hline
Column 1 & Column 2 & Column 3 & Column 4 \\
\hline
\endhead
\lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] \\ \hline
\lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] \\ \hline
\lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] \\ \hline
\lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] \\ \hline
\lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] \\ \hline
\lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] \\ \hline
\lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] \\ \hline
\lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] & \lipsum[2][3-5] \\ \hline
\end{xltabular}}
% \end{landscape}
\end{sidewaystable}
\lipsum[1]
\lipsum[2]
\lipsum[3]
\end{document}
Result using sidewaystable (the table does not break to change the page but the text behaves "correctly"):

Result using landscape (the table does break to change the page but the text behaves "wrongly"):




landscapeenviornment from the lscape or pdflscape package. – David Carlisle May 26 '20 at 18:01sidewaystableto show the behaviour I want the text to have. – Miquel May 26 '20 at 18:25\\after lipsum that tex is warning aboutUnderfull \hbox (badness 10000) in paragraph at lines 10--11– David Carlisle May 26 '20 at 18:30\\are mis-placed, neither what it means this warning (my document has quite a few of these...) :-S How to finish the paragraph, then? – Miquel May 26 '20 at 20:10\\does not finish the paragraph that is the problem, it should never be used at the end of a paragraph it should (vary rarely) be used to force a line break mid-paragraph. A paragraph is ended by a blank line in the source. https://tex.stackexchange.com/questions/334246/what-does-the-phrase-underfull-hbox-badness-10000-in-paragraph-actually-mea/334249#334249 – David Carlisle May 26 '20 at 21:24\setlength{\parskip}{XXpt}for that, right? Maybe you could add a line or two in your answer (the link) saying that? I think many non-experts use \ + blank line in order to have this extra space between paragraphs --at least this is the case within the people I know. (I would comment this directly in your other answer but I don't have enough reputation) – Miquel May 27 '20 at 08:08\\followed by a blank line is typeset like\\zzzfollowed by a blank line, the line withzzz(or nothing) is a line of the paragraph not vertical space so is never dropped. and as it is a line of the paragraph the widow/orphan counting counts that line, similarly the finalhyphendemerits guard agaianst hyphenating the penultimate line of a paragraph applies to teh wrong line. "Badness 10000" is TeX's maximum level of badness. If you get that warning then something is very wrong with the document. – David Carlisle May 27 '20 at 08:40