Received: by nummer-3.proteosys id <01C19442.D489F184@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.D489F184" X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message Subject: indentation Date: Mon, 8 Oct 1990 16:18:07 +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: 235 This is a multi-part message in MIME format. ------_=_NextPart_001_01C19442.D489F184 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, when I was looking into the LaTeX style files, I found the treatment of \everypar, and the way it is handled to prevent indentation not particularly elegant. You're taking \everypar away from the user, effectively. Here is a little bit that I wrote for TUGboat about indentation. A second article on \parskip (a much harder topic) follows. -------------------------------------------- \documentstyle[ltugboat]{article} \chardef\busje=3D`\\ \newcommand{\cs}[1]{{\tt\busje#1}} \frenchspacing \begin{document} \title{An indentation scheme} \author{Victor Eijkhout} \address{Department of Mathematics\\ University of Nijmegen\\ Toernooiveld 5\\ 6525 ED Nijmegen, The Netherlands} \netaddress[\network{Bitnet}]{u641001@HNYKUN11} \maketitle \noindent Indentation is one of the simpler things in \TeX: if you leave one input line open you get a new paragraph, and it is indented unless you say \cs{noindent}. And if you get tired of writing \cs{noindent} all of the time, you declare = \begin{verbatim}\parindent=3D0pt\end{verbatim} at the start of your document. Easy. More sophisticated approaches to indentation are possible, however. In this article I will sketch a quite general approach that can easily be incorporated in existing macro packages. For a better appreciation of what goes on, I will start with a tutorial section on what happens when \TeX\ starts a paragraph. \section{Tutorial: paragraph start} When \TeX\ is not busy typesetting mathematics, it is processing in {\em horizontal mode}, or {\em vertical mode}. In horizontal mode it is putting objects --~usually characters~-- next to each other, in vertical mode it is putting objects --~usually lines of text~-- on top of each other. To see that there is a difference, run the following pieces of code through \TeX: \begin{verbatim} \hbox{a} \hbox{b} \bye\end{verbatim} and \begin{verbatim} a \hbox{b} \hbox{c} \bye\end{verbatim} You notice that the same objects are treated in two different ways. The reason for this is that \TeX\ starts each job in vertical mode, that is, stacking material. In the second piece of input \TeX\ saw the character `a' before it saw the boxes. A~character is for \TeX\ the sign to switch to horizontal mode, that is, lining up material, and start building a paragraph. Commands that can make \TeX\ switch to horizontal mode are called `horizontal commands'. As appeared from the above two examples characters are horizontal commands, but boxes are not. Let us now look at the two most obvious horizontal commands: \cs{indent} and \cs{noindent}. \subsection{\cs{indent} and \cs{noindent}} \cs{indent} is the command to start a paragraph with indentation. \TeX\ realizes the indentation by inserting a box of width \cs{parindent}. If you say \cs{indent} somewhere in the middle of a paragraph you get some white space there, caused by the empty box. \cs{noindent} is the command to start a paragraph without indentation. After this command \TeX\ merely switches to horizontal mode; no indentation box is inserted. If you give this command somewhere in the middle of a paragraph it has no effect at all. If \TeX\ sees a horizontal command that is not \cs{indent} or \cs{noindent}, for instance a character, it acts as if the command was preceded by \cs{indent}. This is why paragraphs usually start with an indentation. As an illustration here is a small variation on the above two examples: \begin{verbatim} \noindent \hbox{a} \hbox{b} \indent \hbox{a} \hbox{b} \bye\end{verbatim} \subsection{\cs{everypar}} \TeX\ performs another action when it starts a paragraph: it inserts whatever is currently the contents of the token list \cs{everypar}. Usually you don't notice this, because the token list is empty in plain \TeX\ (the \TeX\ book~\cite{DeK} gives only a simple example, and the exhortation `if you let your imagination run you will think of better applications'). \LaTeX~\cite{LL}, however, makes regular use of \cs{everypar}. Some mega-trickery with \cs{everypar} can be found in~\cite{E}. \everypar{$\bullet\quad$} Just to show how this works, I put in front of this paragraph the statement %V I just love this \[\hbox to \hsize{\verb>\everypar=3D{$\bullet\quad$}>\hfil}\] That is, I~told \TeX\ that \verb-$\bullet\quad$- should be inserted in front of a paragraph. There's nothing specified for this paragraph; I get the bullet for free, as \cs{everypar} does exactly what its name promises: it is inserted in front of {\em every\/} paragraph.\everypar{} At the end of the previous paragraph I specified \begin{verbatim}\everypar=3D{}\end{verbatim} so nothing is inserted from this paragraph onwards. \subsection{Removing indentation} Every \TeX\ user knows that indentation can be prevented globally by setting \cs{parindent} to zero. However, this is rather crude, and if you use the plain \TeX\ macros you may notice several rather unpleasant side effects of this action, for instance when you use the macros \cs{item} and \cs{footnote}. It is possible to use \cs{everypar} to prevent indentation, or more correctly: to remove indentation. This can be achieved by \begin{verbatim}\everypar=3D{{\setbox0=3D\lastbox}}\end{verbatim} This needs some explanation. If the last item that was processed by \TeX\ is a box, then that box is accessible by the command \cs{lastbox}. If the last item was not a box then \cs{lastbox} is an empty box, but no error ensues. As the \cs{everypar} list is inserted after any indentation box, the \cs{lastbox} command will get hold of the indentation box if there is one. By assigning the last box to another box register --~here \cs{box0}~-- it is removed from where it was previously. Finally, the statement \begin{verbatim}\setbox0=3D\lastbox\end{verbatim} is enclosed in braces. \TeX's grouping mechanism restores values when the group ends that were current when the group began. In this case it has the effect of totally removing the indentation box: first it is taken and assigned to \cs{box0}, then the value of \cs{box0} is restored to whatever it was before the group began. \subsection{Other actions at the start of a paragraph} In the above discussion I have omitted one action that takes place at the start of a paragraph: \TeX\ inserts (vertical) \cs{parskip} glue above the paragraph. As this has no relevance for the subject of indentation I will not go into it any further. However, in a subsequent article I will give more information about \cs{parskip}. \section{To indent or not to indent} In classical book typography~\cite{M} every paragraph is indented, with the exception of the first paragraph of a chapter. Nowadays a design where no paragraph indents is quite common. There are two mixtures between always indenting and never indenting: occasionally indenting, and occasionally not indenting. Thus it seems possible to characterize indentation strategies by two yes/no parameters: one that decides whether paragraphs should indent in principle, and another parameter that can overrule those decisions. Let us now see how this can be implemented in \TeX. \subsection{Implementation} Above I have already indicated that changes to \cs{parindent} should be avoided. Let us then assume that \cs{parindent} is greater than zero, even if we will never indent a paragraph (see \cite{BEP} for other uses for the \cs{parindent} quantity). We must then realize unindented paragraphs by removing their indentation as explained above. First we need a macro for removing the indentation: \begin{verbatim} \def\removeindentation {{\setbox0=3D\lastbox}} \end{verbatim} Then we need the switches that control indentation: \begin{verbatim} \newif\ifNeedIndent %as a rule \newif\ifneedindent %special cases \end{verbatim} Now for the definition of \cs{everypar}. This is a bit tricky. Let us first collect some bits and pieces. The main question is to decide when \cs{removeindent} should be called. This is for instance the case if \cs{NeedIndentfalse}, and that parameter is not overruled by \cs{needindenttrue}. \begin{verbatim} \ifNeedIndent \ifneedindent \else \removeindentation \fi \fi \end{verbatim} Indentation should also be removed in case \cs{NeedIndenttrue}, but when that parameter is overruled by \cs{needindentfalse}. \begin{verbatim} \ifNeedIndent \else \ifneedindent \else \removeindentation \fi \fi \end{verbatim} Next we should make sure that \cs{ifneedindent} is used only for exceptional cases: if the user or a macro sets this parameter to a different value from \cs{ifNeedIndent}, then that should be obeyed exactly once. \begin{verbatim} \ifNeedIndent \ifneedindent \else \needindenttrue \fi \else \ifneedindent \needindentfalse \fi \fi \end{verbatim} This is then the full definition of \cs{everypar}: \begin{verbatim} \everypar=3D{\controlledindentation} \def\controlledindentation {\ifNeedIndent \ifneedindent \else \removeindentation \needindenttrue \fi \else \ifneedindent \needindentfalse \else \removeindentation \fi \fi} \end{verbatim} Another implementation would be possible: \begin{verbatim} \def\controlledindentation {\ifneedindent \else \removeindentation \fi \let\ifneedindent=3D\ifNeedIndent} \end{verbatim} This saves one conditional, but for most paragraphs it involves an unnecessary \cs{let} command. \subsection{Usage} My aim in developing this indentation scheme was to hide all commands pertaining to indentation in macros. The user should have to specify only once whether paragraphs should indent as a rule: \begin{verbatim}\NeedIndenttrue\end{verbatim} and then macros should declare the exceptions: \begin{verbatim} \def\section#1{... \needindentfalse ...}\end{verbatim} \subsection{But couldn't you simply \dots?} Maybe people who read this have written macros themselves that end like \begin{verbatim} \def\section#1{... ... \noindent}\end{verbatim} or \begin{verbatim} \def\section#1\par{... ... \noindent}\end{verbatim} This works reasonably well, but it is not completely safe. In the first case there shouldn't be an empty line after a \begin{verbatim}\section{...}\end{verbatim} call, and in the second case there can only be one empty line after \begin{verbatim}\section ... \end{verbatim} The reason for this is that {\em every\/} empty line generates a \cs{par} command, which annuls the effect of the \cs{noindent}. Hence the more drastic approach. An argument the other way around can also be found, by the way. As Ron Whitney pointed out to me, the following piece of code causes trouble: \begin{verbatim} \section{Title} {\smallcaps The first} words are ... \end{verbatim} Any changes made by \cs{everypar} are now effected {\em inside a group}. In this case one remedy is to insert a \cs{leavevmode} command, or to define \begin{verbatim} \def\smallcapswords#1{\leavevmode {\smallcaps #1}} \end{verbatim} which can be used at any place. Another remedy would be to let all assignments controlling indentation be global. However, there are some subtle objections to this. \section{About macro packages and users} Above I remarked that plain \TeX\ does not use \cs{everypar}, and that \LaTeX\ redefines it a lot. This means that in plain \TeX\ the user is free to take every value of \cs{everypar} that he or she likes; in \LaTeX\ every attempt of the user to use \cs{everypar} is immediately thwarted. One might ask %xV(and Ron did) how the use of \cs{everypar} that I~have sketched compares to this. Can the user be allowed to access \cs{everypar}, even if the macro package needs it all the time? In my own `Lollipop' format I have taken the following way out. The user or the style designer is allowed to fill in \cs{everypar}, as long the statement \begin{verbatim}\the\everyeverypar\end{verbatim} is included. Here \cs{everyeverypar} is the token list with the constant actions such as indentation control that should be performed always. A format designer who wishes to hide even this from the user or the style designer, could use the following piece of code \begin{verbatim} \newtoks\temppar \def\everyparagraph {\afterassignment\xevpar \temppar} \def\xevpar {\edef\act{\everypar=3D {\the\temppar \the\everyeverypar }}% \act} \end{verbatim} so that it becomes possible to write \begin{verbatim} \everyparagraph=3D{\DoSomething \everyparagraph=3D{}} \end{verbatim} while the \cs{everypar} will still contain all of the constant actions. Short explanation: \cs{everyparagraph} is a macro that is made to look like a token parameter by the use of \cs{afterassignment}. This latter command sets aside the token \cs{xevpar} for insertion after the first assignment occurring; then whatever follows is assigned to \cs{temppar}. After this assignment the macro \cs{xevpar} unwraps the \cs{temppar} token list and the constant actions into \cs{everypar}. \section{Conclusion} In a systematic layout indentation commands need never be typed by the user; they can all be hidden in macros. Using \cs{everypar} it is possible to prevent indentation both in single instances, and throughout the document. This has the advantage that is is not necessary to zero the \cs{parindent} parameter or use \cs{indent} and \cs{noindent} instructions. The approach of employing \cs{everypar} as sketched above can also be used for a paragraph skip scheme, as I will show in a subsequent article. \begingroup \parskip=3D6pt plus 3pt \parindent=3D0pt \begin{thebibliography}9 \bibitem{DeK}Donald Knuth, The \TeX\ book, Addison-Wesley Publishing Company, 1984. %Donald Knuth, \TB, 1984. \bibitem{LL} Leslie Lamport, \LaTeX, a document preparation system, Addison-Wesley Publishing Company, 1986. \bibitem{E}Victor Eijkhout, Unusual paragraph shapes, Tugboat vol.~11 (1990) \#1, pp.~51--53. \bibitem{M} Stanley Morison, First principles of typography, Cambridge University Press, 1936. \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. \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.D489F184 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable indentation

