From 6d5c17e5612d0bdedd3bb20cca991f933490e144 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 12 Sep 2018 21:53:04 +0000 Subject: parskip (12sep18) git-svn-id: svn://tug.org/texlive/trunk@48650 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/parskip/parskip-2001-04-09.sty | 86 +++++++++ Master/texmf-dist/tex/latex/parskip/parskip.sty | 196 ++++++++++++--------- 2 files changed, 198 insertions(+), 84 deletions(-) create mode 100644 Master/texmf-dist/tex/latex/parskip/parskip-2001-04-09.sty (limited to 'Master/texmf-dist/tex/latex/parskip') diff --git a/Master/texmf-dist/tex/latex/parskip/parskip-2001-04-09.sty b/Master/texmf-dist/tex/latex/parskip/parskip-2001-04-09.sty new file mode 100644 index 00000000000..6148e4362ba --- /dev/null +++ b/Master/texmf-dist/tex/latex/parskip/parskip-2001-04-09.sty @@ -0,0 +1,86 @@ +% parskip.sty; last edited by Robin Fairbairns (rf10@cam.ac.uk), +% derived from: +% +% This is PARSKIP.STY by H.Partl, TU Wien, as of 19 Jan 1989. +% +% Package to be used with any document class at any size. +% It produces the following Paragraph Layout: +% Zero Parindent and non-zero Parskip. The stretchable glue in \parskip +% helps LaTeX in finding the best place for page breaks. +% +% This package is no more than quick fix; the `proper' way to achieve +% effects as far-reaching as this is to create a new class. An +% example class is to be found in the ntgclass set: artikel3.cls + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{parskip}[2001/04/09 non-zero parskip adjustments] + +\parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt +\parindent=\z@ + +% +% from a suggestion by Donald Arseneau on comp.text.tex: + +\DeclareOption{parfill}{\setlength{\parfillskip}{30\p@ \@plus 1fil}} +\ProcessOptions + +% To accompany this, the vertical spacing in the list environments is changed +% to use the same as \parskip in all relevant places (for normalsize only): +% \parsep = \parskip +% \itemsep = \z@ % add nothing to \parskip between items +% \topsep = \z@ % add nothing to \parskip before first item + +\def\@listI{\leftmargin\leftmargini + \topsep\z@ \parsep\parskip \itemsep\z@} +\let\@listi\@listI +\@listi + +\def\@listii{\leftmargin\leftmarginii + \labelwidth\leftmarginii\advance\labelwidth-\labelsep + \topsep\z@ \parsep\parskip \itemsep\z@} + +\def\@listiii{\leftmargin\leftmarginiii + \labelwidth\leftmarginiii\advance\labelwidth-\labelsep + \topsep\z@ \parsep\parskip \itemsep\z@} + +% and, now... +% \partopsep = \z@ % don't even add anything before first item (beyond +% % \parskip) even if the list is preceded by a blank line +\partopsep=\z@ + +% Note that listiv, listv and listvi don't change vertical parameters. + +% deal with a problem raised on comp.text.tex in april 2001 +% +% don't expand the table of contents any further +% +% first: check that the definition of \@starttoc is unchanged from +% that in latex.ltx +\@ifundefined{CheckCommand}{}{% + \CheckCommand*{\@starttoc}[1]{% + \begingroup + \makeatletter + \@input{\jobname.#1}% + \if@filesw + \expandafter\newwrite\csname tf@#1\endcsname + \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax + \fi + \@nobreakfalse + \endgroup}} +% +% now having generated any warning that might help, redefine +\renewcommand*{\@starttoc}[1]{% + \begingroup + \makeatletter + \parskip\z@ + \@input{\jobname.#1}% + \if@filesw + \expandafter\newwrite\csname tf@#1\endcsname + \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax + \fi + \@nobreakfalse + \endgroup +} + +\endinput + diff --git a/Master/texmf-dist/tex/latex/parskip/parskip.sty b/Master/texmf-dist/tex/latex/parskip/parskip.sty index c5ca5768349..0b5943d0747 100644 --- a/Master/texmf-dist/tex/latex/parskip/parskip.sty +++ b/Master/texmf-dist/tex/latex/parskip/parskip.sty @@ -1,87 +1,115 @@ -% parskip.sty; last edited by Robin Fairbairns (rf10@cam.ac.uk), -% derived from: -% -% This is PARSKIP.STY by H.Partl, TU Wien, as of 19 Jan 1989. -% -% Package to be used with any document class at any size. -% It produces the following Paragraph Layout: -% Zero Parindent and non-zero Parskip. The stretchable glue in \parskip -% helps LaTeX in finding the best place for page breaks. -% -% This package is no more than quick fix; the `proper' way to achieve -% effects as far-reaching as this is to create a new class. An -% example class is to be found in the ntgclass set: artikel3.cls +%% +%% This is file `parskip.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% parskip.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright 2018 Frank Mittelbach +%% +%% This file was generated from file(s) of the LaTeX `parskip Bundle'. +%% ------------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `parskip Bundle'. You may however distribute the `parskip Bundle' +%% without such generated files. +%% +%% The newest sources can be found below +%% +%% https://github.com/FrankMittelbach/fmitex/ +%% +%% where one can also log issues in case there are any. +%% +%% +%% File: parskip.dtx +%% (C) Copyright 1989 H.Partl, TU Wien +%% (C) Copyright 2001 Robin Fairbairns +%% (C) Copyright 2018 Frank Mittelbach +\NeedsTeXFormat{LaTeX2e}[2018-04-01] -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{parskip}[2001/04/09 non-zero parskip adjustments] - -\parskip=0.5\baselineskip \advance\parskip by 0pt plus 2pt -\parindent=\z@ - -% -% from a suggestion by Donald Arseneau on comp.text.tex: - -\DeclareOption{parfill}{\setlength{\parfillskip}{30\p@ \@plus 1fil}} -\ProcessOptions - -% To accompany this, the vertical spacing in the list environments is changed -% to use the same as \parskip in all relevant places (for normalsize only): -% \parsep = \parskip -% \itemsep = \z@ % add nothing to \parskip between items -% \topsep = \z@ % add nothing to \parskip before first item - -\def\@listI{\leftmargin\leftmargini - \topsep\z@ \parsep\parskip \itemsep\z@} -\let\@listi\@listI -\@listi - -\def\@listii{\leftmargin\leftmarginii - \labelwidth\leftmarginii\advance\labelwidth-\labelsep - \topsep\z@ \parsep\parskip \itemsep\z@} - -\def\@listiii{\leftmargin\leftmarginiii - \labelwidth\leftmarginiii\advance\labelwidth-\labelsep - \topsep\z@ \parsep\parskip \itemsep\z@} - -% and, now... -% \partopsep = \z@ % don't even add anything before first item (beyond -% % \parskip) even if the list is preceded by a blank line -\partopsep=\z@ - -% Note that listiv, listv and listvi don't change vertical parameters. - -% deal with a problem raised on comp.text.tex in april 2001 -% -% don't expand the table of contents any further -% -% first: check that the definition of \@starttoc is unchanged from -% that in latex.ltx -\@ifundefined{CheckCommand}{}{% - \CheckCommand*{\@starttoc}[1]{% - \begingroup - \makeatletter - \@input{\jobname.#1}% - \if@filesw - \expandafter\newwrite\csname tf@#1\endcsname - \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax - \fi - \@nobreakfalse - \endgroup}} -% -% now having generated any warning that might help, redefine -\renewcommand*{\@starttoc}[1]{% - \begingroup - \makeatletter - \parskip\z@ - \@input{\jobname.#1}% - \if@filesw - \expandafter\newwrite\csname tf@#1\endcsname - \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax - \fi - \@nobreakfalse - \endgroup -} +\DeclareRelease {v1}{2001-04-09}{parskip-2001-04-09.sty} +\DeclareCurrentRelease{v2}{2018-08-24} +\ProvidesPackage{parskip}[2018-08-24 v2.0a non-zero parskip adjustments] +\RequirePackage{kvoptions} +\SetupKeyvalOptions{family=parskip,prefix=parskip@} +\DeclareStringOption[0pt]{indent}[\parindent] +\DeclareStringOption[0pt]{parfill}[30pt] +\DeclareStringOption{skip} +\ProcessKeyvalOptions* +\ifx\parskip@skip\@empty + \parskip.5\baselineskip + \advance\parskip 0pt plus 2pt\relax +\else + \parskip\parskip@skip\relax +\fi +\parfillskip \parskip@parfill\relax +\advance\parfillskip 0pt plus 1fil\relax +\parindent\parskip@indent\relax +\RequirePackage{etoolbox} +\ifdim \parskip > 0pt + \def\@listI{\leftmargin\leftmargini + \topsep\z@ \parsep\parskip \itemsep\z@} + \let\@listi\@listI + \@listi + \def\@listii{\leftmargin\leftmarginii + \labelwidth\leftmarginii\advance\labelwidth-\labelsep + \topsep\z@ \parsep\parskip \itemsep\z@} + \def\@listiii{\leftmargin\leftmarginiii + \labelwidth\leftmarginiii\advance\labelwidth-\labelsep + \topsep\z@ \parsep\parskip \itemsep\z@} + \partopsep=\z@ +\fi +\patchcmd\@starttoc + {\begingroup \makeatletter} + {\begingroup \makeatletter \parskip\z@} + {}{\typeout{Couldn't patch \string\@starttoc}} +\patchcmd\@startsection + {\addvspace\@tempskipa} + {\advance\@tempskipa-\parskip\addvspace\@tempskipa} + {}{\typeout{Couldn't patch \string\@startsection}} +\patchcmd\@xsect + {\vskip\@tempskipa} + {\advance\@tempskipa-\parskip\vskip\@tempskipa} + {}{\typeout{Couldn't patch \string\@xsect}} +\AtBeginDocument{% +\ifx\ttl@straight@ii\@undefined\else % titlesec got loaded +\patchcmd\ttl@straight@ii + {\addvspace{\@tempskipa}}% + {\advance\@tempskipa-\parskip \addvspace\@tempskipa}% + {}{\typeout{Couldn't patch \string\ttl@straight@ii}}% +\patchcmd\ttl@straight@ii + {\vspace{\@tempskipb}}% + {\advance\@tempskipb-\parskip \vspace\@tempskipb}% + {}{\typeout{Couldn't patch \string\ttl@straight@ii}}% +\patchcmd\ttl@part@ii + {\vspace*{\@tempskipa}}% + {\advance\@tempskipa-\parskip \vspace*\@tempskipa}% + {}{\typeout{Couldn't patch \string\ttl@part@ii}}% +\patchcmd\ttl@part@ii + {\vspace{\@tempskipb}}% + {\advance\@tempskipb-\parskip \vspace\@tempskipb}% + {}{\typeout{Couldn't patch \string\ttl@part@ii}}% +\patchcmd\ttl@page@ii + {\vspace*{\@tempskipa}}% + {\advance\@tempskipa-\parskip \vspace*\@tempskipa}% + {}{\typeout{Couldn't patch \string\ttl@page@ii}}% +\patchcmd\ttl@page@ii + {\vspace{\@tempskipb}}% + {\advance\@tempskipb-\parskip \vspace\@tempskipb}% + {}{\typeout{Couldn't patch \string\ttl@page@ii}}% +\fi} \endinput - - +%% +%% End of file `parskip.sty'. -- cgit v1.2.3