From ca6f5c26e79a63cd163cd6767340e0761a98bd18 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 19 Nov 2018 21:52:01 +0000 Subject: widows-and-orphans (19nov18) git-svn-id: svn://tug.org/texlive/trunk@49194 c570f23f-e606-0410-a88d-b1316a301751 --- .../widows-and-orphans/widows-and-orphans.sty | 30 ++++++++++------------ 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'Master/texmf-dist/tex/latex/widows-and-orphans') 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 f77e5480de3..8aa908027b5 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 @@ -31,7 +31,7 @@ \NeedsTeXFormat{LaTeX2e} \RequirePackage{xparse,l3keys2e} -\ProvidesExplPackage{widows-and-orphans}{2018/09/01}{v1.0a} +\ProvidesExplPackage{widows-and-orphans}{2018/11/18}{v1.0b} {Detecting widows and orphans (FMi)} \tl_put_left:Nn \@makecol { \__fmwao_test_for_widows_etc: } \bool_new:N \g__fmwao_gen_warn_bool @@ -101,14 +101,15 @@ { Orphan~ on~ page~ \__fmwao_this_page: \legacy_switch_if:nT {@twocolumn} { \space ( \legacy_switch_if:nTF {@firstcolumn} - { first~ } { (second~ } column) } + { first~ } { second~ } column) } } { Check~ out~ the~ page~ and~ see~ if~ you~ can~ avoid~ the~ orphan.} \msg_new:nnnn {widows-and-orphans} {hyphen} { Hyphen~ in~ last~ line~ of~ page~ \__fmwao_this_page: \legacy_switch_if:nT {@twocolumn} { \space ( \legacy_switch_if:nTF {@firstcolumn} - { first~ } { (second~ } column) } } + { first~ } { second~ } column) } + } { Check~ out~ the~ page~ and~ see~ if~ you~ can~ get~ a~ better~ line~ break. } \msg_new:nnnn {widows-and-orphans} {widow} @@ -169,8 +170,7 @@ \cs_new:Npn \__fmwao_decide_penalty:Nn #1 #2 { \bool_set_false:N \l__fmwao_success_bool \bool_do_until:Nn \l__fmwao_success_bool - { - \bool_set_true:N \l__fmwao_success_bool + { \bool_set_true:N \l__fmwao_success_bool \clist_map_inline:nn { #2 } { \int_set:Nn \l__fmwao_tmp_int {##1} \prop_get:NVNT @@ -181,8 +181,7 @@ { \clist_map_inline:nn { #2 } { \int_set:Nn \l__fmwao_tmp_int {##1} \prop_put:NVn \l__fmwao_penalties_prop \l__fmwao_tmp_int {##1} - } - } + } } { \int_incr:N #1 } } } @@ -204,17 +203,14 @@ \int_set:Nn \@clubpenalty { \clubpenalty } ,orphans / default .code:n = \int_set:Nn \clubpenalty { 150 } \int_set:Nn \@clubpenalty { \clubpenalty } - % ==================================== ,widows .choice: - ,widows / prevent .code:n = \int_set:Nn \widowpenalty { 10000 } - ,widows / avoid .code:n = \int_set:Nn \widowpenalty { 5000 } - ,widows / default .code:n = \int_set:Nn \widowpenalty { 150 } - % ==================================== + ,widows / prevent .code:n = \int_set:Nn \widowpenalty { 10000 } + ,widows / avoid .code:n = \int_set:Nn \widowpenalty { 5000 } + ,widows / default .code:n = \int_set:Nn \widowpenalty { 150 } ,hyphens .choice: - ,hyphens / prevent .code:n = \int_set:Nn \brokenpenalty { 10000 } - ,hyphens / avoid .code:n = \int_set:Nn \brokenpenalty { 2000 } - ,hyphens / default .code:n = \int_set:Nn \brokenpenalty { 50 } - % ==================================== + ,hyphens / prevent .code:n = \int_set:Nn \brokenpenalty { 10000 } + ,hyphens / avoid .code:n = \int_set:Nn \brokenpenalty { 2000 } + ,hyphens / default .code:n = \int_set:Nn \brokenpenalty { 50 } ,prevent-all .code:n = \int_set:Nn \clubpenalty { 10000 } \int_set:Nn \widowpenalty { 10000 } \int_set:Nn \displaywidowpenalty{ 10000 } @@ -240,7 +236,7 @@ \NewDocumentCommand\WaOparameters{}{\prop_show:N \l__fmwao_penalties_prop} \NewDocumentCommand\WaOignorenext{} - { \bool_gset_false:N\g__fmwao_gen_warn_bool } + { \bool_gset_false:N \g__fmwao_gen_warn_bool } \endinput %% -- cgit v1.2.3