Hello,

when I was looking into the LaTeX style files, I found = the
treatment of \everypar, and the way it is handled = to
prevent indentation not particularly elegant.
You're taking \everypar away from the user, = effectively.

Here is a little bit that I wrote for TUGboat
about indentation. A second article on = \parskip
(a much harder topic) follows.

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

\chardef\busje=3D`\\
\newcommand{\cs}[1]{{\tt\busje#1}}
\frenchspacing

\begin{document}

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

\noindent
Indentation is one of the simpler things in = \TeX:
if you leave one input line open you get a new
paragraph, and it is indented unless you say = \cs{noindent}.
And if you get tired of writing \cs{noindent}
all of the time, you declare = \begin{verbatim}\parindent=3D0pt\end{verbatim}
at the start of your document. Easy.

More sophisticated approaches to indentation are = possible,
however. In this article I will sketch a quite = general approach
that can easily be incorporated in existing macro = packages.
For a better appreciation of what goes on, I will = start
with a tutorial section on what happens when
\TeX\ starts a paragraph.

\section{Tutorial: paragraph start}

When \TeX\ is not busy typesetting mathematics, it is = processing
in {\em horizontal mode}, or {\em vertical mode}. In = horizontal
mode it is putting objects --~usually characters~-- = next to each other,
in vertical mode it is putting objects --~usually = lines of
text~-- on top of each other.

To see that there is a difference, run the following = pieces of
code through \TeX:
\begin{verbatim}
\hbox{a}
\hbox{b}
\bye\end{verbatim}
and
\begin{verbatim}
a
\hbox{b}
\hbox{c}
\bye\end{verbatim}
You notice that the same objects are treated in two = different ways.
The reason for this is that \TeX\ starts each job in = vertical mode,
that is, stacking material. In the second piece of = input
\TeX\ saw the character `a' before it saw the boxes. = A~character
is for \TeX\ the sign to switch to horizontal mode, = that is,
lining up material, and start building a = paragraph.

