1 % \iffalse meta-comment
4 % The LaTeX3 Project and any individual authors listed elsewhere
7 % This file is part of the LaTeX base system.
8 % -------------------------------------------
10 % It may be distributed and/or modified under the
11 % conditions of the LaTeX Project Public License, either version 1.3c
12 % of this license or (at your option) any later version.
13 % The latest version of this license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3c or later is part of all distributions of LaTeX
16 % version 2005/12/01 or later.
18 % This file has the LPPL maintenance status "maintained".
20 % The list of all files belonging to the LaTeX base distribution is
21 % given in the file `manifest.txt'. See also `legal.txt' for additional
24 % The list of derived (unpacked) files belonging to the distribution
25 % and covered by LPPL is defined by the unpacking scripts (with
26 % extension .ins) which are part of the distribution.
31 %%% From File: ltpar.dtx
35 \ProvidesFile{ltpar.dtx}
36 [1995/04/29 v1.1c LaTeX Kernel (paragraphs)]
38 \documentclass{ltxdoc}
39 \GetFileInfo{ltpar.dtx}
48 Tobias Oetiker \thanks{Tobi did the documentation update}\and
52 \MaintainedByLaTeXTeam{latex}
62 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
63 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
64 % Digits \0\1\2\3\4\5\6\7\8\9
65 % Exclamation \! Double quote \" Hash (number) \#
66 % Dollar \$ Percent \% Ampersand \&
67 % Acute accent \' Left paren \( Right paren \)
68 % Asterisk \* Plus \+ Comma \,
69 % Minus \- Point \. Solidus \/
70 % Colon \: Semicolon \; Less than \<
71 % Equals \= Greater than \> Question mark \?
72 % Commercial at \@ Left bracket \[ Backslash \\
73 % Right bracket \] Circumflex \^ Underscore \_
74 % Grave accent \` Left brace \{ Vertical bar \|
75 % Right brace \} Tilde \~}
77 % \changes{v1.1a}{1994/05/16}{(ASAJ) Split from ltinit.dtx.}
78 % \changes{v1.1b}{1995/04/29}{(TO) Comments clean-up.}
80 % \section{Paragraphs}
82 % This section of the kernel declares the commands used to set
83 % |\par| and |\everypar| when ever their function needs to be
84 % changed for a long time.
88 % \subsection{Implementation}
91 % There are two situations in which |\par| may be changed:
94 % \item Long-term changes, in which the new value is to remain in effect
95 % until the current environment is left. The environments that
96 % change |\par| in this way are the following:
98 % \item All list environments (itemize, quote, etc.)
99 % \item Environments that turn |\par| into a noop:
100 % tabbing, array and tabular.
102 % \item Temporary changes, in which |\par| is restored to its previous
103 % value the next time it is executed. The following are all such uses.
105 % \item |\end| when preceded by |\@endparenv|, which is called by
107 % \item The mechanism for avoiding page breaks and getting the
108 % spacing right after section heads.
112 % \DescribeMacro{\@setpar}
113 % To permit the proper interaction of these two situations, long-term
114 % changes are made by the |\@setpar{|\meta{VAL}|}| command.
117 % To set |\par|. It |\def|'s |\par| and |\@par| to \meta{VAL}.
120 % \DescribeMacro{\@restorepar}
121 % Short-term changes are made by the usual |\def\par| commands.
122 % The original values are restored after a short-term change
123 % by the |\@restorepar| commands.
125 % \DescribeMacro{\@@par}
126 % |\@@par| always is defined to be the original \TeX{} |\par|.
128 % \DescribeMacro{\everypar}
129 % |\everypar| is changed only for the short term. Whenever |\everypar|
130 % is set non-null, it should restore itself to null when executed.
132 % The following commands change |\everypar| in this way:
135 % \item |\end| when preceded by |\@endparenv|, which is called by
140 % When dealing with |\par| and |\everypar| remember the following two
143 % \item Commands that make short-term changes to |\par| and |\everypar|
144 % must take account of the possibility that the new commands and the
145 % ones that do the restoration may be executed inside a group. In
146 % particular, |\everypar| is executed inside a group whenever a new
147 % paragraph begins with a left brace. The |\everypar| command
148 % that restores its definition should be local to the current
149 % group (in case the command
150 % is inside a minipage used inside someplace where |\everypar| has
151 % been redefined). Thus, if |\everypar| is redefined to do an
152 % |\everypar{}| it could take several executions of |\everypar|
153 % before the restoration ``holds''. This usually causes no problem.
154 % However, to prevent the extra executions from doing harm,
155 % use a global switch to keep anything harmful in the new
156 % |\everypar| from being done twice.
157 % \item Commands that change |\everypar| should remember that
158 % |\everypar| might be supposed to set the following switches false:
163 % they should do the setting if necessary.
171 % \begin{macro}{\@setpar}
172 % \begin{macro}{\@par}
173 % Initiate a long-term change to |\par|.
175 \def\@setpar#1{\def\par{#1}\def\@par{#1}}
178 % The default definition of |\@par| will ensure that if
179 % |\@restorepar| defines |\par| to execute |\@par| it will redefine
180 % itself to the primitive |\@@par| after one iteration.
182 \def\@par{\let\par\@@par\par}
188 % \begin{macro}{\@restorepar}
189 % Restore from a short-term change to |\par|.
191 \def\@restorepar{\def\par{\@par}}