Open minamotorin opened 2 years ago
The cause of #54 was that hyperref prevent page break around \refstepcounter
.
% This program is in the public domain.
\documentclass{article}
\usepackage[dvipdfmx]{hyperref}% 2020/01/14 v7.00d
\begin{document}
\makeatletter
\@tempcnta\z@
\@whilenum\@tempcnta<46\do{
aaaaa\par
\advance\@tempcnta\@ne
}
\makeatother
%\vskip0pt\relax
\refstepcounter{enumi}
ccccc
\end{document}
Adding \vskip
before \refstepcounter
solves this (I don't know why).
This is why #54 didn't occur with classes or jsclasses.
I do not understand what is happening exactly, but I changed \allowbreak
to\vskip 0pt
and it seems work.
5dea7c3 seems work fine for me (hyperref 2021-06-07 v7.00h). Thanks!
Maybe, keep open was better?
About
Page break is not suppressed between consecutive headings.
Environments
Example
Cause
Prior to jlreq 2019/05/07 (3fed581), this issue doesn't occur.
This image is the result of compiling the above code with jlreq 2019/05/07 (380c151).
\noexpand\allowbreak
in\csname jlreq@BlockHeading@spaces@current@before@\the\jlreq@BlockHeading@spaces@current@count\endcsname
is the cause.https://github.com/abenori/jlreq/blob/4b760c72c9e144779aa8aa098062bff2749f7755/jlreq.cls#L1901-L1905
In my environment, commenting out
\noexpand\allowbreak
didn't cause the problem like #54. Maybe this is because of update of hyperref.Thanks.