summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/ncctools/nccparskip.dtx
blob: dc340ce731e078e424fd4556dda66c94049da00c (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
% \iffalse
%%
%% File: nccparskip.dtx Copyright (C) 2002--2004 by Alexander I. Rozhenko
%%
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{nccparskip}
%<package>         [2004/12/08 v1.1 Parskip Control Package (NCC)]
%
% \changes{v1.01}{2002/01/09}{This version is uploaded to CTAN}
% \changes{v1.02}{2002/02/07}{The package is renamed to nccparskip}
% \changes{v1.1}{2004/12/08}{Documentation was prepared}
%
%<*driver>
\let\makeindex\relax
\documentclass{ltxdoc}
\usepackage{nccparskip}
\SetParskip{6pt plus 1pt minus .4pt}
\GetFileInfo{nccparskip.sty}
\begin{document}
\title{The \textsf{nccparskip} package\thanks{This file
        has version number \fileversion, last
        revised \filedate.}}
\author{Alexander I. Rozhenko\\rozhenko@oapmg.sscc.ru}
\date{\filedate}
\maketitle
\DocInput{nccparskip.dtx}
\end{document}
%</driver>
% \fi
%
% \DescribeMacro{\SetParskip}
% The package provides identical distance between all paragraphs except
% section markups. It redefines control list commands and suppress
% |\topskip|, |\partopskip|, and |\itemsep| in lists. As a result, the distance
% between ordinary paragraphs and paragraphs prepared by lists is the same.
% The command |\SetParskip|\marg{distance} controls this distance.
% The default distance is
% \begin{quote}
% |\SetParskip{4pt plus 1pt minus .2pt}|
% \end{quote}
% In this document, we use |\SetParskip{6pt plus 1pt minus .4pt}|.
% \StopEventually{}
%
% \section{The Implementation}
%
% \begin{macro}{\SetParskip}
% Define the command and set list skips to zero length.
%    \begin{macrocode}
%<*package>
\newcommand*{\SetParskip}[1]{\setlength{\parskip}{#1}\parsep\parskip}
\partopsep\z@
\topsep\z@
\itemsep\z@
%    \end{macrocode}
% \end{macro}
%
% We suppose that list definitions were done in the similar way as
% in standard \LaTeX\ classes. Redefine list control commands:
%    \begin{macrocode}
\def\@listi{\leftmargin\leftmargini}
\let\@listI\@listi
\def\@listii{\leftmargin\leftmarginii
  \labelwidth\leftmarginii \advance\labelwidth-\labelsep}
\def\@listiii{\leftmargin\leftmarginiii
  \labelwidth\leftmarginiii \advance\labelwidth-\labelsep}
%    \end{macrocode}
%
% Redefine the |\normalsize|, |\small|, and |\footnotesize|
% commands to avoid the |\@listi| redefinition in them.
%    \begin{macrocode}
\let\NCC@normalsize\normalsize
\def\normalsize{\let\NCC@temp\@listi\NCC@normalsize\let\@listi\NCC@temp}
\let\NCC@small\small
\def\small{\let\NCC@temp\@listi\NCC@small\let\@listi\NCC@temp}
\let\NCC@footnotesize\footnotesize
\def\footnotesize{\let\NCC@temp\@listi\NCC@footnotesize\let\@listi\NCC@temp}
%    \end{macrocode}
%
% Finally we set defaults:
%    \begin{macrocode}
\normalsize
\SetParskip{4pt plus 1pt minus .2pt}
%</package>
%    \end{macrocode}
\endinput