Commands that can make \TeX\ switch to horizontal = mode
are called `horizontal commands'. As appeared from = the above
two examples characters are horizontal commands, but = boxes
are not.
Let us now look at the two most obvious horizontal = commands:
\cs{indent} and \cs{noindent}.

\subsection{\cs{indent} and \cs{noindent}}

\cs{indent} is the command to start a paragraph = with
indentation. \TeX\ realizes the indentation by = inserting
a box of width \cs{parindent}. If you say = \cs{indent}
somewhere in the middle of a paragraph you get some = white
space there, caused by the empty box.

\cs{noindent} is the command to start a paragraph = without
indentation. After this command \TeX\ merely switches = to
horizontal mode; no indentation box is inserted. If = you
give this command somewhere in the middle of a = paragraph
it has no effect at all.

If \TeX\ sees a horizontal command that is not = \cs{indent}
or \cs{noindent}, for instance a character,
it acts as if the command was preceded
by \cs{indent}. This is why paragraphs usually start = with
an indentation.

As an illustration here is a small variation on the = above
two examples:
\begin{verbatim}
\noindent
\hbox{a}
\hbox{b}

\indent
\hbox{a}
\hbox{b}
\bye\end{verbatim}

\subsection{\cs{everypar}}

\TeX\ performs another action when it starts a = paragraph:
it inserts whatever is currently the contents of = the
token list \cs{everypar}. Usually you don't notice = this,
because the token list is empty in plain \TeX\ = (the
\TeX\ book~\cite{DeK} gives only a simple = example,
and the exhortation `if you let your = imagination
run you will think of better applications').
\LaTeX~\cite{LL}, however, makes regular use of  = \cs{everypar}.
Some mega-trickery with \cs{everypar} can be found = in~\cite{E}.

