| 1 |
% \iffalse |
| 2 |
%% |
| 3 |
%% File: nccparskip.dtx Copyright (C) 2002--2004 by Alexander I. Rozhenko |
| 4 |
%% |
| 5 |
%<package>\NeedsTeXFormat{LaTeX2e} |
| 6 |
%<package>\ProvidesPackage{nccparskip} |
| 7 |
%<package> [2004/12/08 v1.1 Parskip Control Package (NCC)] |
| 8 |
% |
| 9 |
% \changes{v1.01}{2002/01/09}{This version is uploaded to CTAN} |
| 10 |
% \changes{v1.02}{2002/02/07}{The package is renamed to nccparskip} |
| 11 |
% \changes{v1.1}{2004/12/08}{Documentation was prepared} |
| 12 |
% |
| 13 |
%<*driver> |
| 14 |
\let\makeindex\relax |
| 15 |
\documentclass{ltxdoc} |
| 16 |
\usepackage{nccparskip} |
| 17 |
\SetParskip{6pt plus 1pt minus .4pt} |
| 18 |
\GetFileInfo{nccparskip.sty} |
| 19 |
\begin{document} |
| 20 |
\title{The \textsf{nccparskip} package\thanks{This file |
| 21 |
has version number \fileversion, last |
| 22 |
revised \filedate.}} |
| 23 |
\author{Alexander I. Rozhenko\\[email protected]} |
| 24 |
\date{\filedate} |
| 25 |
\maketitle |
| 26 |
\DocInput{nccparskip.dtx} |
| 27 |
\end{document} |
| 28 |
%</driver> |
| 29 |
% \fi |
| 30 |
% |
| 31 |
% \DescribeMacro{\SetParskip} |
| 32 |
% The package provides identical distance between all paragraphs except |
| 33 |
% section markups. It redefines control list commands and suppress |
| 34 |
% |\topskip|, |\partopskip|, and |\itemsep| in lists. As a result, the distance |
| 35 |
% between ordinary paragraphs and paragraphs prepared by lists is the same. |
| 36 |
% The command |\SetParskip|\marg{distance} controls this distance. |
| 37 |
% The default distance is |
| 38 |
% \begin{quote} |
| 39 |
% |\SetParskip{4pt plus 1pt minus .2pt}| |
| 40 |
% \end{quote} |
| 41 |
% In this document, we use |\SetParskip{6pt plus 1pt minus .4pt}|. |
| 42 |
% \StopEventually{} |
| 43 |
% |
| 44 |
% \section{The Implementation} |
| 45 |
% |
| 46 |
% \begin{macro}{\SetParskip} |
| 47 |
% Define the command and set list skips to zero length. |
| 48 |
% \begin{macrocode} |
| 49 |
%<*package> |
| 50 |
\newcommand*{\SetParskip}[1]{\setlength{\parskip}{#1}\parsep\parskip} |
| 51 |
\partopsep\z@ |
| 52 |
\topsep\z@ |
| 53 |
\itemsep\z@ |
| 54 |
% \end{macrocode} |
| 55 |
% \end{macro} |
| 56 |
% |
| 57 |
% We suppose that list definitions were done in the similar way as |
| 58 |
% in standard \LaTeX\ classes. Redefine list control commands: |
| 59 |
% \begin{macrocode} |
| 60 |
\def\@listi{\leftmargin\leftmargini} |
| 61 |
\let\@listI\@listi |
| 62 |
\def\@listii{\leftmargin\leftmarginii |
| 63 |
\labelwidth\leftmarginii \advance\labelwidth-\labelsep} |
| 64 |
\def\@listiii{\leftmargin\leftmarginiii |
| 65 |
\labelwidth\leftmarginiii \advance\labelwidth-\labelsep} |
| 66 |
% \end{macrocode} |
| 67 |
% |
| 68 |
% Redefine the |\normalsize|, |\small|, and |\footnotesize| |
| 69 |
% commands to avoid the |\@listi| redefinition in them. |
| 70 |
% \begin{macrocode} |
| 71 |
\let\NCC@normalsize\normalsize |
| 72 |
\def\normalsize{\let\NCC@temp\@listi\NCC@normalsize\let\@listi\NCC@temp} |
| 73 |
\let\NCC@small\small |
| 74 |
\def\small{\let\NCC@temp\@listi\NCC@small\let\@listi\NCC@temp} |
| 75 |
\let\NCC@footnotesize\footnotesize |
| 76 |
\def\footnotesize{\let\NCC@temp\@listi\NCC@footnotesize\let\@listi\NCC@temp} |
| 77 |
% \end{macrocode} |
| 78 |
% |
| 79 |
% Finally we set defaults: |
| 80 |
% \begin{macrocode} |
| 81 |
\normalsize |
| 82 |
\SetParskip{4pt plus 1pt minus .2pt} |
| 83 |
%</package> |
| 84 |
% \end{macrocode} |
| 85 |
\endinput |