summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/parskip/parskip.sty
blob: 71b0946079e5fb6d0edf240f9ff9ddb00453289c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
%%
%% 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-2020 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 2008 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-2020 Frank Mittelbach
\NeedsTeXFormat{LaTeX2e}[2018-04-01]

\DeclareRelease       {v1}{2001-04-09}{parskip-2001-04-09.sty}
\DeclareCurrentRelease{v2}{2018-08-24}
\ProvidesPackage{parskip}[2020-06-15 v2.0f non-zero parskip adjustments]
\RequirePackage{kvoptions}
\SetupKeyvalOptions{family=parskip,prefix=parskip@}
\DeclareStringOption[0pt]{indent}[\parindent]
\DeclareStringOption[0pt]{parfill}[30pt]
\DeclareStringOption{skip}[]
\DeclareStringOption[0pt]{tocskip}[\parskip]
\ProcessKeyvalOptions*
\ifx\parskip@skip\@empty
  \parskip=.5\baselineskip plus 2pt\relax
\else
  \setlength\parskip\parskip@skip
\fi
\setlength\parfillskip\parskip@parfill
\advance\parfillskip 0pt plus 1fil\relax
\setlength\parindent\parskip@indent
\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
      \skip@\lastskip
      \advance\skip@\parskip
      \vskip-\lastskip
      \vskip\skip@
      \parskip\parskip@tocskip}
    {}{\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}
\AtBeginDocument{%
\ifx\deferred@thm@head\@undefined\else  % amsthm got loaded
\patchcmd\deferred@thm@head
  {\addvspace{-\parskip}}{}%
  {}{\typeout{Couldn't patch \string\deferred@thm@head!}}%
\fi}

\endinput
%%
%% End of file `parskip.sty'.