diff options
author | Norbert Preining <norbert@preining.info> | 2024-12-19 03:03:13 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-12-19 03:03:13 +0000 |
commit | f15a1df448de75200bf0a9c8e8192dc881e306d9 (patch) | |
tree | c22a3282b159b2867e82855ced559ef96d0f25fb /macros/latex | |
parent | 3dab3cbf606a8a72e941ccb8f4f72a21acab9ceb (diff) |
CTAN sync 202412190303
Diffstat (limited to 'macros/latex')
16 files changed, 952 insertions, 146 deletions
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/README b/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/README index 81309dc8d2..d6df2f1415 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/README +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/README @@ -5,8 +5,9 @@ A usage guide is given in beamertheme-light-example.pdf. Please send enhancements and corrections to: Fabien Vergnet, f.j.vergnet@gmail.com, or -Vivien Goepp, vivien.goepp@gmail.com +Vivien Goepp, vivien.goepp@gmail.com, or +निरंजन, hi.niranjan@pm.me -12/11/2024 -Package version 1.1 +2024/12/09 +Package version 1.2 This package is licensed under the General Public License version 3 (GPL3). diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light-example.pdf b/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light-example.pdf Binary files differindex 55432259a3..07e8fe943f 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light-example.pdf +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light-example.pdf diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light-example.tex b/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light-example.tex index 4571d620d1..84da12364b 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light-example.tex +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light-example.tex @@ -1,12 +1,18 @@ +%%%%% Example for ``beamerthemelight'': a colored beamer theme %%%%% +%%%%% Authors: Fabien Vergnet and Vivien Goepp %%%%% +%%%%% Contact: f.j.vergnet@gmail.com and vivien.goepp@gmail.com %%%%% +%%%%% Special thanks to: निरंजन <hi.niranjan@pm.me> %%%%% +%%%%% Repository: https://github.com/goepp/beamertheme-light/ %%%%% +%%%%% Package version 1.2 (18/12/2024) %%%%% +%%%%% License: GNU General Public License, version 3 \documentclass[10pt, compress]{beamer} - -\usepackage[english]{babel} -\usepackage[green]{beamertheme-light} - +\usepackage{fontspec} +\newfontfamily\mrfnt[Script=Devanagari,Renderer=HarfBuzz]{Mukta-Regular.ttf} +\usetheme{light} \title[The package \texttt{light}]{Colored beamer layout \\ with \texttt{beamertheme-light}} -\author[F. Vergnet and V. Goepp]{F. Vergnet$^\dagger$ and V. Goepp$^{\ddagger}$} -\institute{$\dagger$ : LMO, Universit\'e Paris-Sud, Universit\'e Paris-Saclay, \\ $\ddagger$ : MAP5, Universit\'e Paris-Descartes} -\date{Package version 1.1 (12/11/2024)} +\author[F. Vergnet and V. Goepp and {\mrfnt निरंजन}]{F. Vergnet$^\dagger$ \and V. Goepp$^{\ddagger}$ \and {\mrfnt निरंजन}$^{\ast}$} +\institute{$\dagger$ : LMO, Universit\'e Paris-Sud, Universit\'e Paris-Saclay, \\ $\ddagger$ : MAP5, Universit\'e Paris-Descartes,\\$\ast$: {\mrfnt मुंबई विद्यापीठ, कालिना}} +\date{Package version 1.2 (2024/12/18)} \begin{document} diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light.sty index 94c433d928..2a3a28fc43 100644 --- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light.sty +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamertheme-light.sty @@ -2,115 +2,15 @@ %%%%% Authors: Fabien Vergnet and Vivien Goepp %%%%% %%%%% Contact: f.j.vergnet@gmail.com and vivien.goepp@gmail.com %%%%% %%%%% Special thanks to: निरंजन <hi.niranjan@pm.me> %%%%% -%%%%% Package version 1.1 (12/11/2024) %%%%% +%%%%% Repository: https://github.com/goepp/beamertheme-light/ %%%%% +%%%%% Package version 1.2 (18/12/2024) %%%%% %%%%% License: GNU General Public License, version 3 - -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{beamertheme-light}[2024/11/12 v1.1 Beamer style package] - -\mode<presentation> - -%%%%% Define colors %%%%% -% Defaut: -\definecolor{vertfonce}{rgb}{0.20,0.43,0.09} -% Blue: -\definecolor{frenchblue}{rgb}{0.0, 0.45, 0.73} -\definecolor{sanddune}{rgb}{0.59, 0.44, 0.09} -% Purple: -\definecolor{darkmagenta}{rgb}{0.55, 0.0, 0.55} -\definecolor{byzantium}{rgb}{0.44, 0.16, 0.39} -\definecolor{sanddune}{rgb}{0.59, 0.44, 0.09} -% Beige: -\definecolor{darkpastelred}{rgb}{0.76, 0.23, 0.13} -\definecolor{desertsand}{rgb}{0.93, 0.79, 0.69} - -%%%%% Define body and title colors %%%%% -%% Foreground colors -\newcommand{\light@wordcolor}{vertfonce} % Text color -%% Optional colors -\DeclareOption{blue}{\renewcommand{\light@wordcolor}{frenchblue}} -\DeclareOption{red}{\renewcommand{\light@wordcolor}{darkpastelred}} -\DeclareOption{purple}{\renewcommand{\light@wordcolor}{darkmagenta}} -\DeclareOption*{\PackageWarning{descartes}{Unknown ‘\CurrentOption’}} -\ProcessOptions\relax - -%% Background colors -\newcommand{\light@strbg}{white!90!black} % Structure background color -\DeclareOption{blue}{\renewcommand{\light@strbg}{sanddune!15!white}} -\DeclareOption{red}{\renewcommand{\light@strbg}{desertsand!30!white}} -\DeclareOption{purple}{\renewcommand{\light@strbg}{byzantium!25!white}} -\DeclareOption*{\PackageWarning{descartes}{Unknown ‘\CurrentOption’}} -\ProcessOptions\relax - -%% Set colors -\setbeamercolor{title in head/foot}{fg=\light@wordcolor,bg=white!90!black} -\setbeamercolor{structure}{fg=\light@wordcolor,bg=\light@strbg} -\setbeamercolor{title}{fg=\light@wordcolor,bg=white} - -%%%%% Define title frame %%%%% -\defbeamertemplate*{title page}{customized}[1][]% -{% - \vspace{1cm}% - \usebeamerfont{title}\usebeamercolor[fg]{title}\center{\huge \inserttitle}\par - \center{\rule{0.6666\paperwidth}{0.02cm}\par}% - \bigskip - \usebeamerfont{author}\usebeamercolor[black]{author}{\large \insertauthor}\\% - \bigskip - \usebeamerfont{institute}{\small \insertinstitute}\par - \bigskip - \vspace{1cm}% - \usebeamerfont{date}{\small \insertdate}\par +\ProvidesPackage{beamertheme-light}[2024/12/09 v1.2] +\usetheme{light} +\PackageWarningNoLine{beamertheme-light}{% + You have issued \string usepackage{beamertheme-light}. + This method\MessageBreak of loading the "light" theme is + deprecated. Kindly use the\MessageBreak standard + \usetheme{light} command% } -%%%%% End define title frame %%%%% - -%%%%% Define footline %%%%% -\setbeamertemplate{footline}% -{% - \leavevmode - \hbox{% - \begin{beamercolorbox}[wd =.45\paperwidth, ht = 2.25ex, dp = 1ex, center]{author in head/foot}% - \usebeamerfont{author in head/foot}\colorbox{structure.bg}{\makebox[0.45\paperwidth]{\insertshortauthor}}% - \end{beamercolorbox}% - \begin{beamercolorbox}[wd =.45\paperwidth, ht = 2.25ex, dp = 1ex, center]{title in head/foot}% - \usebeamerfont{title in head/foot}\colorbox{structure.bg}{\makebox[0.45\paperwidth]{\insertshorttitle}}% - \end{beamercolorbox}% - \begin{beamercolorbox}[wd=.10\paperwidth, ht = 2.25ex, dp = 1ex, right]{date in head/foot}% - \usebeamerfont{date in head/foot}\colorbox{structure.bg}{\makebox[0.10\paperwidth]{% - \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}}}% - \end{beamercolorbox}}% - \vskip0pt\relax -} -%%%%% End define footline %%%%% - -%%%%% Define command for the "Thank you" frame -\newcommand{\thankframe}[1]{% -\setbeamercolor{background canvas}{fg = title.fg,bg = title.fg!50!black}% -\setbeamertemplate{footline}{}% -\begin{frame}% - \center{\Huge \textcolor{white}{#1}}% -\end{frame}% -\setbeamercolor{structure}{fg = \light@wordcolor, bg = \light@strbg}% -\setbeamercolor{background canvas}{fg = black,bg = white}% -} -%%%%% End define command for the "Thank you" frame - -%% Rounded block (for definition, prop, theorems, etc...) -\setbeamertemplate{blocks}[rounded][shadow = true] - -%% No navigation symbols -\setbeamertemplate{navigation symbols}{} - -%% Redefine itemize -\setbeamercolor{item}{fg = title.fg, bg = title.fg} -\setbeamertemplate{itemize item}{{\tiny{\textbullet}}} - -%% Redefine the way the legend of a figure is written -\setbeamertemplate{caption}{\raggedright\scriptsize{\insertcaption}\par} - -%% To have "[number]" before any reference in bibliography -\setbeamertemplate{bibliography item}[text] - -%% Remove 1 from the counter (title frame is 0) -\addtocounter{framenumber}{-1} - -\mode<all> +\endinput diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamerthemelight.sty b/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamerthemelight.sty new file mode 100644 index 0000000000..34e5f972ea --- /dev/null +++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-light/beamerthemelight.sty @@ -0,0 +1,113 @@ +%%%%% Theme ``beamerthemelight'': a colored beamer theme %%%%% +%%%%% Authors: Fabien Vergnet and Vivien Goepp %%%%% +%%%%% Contact: f.j.vergnet@gmail.com and vivien.goepp@gmail.com %%%%% +%%%%% Special thanks to: निरंजन <hi.niranjan@pm.me> %%%%% +%%%%% Repository: https://github.com/goepp/beamertheme-light/ %%%%% +%%%%% Package version 1.2 (18/12/2024) %%%%% +%%%%% License: GNU General Public License, version 3 +\mode<presentation> + +%%%%% Define colors %%%%% +% Defaut: +\definecolor{vertfonce}{rgb}{0.20,0.43,0.09} +% Blue: +\definecolor{frenchblue}{rgb}{0.0, 0.45, 0.73} +\definecolor{sanddune}{rgb}{0.59, 0.44, 0.09} +% Purple: +\definecolor{darkmagenta}{rgb}{0.55, 0.0, 0.55} +\definecolor{byzantium}{rgb}{0.44, 0.16, 0.39} +\definecolor{sanddune}{rgb}{0.59, 0.44, 0.09} +% Beige: +\definecolor{darkpastelred}{rgb}{0.76, 0.23, 0.13} +\definecolor{desertsand}{rgb}{0.93, 0.79, 0.69} + +%%%%% Define body and title colors %%%%% +%% Foreground colors +\newcommand{\light@wordcolor}{vertfonce} % Text color +%% Optional colors +\DeclareOption{blue}{\renewcommand{\light@wordcolor}{frenchblue}} +\DeclareOption{red}{\renewcommand{\light@wordcolor}{darkpastelred}} +\DeclareOption{purple}{\renewcommand{\light@wordcolor}{darkmagenta}} +\DeclareOption*{\PackageWarning{descartes}{Unknown ‘\CurrentOption’}} +\ProcessOptions\relax + +%% Background colors +\newcommand{\light@strbg}{white!90!black} % Structure background color +\DeclareOption{blue}{\renewcommand{\light@strbg}{sanddune!15!white}} +\DeclareOption{red}{\renewcommand{\light@strbg}{desertsand!30!white}} +\DeclareOption{purple}{\renewcommand{\light@strbg}{byzantium!25!white}} +\DeclareOption*{\PackageWarning{descartes}{Unknown ‘\CurrentOption’}} +\ProcessOptions\relax + +%% Set colors +\setbeamercolor{title in head/foot}{fg=\light@wordcolor,bg=white!90!black} +\setbeamercolor{structure}{fg=\light@wordcolor,bg=\light@strbg} +\setbeamercolor{title}{fg=\light@wordcolor,bg=white} + +%%%%% Define title frame %%%%% +\defbeamertemplate*{title page}{customized}[1][]% +{% + \vspace{1cm}% + \usebeamerfont{title}\usebeamercolor[fg]{title}\center{\huge \inserttitle}\par + \center{\rule{0.6666\paperwidth}{0.02cm}\par}% + \bigskip + \usebeamerfont{author}\usebeamercolor[black]{author}{\large \insertauthor}\\% + \bigskip + \usebeamerfont{institute}{\small \insertinstitute}\par + \bigskip + \vspace{1cm}% + \usebeamerfont{date}{\small \insertdate}\par +} +%%%%% End define title frame %%%%% + +%%%%% Define footline %%%%% +\setbeamertemplate{footline}% +{% + \leavevmode + \hbox{% + \begin{beamercolorbox}[wd =.45\paperwidth, ht = 2.25ex, dp = 1ex, center]{author in head/foot}% + \usebeamerfont{author in head/foot}\colorbox{structure.bg}{\makebox[0.45\paperwidth]{\insertshortauthor}}% + \end{beamercolorbox}% + \begin{beamercolorbox}[wd =.45\paperwidth, ht = 2.25ex, dp = 1ex, center]{title in head/foot}% + \usebeamerfont{title in head/foot}\colorbox{structure.bg}{\makebox[0.45\paperwidth]{\insertshorttitle}}% + \end{beamercolorbox}% + \begin{beamercolorbox}[wd=.10\paperwidth, ht = 2.25ex, dp = 1ex, right]{date in head/foot}% + \usebeamerfont{date in head/foot}\colorbox{structure.bg}{\makebox[0.10\paperwidth]{% + \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}}}% + \end{beamercolorbox}}% + \vskip0pt\relax +} +%%%%% End define footline %%%%% + +%%%%% Define command for the "Thank you" frame +\newcommand{\thankframe}[1]{% +\setbeamercolor{background canvas}{fg = title.fg,bg = title.fg!50!black}% +\setbeamertemplate{footline}{}% +\begin{frame}% + \center{\Huge \textcolor{white}{#1}}% +\end{frame}% +\setbeamercolor{structure}{fg = \light@wordcolor, bg = \light@strbg}% +\setbeamercolor{background canvas}{fg = black,bg = white}% +} +%%%%% End define command for the "Thank you" frame + +%% Rounded block (for definition, prop, theorems, etc...) +\setbeamertemplate{blocks}[rounded][shadow = true] + +%% No navigation symbols +\setbeamertemplate{navigation symbols}{} + +%% Redefine itemize +\setbeamercolor{item}{fg = title.fg, bg = title.fg} +\setbeamertemplate{itemize item}{{\tiny{\textbullet}}} + +%% Redefine the way the legend of a figure is written +\setbeamertemplate{caption}{\raggedright\scriptsize{\insertcaption}\par} + +%% To have "[number]" before any reference in bibliography +\setbeamertemplate{bibliography item}[text] + +%% Remove 1 from the counter (title frame is 0) +\addtocounter{framenumber}{-1} + +\mode<all> diff --git a/macros/latex/contrib/changelog/changelog.pdf b/macros/latex/contrib/changelog/changelog.pdf Binary files differindex f0e2277664..1416e15518 100644 --- a/macros/latex/contrib/changelog/changelog.pdf +++ b/macros/latex/contrib/changelog/changelog.pdf diff --git a/macros/latex/contrib/changelog/changelog.sty b/macros/latex/contrib/changelog/changelog.sty index b58e33479a..0dc42ab2eb 100644 --- a/macros/latex/contrib/changelog/changelog.sty +++ b/macros/latex/contrib/changelog/changelog.sty @@ -1,5 +1,5 @@ \RequirePackage{expl3} -\ProvidesExplPackage{changelog}{2024/09/17}{2.5.1}{Typesetting changelogs} +\ProvidesExplPackage{changelog}{2024/12/18}{2.6.0}{Typesetting changelogs} % Description: Provides the changelog environment for typesetting changelogs % License: LPPL 1.3c % Homepage: https://github.com/9999years/latex-changelog @@ -205,7 +205,10 @@ \bool_if:NTF \g__changelog_section_bool { \exp_after:wN \g__changelog_sectioncmd_tl { \g__changelog_title_tl } - \exp_after:wN \label { \g__changelog_label_tl } + \tl_if_empty:NF \g__changelog_label_tl + { + \exp_after:wN \label { \tl_use:N \g__changelog_label_tl } + } } {} } diff --git a/macros/latex/contrib/changelog/changelog.tex b/macros/latex/contrib/changelog/changelog.tex index 9c949501fc..ced01509ed 100644 --- a/macros/latex/contrib/changelog/changelog.tex +++ b/macros/latex/contrib/changelog/changelog.tex @@ -30,7 +30,7 @@ \author{Rebecca Turner\thanks{\email{rbt@sent.as}}} \title{The \cl\ Package} -\date{2.5.1 (2024/09/17)} +\date{2.6.0 (2024/12/18)} \begin{document} \maketitle @@ -143,12 +143,15 @@ versions have the same author. \begin{keys} \key{section}[\bool][true] Insert a \cs{section} before the changelog? + If |section=false|, no \cs{label} will be generated. \key{sectioncmd}[\m{command}][\cs{section}] Which sectioning command to use? \key{title}[\m{txt}][Changelog] What to title the changelog section? \key{label}[\m{label}][sec:changelog] What to \cs{label} the section? + If the \option{label} option is empty (|label=|), no label will be + inserted. \end{keys} \pagebreak @@ -345,6 +348,16 @@ an email} and I'll incorporate the translation into \cl's next release! This is this package's actual changelog --- not an example! \begin{changelog}[author=Rebecca Turner <\email{rbt@sent.as}>, section=false] +\begin{version}[v=2.6.0, date=2024-12-18] +\changed + \item If the \option{label} option for the |changelog| environment is empty, + no \cs{label} will be generated for the changelog section. + + The documentation has been clarified to explain that if the + \option{section} option is set to |false|, no label will be generated, as + labels are meaningless without being attached to a section. +\end{version} + \begin{version}[v=2.5.1, date=2024-09-17] \fixed \item Fixed \href{https://github.com/9999years/latex-changelog/issues/13}{a diff --git a/macros/latex/contrib/functional/functional.pdf b/macros/latex/contrib/functional/functional.pdf Binary files differindex 2b2cc1f25b..2719465cdf 100644 --- a/macros/latex/contrib/functional/functional.pdf +++ b/macros/latex/contrib/functional/functional.pdf diff --git a/macros/latex/contrib/functional/functional.sty b/macros/latex/contrib/functional/functional.sty index e366794af4..aaf21371d2 100644 --- a/macros/latex/contrib/functional/functional.sty +++ b/macros/latex/contrib/functional/functional.sty @@ -14,7 +14,7 @@ \NeedsTeXFormat{LaTeX2e}[2018-04-01] \RequirePackage{expl3} -\ProvidesExplPackage{functional}{2024-12-14}{2024B} +\ProvidesExplPackage{functional}{2024-12-18}{2024C} {^^JIntuitive Functional Programming Interface for LaTeX2} \cs_generate_variant:Nn \iow_log:n { V } @@ -1602,22 +1602,14 @@ %%> \section{Interfaces for Floating Point Numbers (Fp)} %%% -------------------------------------------------------- -\fp_new:N \cZeroFp -\fp_new:N \cMinusZeroFp -\fp_new:N \cOneFp -\fp_new:N \cInfFp -\fp_new:N \cMinusInfFp -\fp_new:N \cEFp -\fp_new:N \cPiFp -\fp_new:N \cOneDegreeFp -\fp_set_eq:NN \cZeroFp \c_zero_fp -\fp_set_eq:NN \cMinusZeroFp \c_minus_zero_fp -\fp_set_eq:NN \cOneFp \c_one_fp -\fp_set_eq:NN \cInfFp \c_inf_fp -\fp_set_eq:NN \cMinusInfFp \c_minus_inf_fp -\fp_set_eq:NN \cEFp \c_e_fp -\fp_set_eq:NN \cPiFp \c_pi_fp -\fp_set_eq:NN \cOneDegreeFp \c_one_degree_fp +\fp_const:Nn \cZeroFp { \c_zero_fp } +\fp_const:Nn \cMinusZeroFp { \c_minus_zero_fp } +\fp_const:Nn \cOneFp { \c_one_fp } +\fp_const:Nn \cInfFp { \c_inf_fp } +\fp_const:Nn \cMinusInfFp { \c_minus_inf_fp } +\fp_const:Nn \cEFp { \c_e_fp } +\fp_const:Nn \cPiFp { \c_pi_fp } +\fp_const:Nn \cOneDegreeFp { \c_one_degree_fp } \fp_new:N \lTmpaFp \fp_new:N \lTmpbFp \fp_new:N \lTmpcFp \fp_new:N \lTmpiFp \fp_new:N \lTmpjFp \fp_new:N \lTmpkFp @@ -1866,8 +1858,7 @@ \clist_new:N \l@FunTmpyClist \clist_new:N \g@FunTmpyClist \clist_new:N \l@FunTmpzClist \clist_new:N \g@FunTmpzClist -\clist_new:N \cEmptyClist -\clist_set_eq:NN \cEmptyClist \c_empty_clist +\clist_const:Nn \cEmptyClist {} \prgNewFunction \clistNew { M } { \clist_new:N #1 } @@ -2091,8 +2082,7 @@ \seq_new:N \gTmpiSeq \seq_new:N \gTmpjSeq \seq_new:N \gTmpkSeq \seq_new:N \g@FunTmpxSeq \seq_new:N \g@FunTmpySeq \seq_new:N \g@FunTmpzSeq -\seq_new:N \cEmptySeq -\seq_set_eq:NN \cEmptySeq \c_empty_seq +\seq_const_from_clist:Nn \cEmptySeq {} \prgNewFunction \seqNew { M } { \seq_new:N #1 } @@ -2929,7 +2919,7 @@ \AddToHook{package/xcolor/after} { \tlNew \l@Fun@Color@Tl - \prgNewFunction \colorFromSpec {mm} + \prgNewFunction \funColor { m m } { %% replace commas with vertical bars \tlSet \l@Fun@Color@Tl { \clistJoin { fun | #1 | #2 } { | } } diff --git a/macros/latex/contrib/functional/functional.tex b/macros/latex/contrib/functional/functional.tex index 5acab9a26a..6bb0568b45 100644 --- a/macros/latex/contrib/functional/functional.tex +++ b/macros/latex/contrib/functional/functional.tex @@ -3,7 +3,7 @@ \documentclass[oneside]{book} \usepackage[a4paper,margin=2.5cm]{geometry} -\newcommand*{\myversion}{2024B} +\newcommand*{\myversion}{2024C} \newcommand*{\mydate}{Version \myversion\ (\the\year-\mylpad\month-\mylpad\day)} \newcommand*{\mylpad}[1]{\ifnum#1<10 0\the#1\else\the#1\fi} diff --git a/macros/latex/contrib/listparskip/README.txt b/macros/latex/contrib/listparskip/README.txt new file mode 100644 index 0000000000..1e1492a4ce --- /dev/null +++ b/macros/latex/contrib/listparskip/README.txt @@ -0,0 +1,143 @@ + LaTeX Package listparskip v. 1.0 + Installation Guide/README + Conrad Kosowsky + +This file is README.txt from version 1.0 of the free and +open-source LaTeX package "listparskip," released December +2024. The listparskip package changes the rules for vertical +spacing before and after list environments. See the user +guide for more information. See below for installation and +license information. + +********************************************************* + + How to Install + +To install listparskip automatically, update your TeXLive or +MacTeX distribution or use a package manager such as tlmgr. + +To install listparskip manually requires two steps as follows. + +Step 1: You will need to generate the package file +listparskip.sty from listparskip_code.dtx. You can do this in +two ways: + + (1) Running Plain TeX on listparskip_code.dtx will create + listparskip.sty as well as several other tex files that + can be used for typesetting documentation. + + (2) Running LaTeX on listparskip_code.dtx will produce the + files listed in point (1) including listparskip.sty as + well as listparskip_code.pdf, which documents the + package code. + +Step 2: Once you have created listparskip.sty, you should +move it into a directory searchable by TeX to complete the +installation. If you are unsure how to do this, consult your +TeX distribution. + +********************************************************* + + Installation Contents + +Besides this README, the installation contains the following +files: + + (1) listparskip_code.dtx: the main file. See above for + instructions to generate listparskip.sty from this + file and complete the installation. + + (2) listparskip_code.pdf: documentation of the package + code. + + (3) listparskip_user_guide.pdf: a user guide. + + (4) listparskip_example.pdf: an example of listparskip. + +Typesetting listparskip_code.dtx will create +listparskip_user_guide.tex, which is the tex file that +produces the user guide in point (3) above. It will also +create listparskip_example.tex, which is the tex file +that produces the example file in point (4) above. + +********************************************************* + + Package Contents, License, and Copyright + +Copyright 2024 Conrad Kosowsky + +This file may be distributed and modified under the terms +of the LaTeX Public Project License, version 1.3c or any +later version. The most recent version of this license is +available online at + + https://www.latex-project.org/lppl/ + +This Work has the LPPL status "maintained," and the current +maintainer is the package author, Conrad Kosowsky. He can +be reached at kosowsky.latex@gmail.com. The Work consists +of the following items: + + (1) the base file: + listparskip_code.dtx + + (2) the package file: + listparskip.sty + + (3) the pdf documentation files: + listparskip_code.pdf + listparskip_user_guide.pdf + listparskip_example.pdf + + (4) the derived files: + listparskip_user_guide.tex + listparskip_example.tex + listparskip_heading.tex + + (5) all other files created through the configuration + process + + and + + (6) this README.txt file + +********************************************************* + + No Warranty + +PLEASE KNOW THAT THIS FREE SOFTWARE IS PROVIDED WITHOUT +ANY WARRANTY. SPECIFICALLY, THE "NO WARRANTY" SECTION OF +THE LATEX PROJECT PUBLIC LICENSE STATES THE FOLLOWING: + +THERE IS NO WARRANTY FOR THE WORK. EXCEPT WHEN OTHERWISE +STATED IN WRITING, THE COPYRIGHT HOLDER PROVIDES THE WORK +`AS IS’, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE +OF THE WORK IS WITH YOU. SHOULD THE WORK PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR +CORRECTION. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED +TO IN WRITING WILL THE COPYRIGHT HOLDER, OR ANY AUTHOR +NAMED IN THE COMPONENTS OF THE WORK, OR ANY OTHER PARTY +WHO MAY DISTRIBUTE AND/OR MODIFY THE WORK AS PERMITTED +ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, +SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT +OF ANY USE OF THE WORK OR OUT OF INABILITY TO USE THE WORK +(INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA, DATA BEING +RENDERED INACCURATE, OR LOSSES SUSTAINED BY ANYONE AS A +RESULT OF ANY FAILURE OF THE WORK TO OPERATE WITH ANY +OTHER PROGRAMS), EVEN IF THE COPYRIGHT HOLDER OR SAID +AUTHOR OR SAID OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +For more information, see the LaTeX Project Public License. +Derivative works based on this software may come with their +own license or terms of use, and the package author is not +responsible for any third-party software. + +********************************************************* + +For more information, see listparskip_code.dtx. Happy TeXing! diff --git a/macros/latex/contrib/listparskip/listparskip_code.dtx b/macros/latex/contrib/listparskip/listparskip_code.dtx new file mode 100644 index 0000000000..51aa56cc86 --- /dev/null +++ b/macros/latex/contrib/listparskip/listparskip_code.dtx @@ -0,0 +1,637 @@ +% \iffalse ---!!! FIRST META-COMMENT !!!--- +% +% +% This file is listparskip_code.dtx from version 1.0 +% of the free and open-source LaTeX package "listparskip," +% released December 2024. +% +% Running Plain TeX on listparskip_code.dtx will +% produce the following files: +% +% (1) the package file listparskip.sty; +% +% (2) the derived files listparskip_heading.tex +% and listparskip_user_guide.tex, and +% listparskip_example.tex, which are +% used for typesetting documentation; +% +% and +% +% (3) a number of other derived files. +% +% Running LaTeX on listparskip_code.dtx will produce the +% files listed above as well as the following: +% +% (4) the pdf documentation file listparskip_code.pdf; +% +% and +% +% (5) a number of other derived files. +% +% To install listparskip on your computer, run this file +% through Plain TeX or LaTeX and move listparskip.sty +% to a directory searchable by TeX. See the associated +% README.txt file for installation information. +% +% +% \fi +% \iffalse ---!!! SECOND META-COMMENT !!!--- +% +% +% This file is from version 1.0 of the free and open-source +% LaTeX package "listparskip," released December 2024. +% +% Copyright 2024 Conrad Kosowsky +% +% This file may be used, distributed, and modified under the +% terms of the LaTeX Public Project License, version 1.3c or +% any later version. The most recent version of this license +% is available online at +% +% https://www.latex-project.org/lppl/ +% +% This Work has the LPPL status "maintained," and the current +% maintainer is the package author, Conrad Kosowsky. He can +% be reached at kosowsky.latex@gmail.com. The Work consists +% of the following items: +% +% (1) the base file: +% listparskip.dtx +% +% (2) the package file: +% listparskip.sty +% +% (3) the pdf documentation files: +% listparskip_code.pdf +% listparskip_user_guide.pdf +% listparskip_example.pdf +% +% (4) the derived files: +% listparskip_user_guide.tex +% listparskip_example.tex +% listparskip_heading.tex +% +% (5) all other files created through the configuration +% process +% +% and +% +% (6) this README.txt file +% +% PLEASE KNOW THAT THIS FREE SOFTWARE IS PROVIDED WITHOUT +% ANY WARRANTY. SPECIFICALLY, THE "NO WARRANTY" SECTION OF +% THE LATEX PROJECT PUBLIC LICENSE STATES THE FOLLOWING: +% +% THERE IS NO WARRANTY FOR THE WORK. EXCEPT WHEN OTHERWISE +% STATED IN WRITING, THE COPYRIGHT HOLDER PROVIDES THE WORK +% `AS IS’, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +% OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +% WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +% PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE +% OF THE WORK IS WITH YOU. SHOULD THE WORK PROVE DEFECTIVE, +% YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR +% CORRECTION. +% +% IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED +% TO IN WRITING WILL THE COPYRIGHT HOLDER, OR ANY AUTHOR +% NAMED IN THE COMPONENTS OF THE WORK, OR ANY OTHER PARTY +% WHO MAY DISTRIBUTE AND/OR MODIFY THE WORK AS PERMITTED +% ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, +% SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT +% OF ANY USE OF THE WORK OR OUT OF INABILITY TO USE THE WORK +% (INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA, DATA BEING +% RENDERED INACCURATE, OR LOSSES SUSTAINED BY ANYONE AS A +% RESULT OF ANY FAILURE OF THE WORK TO OPERATE WITH ANY +% OTHER PROGRAMS), EVEN IF THE COPYRIGHT HOLDER OR SAID +% AUTHOR OR SAID OTHER PARTY HAS BEEN ADVISED OF THE +% POSSIBILITY OF SUCH DAMAGES. +% +% For more information, see the LaTeX Project Public License. +% Derivative works based on this software may come with their +% own license or terms of use, and the package author is not +% responsible for any third-party software. +% +% Happy TeXing! +% +% +% \fi +% \iffalse +% +% The installation and driver files are incorporated into +% listparskip_code.dtx, so we do not need to generate them +% separately. The <batchfile> and <driver> tags are for +% reference. +% +%<*batchfile> +\begingroup +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble + +This file is from version 1.0 of the free and open-source +LaTeX package "listparskip," released December 2024. + +Copyright 2024 Conrad Kosowsky + +This file may be used, distributed, and modified under the +terms of the LaTeX Public Project License, version 1.3c or +any later version. The most recent version of this license +is available online at + + https://www.latex-project.org/lppl/ + +This work has the LPPL status "maintained," and the current +maintainer is the package author, Conrad Kosowsky. He can +be reached at kosowsky.latex@gmail.com. + +PLEASE KNOW THAT THIS FREE SOFTWARE IS PROVIDED WITHOUT +ANY WARRANTY. SPECIFICALLY, THE "NO WARRANTY" SECTION OF +THE LATEX PROJECT PUBLIC LICENSE STATES THE FOLLOWING: + +THERE IS NO WARRANTY FOR THE WORK. EXCEPT WHEN OTHERWISE +STATED IN WRITING, THE COPYRIGHT HOLDER PROVIDES THE WORK +`AS IS’, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE +OF THE WORK IS WITH YOU. SHOULD THE WORK PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR +CORRECTION. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED +TO IN WRITING WILL THE COPYRIGHT HOLDER, OR ANY AUTHOR +NAMED IN THE COMPONENTS OF THE WORK, OR ANY OTHER PARTY +WHO MAY DISTRIBUTE AND/OR MODIFY THE WORK AS PERMITTED +ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, +SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT +OF ANY USE OF THE WORK OR OUT OF INABILITY TO USE THE WORK +(INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA, DATA BEING +RENDERED INACCURATE, OR LOSSES SUSTAINED BY ANYONE AS A +RESULT OF ANY FAILURE OF THE WORK TO OPERATE WITH ANY +OTHER PROGRAMS), EVEN IF THE COPYRIGHT HOLDER OR SAID +AUTHOR OR SAID OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +For more information, see the LaTeX Project Public License. +Derivative works based on this software may come with their +own license or terms of use, and the package author is not +responsible for any third-party software. + +Happy TeXing! + +\endpreamble +\generate{\file{listparskip.sty}{\from{listparskip_code.dtx}{package}} + \file{listparskip_user_guide.tex}{\from{listparskip_code.dtx}{user}} + \file{listparskip_example.tex}{\from{listparskip_code.dtx}{example}} + \file{listparskip_heading.tex}{\from{listparskip_code.dtx}{heading}}} +\catcode`\ =12\relax +\immediate\write0{^^J% +****************************************************^^J% +* Step 1 of the listparskip installation complete! *^^J% +****************************************************^^J^^J% +****************************************************^^J% +* To finish installing the package, move *^^J% +* listparskip.sty to a directory searchable by TeX *^^J% +* after listparskip_code.tex is done typesetting *^^J% +****************************************************^^J} +\endgroup +\ifx\LaTeX\undefined + \immediate\write0{Plain TeX format used; quitting now.} + \immediate\write0{To create listparskip_code.pdf, run^^J% + listparskip_code.dtx through LaTeX.^^J^^J} + \expandafter\end +\fi +%</batchfile> +%<*driver> +\makeatletter +\documentclass[12pt,doc2,letterpaper]{ltxdoc} +\usepackage[margin=72.27pt]{geometry} +\usepackage[factor=700,stretch=14,shrink=14,step=1]{microtype} +\begin{document} + \def\documentname{Implementation} + \input listparskip_heading.tex + \DocInput{listparskip_code.dtx} +\end{document} +%</driver> +%<*package> +% +% \fi +% +% +% \CheckSum{112} +% \init@checksum +% +% \makeatother +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% \makeatletter +% +% +% +% +% +% +% \noindent This file documents the code for the \textsf{listparskip} package. It is not a user guide! If you are looking for discussion of how \textsf{listparskip} will change the layout of your documents, see |listparskip_user_guide.pdf| and |listparskip_example.pdf|, which are included with the \textsf{listparskip} installation and are available on \textsc{ctan}. +% +% Spacing in list environments is subtle, and it will be helpful to summarize how \LaTeX\ implements vertical space in lists. Every list environment comes from either a |\list| or |\trivlist| macro, and |\list| is responsible for the standard list structure that shows up in enumerate, itemize, and description environments. A |\trivlist| is a list without any indentation or space for item markers, and this command comes up, for example, in quotations or some verbatim environments where fine control over vertical spacing is important. Both user-level commands serve as wrappers for the internal macro |\@trivlist|, which translates the definition of the current environment into internal list control sequences for processing later in the document. Default dimensions for different list levels come from the class file in the |\@listi| through |\@listiv| macros. +% +% When the user enters a list environment, for example with |\begin{enumerate}|, \TeX\ will at some point encounter |\@trivlist|. When that happens, \TeX\ prepares to add |\topsep| and |\parskip| to the main vertical list, and if \TeX\ is in \v mode, it prepares to add an extra |\partopsep|. The environment call itself doesn't add space or penalties, and instead, the first |\item| inside the list environment is responsible for these changes. Future uses of |\item| add an |\itempenalty| and |\itemsep| to the main vertical list, and any |\parsep| space additions happen automatically because \LaTeX\ sets |\parskip| to |\parsep| inside |\list| immediately after |\@trivlist|. At the end of the list environment, \TeX\ adds |\topsep| and, if it was present at the beginning of the environment, |\partopsep| to the main vertical list. \LaTeX\ does not instruct \TeX\ to manually add |\parskip|, so if the user includes, for example, an |\hbox| right after |\end{enumerate}|, \TeX\ will not add |\parskip| there. (\TeX\ is always in \v mode after it begins or ends a list environment.) +% +% Changing this behavior at the beginning of lists is straightforward---\textsf{listparskip} patches |\@trivlist| by treating the extra |\parskip| the same way \LaTeX\ normally treats |\partopsep|. Dealing with after-list space is more complicated. Normally |\@endparenv| adds |\topsep| and possibly |\partopsep| directly to the main vertical list, but we want a more tailored approach. Instead, \textsf{listparskip} redefines |\@endparenv| to add |\topsep| to the main vertical list and (globally) save |\topsep| plus |\partopsep| in |\@tempskipa|. Immediately outside the list environment, \textsf{listparskip} sets |\parskip| to 0pt and redefines |\par| to remove the previous |\topsep| and replace it with |\@tempskipa|. To ensure that (a) the extra |\partopsep| happens only if a blank line immediately follows the list and (b) \TeX\ avoids inserting |\parskip| only if \h mode material immediately follows the list, \textsf{listparskip} makes |\par|, |\everypar|, and |\item| restore |\par| and |\parskip| to their previous (local) definitions. Using creative groupings or manually redefining |\par| or |\everypar| right after a list may break things, so please be careful! +% +% Sometimes the user will want to include non-horizontal material, such as a box, immediately after a list environment without worrying about an extra or missing |\parskip| or |\partopsep|. In the implementation outlined above, \textsf{listparskip} adds or removes this space whenever \TeX\ first encounters a |\par| or \h mode material after a list. A box is neither of these things, so any after-list adjustments will show up after the box instead of before. The easiest way to avoid this problem is to transition to \h mode and then back to \v mode before adding the box, and the macro |\nullline| does this. +% +% \bigskip +% \centerline{$***$} +% \bigskip +% +% \noindent First, the package should declare itself. There are no package options. +% \begin{macrocode} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{listparskip}[2024/12/17 v. 1.0 Package listparskip] +\newdimen\@saveparskip +% \end{macrocode} +% We begin with spacing at the start of list environments. We patch |\@trivlist| such that |\@topsepadd| increases by |\parskip| only when \TeX\ is already in \v mode. +% \begin{macrocode} +\long\def\patch@trivlist#1\ifvmode#2\else#3% + \advance\@topsep\parskip#4\@nil{% + #1% + \ifvmode + \advance\@topsepadd\partopsep + \advance\@topsepadd\parskip + \else + #3#4} +\toks@\expandafter\expandafter\expandafter + {\expandafter\patch@trivlist\@trivlist\@nil} +\edef\@trivlist{\the\toks@} +% \end{macrocode} +% We change |\@endparenv| so that it adds only |\topsep|. We set |\@tempskipa| globally in order to access its value in |\@doendpe|, which is outside the current group. +% \begin{macrocode} +\def\@endparenv{% + \addpenalty\@endparpenalty + \addvspace\topsep + \global\@tempskipa\glueexpr\topsep+\partopsep\relax + \@endpetrue} +% \end{macrocode} +% Normally |\@restoreparskip| is |\relax|, but we change it in |\@doendpe| to return |\parskip| back to its previous value, which we have stored in |\@saveparskip|. This makes |\parskip\z@| a one-op. (Or a no-op if \TeX\ sees a |\par| or |\item| after the list and doesn't enter \h mode.)\vadjust{\penalty-100} +% \begin{macrocode} +\let\@restoreparskip\relax +\def\@doendpe{% + \@endpetrue + \@saveparskip\parskip + \parskip\z@ + \def\@restoreparskip{% + \parskip\@saveparskip + \let\@restoreparskip\relax} +% \end{macrocode} +% We add |\@restoreparskip| to |\par|, and the |\addvspace| will replace the previous addition of |\topsep| from |\@endparenv| with |\topsep| plus |\partopsep|. We put everything inside an |\edef| so we can expand |\the\@tempskipa| now and not worry about a redefinition of |\@tempskipa| before the next |\par|. (Unlikely, but you never know.) +% \begin{macrocode} + \edef\par{% + \unexpanded{\clubpenalty\@clubpenalty + \everypar{}% + \@restorepar\par + \@restoreparskip + \@endpefalse}% + \noexpand\addvspace{\the\@tempskipa}}% +% \end{macrocode} +% The contents of |\everypar| here are the same as the \LaTeX\ default in this situation except that we add |\@restorepar| and |\@restoreparskip|. +% \begin{macrocode} + \everypar{\@restorepar + \@restoreparskip + {\setbox\z@\lastbox}% + \everypar{}% + \@endpefalse}} +% \end{macrocode} +% Next we add |\@restorepar| to the beginning of |\item|. Calling |\patch@item| on a control sequence |#1| will insert |\@restorepar| and |\@restoreparskip| into |#1|'s definition. +% \begin{macrocode} +\def\patch@item#1{% + \edef#1{\noexpand\@restorepar + \noexpand\@restoreparskip + \expandafter\unexpanded\expandafter{#1}}} +% \end{macrocode} +% The \textsf{hyperref} package sometimes turns |\item| into a wrapper for itself. In that case, \textsf{hyperref} will have renamed |\item| to |\H@item|, so we patch that instead. +% \begin{macrocode} +\@ifpackageloaded{hyperref}{% + \ifHy@implicit + \patch@item\H@item + \else + \patch@item\item + \fi}{\patch@item\item} +% \end{macrocode} +% Finally, create the command that forces a transition from \textsc v mode to \h mode and back without (directly) adding any space. +% \begin{macrocode} +\def\nullline{\ifvmode\nointerlineskip\leavevmode\par\fi} +% \end{macrocode} +% All done! +% +% +% \iffalse +% ^^A No version history unless we end up with multiple versions +% +% \vfill\eject +% +% \section*{Version History} +% +% \begin{multicols*}{2} +% \raggedright +% \parskip\z@ +% \parindent\z@ +% \leftskip1em +% \obeylines +% \setbox0\hbox{\hskip 1pt.\hskip 1pt} +% \def\version#1#2{\bigskip\hbox to \hsize{\textbf{#1} % +% \cleaders\copy0\hfill\ #2}\par} +% \def\item{---\kern0.2ex\relax} +% +% \version{1.0}{May 2024} +% \item initial release +% +% +% \end{multicols*} +% +% \fi +% +% +% \check@checksum +% +% +% \iffalse +%</package> +%<*user> +% +\documentclass[12pt]{article} +\usepackage[margin=72.27pt]{geometry} +\usepackage[factor=700,stretch=14,shrink=14,step=1]{microtype} +\usepackage{booktabs} +\usepackage{tabularx} +\usepackage{enumitem} +\setlist{topsep=\smallskipamount,itemsep=\smallskipamount, + parsep=0pt,partopsep=0pt} +\usepackage{shortvrb} +\MakeShortVerb{|} + +\begin{document} + +\def\documentname{User Guide} +\newdimen\MacroIndent +\input listparskip_heading.tex + + +\noindent Most \LaTeX\ users are familiar with the enumerate and itemize environments, and a number of other environments share the same underlying macros and structure. These list environments are useful and versatile, and they come up in many different situations where fine control over vertical spacing is important.\footnote{There is an overlap in terminology. The list environments described in this document are very different from horizontal and vertical lists in the \TeX\ language.} The dimensions |\topsep|, |\parsep|, |\partopsep|, and |\itemsep| control vertical spacing for list environments, and by default, \LaTeX\ determines the space immediately outside a list as follows: +\begin{itemize} +\item Always add |\topsep| before and after a list +\item Add |\parskip| (not |\parsep|) always before a list and usually after it\footnote{\TeX\ treats any text after a list as the start of a new paragraph, so if the next material to be typeset is text, \TeX\ adds \vrb\parskip\ after the list. If the user includes a box or rule instead of text, it does not trigger the start of a paragraph, and \TeX\ does not add \vrb\parskip.} +\item If a list begins outside of a paragraph, add |\partopsep| before and after the list +\end{itemize} +If |\parskip| is nonzero, for example in a formal letter, it is impossible to include a list inside a paragraph without the inter-paragraph space suggesting that the list forms its own paragraph. (Unless the user manually changes |\parskip| or adds negative vertical glue.) Similarly, \LaTeX\ chooses whether to add |\partopsep| after a list independently of what happens at that point in the source code. + +The \textsf{listparskip} package modifies this behavior by making the |\parskip| and |\partopsep| spacing depend more closely on paragraph structure from the source code. Under \textsf{listparskip} rules, the space around lists happens as follows: +\begin{itemize} +\item Always add |\topsep| before and after a list +\item If a list begins outside of a paragraph, add |\parskip| and |\partopsep| before the list +\item If a blank line comes immediately after the list in the source code, always add |\partopsep| and usually add |\parskip| +\end{itemize} +These changes happen automatically after loading the package, and they allow the user to control whether \TeX\ positions a list environment as its own paragraph or as part of the surrounding paragraph. When |\parskip| and |\partopsep| are both 0pt, this package does nothing, but for an example of what can happen when either dimension is positive, see |listparskip_example.pdf|, which is included with the \textsf{listparskip} installation and is available on \textsc{ctan}. Users can load \textsf{listparskip} with the standard |\usepackage{listparskip}| syntax, and the package has no options. + + + +\begin{figure}[t] +\centerline{\bfseries Table 1: Recommended Source Code to Insert after a List\strut} +\begin{tabularx}{\textwidth}{lXX}\toprule +Next Material to Typeset & No New Paragraph Desired & New Paragraph Desired \\\midrule +Text & Nothing & Blank line \\ +|\item| & Nothing & Nothing or blank line \\ +Box or Rule & |\nullline| & Blank line, then |\nullline| \\\bottomrule +\end{tabularx} +\end{figure} + +\begin{figure}[tb] +\centerline{\bfseries Table 2: Space after a List When Using \textsf{listparskip}\strut} +\begin{tabularx}{\textwidth}{XX}\toprule +Material after a List & Vertical Space Used in Addition to |\topsep|\\\midrule +Text* & None \\ +Box & Don't do this\textsuperscript\ddag \\ +|\item|*\textsuperscript\dag & $\vrb\parsep+\vrb\itemsep$ \\\midrule +Blank line, then text* & $\vrb\partopsep+\vrb\parskip$ \\ +Blank line, then box & Don't do this\textsuperscript\ddag \\ +Blank line, then |\item|*\textsuperscript\dag & + $\vrb\partopsep+\vrb\parsep+\vrb\itemsep$ \\\midrule +|\nullline|, then text & |\parskip| \\ +|\nullline|, then box* & None \\ +|\nullline|, then |\item|\textsuperscript\dag & + $\vrb\parsep+\vrb\itemsep$ \\\midrule +Blank line, then |\nullline|, then text & + $\vrb\partopsep+2\vrb\parskip$ \\ +Blank line, then |\nullline|, then box* & + $\vrb\partopsep+\vrb\parskip$ \\ +Blank line, then |\nullline|, then |\item|\textsuperscript\dag & + $\vrb\partopsep+2\vrb\parsep+\vrb\itemsep$ \\ +\bottomrule +\end{tabularx} +\smallskip +\vbox{\footnotesize\noindent\hskip 1.8em\llap{*}Recommended use. + +\noindent\hskip 1.8em\llap{\textsuperscript\dag}For \vrb\item\ in a nested list, the \vrb\parsep\ and \vrb\itemsep\ refer to the dimensions in the outer list, not the list that just ended. + +\noindent\hskip 1.8em\llap{\textsuperscript\ddag}With \textsf{listparskip}, putting a box after the end of a list environment without text or \vrb\nullline\ previously may mess up vertical spacing or paragraph indentation after the box depending on what comes next.} +\end{figure} + +Immediately after the end of a list environment, \textsf{listparskip} expects to see a some text, a blank line followed by text, or an |\item|. As a general rule, text means an extra |\topsep|, and a blank line followed by text leads to an extra $\vrb\topsep+\vrb\partopsep+\vrb\parskip$. If you want to put something else, such as a box or rule, after the end of a list environment, you should type |\nullline| before the other material to prevent any spacing mishaps. This macro instructs \TeX\ to behave like it just encountered a line of text except without adding any vertical space. Table~1 shows my recommendations for code to include after a list in various cases depending on the desired result, and Table~2 shows the full rules for what happens after a list with \textsf{listparskip} in various situations. For more information, see |listparskip_code.pdf|, which is included with the \textsf{listparskip} installation and is available on \textsc{ctan}. + + + + + +\end{document} +% +%</user> +%<*example> +% +% +\documentclass[12pt]{article} +\usepackage[margin=72.27pt]{geometry} +\usepackage[factor=700,stretch=14,shrink=14,step=1]{microtype} +\usepackage{lipsum} +\usepackage{multicol} +\usepackage{enumitem} +\setlist{parsep=0pt,partopsep=\medskipamount, + topsep=\smallskipamount,itemsep=\smallskipamount} +\usepackage{shortvrb} +\MakeShortVerb{|} +\parindent=0pt +\makeatletter +\begin{document} + +\def\documentname{Example} + +\newdimen\MacroIndent +\input listparskip_heading.tex +\baselineskip=14pt + +This document shows an example of \textsf{listparskip}. The left column uses standard \LaTeX\ spacing before and after the itemize and enumerate lists, and the right column shows the same text with \textsf{listparskip} spacing rules. Notice \textsf{listparskip} corrects the issues from the left column. +\begin{multicols*}{2} +\parskip\bigskipamount + +\lipsum[1][1] + +This paragraph has some bullet points in the middle of the paragraph. In this portion of the document, |\parskip| is set to |\bigskipamount|, and we see that +\begin{itemize} +\item \LaTeX\ inserts |\parskip| above the list +\item Even though there is no |\par| between the paragraph and the itemize environment in the source code +\item The same thing is true after the itemize +\item It's especially salient when |\topsep| and |\itemsep| are |\smallskipamount| +\end{itemize} +Currently |\partopsep| is |\medskipamount|, but when there is no |\par| immediately before a list, \LaTeX\ does not insert |\partopsep| before or after the list environment. \hbox{This is true} +\begin{enumerate} +\item Despite the use of |\parskip|; and +\item For the end of the list environment regardless of whether a |\par| follows the list, as is the case with this enumerate. +\end{enumerate} + +\lipsum[1][2] + +\vfill\nointerlineskip\null +\columnbreak + +\lipsum[1][1] + +This paragraph has some bullet points in the middle of the paragraph. In this portion of the document, |\parskip| is set to |\bigskipamount|, and we see that +\begin{itemize} +\vskip-\@outerparskip +\vskip\z@ +\item \LaTeX\ inserts |\parskip| above the list +\item Even though there is no |\par| between the paragraph and the itemize environment in the source code +\item The same thing is true after the itemize +\item It's especially salient when |\topsep| and |\itemsep| are |\smallskipamount| +\end{itemize} +\vskip-\parskip +Currently |\partopsep| is |\medskipamount|, but when there is no |\par| immediately before a list, \LaTeX\ does not insert |\partopsep| before or after the list environment. \hbox{This is true} +\begin{enumerate} +\vskip-\@outerparskip +\vskip\z@ +\item Despite the use of |\parskip|; and +\item For the end of the list environment regardless of whether a |\par| follows the list, as is the case with this enumerate. +\end{enumerate} +\vskip\partopsep + +\lipsum[1][2] + +\end{multicols*} + +\end{document} +% +% +%</example> +%<*heading> +% +% preliminaries +\csname count@\endcsname\catcode`\@ +\makeatletter +% date +\def\packageversion{1.0} +\def\packagedate{December 2024} +% spacing macros +\MacroIndent=1.3em +\baselineskip=\the\baselineskip plus 0.3pt minus 0.3pt\relax +% section redefinition +\let\@@section\section +\def\section{\@ifstar\star@sect\no@star@sect} +\def\star@sect#1{\sectionhook{#1}\@@section*{#1}} +\def\no@star@sect#1{\sectionhook{#1}\@@section{#1}} +% +\def\sectionhook#1{% + \ifdim\dimexpr\pagegoal-\pagetotal-3pt\relax<6\bigskipamount + \vfill\eject + \fi + \def\sectionname{#1}} +\let\sectionhook\@gobble +% header and footer (centered page number in the foot +% for first page only; otherwise at left or right of +% the header) +\def\@oddhead{% + \ifnum\count0>1\relax + \ifodd\c@page + \hfil + \llap{\the\count0}% + \else + \rlap{\the\count0}\hfil + \fi + \fi} +\def\@oddfoot{\hfil\ifnum\count0=1\relax1\fi\hfil} +% penalties +\pretolerance=-1 +\hyphenpenalty=20 +\exhyphenpenalty=15 +\brokenpenalty=0 +\clubpenalty=0 +\widowpenalty=0 +\finalhyphendemerits=500 +\doublehyphendemerits=2000 +% floats +\c@topnumber\@ne +\def\topfraction{1} +\def\bottomfraction{0.5} +\def\textfraction{0} +\def\floatpagefraction{0} +% macros +\def\h{\textsc h } +\def\v{\textsc v } +\def\smallskip{\vskip\smallskipamount} +\def\medskip{\vskip\medskipamount} +\def\bigskip{\vskip\bigskipamount} +% environment for code (would probably better to use +% trivlist) +\let\code\@undefined +\let\endcode\@undefined +\newenvironment{code} + {\strut\vadjust\bgroup\medskip\parindent\z@\leftskip=4em\relax + \noindent\strut\ignorespaces} + {\strut\par\medskip\egroup\hfill\break\strut\ignorespacesafterend} +\def\argtext#1{\ensuremath{\langle$\textit{#1}$\rangle}} +\def\vrb#1{\expandafter\texttt\expandafter{\string#1}} +\def\clap@math#1{\hb@xt@\z@{\hss$\displaystyle#1$\hss}} +% begin first-page heading +{\large +\parindent=0pt +\leftskip=0pt plus 1 fil +\rightskip=0pt plus 1fil +\parfillskip=0pt +{\strut\Large Package \textsf{listparskip} v.\ 1.0 \documentname}\par +\strut Conrad Kosowsky\par +\strut \packagedate\par +\strut\texttt{kosowsky.latex@gmail.com}\par} +% bigskip +\bigskip +% overview/abstract +{\small +\leftskip=0.5in +\rightskip=0.5in +\centerline{\bfseries Overview\strut} +\noindent The \textsf{listparskip} package modifies list environments such that they add |\parskip| and |\partopsep| before or after a list if and only if the environment follows or precedes, respectively, a blank line (i.e.\ a |\par|). +\par} +% bar between overview/abstract and text +\bigskip\bigskip\nointerlineskip +\centerline{\vrule height 0.5pt width 2.5in}\bigskip\bigskip +\nointerlineskip +% restore catcode +\catcode`\@\count@ +% +% +%</heading> +% \fi +% +% +\endinput
\ No newline at end of file diff --git a/macros/latex/contrib/listparskip/listparskip_code.pdf b/macros/latex/contrib/listparskip/listparskip_code.pdf Binary files differnew file mode 100644 index 0000000000..daf8cf3c95 --- /dev/null +++ b/macros/latex/contrib/listparskip/listparskip_code.pdf diff --git a/macros/latex/contrib/listparskip/listparskip_example.pdf b/macros/latex/contrib/listparskip/listparskip_example.pdf Binary files differnew file mode 100644 index 0000000000..9495c8006f --- /dev/null +++ b/macros/latex/contrib/listparskip/listparskip_example.pdf diff --git a/macros/latex/contrib/listparskip/listparskip_user_guide.pdf b/macros/latex/contrib/listparskip/listparskip_user_guide.pdf Binary files differnew file mode 100644 index 0000000000..fe08d98fa8 --- /dev/null +++ b/macros/latex/contrib/listparskip/listparskip_user_guide.pdf |