diff --git a/base/changes.txt b/base/changes.txt index 5494cfeb5..7da7aab41 100644 --- a/base/changes.txt +++ b/base/changes.txt @@ -9,6 +9,10 @@ are not part of the distribution. * ltmiscen.dtx (subsection{Verbatim}): Provide visible space in \verb* also for XeTeX and LuaTeX (github/69) +2018-10-10 David Carlisle + + * ltspace.dtx: prevent space hacks adding breakpoints (githib 81) + 2018-10-05 David Carlisle * utf8ienc.dtx: Use hex in invalid byte error (suggested in PR 82 from mirabilos) diff --git a/base/ltspace.dtx b/base/ltspace.dtx index c6020d0fa..6f212bba1 100644 --- a/base/ltspace.dtx +++ b/base/ltspace.dtx @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{ltspace.dtx} - [2018/09/24 v1.3h LaTeX Kernel (spacing)] + [2018/10/10 v1.3i LaTeX Kernel (spacing)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltspace.dtx} @@ -559,8 +559,8 @@ % \changes{v1.3d}{2015/01/11}{Allow hyphenation (Donald Arseneau pr/3498) (latexrelease)} % \begin{macrocode} % -%\IncludeInRelease{2015/10/01}% -% {\@esphack}{hyphenation after space hack}% +%\IncludeInRelease{2018/10/10}% +% {\@esphack}{hyphenation and nobreak after space hack}% %<*2ekernel|latexrelease> \def\@esphack{% \relax @@ -576,11 +576,36 @@ \fi \ignorespaces \fi +% \end{macrocode} +% \changes{v1.3i}{2018/10/10} +% {Don't introduce breakpoints if @nobreak is true and after sections} +% \begin{macrocode} + \else + \ifvmode + \if@nobreak\nobreak\else\if@noskipsec\nobreak\fi\fi + \fi +% \end{macrocode} +% +% \begin{macrocode} \fi}% % %\EndIncludeInRelease +%\IncludeInRelease{2015/10/01}% +% {\@esphack}{hyphenation and nobreak after space hack}% +%\def\@esphack{% +% \relax +% \ifhmode +% \spacefactor\@savsf +% \ifdim\@savsk>\z@ +% \ifdim\lastskip=\z@ +% \nobreak \hskip\z@skip +% \fi +% \ignorespaces +% \fi +% \fi}% +%\EndIncludeInRelease %\IncludeInRelease{2015/01/01}% -% {\@esphack}{hyphenation after space hack}% +% {\@esphack}{hyphenation and nobreak after space hack}% %\def\@esphack{% % \relax % \ifhmode @@ -592,7 +617,7 @@ % \fi}% %\EndIncludeInRelease %\IncludeInRelease{0000/00/00}% -% {\@esphack}{hyphenation after space hack}% +% {\@esphack}{hyphenation and nobreak after space hack}% %\def\@esphack{% % \relax % \ifhmode diff --git a/base/testfiles/github-0081.lvt b/base/testfiles/github-0081.lvt new file mode 100644 index 000000000..ed564a38c --- /dev/null +++ b/base/testfiles/github-0081.lvt @@ -0,0 +1,29 @@ +\documentclass{article} + +\input{test2e} + +\begin{document} +\section{Intro} + +aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa + +aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa + +aa\\aa\\aa\\aa\\aa\\aa\\aa\\aa\\aa\\aa\\aa + +aaa\\aaa\label{l1} + +\subsubsection{Test\label{l2}} +\paragraph{Subsec\label{l3}}\label{subsec} +zz\label{l4}\\zz + +\START +\sbox0{\pageref{l1}-\pageref{l2}-\pageref{l3}-\pageref{l4}} + +% the page break should not be after a heading so not after l2 or l3 +\showbox0 + +\OMIT +\clearpage +\TIMO +\end{document} diff --git a/base/testfiles/github-0081.tlg b/base/testfiles/github-0081.tlg new file mode 100644 index 000000000..a38dbb619 --- /dev/null +++ b/base/testfiles/github-0081.tlg @@ -0,0 +1,18 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +> \box...= +\hbox(6.44444+0.0)x30.00005 +.\OT1/cmr/m/n/10 1 +.\hbox(0.0+0.0)x0.0 +.\OT1/cmr/m/n/10 - +.\OT1/cmr/m/n/10 2 +.\hbox(0.0+0.0)x0.0 +.\OT1/cmr/m/n/10 - +.\OT1/cmr/m/n/10 2 +.\hbox(0.0+0.0)x0.0 +.\OT1/cmr/m/n/10 - +.\OT1/cmr/m/n/10 2 +.\hbox(0.0+0.0)x0.0 +! OK. +l. ...\showbox0 +(github-0081.aux) diff --git a/base/testfiles/github-0081b.lvt b/base/testfiles/github-0081b.lvt new file mode 100644 index 000000000..88a7ee33c --- /dev/null +++ b/base/testfiles/github-0081b.lvt @@ -0,0 +1,37 @@ +\RequirePackage[2018/04/01]{latexrelease} +\renewcommand\encodingdefault{OT1}% minimise diffs +\fontencoding{\encodingdefault} +\renewcommand\familydefault{cmr}% minimise diffs +\fontfamily{\familydefault} + +\documentclass{article} + +\input{test2e} + +\begin{document} + +\section{Intro} + +aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa + +aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa\\aaa + +aa\\aa\\aa\\aa\\aa\\aa\\aa\\aa\\aa\\aa\\aa + +aaa\\aaa\label{l1} + +\subsubsection{Test\label{l2}} +\paragraph{Subsec\label{l3}}\label{subsec} +zz\label{l4}\\zz + +\START +\sbox0{\pageref{l1}-\pageref{l2}-\pageref{l3}-\pageref{l4}} + +% the page break should not be after a heading so not after l2 or l3 +% older releases break after l2 +\showbox0 + +\OMIT +\clearpage +\TIMO +\end{document} diff --git a/base/testfiles/github-0081b.tlg b/base/testfiles/github-0081b.tlg new file mode 100644 index 000000000..f41d9936d --- /dev/null +++ b/base/testfiles/github-0081b.tlg @@ -0,0 +1,18 @@ +This is a generated file for the LaTeX2e validation system. +Don't change this file in any respect. +> \box...= +\hbox(6.44444+0.0)x30.00005 +.\OT1/cmr/m/n/10 1 +.\hbox(0.0+0.0)x0.0 +.\OT1/cmr/m/n/10 - +.\OT1/cmr/m/n/10 1 +.\hbox(0.0+0.0)x0.0 +.\OT1/cmr/m/n/10 - +.\OT1/cmr/m/n/10 2 +.\hbox(0.0+0.0)x0.0 +.\OT1/cmr/m/n/10 - +.\OT1/cmr/m/n/10 2 +.\hbox(0.0+0.0)x0.0 +! OK. +l. ...\showbox0 +(github-0081b.aux) diff --git a/required/tools/testfiles/tlb4159.tlg b/required/tools/testfiles/tlb4159.tlg index 306d57635..f4205a254 100644 --- a/required/tools/testfiles/tlb4159.tlg +++ b/required/tools/testfiles/tlb4159.tlg @@ -160,6 +160,7 @@ Completed box being shipped out [1] ...\glue 6.45831 plus 0.86108 ...\write1{\newlabel{sec-def}{{1.1}{\thepage }}} ...\penalty 10000 +...\penalty 10000 ...\glue(\parskip) 0.0 plus 1.0 ...\glue(\baselineskip) 5.05556 ...\hbox(6.94444+0.0)x345.0, glue set 212.13127fil @@ -224,6 +225,7 @@ Completed box being shipped out [1] ...\glue 6.45831 plus 0.86108 ...\write1{\newlabel{subsec-parity}{{1.1.2}{\thepage }}} ...\penalty 10000 +...\penalty 10000 ...\glue -1.94444 ...\glue 0.0 plus 1.0fil ...\glue 0.0