\everypar{$\bullet\quad$}
Just to show how this works, I put in front of = this
paragraph the statement
%V I just love this
\[\hbox to = \hsize{\verb>\everypar=3D{$\bullet\quad$}>\hfil}\]
That is, I~told \TeX\ that = \verb-$\bullet\quad$-
should be inserted in front of a paragraph.

There's nothing specified for this paragraph; I get = the
bullet for  free, as \cs{everypar} does exactly = what
its name promises: it is inserted in front of {\em = every\/}
paragraph.\everypar{}

At the end of the previous paragraph I = specified
\begin{verbatim}\everypar=3D{}\end{verbatim}
so nothing is inserted from this paragraph = onwards.

\subsection{Removing indentation}

Every \TeX\ user knows that
indentation can be prevented
globally by setting \cs{parindent} to zero. However, = this
is rather crude, and if you use the plain \TeX\ = macros
you may notice several rather unpleasant side effects = of this action,
for instance when you use the macros \cs{item} and = \cs{footnote}.

It is possible to use \cs{everypar} to prevent = indentation,
or more correctly: to remove indentation. This can be = achieved
by = \begin{verbatim}\everypar=3D{{\setbox0=3D\lastbox}}\end{verbatim}
This needs some explanation.

If the last item that was processed by \TeX\ is a box, = then that
box is accessible by the command \cs{lastbox}. If the = last item
was not a box then \cs{lastbox} is an empty box, but = no error
ensues. As the \cs{everypar}
list is inserted after any indentation box, = the
\cs{lastbox} command will get hold of the indentation = box if
there is one.
By assigning the last box to another box register = --~here
\cs{box0}~-- it is removed from where it was = previously.

