summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-04-03 21:35:28 +0000
committerKarl Berry <karl@freefriends.org>2023-04-03 21:35:28 +0000
commit4cad1a2ee7a39f4dfc9f3f5957df50fa2d684d34 (patch)
tree7e8ea514d437dab94dc0bff38199c58ac52fdf00
parent3f7007a6514486b75de41b9c8d2186728072be43 (diff)
widows-and-orphans (3apr23)
git-svn-id: svn://tug.org/texlive/trunk@66753 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/widows-and-orphans/changes.txt9
-rw-r--r--Master/texmf-dist/doc/latex/widows-and-orphans/widows-and-orphans-code.pdfbin584816 -> 586443 bytes
-rw-r--r--Master/texmf-dist/doc/latex/widows-and-orphans/widows-and-orphans-doc.pdfbin305364 -> 306153 bytes
-rw-r--r--Master/texmf-dist/source/latex/widows-and-orphans/widows-and-orphans.dtx36
-rw-r--r--Master/texmf-dist/tex/latex/widows-and-orphans/widows-and-orphans.sty9
5 files changed, 39 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/latex/widows-and-orphans/changes.txt b/Master/texmf-dist/doc/latex/widows-and-orphans/changes.txt
index 84156da8c02..63b989499d0 100644
--- a/Master/texmf-dist/doc/latex/widows-and-orphans/changes.txt
+++ b/Master/texmf-dist/doc/latex/widows-and-orphans/changes.txt
@@ -1,3 +1,12 @@
+2023-04-02 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * widows-and-orphans.dtx:
+ Honor a global "draft" option on the documentclass and change the
+ default from warning to info in that case unless explicitly set
+ with a check option (gh/1)
+
+ Use \ProcessKeyOptions which requires a 2022-06 kernel.
+
2022-08-27 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* widows-and-orphans.dtx (subsection{Checking \outputpenalty}):
diff --git a/Master/texmf-dist/doc/latex/widows-and-orphans/widows-and-orphans-code.pdf b/Master/texmf-dist/doc/latex/widows-and-orphans/widows-and-orphans-code.pdf
index 8fa7f691a5b..b87b12130ae 100644
--- a/Master/texmf-dist/doc/latex/widows-and-orphans/widows-and-orphans-code.pdf
+++ b/Master/texmf-dist/doc/latex/widows-and-orphans/widows-and-orphans-code.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/widows-and-orphans/widows-and-orphans-doc.pdf b/Master/texmf-dist/doc/latex/widows-and-orphans/widows-and-orphans-doc.pdf
index ba1d01e3207..04d43207668 100644
--- a/Master/texmf-dist/doc/latex/widows-and-orphans/widows-and-orphans-doc.pdf
+++ b/Master/texmf-dist/doc/latex/widows-and-orphans/widows-and-orphans-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/widows-and-orphans/widows-and-orphans.dtx b/Master/texmf-dist/source/latex/widows-and-orphans/widows-and-orphans.dtx
index 7170fae2c6c..7ab5aec6fbf 100644
--- a/Master/texmf-dist/source/latex/widows-and-orphans/widows-and-orphans.dtx
+++ b/Master/texmf-dist/source/latex/widows-and-orphans/widows-and-orphans.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%%
-%% File: widows-and-orphans.dtx (C) Copyright 2017-2022 Frank Mittelbach
+%% File: widows-and-orphans.dtx (C) Copyright 2017-2023 Frank Mittelbach
%
% It may be distributed and/or modified under the conditions of the
% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -154,6 +154,12 @@
% when an issue is found: default is \ovalue{warning}, other
% possibilities are \ovalue{error}, \ovalue{info} and \ovalue{none}.
%
+% If the option \option{draft} is given on the document class then the
+% checking messages are reduced to \ovalue{info} messages and only appear in
+% the log file. If one wants warnings or errors in that case, one has
+% to explicitly specify \option{check} with the appropriate value on
+% the package level.
+%
% The options \option{orphans} and \option{widows} set
% reasonable parameter values; the default is to use whatever the class
% defines. Possible values are \ovalue{prevent}, \ovalue{avoid} or
@@ -163,7 +169,7 @@
% \option{avoid-all} or \option{default-all}. These options also assign
% values to \cs{brokenpenalty} and \cs{predisplaypenalty}.
%
-% \TypesetImplementationTF {\pagebreak}{}
+% ^^A\TypesetImplementationTF {\pagebreak}{}
%
%
% \subsection{User commands}
@@ -247,14 +253,13 @@
%<@@=fmwao>
% \end{macrocode}
%
-% Then we check that we are running on top of \LaTeXe{} and load the
-% two packages we want to use: \pkg{xparse} for the user interface and
-% \pkg{l3keys2e} for key/value option syntax. They load the needed
-% \pkg{expl3} code so we are ready to roll afterwards.
-% Nowadays \pkg{xparse} is in the kernel so doesn't need loading any longer.
-%
+% Then we check that we are running on top of \LaTeXe{} and use a fairly recent
+% version of the kernel that contains the L3 programming layer,
+% \pkg{xparse} and the command \cs{ProcessKeyOptions}. For the latter
+% we need June 2022.
+% \changes{v1.0f}{2023/04/02}{Require a kernel of 2022-06 or newer}
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e} \RequirePackage{l3keys2e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
% \end{macrocode}
%
% Then we announce the package to the world at large. This declaration
@@ -335,7 +340,7 @@
% \end{figure}
%
% \begin{macrocode}
-\ProvidesExplPackage{widows-and-orphans}{2023/03/10}{v1.0e}
+\ProvidesExplPackage{widows-and-orphans}{2023/04/02}{1.0f}
{Detecting widows and orphans (FMi)}
% \end{macrocode}
%
@@ -960,6 +965,14 @@
,check / warning
.code:n = \msg_redirect_module:nnn {widows-and-orphans}{warning}{ }
% \end{macrocode}
+% If the class option \texttt{draft} was given we downgrade the
+% checks to info, thus if one wants warnings or errors even then,
+% then one has to give the check key explicitly on package level.
+% \changes{v1.0f}{2023/04/02}{Honor a global draft option (gh/1)}
+% \begin{macrocode}
+ ,draft .meta:n = {check = info}
+% \end{macrocode}
+%
% The other options set parameters to some hopefully ``reasonable''
% values\Dash no real surprises here. \LaTeX{} internally uses
% \cs{@clubpenalty} so we need to set this too, if we change
@@ -1015,8 +1028,9 @@
}
% \end{macrocode}
% Once declared we evaluate the options given to the package:
+% \changes{v1.0f}{2023/04/02}{Use kernel method now not \pkg{l3keys2e}}
% \begin{macrocode}
-\ProcessKeysPackageOptions{fmwao}
+\ProcessKeyOptions[fmwao]
% \end{macrocode}
%
%
diff --git a/Master/texmf-dist/tex/latex/widows-and-orphans/widows-and-orphans.sty b/Master/texmf-dist/tex/latex/widows-and-orphans/widows-and-orphans.sty
index 6654567172f..50969559877 100644
--- a/Master/texmf-dist/tex/latex/widows-and-orphans/widows-and-orphans.sty
+++ b/Master/texmf-dist/tex/latex/widows-and-orphans/widows-and-orphans.sty
@@ -27,11 +27,11 @@
%% without such generated files.
%%
%%
-%% File: widows-and-orphans.dtx (C) Copyright 2017-2022 Frank Mittelbach
+%% File: widows-and-orphans.dtx (C) Copyright 2017-2023 Frank Mittelbach
-\NeedsTeXFormat{LaTeX2e} \RequirePackage{l3keys2e}
-\ProvidesExplPackage{widows-and-orphans}{2023/03/10}{v1.0e}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
+\ProvidesExplPackage{widows-and-orphans}{2023/04/02}{1.0f}
{Detecting widows and orphans (FMi)}
\tl_put_left:Nn \@makecol { \__fmwao_test_for_widows_etc: }
\bool_new:N \g__fmwao_gen_warn_bool
@@ -196,6 +196,7 @@
.code:n = \msg_redirect_module:nnn {widows-and-orphans}{warning}{none}
,check / warning
.code:n = \msg_redirect_module:nnn {widows-and-orphans}{warning}{ }
+ ,draft .meta:n = {check = info}
,orphans .choice:
,orphans / prevent .code:n = \int_set:Nn \clubpenalty { 10000 }
\int_set:Nn \@clubpenalty { \clubpenalty }
@@ -229,7 +230,7 @@
\int_set:Nn \predisplaypenalty { 10000 }
\int_set:Nn \@clubpenalty { \clubpenalty }
}
-\ProcessKeysPackageOptions{fmwao}
+\ProcessKeyOptions[fmwao]
\NewDocumentCommand\WaOsetup{m}
{ \keys_set:nn{fmwao}{#1} \__fmwao_initialize: \ignorespaces }