## LaTeX forum ⇒ General ⇒ first entry of enumerate rendered off-page

LaTeX specific issues not fitting into one of the other forums of this category.
timsifive
Posts: 4
Joined: Fri Mar 15, 2019 11:24 pm

### first entry of enumerate rendered off-page

I have an issue that I completely don't understand, where the first line of an enumerate goes missing. It's probably not quite that straightforward, because the start of the subsubsection itself already looks too low on the page to me. You can see the problem in https://github.com/riscv/riscv-debug-sp ... elease.pdf at the bottom of (numbered) page 14. I took a screenshot that shows the problem which you can view at http://www.casualhacker.net/tmp/enumera ... issing.png.

The source is autogenerated. I've attached the relevant file. The entire project is available at https://github.com/riscv/riscv-debug-spec/tree/release. If I had to make a minimal case it would look as follows, but I don't know how to make the alignment happen in a way to show the problem outside of the document itself:
\usepackage{enumitem}\newenvironment{steps}[1] { \vspace{1ex} \noindent #1 \begin{enumerate}[nolistsep] } { \end{enumerate} \vspace{1ex} }\begin{center} \begin{longtable}{|l|p{0.5\textwidth}|} \hline Field & Description\\ \hline \endhead \multicolumn{2}{r}{\textit{Continued on next page}} \\ \endfoot \endlastfoot... \end{longtable}\end{center}\subsubsection{Quick Access}\begin{steps}{Perform the following sequence of operations:} \item If the hart is halted, the command sets \Fcmderr to halt/resume'' and does not continue. \item Halt the hart. If the hart halts for some other reason (e.g. breakpoint), the command sets \Fcmderr to halt/resume'' and does not continue.... \end{steps}

Can somebody point me in the right direction to solve this problem?

Thank you,
Tim
Attachments
abstract_commands.tex

Stefan Kottwitz
Posts: 9323
Joined: Mon Mar 10, 2008 9:44 pm
Hi Tim,

welcome to the forum!

Perhaps post the .log file here, as attachment. A warning in that file could point to the issue. Or post a a compilable version of the document, as attachment, even if it's not small. Downloading from github and figuring out how to compile etc. took too much time for me for now so a test was not possible.

Stefan

timsifive
Posts: 4
Joined: Fri Mar 15, 2019 11:24 pm
Thanks, Stefan!

I've made the whole thing one big .tex file and cut out most of the unnecessary bits.

I've attached the .tex file, .log, console log, and the final pdf. You can see the problem on the page break between the penultimate and last pages of the pdf, where item number 1 is missing from the list.

I'm a pretty basic LaTeX user. Usually it does something reasonable, but in this case I have no idea how to even begin to troubleshoot this problem.

Tim
Attachments
typescript.txt
riscv-debug-latex-issue.pdf
riscv-debug-latex-issue.log
riscv-debug-latex-issue.tex

Stefan Kottwitz
Posts: 9323
Joined: Mon Mar 10, 2008 9:44 pm
Hi Tim!

It may be because of the nolistsep option. You have it here two times:

% Keep spacing normal in enumerated instead of adding extra space between% items.\usepackage{enumitem}\setlist{nolistsep} \newenvironment{steps}[1]  {     \vspace{1ex}     \noindent #1     \begin{enumerate}[nolistsep]  }  {     \end{enumerate}     \vspace{1ex} }

You could replace it by noitemsep.

Stefan

timsifive
Posts: 4
Joined: Fri Mar 15, 2019 11:24 pm
In my file that \setlist{nolistsep} is commented out.

Replacing nolistsep with noitemsep does fix the problem, but I don't want that. I want no separation between lines in the steps environment, but of course I never ever want anything rendered off the end of the page. Is there some other way to achieve that while still allowing page breaks where they should be?

Another thing that looks funny to me is how low on the page the subsubsection{Quick Access} starts. It already appears to be below the usual drawable area of the page. Could there be something about center/longtable that's causing trouble?

Thank you,
Tim

timsifive
Posts: 4
Joined: Fri Mar 15, 2019 11:24 pm
I found the cause of my problem. There's a bug in longtable (first reported in 2003!) that causes it to run text off the end of a page when floats end up on the same page. Bug and patch that fixes it are at https://www.latex-project.org/cgi-bin/l ... tools/3512

Stefan Kottwitz