summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-11-27 21:26:37 +0000
committerKarl Berry <karl@freefriends.org>2021-11-27 21:26:37 +0000
commit511ac6e5b1a3cf5bf3ecdb3085625a22cf0287b0 (patch)
treeedc222ed4b2ef8f0f226703aa1a16693dc1ae64b /Master/texmf-dist
parent995101497c4b94ca96b78714e873d0a5e3be89fa (diff)
lua-widow-control (27nov21)
git-svn-id: svn://tug.org/texlive/trunk@61174 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/luatex/lua-widow-control/README.md2
-rw-r--r--Master/texmf-dist/doc/luatex/lua-widow-control/lua-widow-control.pdfbin304194 -> 313873 bytes
-rw-r--r--Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.mkxl82
-rw-r--r--Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.tex26
-rw-r--r--Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl4
-rw-r--r--Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua4
-rw-r--r--Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex2
8 files changed, 85 insertions, 37 deletions
diff --git a/Master/texmf-dist/doc/luatex/lua-widow-control/README.md b/Master/texmf-dist/doc/luatex/lua-widow-control/README.md
index abf44e5efcd..71a4d67f468 100644
--- a/Master/texmf-dist/doc/luatex/lua-widow-control/README.md
+++ b/Master/texmf-dist/doc/luatex/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)_ <!--%%version %%date-->
+_v1.1.1 (2021-11-26)_ <!--%%version %%date-->
diff --git a/Master/texmf-dist/doc/luatex/lua-widow-control/lua-widow-control.pdf b/Master/texmf-dist/doc/luatex/lua-widow-control/lua-widow-control.pdf
index f004a1404e4..c0107a62780 100644
--- a/Master/texmf-dist/doc/luatex/lua-widow-control/lua-widow-control.pdf
+++ b/Master/texmf-dist/doc/luatex/lua-widow-control/lua-widow-control.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.mkxl b/Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.mkxl
index a4d153de5b9..05d9d930f9d 100644
--- a/Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.mkxl
+++ b/Master/texmf-dist/source/luatex/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/Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.tex b/Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.tex
index 40923c3707a..a49ab00a535 100644
--- a/Master/texmf-dist/source/luatex/lua-widow-control/lwc-documentation.tex
+++ b/Master/texmf-dist/source/luatex/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/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl b/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl
index 62d091aea6c..78bdf1fc34c 100644
--- a/Master/texmf-dist/tex/context/third/lua-widow-control/t-lua-widow-control.mkxl
+++ b/Master/texmf-dist/tex/context/third/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]
diff --git a/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty b/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty
index ff3781944fa..ab6e6ffbc1b 100644
--- a/Master/texmf-dist/tex/lualatex/lua-widow-control/lua-widow-control.sty
+++ b/Master/texmf-dist/tex/lualatex/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/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua b/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua
index 62f1867b62d..587288e1da0 100644
--- a/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.lua
+++ b/Master/texmf-dist/tex/luatex/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/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex b/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex
index 904ee03c69f..cba8ecfe396 100644
--- a/Master/texmf-dist/tex/luatex/lua-widow-control/lua-widow-control.tex
+++ b/Master/texmf-dist/tex/luatex/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