Received: by nummer-3.proteosys id <01C19442.D47DB7C4@nummer-3.proteosys>; Thu, 3 Jan 2002 11:38:49 +0100 MIME-Version: 1.0 x-vm-v5-data: ([nil nil nil nil nil nil nil t nil][nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil]) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C19442.D47DB7C4" X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message Subject: \parskip Date: Mon, 8 Oct 1990 16:20:32 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: Sender: "LaTeX-L Mailing list" To: "Rainer Schoepf" Reply-To: "LaTeX-L Mailing list" Status: R X-Status: X-Keywords: X-UID: 236 This is a multi-part message in MIME format. ------_=_NextPart_001_01C19442.D47DB7C4 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Here is the \parskip article. This has a bit more substance than the indentation bit. I can think of more uses for \everypar, by the way, but that's for a future article, not written yet. --------------------------------------- \documentstyle[ltugboat]{article} \chardef\busje=3D`\\ \newcommand{\cs}[1]{{\tt\busje#1}} \newcommand{\whiteline}{\medskip\noindent} \frenchspacing %\hyphenchar\tentt=3D`\- \begin{document} \title{A parskip scheme} \author{Victor Eijkhout} \address{Department of Mathematics\\ University of Nijmegen\\ Toernooiveld 1\\ 6525 ED Nijmegen, The Netherlands} \netaddress[\network{Bitnet}]{u641001@HNYKUN11} \maketitle \noindent While I~was working on the \LaTeX\ styles described in~\cite{BEP}, it became apparent to me that lots of people are rather fond of the sort of layout that can be described as \begin{verbatim} \parindent=3D0cm \parskip=3D6pt % or other positive size \end{verbatim} Unfortunately, most of them realize this layout by no more sophisticated means than simply inserting these two lines at the beginning of the input. The drawback of such a simple action is that all sorts of vertical spaces are augmented by the \cs{parskip} when there is absolutely no need to, or where it is positively unwanted. Examples of this are the white space below section headings, and the white space above and below list environments in \LaTeX. In this article I~will present an approach that unifies the paragraph skip and the white spaces surrounding various environments. Since the macros given below make use of the \cs{everypar} token list, this article may be seen as a sequel to an earlier paper on an indentation scheme~\cite{E}, which is based on a similar principle. The \cs{everypar} parameter was explained there. \section{\cs{parskip}} \TeX\ starts a paragraph when it switches from vertical to horizontal mode. The vertical mode may have been initiated by a \cs{par} (for instance because of an empty line after a preceding paragraph) or by a vertical skip command; the switch to horizontal mode can be effected by, for example, a character or a horizontal skip command (see the list in~\cite[p.~283]{DeK}). Immediately above the first line of the paragraph \TeX\ will then add glue of size \cs{parskip} to the vertical list\footnote{Unless this paragraph is at the start of a vertical list, for instance at the start of a vertical box or insertion item.}. Apparently, then, the \cs{parskip} parameter is very simple to use. That this is only an apparent simplicity becomes clear in a number of instances. For instance, unless precautions are taken, the white space below headings is augmented by the paragraph skip. Precautions against this are not particularly elegant: the easiest solution is to include a \begin{verbatim}\vskip-\parskip\end{verbatim} statement, to backspace the paragraph skip in advance. Such an approach, however, is somewhat error-prone. Vertical spacing will be messed up if what follows is not a paragraph, but a display formula or a box. Similar considerations apply to the amounts of white space that surround, for example, list environments, as in \LaTeX. \section{Paragraph skip: to be or not to be} (This section is something of a footnote to the rest of the article. Readers who are not interested in layout consideration may skip the rest of it.) Ordinarily in plain \TeX\ and in \LaTeX\ the paragraph skip is set to {\tt 0pt plus 1pt}, which gives pages some `last resort' stretchability. However, even an amount of vertical space as small as one point may become very visible, and often without need (see for instance the first page of the preface of~\cite{DeK}). Furthermore, Stanley Morison states that not indenting paragraphs is `decidedly an abject method'~\cite{M}. However, reading his intention instead of his words, he is only concerned with the recognizability of the individual paragraphs. The positive value of the paragraph skip is sufficient to ensure this. If a layout is based on zero values for both \cs{parindent} and \cs{parskip}, one may for instance give the \cs{parfillskip} a positive natural width to prevent last lines of a paragraph from almost, or completely, lining up with the right margin. Neither Donald Knuth nor Leslie Lamport seem to have given much thought to the case where the paragraph skip has a positive natural width. Leslie Lamport dismisses all potential difficulties with the remark that `it is customary not to leave any extra space between paragraphs'~\cite[p.~94]{LL}. \section{Environments and white lines} Given that the paragraph skip appears to interact with explicit vertical spacing in user macros, it may seem like a good idea to find a unified approach to both. In the rest of this article I~will describe the implementation of the following basic idea: {\em give the paragraph skip the value zero whenever you do an explicit vertical skip}. For the presentation I~assume a context with some form of environments. These are the assumptions that I~make about such environments: \begin{itemize} \item An environment is a portion of material that is vertically separated from whatever is before and after it. Thus, according to this definition, a portion of a paragraph cannot be an environment, nor can an environment start or end in the middle of a paragraph. \item An environment has associated with it three glue parameters: to an environment {\tt foo} correspond \cs{fooStartskip} (glue above the environment), \cs{fooParskip} (the paragraph skip inside the environment), and the \cs{fooEndskip} (glue below the environment). \item At the outset of the environment a \begin{verbatim}\StartEnvironment{foo}\end{verbatim} statement is executed; at the end of the environment a macro \begin{verbatim}\EndEnvironment{foo}\end{verbatim} is executed. These statements are assumed to contain a \cs{begingroup} and \cs{endgroup} respectively.\end{itemize} Such assumptions are sufficiently general for the macros below to be adaptable to existing macro packages. At first sight it would appear as if section headings are not covered by the above points. However, there is no argument against the start and end of an environment occurring in the same macro. \section{Tools} First I will present two auxiliary macros: \cs{csarg} and \cs{vspace}. The command \cs{csarg} is only needed inside other macros; it is meant to enable constructs such as \begin{verbatim}\csarg\vskip{#1Parskip}\end{verbatim} Its definition is \begin{verbatim} \def\csarg#1#2{\expandafter #1\csname#2\endcsname} \end{verbatim} By way of explanation of this macro, consider a simple example. Let us assume that there exists a macro \begin{verbatim} \def\startlist#1{ ... \csarg\vskip{#1Startskip} ...} \end{verbatim} The call \begin{verbatim}\startlist{enumerate}\end{verbatim} will then lead to the following call to \cs{csarg}: \begin{verbatim}\csarg\vskip{enumerateStartskip}\end{verbatim} This expands to \begin{verbatim} \expandafter\vskip \csname enumerateStartskip\endcsname\end{verbatim} Now the \cs{expandafter} forces \cs{csname} to be executed before the \cs{vskip}, so the next step of the expansion looks like \begin{verbatim}\vskip\enumerateStartskip\end{verbatim} and this statement can simply be executed. Next I~need a generalization of \cs{vskip}, which I~will call = \cs{vspace}: a number of calls to \cs{vspace} should have the effect that only the maximum argument is placed. \begin{verbatim} \newskip\tempskipa \def\vspace #1{\tempskipa=3D#1\relax \ifvmode \ifdim\tempskipa<\lastskip \else \vskip-\lastskip \vskip\tempskipa \fi \else \vskip\tempskipa \fi} \end{verbatim} This may need some explanation too. First, by the assignment \begin{verbatim}\tempskipa=3D#1 \end{verbatim} I~allow the argument of \cs{vspace} to be both a control sequence, for instance \cs{parskip}, and a denotation, for instance {\tt 5pt plus 3pt}. If one omits the assignment, the latter option would cause trouble in the \cs{ifdim} test. The decision to keep the maximum value of the skip, instead of always replacing the last skip, was motivated by phenomena such as a display formula at the end of a list. If the skip below the display is larger than the vertical glue below the list (which may for instance be zero), the former should be retained entirely. Note that this macro can insert vertical space of size zero. This will for instance happen if it follows a \cs{par} command at the end of a paragraph. It is then called in vertical mode, but the last item on the vertical list is a box (the last line of the paragraph) instead of a glue item. The parameter \cs{lastskip} will then be zero. \section{The environment macros} In this section, I~will give the implementation of the macros \cs{StartEnvironment} and \cs{EndEnvironment}. There is a remarkable similarity between these two macros. As I explained above, the basic idea is to have only explicit spacing above and below the environment; thus, the value of \cs{parskip} should then be zero both for the first paragraph in the environment, and for the first paragraph that follows it. Both macros should then \begin{itemize} \item save the current value of the paragraph skip; \item set the paragraph skip to zero; \item give \TeX\ a signal that, somewhere in the near future, the old value of \cs{parskip} is to be restored. \end{itemize} For this I~allocate a skip register and a conditional: \begin{verbatim} \newskip\TempParskip \newif\ifParskipNeedsRestoring \end{verbatim} The basic sequence for both macros is then \begin{verbatim} \TempParskip=3D\parskip \parskip=3D0cm\relax \ParskipNeedsRestoringtrue \end{verbatim} For both macros, however, this sequence needs to be refined slightly. The paragraph skip to be `restored' at the start of the environment is the specific value associated with that environment. This gives us: \begin{verbatim} \def\StartEnvironment #1{\csarg\vspace{#1Startskip} \begingroup %% make changes local \csarg\TempParskip{#1Parskip} \parskip=3D0cm\relax \ParskipNeedsRestoringtrue} \end{verbatim} Note that the statement \begin{verbatim} \csarg\TempParskip{#1parskip} \end{verbatim} denotes an assignment (without an optional equals sign) here. At the end of the environment we have to be more careful. It may be the case that the environment being ended was inside another environment, and occurred before the first paragraph inside that environment. In that case the value of \cs{parskip} is zero, and the proper value must still be restored. Therefore, no further actions are required. We arrive at the following implementation: \begin{verbatim} \def\EndEnvironment #1{\csarg\vspace{#1Endskip} \endgroup %% restore global values \ifParskipNeedsRestoring \else \TempParskip=3D\parskip \parskip=3D0cm\relax \ParskipNeedsRestoringtrue \fi} \end{verbatim} Note that both macros start with a vertical skip. This prevents the \cs{begingroup} and \cs{endgroup} statements from occurring in a paragraph. On a side note: since these macros are executed in vertical mode, I~have not bothered to terminate any lines with comment signs. Any spaces generated by these macros are ignored in vertical mode. \section{Paragraph skip restoring} So far, I~have ignored one important question: how exactly is restoring the paragraph skip implemented. For this I~use the \cs{everypar} token list. Basically then, the idea is the same as in~\cite{E}: the occurrence of a paragraph will automatically have \TeX\ perform, through the insertion of the \cs{everypar} tokens, the actions necessary for subsequent paragraphs. \begin{verbatim} \everypar=3D {\ControlledIndentation %see Tugboat 11, #3 \ControlledParskip} \def\ControlledParskip {\ifParskipNeedsRestoring \parskip=3D\TempParskip \ParskipNeedsRestoringfalse \fi} \end{verbatim} The cost of a controlled paragraph skip is then one conditional per paragraph. Conceivably, this cost could even be reduced further (to almost zero) by defining \begin{verbatim} \def\CPS % Controlled Parskip {\ifParskipNeedsRestoring \parskip=3D\TempParskip \ParskipNeedsRestoringfalse \let\ControlledParskip=3D\relax \fi} \end{verbatim} and including a statement \begin{verbatim}\let\ControlledParskip=3D\CPS\end{verbatim} in both the \cs{StartEnvironment} and \cs{EndEnvironment} macros, and at the start of the job (for instance by including it in the macro package). This approach, however, does not particularly appeal to me. Too much `pushing the bit around'. \section{Conclusion} The \cs{parskip} parameter is arguably the most tricky parameter of \TeX. Its workings are very easy to describe, but in actual practice difficulties arise. In this article I~have described how treatment of the paragraph skip can be integrated with the glue above and below environments. As in an earlier article on indentation, I~use for this the \cs{everypar} parameter as an essential tool. \begingroup %\parskip=3D6pt plus 3pt \parindent=3D0pt \begin{thebibliography}9 \bibitem{BEP}J. Braams, V.~Eijkhout, N.A.F.M.~Poppelier, The development of national \LaTeX\ styles, TUGboat vol.~10 (1989) \#3, pp.~401--406. \bibitem{E}Victor Eijkhout, An indentation scheme, TUGboat vol.~11 (1990) \#4. \bibitem{DeK}Donald Knuth, The \TeX\ book, Addison-Wesley Publishing Company, 1984. %Donald Knuth, \TB, 1984. \bibitem{M} Stanley Morison, First principles of typography, Cambridge University Press, 1936. \bibitem{LL} Leslie Lamport, \LaTeX, a document preparation system, Addison-Wesley Publishing Company, 1986. \end{thebibliography}\endgroup \makesignature \end{document} ------------------------------------------------ Victor Eijkhout phone: +1 217 244-0047 Center for Supercomputing Research and Development University of Illinois at Urbana-Champaign 305 Talbot laboratory 104 South Wright street Urbana, Illinois 61801-2932, USA home: 2503 W. Springfield Av, Apt. K-4, Champaign 61821, USA ------_=_NextPart_001_01C19442.D47DB7C4 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable \parskip