Finally, the statement = \begin{verbatim}\setbox0=3D\lastbox\end{verbatim}
is enclosed in braces. \TeX's grouping mechanism = restores values
when the group ends that were current when the group = began.
In this case it has the effect of totally removing = the indentation
box: first it is taken and assigned to \cs{box0}, = then the value
of \cs{box0} is restored to whatever it was before = the group began.

\subsection{Other actions at the start of a = paragraph}

In the above discussion I have omitted one action that = takes
place at the start of a paragraph: \TeX\ = inserts
(vertical) \cs{parskip}
glue above the paragraph. As this has no relevance = for
the subject of indentation I will not go into it any = further.
However, in a subsequent article I will give = more
information about \cs{parskip}.

\section{To indent or not to indent}

In classical book typography~\cite{M} every = paragraph
is indented, with
the exception of the first paragraph of a = chapter.
Nowadays a design where no paragraph indents is = quite
common.
There are two mixtures between
always indenting and never indenting: occasionally = indenting, and
occasionally not indenting.
Thus it seems possible to
characterize indentation strategies by two = yes/no
parameters: one that decides whether = paragraphs
should indent in principle, and another parameter = that can overrule
those decisions. Let us now see how this can be = implemented in \TeX.

\subsection{Implementation}

Above I have already indicated that changes to = \cs{parindent} should
be avoided. Let us then assume that \cs{parindent} is = greater
than zero, even if we will never indent a = paragraph
(see \cite{BEP} for other uses for the \cs{parindent} = quantity).
We must then realize unindented paragraphs by = removing their
indentation as explained above.

First we need a macro for removing the = indentation:
\begin{verbatim}
\def\removeindentation
    {{\setbox0=3D\lastbox}}
\end{verbatim}
Then we need the switches that control = indentation:
\begin{verbatim}
\newif\ifNeedIndent %as a rule
\newif\ifneedindent %special cases
\end{verbatim}
Now for the definition of \cs{everypar}. This is a = bit tricky.

Let us first collect some bits and pieces. The main = question
is to decide when \cs{removeindent} should be = called.
This is for instance the case if = \cs{NeedIndentfalse},
and that parameter is not overruled by = \cs{needindenttrue}.
\begin{verbatim}
\ifNeedIndent
    \ifneedindent
    \else \removeindentation
\fi \fi
\end{verbatim}
Indentation should also be removed
in case \cs{NeedIndenttrue},
but when that parameter is overruled by = \cs{needindentfalse}.
\begin{verbatim}
\ifNeedIndent
\else \ifneedindent
      \else = \removeindentation
\fi   \fi
\end{verbatim}
Next we should make sure that \cs{ifneedindent} is = used
only for exceptional cases: if the user or a = macro
sets this parameter to a different value from = \cs{ifNeedIndent},
then that should be obeyed exactly once.
\begin{verbatim}
\ifNeedIndent
      \ifneedindent
      \else \needindenttrue = \fi
\else \ifneedindent \needindentfalse
\fi   \fi
\end{verbatim}
This is then the full definition of = \cs{everypar}:
\begin{verbatim}
\everypar=3D{\controlledindentation}
\def\controlledindentation
   {\ifNeedIndent
          = \ifneedindent
          \else = \removeindentation
          &nbs= p;     \needindenttrue
          = \fi
    \else \ifneedindent
          &nbs= p;     \needindentfalse
          \else = \removeindentation
    \fi   \fi}
\end{verbatim}

Another implementation would be possible:
\begin{verbatim}
\def\controlledindentation
   {\ifneedindent
    \else \removeindentation = \fi
    = \let\ifneedindent=3D\ifNeedIndent}
