2

I encountered a very strange problem. I wrote an enumerate after a long table, the enumerate text will be printed outside the bottom of a page, and some item text can not be shown. I simplified a latex code, only used a picture and a longtable.

I want to know why this happened, although I know how to avoid it this time, but I can't avoid every situation I will encounter later if I don't know the reason.

\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{longtable}

\begin{document}
\begin{figure}
  \centering
  \includegraphics[scale=1]{example-image}
  \caption{aaa}
\end{figure}

\begin{longtable}{ll}
\hline
  a & b\\
  a & b\\
  a & b\\
  a & b\\
  a & b\\
  a & b\\
  a & b\\
  a & b\\
  a & b\\
\hline
\end{longtable}

a\\a\\a\\a\\a\\a\\a\\a\\
enumerate1
\begin{enumerate}
  \item a
  \item b
  \item c
  \item d
  \item e
  \item f
  \item g
  \item h
\end{enumerate}

enumerate2
\begin{enumerate}
  \item i
  \item j
  \item k
  \item l
  \item m
  \item n
\end{enumerate}

enumerate3
\begin{enumerate}
  \item a
  \item b
  \item c
  \item d
  \item e
  \item f
  \item g
  \item h
\end{enumerate}

\end{document}

Look at the error picture as follows, enumerate1 is under the page number, beyond the bottom of the page; and enumerate2 can not be shown. The result of the typeset is wrong.

enter image description here

naphaneal
  • 2,614
Fei De
  • 21
  • use \clearpage or \newpage after the end of longtable. – murugan Mar 17 '16 at 07:29
  • @DavidCarlisle Looking into your answer and the links you provided: hast this been fixed ten years ago and Fei De has an outdated installation? – Keks Dose Mar 17 '16 at 08:27
  • @KeksDose: No the patch has not been applied in TL15. – Ulrike Fischer Mar 17 '16 at 08:43
  • @KeksDose it's tricky, it's a lot easier to see what's wrong than how to fix, or how to add a change without breaking existing documents. (There were some issues with the proposed fix which meant I didn't add it at the time, although it does give a better result in many cases) – David Carlisle Mar 17 '16 at 08:53

0 Answers0