Here is the \parskip article. This has a bit = more
substance than the indentation bit.

I can think of more uses for \everypar, by the way, = but
that's for a future article, not written yet.

---------------------------------------
\documentstyle[ltugboat]{article}

\chardef\busje=3D`\\
\newcommand{\cs}[1]{{\tt\busje#1}}
\newcommand{\whiteline}{\medskip\noindent}
\frenchspacing
%\hyphenchar\tentt=3D`\-

\begin{document}

\title{A parskip scheme}
\author{Victor Eijkhout}
\address{Department of Mathematics\\
        University = of Nijmegen\\
        = Toernooiveld 1\\
        6525 ED = Nijmegen, The Netherlands}
\netaddress[\network{Bitnet}]{u641001@HNYKUN11}
\maketitle

\noindent
While I~was working on the \LaTeX\ styles described = in~\cite{BEP},
it became apparent to me that lots of people are = rather fond of
the sort of layout
that can be described as
\begin{verbatim}
\parindent=3D0cm
\parskip=3D6pt % or other positive size
\end{verbatim}
Unfortunately, most of them realize this layout by no = more sophisticated
means than simply inserting these two lines at the = beginning
of the input. The drawback of such a simple action = is
that all sorts of vertical spaces are augmented by = the
\cs{parskip} when there is absolutely no need = to,
or where it is positively unwanted. Examples of = this
are the white space below section headings,
and the white space above and
below list environments in \LaTeX.