\end{verbatim}
This saves one conditional, but for most = paragraphs
it involves an unnecessary \cs{let} command.

\subsection{Usage}

My aim in developing this indentation scheme was to = hide all
commands pertaining to indentation in macros.
The user should have to specify only once whether = paragraphs
should indent as a rule:
\begin{verbatim}\NeedIndenttrue\end{verbatim}
and then macros should declare the exceptions:
\begin{verbatim}
\def\section#1{...
    \needindentfalse
    ...}\end{verbatim}

\subsection{But couldn't you simply \dots?}

Maybe people who read this have written macros = themselves that
end like
\begin{verbatim}
\def\section#1{...
    ...
    \noindent}\end{verbatim}
or
\begin{verbatim}
\def\section#1\par{...
    ...
    \noindent}\end{verbatim}
This works reasonably well, but it is not completely = safe.
In the first case there shouldn't be an empty line = after
a \begin{verbatim}\section{...}\end{verbatim} = call,
and in the second case there can only be one empty = line
after \begin{verbatim}\section ... = \end{verbatim}
The reason for this is that {\em every\/} empty = line
generates a \cs{par} command, which annuls the = effect
of the \cs{noindent}. Hence the more drastic = approach.

An argument the other way around can also be found, by = the
way. As Ron Whitney pointed out to me, the = following
piece of code causes trouble:
\begin{verbatim}
\section{Title}
{\smallcaps The first} words are ...
\end{verbatim}
Any  changes made by \cs{everypar} are now = effected
{\em inside a group}. In this case one remedy is = to
insert a \cs{leavevmode} command, or to define
\begin{verbatim}
\def\smallcapswords#1{\leavevmode
   {\smallcaps #1}}
\end{verbatim}
which can be used at any place.

Another remedy would be to let all assignments = controlling
indentation be global. However, there are some = subtle
objections to this.

\section{About macro packages and users}

Above I remarked that plain \TeX\ does not use = \cs{everypar},
and that \LaTeX\ redefines it a lot. This means that = in plain \TeX\
the user is free to take every value of \cs{everypar} = that
he or she likes; in \LaTeX\ every attempt of the = user
to use \cs{everypar} is immediately thwarted.

One might ask %xV(and Ron did)
how the use of \cs{everypar} that I~have sketched = compares to this.
Can the user be allowed to access \cs{everypar}, even = if
the macro package needs it all the time?

In my own `Lollipop' format I have taken the following = way
out. The user or the style designer is allowed to = fill in
\cs{everypar}, as long the statement
\begin{verbatim}\the\everyeverypar\end{verbatim}
is included.
Here \cs{everyeverypar} is the token list with the = constant
actions such as indentation control that should be = performed
always.

A format designer who wishes to hide even this from = the user
or the style designer, could use the following piece = of code
\begin{verbatim}
\newtoks\temppar
\def\everyparagraph
   {\afterassignment\xevpar
    \temppar}
\def\xevpar
   {\edef\act{\everypar=3D
        = {\the\temppar
         = \the\everyeverypar
        }}%
    \act}
\end{verbatim} so that it becomes possible to = write
\begin{verbatim}
\everyparagraph=3D{\DoSomething
    \everyparagraph=3D{}}
\end{verbatim}
while the \cs{everypar} will still contain all of = the
constant actions.

Short explanation: \cs{everyparagraph} is a macro that = is
made to look like a token parameter by the use
of \cs{afterassignment}. This latter command sets = aside the
token \cs{xevpar} for insertion after the first = assignment
occurring; then whatever follows is assigned to = \cs{temppar}.
After this assignment
the macro \cs{xevpar} unwraps the \cs{temppar} token = list and the
constant actions into \cs{everypar}.

\section{Conclusion}

In a systematic layout indentation commands need never = be
typed by the user; they can all be hidden in = macros.
Using \cs{everypar} it is possible to prevent = indentation
both in single instances, and throughout the = document.
This has the advantage that is is not = necessary
to zero the \cs{parindent} parameter or use = \cs{indent} and
\cs{noindent} instructions.

The approach of employing \cs{everypar} as sketched = above
can  also be used for a paragraph skip scheme, = as I will
show in a subsequent article.

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

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

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

\bibitem{E}Victor Eijkhout,
Unusual paragraph shapes, Tugboat vol.~11 (1990) \#1, = pp.~51--53.

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

\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.

\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.D489F184--