From a7512cfe1987a97f46fbcaa7f90fe40356b24be5 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sun, 28 Nov 2021 03:00:45 +0000 Subject: CTAN sync 202111280300 --- macros/luatex/generic/lua-widow-control/README.md | 2 +- .../lua-widow-control/lua-widow-control.lua | 4 +- .../lua-widow-control/lua-widow-control.pdf | Bin 304194 -> 313873 bytes .../lua-widow-control/lua-widow-control.sty | 2 +- .../lua-widow-control/lua-widow-control.tex | 2 +- .../lua-widow-control/lwc-documentation.mkxl | 82 ++++++++++++++++----- .../lua-widow-control/lwc-documentation.tex | 26 ++++--- .../lua-widow-control/t-lua-widow-control.mkxl | 4 +- 8 files changed, 85 insertions(+), 37 deletions(-) (limited to 'macros/luatex') diff --git a/macros/luatex/generic/lua-widow-control/README.md b/macros/luatex/generic/lua-widow-control/README.md index abf44e5efc..71a4d67f46 100644 --- a/macros/luatex/generic/lua-widow-control/README.md +++ b/macros/luatex/generic/lua-widow-control/README.md @@ -42,4 +42,4 @@ Lua-widow-control is licensed under the [_Mozilla Public License_, version 2.0]( Please note that a compiled document is absolutely **not** considered to be an "Executable Form" as defined by the MPL. The use of lua-widow-control in a document does not place **any** obligations on the document's author or distributors. The MPL and CC-BY-SA licenses **only** apply to you if you distribute the lua-widow-control source code or documentation. --- -_v1.1.0 (2021-11-08)_ +_v1.1.1 (2021-11-26)_ diff --git a/macros/luatex/generic/lua-widow-control/lua-widow-control.lua b/macros/luatex/generic/lua-widow-control/lua-widow-control.lua index 62f1867b62..587288e1da 100644 --- a/macros/luatex/generic/lua-widow-control/lua-widow-control.lua +++ b/macros/luatex/generic/lua-widow-control/lua-widow-control.lua @@ -64,8 +64,8 @@ if lwc.context then elseif lwc.plain or lwc.latex then luatexbase.provides_module { name = lwc.name, - date = "2021/11/08", --%%date - version = "1.1.0", --%%version + date = "2021/11/26", --%%date + version = "1.1.1", --%%version description = [[ This module provides a LuaTeX-based solution to prevent diff --git a/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf b/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf index f004a1404e..c0107a6278 100644 Binary files a/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf and b/macros/luatex/generic/lua-widow-control/lua-widow-control.pdf differ diff --git a/macros/luatex/generic/lua-widow-control/lua-widow-control.sty b/macros/luatex/generic/lua-widow-control/lua-widow-control.sty index ff3781944f..ab6e6ffbc1 100644 --- a/macros/luatex/generic/lua-widow-control/lua-widow-control.sty +++ b/macros/luatex/generic/lua-widow-control/lua-widow-control.sty @@ -5,7 +5,7 @@ \NeedsTeXFormat{LaTeX2e}[2015/01/01] % Formats built after 2015 include \LuaTeX{}Base \ProvidesPackage{lua-widow-control}% - [2021/11/08 v1.1.0] %%version %%date + [2021/11/26 v1.1.1] %%version %%date \setlength{\clubpenalty}{1} \setlength{\widowpenalty}{1} diff --git a/macros/luatex/generic/lua-widow-control/lua-widow-control.tex b/macros/luatex/generic/lua-widow-control/lua-widow-control.tex index 904ee03c69..cba8ecfe39 100644 --- a/macros/luatex/generic/lua-widow-control/lua-widow-control.tex +++ b/macros/luatex/generic/lua-widow-control/lua-widow-control.tex @@ -3,7 +3,7 @@ % SPDX-License-Identifier: MPL-2.0+ % SPDX-FileCopyrightText: 2021 Max Chernoff -\wlog{lua-widow-control v1.1.0} %%version +\wlog{lua-widow-control v1.1.1} %%version \input ltluatex % \LuaTeX{}Base diff --git a/macros/luatex/generic/lua-widow-control/lwc-documentation.mkxl b/macros/luatex/generic/lua-widow-control/lwc-documentation.mkxl index a4d153de5b..05d9d930f9 100644 --- a/macros/luatex/generic/lua-widow-control/lwc-documentation.mkxl +++ b/macros/luatex/generic/lua-widow-control/lwc-documentation.mkxl @@ -32,6 +32,7 @@ fonts.handlers.otf.addfeature { \setupalign[hz, hanging] \definefontfeature[lining][onum=no,lnum=yes] +\definefontfeature[allsmall][c2sc=yes, smcp=yes] \define\lining{\feature[+][lining]} \starttypescript[lwc-fonts] @@ -78,7 +79,7 @@ fonts.handlers.otf.addfeature { \setupstructure[state=start, method=auto] % Bookmarks -\placebookmarks[section, subsection, filename][section, subsection, filename][number=no] +\placebookmarks[section, subsection][section, subsection][number=no] \setupinteractionscreen[option=bookmark] %%%%%%%%%%%%%%%%%%%%%% @@ -91,7 +92,7 @@ fonts.handlers.otf.addfeature { % Acronym styling \definecharacterkerning[acronymkerning][factor=0.05] -\definealternativestyle[acronymstyle][{\word\sc\switchtobodyfont[1.1em]\setcharacterkerning[acronymkerning]}][] +\definealternativestyle[acronymstyle][{\feature[+][allsmall]\switchtobodyfont[1.1em]\setcharacterkerning[acronymkerning]}][] \definehighlight[acronym][style=acronymstyle] \startuniqueMPgraphic{warning} @@ -146,9 +147,9 @@ setbounds currentpicture to boundingbox OverlayBox; \startsetups[style:section] \setcharacterkerning[titlekern] \switchtobodyfont[adventor] - \word + \WORD \bfb - \feature[+][smallcaps] + \feature[+][allsmall] \interwordspace=0.4em \veryraggedcenter \stopsetups @@ -169,26 +170,69 @@ setbounds currentpicture to boundingbox OverlayBox; number=no, ] -\definehead[filename][subsection][ - alternative=normal, - style=\ssita, - before={\blank[big, preference]}, -] - % TOC -\define[3]\TOCcommand{ - \midaligned{ - \llap{#2} - \hskip 1em - \rlap{\color[\interactionparameter{color}]{\bf #3}} - } +\starttexdefinition protected SectionTOCcommand #1#2#3 + \startcurrentlistentrywrapper % Make the whole line a link + \midaligned{ % Have the title and page number "glued" to the middle + \llap{\currentlistentrytitle} + \hskip 1em + \rlap{\color[\interactionparameter{color}]{\bf \currentlistentrypagenumber}} + } + \stopcurrentlistentrywrapper + + \par + + \setbox0=\vbox{\framedtext[ % Align the subsection titles under the section title + frame=off, + width=\dimexpr\textwidth/2 - 0.5em, + align={flushright, wide}, + offset=none, + toffset=-\lineheight, + ]{ + \global\firstsubsectiontrue + \placelist[subsection][criterium=local] + }} + \iffirstsubsection + \blank[quarterline] % No subsections here + \else + \box0 + \fi +\stoptexdefinition + +\newif\iffirstsubsection + +\define\tocspace{\hskip 0.5em plus 0.5em minus 0.2em\relax} + +\unexpanded\def\toc_link#1{% + \startcurrentlistentrywrapper% + \hbox{#1}% + \stopcurrentlistentrywrapper% } +\starttexdefinition protected SubsectionTOCcommand #1#2#3 + \ss\itx + \dontleavehmode + \iffirstsubsection + \global\firstsubsectionfalse + \toc_link{#2} + \else + \discretionary{}{ + \toc_link{#2} % No interpunct if the line splits here + }{ + \tocspace{\bfa·}\tocspace\toc_link{#2} + } + \fi +\stoptexdefinition + \setupcombinedlist[content][list=section] \setuplist[section][ - alternative=interactive, - command=\TOCcommand, - after=\par + alternative=command, + command=\SectionTOCcommand, +] + +\setuplist[subsection][ + alternative=command, + command=\SubsectionTOCcommand, ] %%%%%%%%%%%%%%%%%%%%%%% diff --git a/macros/luatex/generic/lua-widow-control/lwc-documentation.tex b/macros/luatex/generic/lua-widow-control/lwc-documentation.tex index 40923c3707..a49ab00a53 100644 --- a/macros/luatex/generic/lua-widow-control/lwc-documentation.tex +++ b/macros/luatex/generic/lua-widow-control/lwc-documentation.tex @@ -37,20 +37,19 @@ \startdocument[ title=lua-widow-control, author=Max Chernoff, - version=1.1.0, %%version + version=1.1.1, %%version github=https://github.com/gucci-on-fleek/lua-widow-control, ctan=https://www.ctan.org/pkg/lua-widow-control, ] \Lwc/ is a Plain~\TeX/\LaTeX/\ConTeXt{} package that removes \waos/ without any user intervention. Using the power of \LuaTeX{}, it does so \emph{without} stretching any glue or shortening any pages or columns. Instead, \lwc/ automatically lengthens a paragraph on a page or column where a \woo/ would otherwise occur. -\subject{Contents} -\placecontent[criterium=all] -\page - \section{Quick Start} Ensure that your \TeX~Live/Mik\TeX{} distribution is up-to-date. Then, \LaTeX{} users just need to place \inlineTEX{\usepackage{lua-widow-control}} in the preamble of your document. For more details, see the \goto{Installation and Usage sections}[sec:install]. +\subject{Contents} +\placecontent[criterium=all] + \section{Motivation} \TeX{} provides top-notch typesetting: even 40 years after its first release, no other program produces higher quality mathematical typesetting, and its paragraph-breaking algorithm is still state-of-the-art. However, its page breaking is not quite as sophisticated as its paragraph breaking and thus suffers from some minor issues. @@ -198,7 +197,7 @@ Currently, \ConTeXt{} \acronym{MKXL} (\LuaMetaTeX{}) users must manually install \subsection{Plain \TeX} -\inlineTEX{\input lua-widow-control} +\inlineTEX{\input lua-widow-control} \subsection{\LaTeX} @@ -314,25 +313,30 @@ Please note that a compiled document is \bold{not} considered to be an \q{Execut \section[sec:implementation]{Implementation} \setupbodyfont[10pt] +\setuphead[subsection][ + alternative=normal, + style=\ssita, + before={\blank[big, preference]}, +] -\filename{lua-widow-control.lua} +\subsection{lua-widow-control.lua} \typeLUAfile{../source/lua-widow-control.lua} -\filename{lua-widow-control.tex} +\subsection{lua-widow-control.tex} \typeTEXfile{../source/lua-widow-control.tex} -\filename{lua-widow-control.sty} +\subsection{lua-widow-control.sty} \typeTEXfile{../source/lua-widow-control.sty} \def\module{\tex{module}} -\filename{t-lua-widow-control.mkxl} +\subsection{t-lua-widow-control.mkxl} \typeTEXfile{../source/t-lua-widow-control.mkxl} -\filename{Demo from \in{Table}[tab:demo]} +\subsection{Demo from \in{Table}[tab:demo]} \typeTEXfile{lwc-documentation-demo-text.tmp} diff --git a/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkxl b/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkxl index 62d091aea6..78bdf1fc34 100644 --- a/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkxl +++ b/macros/luatex/generic/lua-widow-control/t-lua-widow-control.mkxl @@ -1,10 +1,10 @@ %D \module %D [ file=t-lua-widow-control, -%D version=1.1.0, %%version +%D version=1.1.1, %%version %D title=lua-widow-control, %D subtitle=\ConTeXt module for lua-widow-control, %D author=Max Chernoff, -%D date=2021-11-08, %%date +%D date=2021-11-26, %%date %D copyright=Max Chernoff, %D license=MPL-2.0+, %D url=https://github.com/gucci-on-fleek/lua-widow-control] -- cgit v1.2.3