In this article I~will present an approach that = unifies the
paragraph skip and the
white spaces surrounding various environments.
Since the macros given below make use of the = \cs{everypar}
token list, this article may be seen as a sequel = to
an earlier paper on an indentation = scheme~\cite{E},
which is based on a similar principle.
The \cs{everypar} parameter was explained = there.

\section{\cs{parskip}}

\TeX\ starts a paragraph when it switches from
vertical to horizontal mode. The vertical mode
may have been initiated by a \cs{par} (for = instance
because of an empty line after a preceding = paragraph)
or by a vertical skip command; the switch to = horizontal
mode can be effected by, for example, a = character
or a horizontal skip command (see the list = in~\cite[p.~283]{DeK}).
Immediately above the first line of the = paragraph
\TeX\ will then add glue
of size \cs{parskip}
to the vertical list\footnote{Unless this paragraph = is
at the start of a vertical list, for instance at = the
start of a vertical box or insertion item.}.

Apparently, then, the \cs{parskip} parameter is = very
simple to use. That this is only an apparent
simplicity becomes  clear in a number of = instances.

For instance, unless precautions are taken, the = white
space below headings is augmented by the paragraph = skip.
Precautions against this are not particularly = elegant:
the easiest solution is to include a
\begin{verbatim}\vskip-\parskip\end{verbatim}
statement, to backspace the paragraph skip in = advance.
Such an approach, however, is somewhat = error-prone.
Vertical spacing  will be messed up if what = follows is not
a paragraph, but a display formula or a box.

