Created
January 16, 2019 23:06
-
-
Save jfbu/337a9dd1cb8dadebeb52564102db3894 to your computer and use it in GitHub Desktop.
parskip.sty v2.0a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% | |
%% 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] | |
\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'. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment