Open minamotorin opened 2 years ago
As one can see the following example, it is possible to have a break after \section
with article class.
%#!uplatex
\documentclass[dvipdfmx]{article}
\usepackage[vmargin=0pt,hmargin=0pt,paperwidth=50pt,paperheight=55pt]{geometry}
\usepackage{color}
\begin{document}
aaaaa
\section{bbbbb}
\color{black}
ccccc
\end{document}
Above results is a consequence of the TeX's (complicated) calculation to determine the position of page break. I'll try to use the same penalties as article class around \section
etc.
If there are
\color
immediately after headings, page breaks are not prohibited.This happens with both (u)pLaTeX and LuaLaTeX. I couldn't find version of jlreq which doesn't cause this problem.
jlreq
classes
The cause seems to be that
\special
(same for\write
) allows page break there. In classes or jclasses, inserting\addpenalty{-300}
solves this and\color
immediately after headings are no problem. However, in jsclasses or jlreq,\addpenalty
doesn't solve this. I don't know why.jsclasses
jclasses
classes
Thanks.