Similar considerations apply to the amounts of white = space
that surround, for example, list environments, as in = \LaTeX.

\section{Paragraph skip: to be or not to be}

(This section is something of a footnote to the = rest
of the article. Readers who are not interested in = layout consideration
may skip the rest of it.)

Ordinarily in plain \TeX\ and in \LaTeX\ the = paragraph
skip is set to {\tt 0pt plus 1pt}, which gives pages = some
`last resort' stretchability. However, even an amount = of vertical
space as small as one point may become very
visible, and often without need (see for = instance
the first page of the preface of~\cite{DeK}).

Furthermore, Stanley Morison states that not = indenting
paragraphs is `decidedly an abject = method'~\cite{M}.
However, reading his intention instead of his = words,
he is only concerned with the recognizability of the = individual
paragraphs. The positive value of the paragraph skip = is sufficient
to ensure this. If a layout is based on zero values = for
both \cs{parindent} and \cs{parskip}, one may for = instance
give the \cs{parfillskip} a positive natural = width
to prevent last lines of a paragraph from almost, or = completely,
lining up with the right margin.

Neither Donald Knuth nor Leslie Lamport
seem to have given much thought to
the case where the paragraph skip has a positive = natural width.
Leslie Lamport dismisses all potential difficulties = with the remark
that `it is customary not to leave any extra = space
between paragraphs'~\cite[p.~94]{LL}.

\section{Environments and white lines}

Given that the paragraph skip appears to interact = with
explicit vertical spacing in user macros, it may = seem
like a good idea to find a unified approach to = both.
In the rest of this article I~will describe the = implementation
of the following basic idea: {\em give the paragraph = skip
the value zero whenever you do an explicit vertical = skip}.

For the presentation  I~assume a context = with  some form of
environments. These are the assumptions that = I~make
about such environments:
\begin{itemize}
\item An environment is a portion of material that is = vertically
separated from whatever is before and after it. Thus, = according to
this definition, a portion of a paragraph cannot be = an environment,
nor can an environment start or end in the middle of = a paragraph.
\item An environment has associated with it three = glue parameters:
to an environment {\tt foo} correspond = \cs{fooStartskip} (glue
above the environment), \cs{fooParskip} (the = paragraph skip
inside the environment), and the \cs{fooEndskip} = (glue below
the environment). \item At the outset of the = environment
a = \begin{verbatim}\StartEnvironment{foo}\end{verbatim} statement
is executed; at the end of the environment a = macro
\begin{verbatim}\EndEnvironment{foo}\end{verbatim} is = executed.
These statements are assumed to
contain a \cs{begingroup} and \cs{endgroup}
respectively.\end{itemize}
Such assumptions are sufficiently general for the = macros
below to be adaptable to existing macro = packages.
At first sight it would appear as if section = headings
are not covered by the above points. However, = there
is no argument against the start and end of an = environment
occurring in the same macro.

\section{Tools}

First I will present two auxiliary macros: = \cs{csarg}
and \cs{vspace}.

The command \cs{csarg}
is only needed inside other macros; it is meant = to
enable constructs such as
\begin{verbatim}\csarg\vskip{#1Parskip}\end{verbatim}
Its definition is
\begin{verbatim}
\def\csarg#1#2{\expandafter
    #1\csname#2\endcsname}
\end{verbatim}
By way of explanation of this macro, consider a = simple example.
Let us assume that there exists a macro
\begin{verbatim}
\def\startlist#1{ ...
    \csarg\vskip{#1Startskip}
    ...}
\end{verbatim}
The call = \begin{verbatim}\startlist{enumerate}\end{verbatim}
will then lead to the following call to = \cs{csarg}:
\begin{verbatim}\csarg\vskip{enumerateStartskip}\end{verbatim}
This expands to
\begin{verbatim}
\expandafter\vskip
 \csname = enumerateStartskip\endcsname\end{verbatim}
Now the \cs{expandafter} forces \cs{csname} to be = executed
before the \cs{vskip}, so the next step of the = expansion
looks like
\begin{verbatim}\vskip\enumerateStartskip\end{verbatim}
and this statement can simply be executed.

Next I~need a generalization of \cs{vskip}, which = I~will call \cs{vspace}:
a number of calls to \cs{vspace} should have the = effect
that only the maximum argument is placed.
\begin{verbatim}
\newskip\tempskipa
\def\vspace
 #1{\tempskipa=3D#1\relax
    \ifvmode = \ifdim\tempskipa<\lastskip
        \else = \vskip-\lastskip \vskip\tempskipa
        \fi
    \else \vskip\tempskipa \fi}
\end{verbatim}
This may need some explanation too. First, by the = assignment
\begin{verbatim}\tempskipa=3D#1
\end{verbatim} I~allow the argument of \cs{vspace} to = be
both a control sequence, for instance = \cs{parskip},
and a denotation, for instance {\tt 5pt plus = 3pt}.
If one omits the assignment, the latter option would = cause trouble
in the \cs{ifdim} test.

The decision to keep the maximum value of the skip, = instead of
always replacing the last skip, was motivated by = phenomena
such as a display formula at the end of a list. If = the
skip below the display is larger than the vertical = glue
below the list (which may for instance be = zero),
the former should be retained entirely.

Note that this macro can insert vertical space of = size
zero. This will for instance happen if it = follows
a \cs{par} command at the end of a paragraph.
It is then called in vertical mode,
but the last item on the vertical list is a = box
(the last line of the paragraph) instead of a
glue item. The parameter \cs{lastskip} will then be = zero.

\section{The environment macros}

In this section, I~will give the implementation of = the
macros \cs{StartEnvironment} and = \cs{EndEnvironment}.

There is a remarkable similarity between these two = macros.
As I explained above, the basic idea is to have only = explicit
spacing above and below the environment; thus, the = value of \cs{parskip}
should then be zero both for the first paragraph in = the
environment, and for the first paragraph that follows = it.
Both macros should then
\begin{itemize}
   \item save the current value of the = paragraph skip;
   \item set the paragraph skip to = zero;
   \item give \TeX\ a signal that, = somewhere in the near
   future, the old value of \cs{parskip} is = to be restored.
\end{itemize}
For this I~allocate a skip register and a = conditional:
\begin{verbatim}
\newskip\TempParskip
\newif\ifParskipNeedsRestoring
\end{verbatim}
The basic sequence for both macros is then
\begin{verbatim}
\TempParskip=3D\parskip
\parskip=3D0cm\relax
\ParskipNeedsRestoringtrue
\end{verbatim}

For both macros, however, this sequence needs to = be
refined slightly.

The paragraph skip to be `restored' at the start of = the
environment is the specific value associated with = that
environment. This gives us:
\begin{verbatim}
\def\StartEnvironment
 #1{\csarg\vspace{#1Startskip}
    \begingroup %% make changes = local
    = \csarg\TempParskip{#1Parskip}
    \parskip=3D0cm\relax
    \ParskipNeedsRestoringtrue}
\end{verbatim}
Note that the statement
\begin{verbatim}
\csarg\TempParskip{#1parskip}
\end{verbatim}
denotes an assignment (without an optional equals = sign) here.

At the end of the environment we have to be more = careful.
It may be the case that
the environment being ended was inside another
environment, and occurred
before the first paragraph inside
that environment. In that case the value of = \cs{parskip} is zero,
and the proper value must still be restored.
Therefore, no further actions are required.
We arrive at the following implementation:
\begin{verbatim}
\def\EndEnvironment
 #1{\csarg\vspace{#1Endskip}
    \endgroup %% restore global = values
    \ifParskipNeedsRestoring
    \else = \TempParskip=3D\parskip
          = \parskip=3D0cm\relax
          = \ParskipNeedsRestoringtrue
    \fi}
\end{verbatim}
Note that both macros start with a vertical skip. = This prevents
the \cs{begingroup} and \cs{endgroup} statements = from
occurring in a paragraph. On a side note: since these = macros
are executed in vertical mode, I~have not bothered to = terminate
any lines with comment signs. Any spaces generated = by
these macros are ignored in vertical mode.

\section{Paragraph skip restoring}

So far, I~have ignored one important question:
how exactly is restoring the paragraph skip = implemented.
For this I~use the \cs{everypar} token list.
Basically then, the idea is the same as = in~\cite{E}:
the occurrence of a paragraph will  = automatically
have \TeX\ perform, through the insertion of = the
\cs{everypar} tokens, the actions necessary for = subsequent
paragraphs.
\begin{verbatim}
\everypar=3D
   {\ControlledIndentation
      %see Tugboat 11, = #3
    \ControlledParskip}
\def\ControlledParskip
   {\ifParskipNeedsRestoring
       = \parskip=3D\TempParskip
       = \ParskipNeedsRestoringfalse
    \fi}
\end{verbatim}
The cost of a controlled paragraph skip is then one = conditional
per paragraph. Conceivably, this cost could even be = reduced further
(to almost zero) by defining
\begin{verbatim}
\def\CPS % Controlled Parskip
   {\ifParskipNeedsRestoring
       = \parskip=3D\TempParskip
       = \ParskipNeedsRestoringfalse
       = \let\ControlledParskip=3D\relax
    \fi}
\end{verbatim}
and including a statement
\begin{verbatim}\let\ControlledParskip=3D\CPS\end{verbatim}
in both the \cs{StartEnvironment} and = \cs{EndEnvironment}
macros, and at the start of the job (for = instance
by including it in the macro package).
This approach, however, does not particularly
appeal to me. Too much `pushing the bit = around'.

\section{Conclusion}

The \cs{parskip} parameter is arguably the most tricky = parameter of
\TeX. Its workings are very easy to describe, but in = actual
practice difficulties arise. In this article = I~have
described how treatment of the paragraph skip can be = integrated
with the glue above and below environments.
As in an earlier article on indentation, I~use for = this
the \cs{everypar} parameter as an essential = tool.

\begingroup
%\parskip=3D6pt plus 3pt \parindent=3D0pt
\begin{thebibliography}9

\bibitem{BEP}J. Braams, V.~Eijkhout, = N.A.F.M.~Poppelier,
The development of national \LaTeX\ styles,
TUGboat vol.~10 (1989) \#3, pp.~401--406.

\bibitem{E}Victor Eijkhout,
An indentation scheme, TUGboat vol.~11 (1990) = \#4.

\bibitem{DeK}Donald Knuth, The \TeX\ book,
Addison-Wesley Publishing Company, 1984.
%Donald Knuth, \TB, 1984.

\bibitem{M} Stanley Morison, First principles of = typography,
Cambridge University Press, 1936.

\bibitem{LL} Leslie Lamport, \LaTeX, a document = preparation
system, Addison-Wesley Publishing Company, = 1986.

\end{thebibliography}\endgroup



\makesignature

\end{document}


------------------------------------------------
Victor = Eijkhout           = ;          phone: +1 217 = 244-0047
 Center for Supercomputing Research and = Development
 University of Illinois at = Urbana-Champaign
 305 Talbot laboratory
 104 South Wright street
 Urbana, Illinois 61801-2932, USA

home: 2503 W. Springfield Av, Apt. K-4, Champaign = 61821, USA

------_=_NextPart_001_01C19442.D47DB7C4--