From 0e03b1c035f50863fd828faf12e59f1b3c6850a7 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 2 Apr 2020 03:02:37 +0000 Subject: CTAN sync 202004020302 --- macros/luatex/optex/lists.opm | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'macros/luatex/optex/lists.opm') diff --git a/macros/luatex/optex/lists.opm b/macros/luatex/optex/lists.opm index adc28a3617..067fa4a7d9 100644 --- a/macros/luatex/optex/lists.opm +++ b/macros/luatex/optex/lists.opm @@ -6,11 +6,20 @@ `\aboveliskip` is used above the list of items, `\belowliskip` is used below the list of items and `\interliskip` is used between items. + `\listskipA` is used as `\listskipamount` at level 1 of items. + `\listskipB` is used as `\listskipamount` at other levels. \_cod ----------------------------- -\_def\_aboveliskip {\_removelastskip \_penalty-100 \_medskip} -\_def\_belowliskip {\_penalty-200 \_medskip} +\_def\_aboveliskip {\_removelastskip \_penalty-100 \_vskip\_listskipamount} +\_def\_belowliskip {\_penalty-200 \_vskip\_listskipamount} \_def\_interliskip {} +\_def\_listskipA {\_medskipamount} +\_def\_listskipB {0pt plus.5\smallskipamount} + +\_def\_setlistskip {% + \_ifnum \_ilevel = 1 \_listskipamount = \_listskipA \_relax + \_else \_listskipamount = \_listskipB \_relax + \_fi} \_doc ----------------------------- The `\itemnum` is localy reset to zero in each group declared by @@ -27,20 +36,30 @@ \_newcount\_itemnum \_itemnum=0 \_newtoks\_printitem -\_def\_begitems{\_par \_ifnum\_lastpenalty<10000 \_aboveliskip \_fi +\_def\_begitems{\_par \_bgroup + \_advance \_ilevel by1 + \_setlistskip + \_ifnum\_lastpenalty<10000 \_aboveliskip \_fi \_itemnum=0 \_adef*{\_startitem} \_advance\_leftskip by\_iindent \_printitem=\_defaultitem - \_the\_everybegitems + \_the\_everylist \_relax } -\_def\_enditems{\_par\_egroup\_belowliskip} +\_def\_enditems{\_par\_belowliskip\_egroup} \_def\_startitem{\_par \_ifnum\_itemnum>0 \_interliskip \_fi \_advance\_itemnum by1 \_the\_everyitem \_noindent\_llap{\_the\_printitem}\_ignorespaces } + \_doc ---------------------------- + `\novspaces` sets `\listsipamount` to 0pt. + \_cod ---------------------------- + +\_def\_novspaces {\_removelastskip \_listskipamount=0pt \_relax} +\_public \novspaces ; + \_doc ----------------------------- Various item marks are saved in `\_item:` macros. You ca re-define then or define more such macros. -- cgit v1.2.3