Update LuaTeX testfiles for ^@ change
[latex2e.git] / latex2e-20170101 / base / ltboxes.dtx
blobc631a1f9cbb4b6a620ccd750275243b4b6282d96
1 % \iffalse meta-comment
3 % Copyright 1993-2016
4 % The LaTeX3 Project and any individual authors listed elsewhere
5 % in this file.
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
22 % information.
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.
28 % \fi
30 % \iffalse
31 %%% From File: ltboxes.dtx
33 %<*driver>
34 % \fi
35 \ProvidesFile{ltboxes.dtx}
36              [2016/12/29 v1.2a LaTeX Kernel (Box Commands)]
37 % \iffalse
38 \documentclass{ltxdoc}
39 \GetFileInfo{ltboxes.dtx}
40 \title{\filename}
41 \date{\filedate}
42 \author{David Carlisle\and
43   Leslie Lamport\and
44   Frank Mittelbach\and
45   Chris Rowley}
46 \begin{document}
47  \MaintainedByLaTeXTeam{latex}
48  \maketitle
49  \DocInput{\filename}
50 \end{document}
51 %</driver>
52 % \fi
55 % \changes{v1.1e}{1998/08/17}{(RmS) Minor Documentation fixes.}
56 % \section{\LaTeX\ Box commands}
59 % \DescribeMacro\makebox
60 % |\makebox[|\meta{wid}|][|\meta{pos}|]{|\meta{obj}|}|\\
61 % Puts \meta{obj} in an |\hbox| of width \meta{wid}, positioned by
62 % \meta{pos}.
64 % The possible \meta{pos} are:\\
65 % \begin{tabular}{ll}
66 % |s| stretched,\\
67 % |l| flushleft,\\
68 % |r| flushright,\\
69 % |c| (default) centred.
70 % \end{tabular}
72 % If \meta{wid} is missing, then \meta{pos} is also missing and
73 % \meta{obj} is put in an |\hbox| of its natural width.
75 %  |\makebox(|\meta{x}|,|\meta{y}|)[|\meta{pos}|]{|\meta{obj}|}|\\
76 %  Puts \meta{obj} in an |\hbox| of width $x * |\unitlength|$
77 %            and height $y * |\unitlength|$.
78 % \meta{pos} arguments are
79 %  |s|, |l|, |r| or |c| (default) for stretched, flushleft, flushright
80 %  or centred, and  |t| or |b|
81 %            for top, bottom -- or combinations like  |tr| or |rb|.
82 %            Default for horizontal and vertical are centered.
83 % Note that in this picture mode version of |\makebox| a [b] aligns on
84 % the \emph{bottom} of the text as documented. If you want to align on
85 % the \emph{baseline} use
86 %  |\makebox( , )[b]{\raisebox{0pt}[\height][0pt]{xyz}}}|
87 %  or |\makebox( , )[b]{\smash{xyz}}|
89 % \DescribeMacro\mbox
90 %  |\mbox{|\meta{obj}|}| The same as |\makebox{|\meta{obj}|}|, but is
91 %  more efficient as no checking for optional arguments is done.
93 % \DescribeMacro\newsavebox
94 %  |\newsavebox{\cmd}| : If |\cmd| is undefined, then defines it
95 %           to be a \TeX\ box register.
97 % \DescribeMacro\savebox
98 %  |\savebox{\cmd}| ... : |\cmd| is defined to be a \TeX\ box register,
99 %            and the '...' are any |\makebox| arguments.  It is
100 %            like |\makebox|, except it doesn't produce text but
101 %            saves the value in |\box| |\cmd|.
103 % \DescribeMacro\sbox
104 % |\sbox{|\meta{cmd}|}{|\meta{obj}|}| is an efficient abbreviation for\\
105 % |\savebox{|\meta{cmd}|}{|\meta{obj}|}|.
107 % \DescribeEnv{lrbox}
108 %  |\begin{lrbox}{|\meta{cmd}|}|\meta{text}|\end{lrbox}| is equivalent
109 %  to\\
110 %  |\sbox{|\meta{cmd}|}{|\meta{text}|}|\\
111 %  except that any white space at the beginning and end of \meta{text}
112 %  is ignored.
114 % \DescribeMacro\framebox
115 %  |\framebox| ...  : like |\makebox|, except it puts a `frame' around
116 %            the box.  The frame is made of lines of thickness
117 %            |\fboxrule|, separated by space |\fboxsep| from the
118 %            text -- except for |\framebox(X,Y)| ... , where the
119 %            thickness of the lines is as for the picture environment,
120 %            and there is no separation added.
122 % \DescribeMacro\fbox
123 % |\fbox{|\meta{obj}|}| is an abbreviation for
124 % |\framebox{|\meta{obj}|}|.
126 % \DescribeMacro\parbox
127 %  |\parbox[|\meta{pos}|][|\meta{height}|][|\meta{inner-pos}|]{|^^A
128 %                    \meta{width}|}{|\meta{text}|}| :
129 % Makes a box with |\hsize| \meta{width}, positioned by \meta{pos} as
130 % follows:
131 %              c : |\vcenter| (placed in |$...$| if not in math mode)
132 %              b : |\vbox|
133 %              t : |\vtop|
134 %         default value is c.
135 %    Sets |\hsize| := \meta{width} and calls |\@parboxrestore|, which
136 %    does the following:
137 %         Restores the original definitions of:
139 %              \begin{tabular}{l}
140 %              |\par|\\
141 %              |\\|\\
142 %              |\-|\\
143 %              |\'|\\
144 %              | \`|\\
145 %              |\=|
146 %              \end{tabular}
148 %         Resets the following parameters:
150 %              \begin{tabular}{l@{\quad=\quad}ll}
151 %              |\parindent|        & 0pt \\
152 %              |\parskip|          & 0pt           & added 20 Jan 87\\
153 %              |\linewidth|        & |\hsize|\\
154 %              |\@totalleftmargin| & 0pt\\
155 %              |\leftskip|         & 0pt\\
156 %              |\rightskip|        & 0pt\\
157 %              |\@rightskip|       & 0pt\\
158 %              |\parfillskip|      & 0pt plus 1fil\\
159 %              |\lineskip|         & |\normallineskip|\\
160 %              |\baselineskip|     & |\normalbaselineskip|
161 %              \end{tabular}
163 %         Calls |\sloppy|
165 %  Note: |\@arrayparboxrestore| same as |\@parboxrestore|
166 %         but it doesn't restore |\\|.
168 % \DescribeEnv{minipage}
169 % |minipage|  :  Similar to |\parbox|, except it also
170 %        makes this look like a page by setting
172 %              |\textwidth| == |\columnwidth| == box width
174 %        changes footnotes by redefining:\\%
175 %              |\@mpfn|         == mpfootnote \\
176 %              |\thempfn|       == |\thempfootnote|\\
177 %              |\@footnotetext| == |\@mpfootnotetext|
179 %        resets the following list environment parameters:\\
180 %              |\@listdepth|    == |\@mplistdepth|\\
181 %        where  |\@mplistdepth| is initialized to zero,
183 %        and executes |\@minipagerestore| to allow the document
184 %        style to reset any other parameters it desires.
185 %        It sets |@minipage| true, and resets |\everypar| to set
186 %        it false.  This switch keeps |\addvspace| from putting space
187 %        at the top of a minipage.
189 %        Change added 24 May 89: |\minipage| sets |@minipage| globally;
190 %        |\endminipage| resets it false.
193 % \DescribeMacro\rule
194 % |\rule[|\meta{raised}|]{|\meta{width}|}{|\meta{height}|}| :
195 % Makes a $\meta{width}*\meta{height}$ rule, raised \meta{raised}.
197 % \DescribeMacro\underline
198 % |\underline{|\meta{text}|}| : Makes an underlined hbox with
199 % \meta{text} in it.
201 % \DescribeMacro\raisebox
202 % |\raisebox{|\meta{distance}|}[|\meta{height}|][|\meta{depth}^^A
203 %                 |]{|\meta{box}|}| :\\
204 % Raises \meta{box} up by \meta{distance} length (down if
205 % \meta{distance} negative).  Makes \TeX\ think that the new box extends
206 % \meta{height} above the line and \meta{depth} below, for a total
207 % vertical length of \meta{height}+\meta{depth}.  Default values of
208 % \meta{height} \& \meta{depth} = actual height and depth of box in new
209 % position.
211 % \StopEventually{}
213 % \changes{v0.1e}{1994/03/02}{Remove need for drv file}
214 % \changes{v0.1e}{1994/03/02}{Add 2ekernel module}
215 % \changes{v1.0a}{1994/03/07}{Unify format with other Kernel files}
216 % \changes{v1.0f}{1994/05/11}
217 %     {Superfluous braces removed from several commands}
218 % \changes{v1.0j}{1994/10/18}
219 %         {stuff from ltpatch done}
220 % \changes{v1.0p}{1994/11/09}
221 %         {more colour changes\ldots}
222 % \changes{v1.0q}{1994/11/17}
223 %         {\cs{@tempa} to \cs{reserved@a}}
224 % \changes{v1.0t}{1995/05/07}{Use \cs{hb@xt@}}
225 % \changes{v1.0w}{1995/10/16}{Clarify makebox description}
226 %    \begin{macrocode}
227 %<*2ekernel>
228 \message{boxes,}
229 %    \end{macrocode}
231 % \begin{macro}{\makebox}
232 % \changes{v0.1a}{1993/12/03}
233 %         {modified}
234 % |\makebox| User level command just looks for optional |[| or |(|.
235 % \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
236 %    \begin{macrocode}
237 %</2ekernel>
238 %<latexrelease>\IncludeInRelease{2015/01/01}%
239 %<latexrelease>                 {\makebox}{Make \makebox robust}%
240 %<*2ekernel|latexrelease>
241 \DeclareRobustCommand\makebox{%
242   \leavevmode
243   \@ifnextchar(%)
244     \@makepicbox
245     {\@ifnextchar[\@makebox\mbox}}%
246 %</2ekernel|latexrelease>
247 %<latexrelease>\EndIncludeInRelease
248 %<latexrelease>\IncludeInRelease{0000/00/00}%
249 %<latexrelease>                 {\makebox}{Make \makebox robust}%
250 %<latexrelease>\def\makebox{%
251 %<latexrelease>  \leavevmode
252 %<latexrelease>  \@ifnextchar(%)
253 %<latexrelease>    \@makepicbox
254 %<latexrelease>    {\@ifnextchar[\@makebox\mbox}}%
255 %<latexrelease>\expandafter\let\csname makebox \endcsname\@undefined
256 %<latexrelease>\EndIncludeInRelease
257 %<*2ekernel>
258 %    \end{macrocode}
259 % \end{macro}
261 % \begin{macro}{\mbox}
262 % \changes{v0.1a}{1993/12/03}
263 %         {extra group}
264 % \changes{v1.0j}{1994/10/18}
265 %         {\cs{long} added}
266 % The basic horizontal box command for \LaTeX.
267 %    \begin{macrocode}
268 \long\def\mbox#1{\leavevmode\hbox{#1}}
269 %    \end{macrocode}
270 % \end{macro}
272 % \begin{macro}{\@makebox}
273 % \changes{v0.1a}{1993/12/03}
274 %         {default changed from x to c}
275 % Look for a possible second optional argument (defaults to |c|).
276 %    \begin{macrocode}
277 \def\@makebox[#1]{%
278   \@ifnextchar [{\@imakebox[#1]}{\@imakebox[#1][c]}}
279 %    \end{macrocode}
280 % \end{macro}
283 % \begin{macro}{\@begin@tempboxa}
284 % \changes{v0.1a}{1993/12/03}
285 %         {macro added}
286 % \changes{v0.1b}{1993/12/08}
287 %         {Extra braces for color support
288 %          (braces removed from other macros)}
289 % \changes{v1.0f}{1994/05/11}
290 %         {Use new \cs{color@setgroup} concept.}
291 % Helper macro for supporting |\height|, |\width| etc. Grab |#1| into
292 % |\@tempboxa| and measure it.
293 %    \begin{macrocode}
294 \long\def\@begin@tempboxa#1#2{%
295    \begingroup
296      \setbox\@tempboxa#1{\color@begingroup#2\color@endgroup}%
297      \def\width{\wd\@tempboxa}%
298      \def\height{\ht\@tempboxa}%
299      \def\depth{\dp\@tempboxa}%
300      \let\totalheight\@ovri
301      \totalheight\height
302      \advance\totalheight\depth}
303 %    \end{macrocode}
304 % \end{macro}
306 % \begin{macro}{\@end@tempboxa}
307 % \changes{v0.1a}{1993/12/03}
308 %         {macro added}
309 % End the group started by |\@begin@tempboxa|, so that the scope of
310 % |\height| only includes the `length' argument to the user-command.
311 %    \begin{macrocode}
312 \let\@end@tempboxa\endgroup
313 %    \end{macrocode}
314 % \end{macro}
316 % \begin{macro}{\bm@c}
317 % \begin{macro}{\bm@l}
318 % \begin{macro}{\bm@r}
319 % \begin{macro}{\bm@s}
320 % \begin{macro}{\bm@t}
321 % \begin{macro}{\bm@b}
322 % \changes{v0.1a}{1993/12/03}
323 %         {macros added}
324 % Set up spacing.
325 %    \begin{macrocode}
326 \def\bm@c{\hss\unhbox\@tempboxa\hss}
327 \def\bm@l{\unhbox\@tempboxa\hss}\let\bm@t\bm@l
328 \def\bm@r{\hss\unhbox\@tempboxa}\let\bm@b\bm@r
329 \def\bm@s{\unhbox\@tempboxa}
330 %    \end{macrocode}
331 % \end{macro}
332 % \end{macro}
333 % \end{macro}
334 % \end{macro}
335 % \end{macro}
336 % \end{macro}
338 % \begin{macro}{\@imakebox}
339 % \changes{v0.1a}{1993/12/03}
340 %         {macro modified}
341 % Internal form of |\makebox|.
342 %    \begin{macrocode}
343 \long\def\@imakebox[#1][#2]#3{%
344   \@begin@tempboxa\hbox{#3}%
345     \setlength\@tempdima{#1}%       support calc
346     \hb@xt@\@tempdima{\csname bm@#2\endcsname}%
347   \@end@tempboxa}
348 %    \end{macrocode}
349 % \end{macro}
351 % \begin{macro}{\@makepicbox}
352 % \changes{v0.1a}{1993/12/03}
353 %         {macro modified}
354 % Picture mode form of |\makebox|.
355 %    \begin{macrocode}
356 \def\@makepicbox(#1,#2){%
357   \@ifnextchar[{\@imakepicbox(#1,#2)}{\@imakepicbox(#1,#2)[]}}
358 %    \end{macrocode}
359 % \end{macro}
361 % \begin{macro}{\@imakepicbox}
362 % picture mode version
363 %    \begin{macrocode}
364 \long\def\@imakepicbox(#1,#2)[#3]#4{%
365   \vbox to#2\unitlength
366    {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
367     \let\mb@t\vss
368     \@tfor\reserved@a :=#3\do{%
369       \if s\reserved@a
370         \let\mb@l\relax\let\mb@r\relax
371       \else
372         \expandafter\let\csname mb@\reserved@a\endcsname\relax
373       \fi}%
374     \mb@t
375     \hb@xt@ #1\unitlength{\mb@l #4\mb@r}%
376     \mb@b
377 %    \end{macrocode}
378 % This kern ensures that a |b| option aligns on the bottom of the
379 % text rather than the baseline. this is the documented behaviour in
380 % the \LaTeX Book. The kern is removed in compatibility mode.
381 %    \begin{macrocode}
382     \kern\z@}}
383 %    \end{macrocode}
384 % \end{macro}
387 % \begin{macro}{\set@color}
388 % \changes{v0.1a}{1993/12/03}
389 %         {macro added}
390 % \changes{v0.1a}{1993/12/03}
391 %         {color support}
392 % This macro is initially a no-op, but the colour package will redefine
393 % it to insert a |\special|.
394 %    \begin{macrocode}
395 \let\set@color\relax
396 %    \end{macrocode}
397 % \end{macro}
399 % \begin{macro}{\color@begingroup}
400 % \changes{v1.0b}{1994/03/14}
401 %         {macro added for colour support}
402 % \begin{macro}{\color@endgroup}
403 % \changes{v1.0b}{1994/03/14}
404 %         {macro added for colour support}
405 % \begin{macro}{\color@setgroup}
406 % \changes{v1.0f}{1994/05/11}
407 %         {macro added for colour support}
408 % \begin{macro}{\normalcolor}
409 % \changes{v1.0g}{1994/05/12}
410 %         {macro added for colour support}
411 % \begin{macro}{\color@hbox}
412 % \changes{v1.0n}{1994/11/05}
413 %         {macro added for colour support}
414 % \begin{macro}{\color@vbox}
415 % \changes{v1.0r}{1994/11/18}
416 %         {macro added for colour support}
417 % \begin{macro}{\color@endbox}
418 % \changes{v1.0n}{1994/11/05}
419 %         {macro added for colour support}
420 % These macros are initially a no-op, but the colour package will
421 % redefine them to be |\begingroup|, |\endgroup|,
422 % |\begingroup\set@color|,\\ |\hbox\bgroup\color@begingroup|,
423 % |\color@endgroup\egroup|.
424 % and \meta{set to main document colour} respectively.
425 %    \begin{macrocode}
426 \let\color@begingroup\relax
427 \let\color@endgroup\relax
428 \let\color@setgroup\relax
429 \let\normalcolor\relax
430 \let\color@hbox\relax
431 \let\color@vbox\relax
432 \let\color@endbox\relax
433 %    \end{macrocode}
434 % \end{macro}
435 % \end{macro}
436 % \end{macro}
437 % \end{macro}
438 % \end{macro}
439 % \end{macro}
440 % \end{macro}
442 % \begin{macro}{\newsavebox}
443 % \changes{v0.1a}{1993/12/03}
444 %         {Pass the whole of arg 1 to \cs{@ifdefinable}}
445 % Allocate a new `savebox'.
446 %    \begin{macrocode}
447 \def\newsavebox#1{\@ifdefinable{#1}{\newbox#1}}
448 %    \end{macrocode}
449 % \end{macro}
451 % \begin{macro}{\savebox}
452 % Save |#1| in a box register.
453 % \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
454 %    \begin{macrocode}
455 %</2ekernel>
456 %<latexrelease>\IncludeInRelease{2015/01/01}%
457 %<latexrelease>                 {\savebox}{Make \savebox robust}%
458 %<*2ekernel|latexrelease>
459 \DeclareRobustCommand\savebox[1]{%
460   \@ifnextchar(%)
461     {\@savepicbox#1}{\@ifnextchar[{\@savebox#1}{\sbox#1}}}%
462 %</2ekernel|latexrelease>
463 %<latexrelease>\EndIncludeInRelease
464 %<latexrelease>\IncludeInRelease{0000/00/00}%
465 %<latexrelease>                 {\savebox}{Make \savebox robust}%
466 %<latexrelease>\def\savebox#1{%
467 %<latexrelease>  \@ifnextchar(%)
468 %<latexrelease>    {\@savepicbox#1}{\@ifnextchar[{\@savebox#1}{\sbox#1}}}%
469 %<latexrelease>\expandafter\let\csname savebox \endcsname\@undefined
470 %<latexrelease>\EndIncludeInRelease
471 %<*2ekernel>
472 %    \end{macrocode}
473 % \end{macro}
475 % \begin{macro}{\sbox}
476 % \changes{v0.1a}{1993/12/03}
477 %         {extra group}
478 % \changes{v0.1a}{1993/12/03}
479 %         {color support}
480 % \changes{v1.0b}{1994/03/14}
481 %         {Use \cs{color@setgroup}}
482 % \changes{v1.0j}{1994/10/18}
483 %         {\cs{long} added}
484 % Save |#1| in a box register.
485 %    \begin{macrocode}
486 \long\def\sbox#1#2{\setbox#1\hbox{%
487   \color@setgroup#2\color@endgroup}}
488 %    \end{macrocode}
489 % \end{macro}
491 % \begin{macro}{\@savebox}
492 % \changes{v0.1a}{1993/12/03}
493 %         {default c not x}
494 % Look for second optional argument.
495 %    \begin{macrocode}
496 \def\@savebox#1[#2]{%
497   \@ifnextchar [{\@isavebox#1[#2]}{\@isavebox#1[#2][c]}}
498 %    \end{macrocode}
499 % \end{macro}
501 % \begin{macro}{\@isavebox}
502 % \changes{v0.1a}{1993/12/03}
503 %         {extra group}
504 % \changes{v0.1a}{1993/12/03}
505 %         {color support}
506 % \changes{v1.0b}{1994/03/14}
507 %         {Use \cs{color@setgroup}}
508 % \changes{v1.0d}{1994/04/15}
509 %         {Added missing procent character.}
510 % \changes{v1.0v}{1995/07/20}
511 %         {Use \cs{sbox}}
512 %    \begin{macrocode}
513 \long\def\@isavebox#1[#2][#3]#4{%
514   \sbox#1{\@imakebox[#2][#3]{#4}}}
515 %    \end{macrocode}
516 % \end{macro}
518 % \begin{macro}{\@savepicbox}
519 % Picture mode version of |\savebox|.
520 %    \begin{macrocode}
521 \def\@savepicbox#1(#2,#3){%
522   \@ifnextchar[%]
523     {\@isavepicbox#1(#2,#3)}{\@isavepicbox#1(#2,#3)[]}}
524 %    \end{macrocode}
525 % \end{macro}
527 % \begin{macro}{\@isavepicbox}
528 % \changes{v0.1a}{1993/12/03}
529 %         {extra group}
530 % \changes{v1.0b}{1994/03/14}
531 %         {Use \cs{color@setgroup}}
532 % \changes{v1.0l}{1994/10/25}
533 %         {missing percent (moved from ltpatch)}
534 % \changes{v1.0v}{1995/07/20}
535 %         {Use \cs{sbox}}
536 % Picture mode version of |\savebox|.
537 %    \begin{macrocode}
538 \long\def\@isavepicbox#1(#2,#3)[#4]#5{%
539   \sbox#1{\@imakepicbox(#2,#3)[#4]{#5}}}
540 %    \end{macrocode}
541 % \end{macro}
543 % \begin{macro}{\lrbox}
544 % \changes{v0.1a}{1993/12/03}
545 %         {macro added}
546 % \changes{v0.1a}{1993/12/03}
547 %         {color support}
548 % \changes{v0.1b}{1993/12/08}
549 %         {move \cs{@endpefalse} out of the inner group}
550 % \changes{v1.0b}{1994/03/14}
551 %         {Use \cs{color@setgroup}}
552 % |lrbox|: the new environment form of |\sbox|. Use |\aftergroup| tricks
553 % to enable a \emph{local} assignment to be made to the box, in a way
554 % that it still has an effect \emph{outside} the |lrbox| environment.
555 %    \begin{macrocode}
556 \def\lrbox#1{%
557   \edef\reserved@a{%
558     \endgroup
559     \setbox#1\hbox{%
560       \begingroup\aftergroup}%
561         \def\noexpand\@currenvir{\@currenvir}%
562         \def\noexpand\@currenvline{\on@line}}%
563   \reserved@a
564     \@endpefalse
565     \color@setgroup
566       \ignorespaces}
567 %    \end{macrocode}
568 % \end{macro}
570 % \begin{macro}{\endlrbox}
571 % \changes{v0.1a}{1993/12/03}
572 %         {macro added}
573 % End the |lrbox| environment.
574 %    \begin{macrocode}
575 \def\endlrbox{\unskip\color@endgroup}
576 %    \end{macrocode}
577 % \end{macro}
579 % \begin{macro}{\usebox}
580 % unchanged
581 %    \begin{macrocode}
582 \def\usebox#1{\leavevmode\copy #1\relax}
583 %    \end{macrocode}
584 % \end{macro}
586 % \begin{macro}{\frame}
588 % The following definition of |\frame| was written by Pavel Curtis
589 % (Extra space removed 14 Jan 88)
590 % RmS 92/08/24: Replaced occurrence of |\@halfwidth| by |\@wholewidth|
591 %    \begin{macrocode}
592 \long\def\frame#1{%
593   \leavevmode
594   \hbox{%
595     \hskip-\@wholewidth
596     \vbox{%
597       \vskip-\@wholewidth
598       \hrule \@height\@wholewidth
599       \hbox{%
600         \vrule\@width\@wholewidth
601         #1%
602         \vrule\@width\@wholewidth}%
603       \hrule\@height\@wholewidth
604       \vskip-\@wholewidth}%
605     \hskip-\@wholewidth}}
606 %    \end{macrocode}
607 % \end{macro}
609 % \begin{macro}{\fboxrule}
610 % \begin{macro}{\fboxsep}
611 % user level parameters,
612 %    \begin{macrocode}
613 \newdimen\fboxrule
614 \newdimen\fboxsep
615 %    \end{macrocode}
616 % \end{macro}
617 % \end{macro}
619 % \begin{macro}{\fbox}
620 % Abbreviated framed box command.
621 % \changes{v0.1a}{1993/12/03}
622 %         {extra group}
623 % \changes{v1.0g}{1994/05/12}
624 %         {New definition, merged with \cs{framebox}}
625 % \changes{v1.0i}{1994/06/01}
626 %         {New version, using \cs{@frameb@x}}
627 % \changes{v1.0j}{1994/10/18}
628 %         {\cs{long} added}
629 % \changes{v1.0k}{1994/10/24}
630 %         {Inner braces added (to fix latex/1061)}
631 % \changes{v1.0s}{1995/04/27}
632 %         {Move \cs{leavevmode} for graphics/1512}
633 %    \begin{macrocode}
634 \long\def\fbox#1{%
635   \leavevmode
636   \setbox\@tempboxa\hbox{%
637     \color@begingroup
638       \kern\fboxsep{#1}\kern\fboxsep
639     \color@endgroup}%
640   \@frameb@x\relax}
641 %    \end{macrocode}
642 % \end{macro}
644 % \begin{macro}{\framebox}
645 % Framed version of |\makebox|.
646 % \changes{v1.0g}{1994/05/12}
647 %         {Merged \cs{fbox} and \cs{framebox}}
648 % \changes{v1.0i}{1994/06/01}
649 %         {New version, so \cs{width} is correct in \cs{framebox}}
650 % \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
651 %    \begin{macrocode}
652 %</2ekernel>
653 %<latexrelease>\IncludeInRelease{2015/01/01}%
654 %<latexrelease>                 {\framebox}{Make \framebox robust}%
655 %<*2ekernel|latexrelease>
656 \DeclareRobustCommand\framebox{%
657   \@ifnextchar(%)
658     \@framepicbox{\@ifnextchar[\@framebox\fbox}}%
659 %</2ekernel|latexrelease>
660 %<latexrelease>\EndIncludeInRelease
661 %<latexrelease>\IncludeInRelease{0000/00/00}%
662 %<latexrelease>                 {\framebox}{Make \framebox robust}%
663 %<latexrelease>\def\framebox{%
664 %<latexrelease>  \@ifnextchar(%)
665 %<latexrelease>    \@framepicbox{\@ifnextchar[\@framebox\fbox}}%
666 %<latexrelease>\expandafter\let\csname framebox \endcsname\@undefined
667 %<latexrelease>\EndIncludeInRelease
668 %<*2ekernel>
669 %    \end{macrocode}
670 % \end{macro}
672 % \begin{macro}{\@framebox}
673 % Deal with optional arguments.
674 %    \begin{macrocode}
675 \def\@framebox[#1]{%
676   \@ifnextchar[%]
677     {\@iframebox[#1]}%
678     {\@iframebox[#1][c]}}
679 %    \end{macrocode}
680 % \end{macro}
682 % \begin{macro}{\@iframebox}
683 % The handling the optional arguments.
684 % \changes{v1.0i}{1994/06/01}
685 %         {New version, so \cs{width} is correct in \cs{framebox}}
686 % \changes{v1.0j}{1994/10/18}
687 %         {\cs{leavevmode} moved to \cs{@frameb@x}}
688 % \changes{v1.0s}{1995/04/27}
689 %         {Move \cs{leavevmode} for graphics/1512}
690 %    In order to set the whole box, including the frame to the
691 %    specified dimension, we first determine that dimension
692 %    from the natural size of the text, |#3|.
693 %    calculated width.
694 %    \begin{macrocode}
695 \long\def\@iframebox[#1][#2]#3{%
696   \leavevmode
697   \@begin@tempboxa\hbox{#3}%
698     \setlength\@tempdima{#1}%
699     \setbox\@tempboxa\hb@xt@\@tempdima
700          {\kern\fboxsep\csname bm@#2\endcsname\kern\fboxsep}%
701     \@frameb@x{\kern-\fboxrule}%
702   \@end@tempboxa}
703 %    \end{macrocode}
704 % \end{macro}
706 % \begin{macro}{\@frameb@x}
707 % Common part of |\framebox| and |\fbox|. |#1| is a negative kern
708 % in the |\framebox| case so that the vertical rules do not add to the
709 % width of the box.
710 % \changes{v1.0i}{1994/06/01}
711 %         {Macro added.}
712 % \changes{v1.0j}{1994/10/18}
713 %         {\cs{leavevmode} added}
714 % \changes{v1.0s}{1995/04/27}
715 %         {Move \cs{leavevmode} for graphics/1512}
716 %    \begin{macrocode}
717 \def\@frameb@x#1{%
718   \@tempdima\fboxrule
719   \advance\@tempdima\fboxsep
720   \advance\@tempdima\dp\@tempboxa
721   \hbox{%
722     \lower\@tempdima\hbox{%
723       \vbox{%
724         \hrule\@height\fboxrule
725         \hbox{%
726           \vrule\@width\fboxrule
727           #1%
728           \vbox{%
729             \vskip\fboxsep
730             \box\@tempboxa
731             \vskip\fboxsep}%
732           #1%
733           \vrule\@width\fboxrule}%
734         \hrule\@height\fboxrule}%
735                           }%
736         }%
738 %    \end{macrocode}
739 % \end{macro}
741 % \begin{macro}{\@framepicbox}
742 % Picture mode version.
743 %    \begin{macrocode}
744 \def\@framepicbox(#1,#2){%
745   \@ifnextchar[{\@iframepicbox(#1,#2)}{\@iframepicbox(#1,#2)[]}}
746 %    \end{macrocode}
747 % \end{macro}
749 % \begin{macro}{\@iframepicbox}
750 % Picture mode version.
751 %    \begin{macrocode}
752 \long\def\@iframepicbox(#1,#2)[#3]#4{%
753   \frame{\@imakepicbox(#1,#2)[#3]{#4}}}
754 %    \end{macrocode}
755 % \end{macro}
757 % \begin{macro}{\parbox}
758 % \changes{v0.1a}{1993/12/03}
759 %         {Redefined to support extra optional arguments}
760 % \changes{v0.1d}{1993/12/15}
761 %         {Changed default from `c' to `s'}
762 % The main vertical-box command for \LaTeX.
763 % \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
764 %    \begin{macrocode}
765 %</2ekernel>
766 %<latexrelease>\IncludeInRelease{2015/01/01}%
767 %<latexrelease>                 {\parbox}{Make \parbox robust}%
768 %<*2ekernel|latexrelease>
769 \DeclareRobustCommand\parbox{%
770   \@ifnextchar[%]
771     \@iparbox
772     {\@iiiparbox c\relax[s]}}%
773 %</2ekernel|latexrelease>
774 %<latexrelease>\EndIncludeInRelease
775 %<latexrelease>\IncludeInRelease{0000/00/00}%
776 %<latexrelease>                 {\parbox}{Make \parbox robust}%
777 %<latexrelease>\def\parbox{%
778 %<latexrelease>  \@ifnextchar[%]
779 %<latexrelease>    \@iparbox
780 %<latexrelease>    {\@iiiparbox c\relax[s]}}%
781 %<latexrelease>\expandafter\let\csname parbox \endcsname\@undefined
782 %<latexrelease>\EndIncludeInRelease
783 %<*2ekernel>
784 %    \end{macrocode}
785 % \end{macro}
787 % \begin{macro}{\@iparbox}
788 % \changes{v0.1d}{1993/12/15}
789 %         {Changed default from `c' to `s'}
790 % Optional argument handling.
791 %    \begin{macrocode}
792 \def\@iparbox[#1]{%
793   \@ifnextchar[%]
794     {\@iiparbox{#1}}%
795     {\@iiiparbox{#1}\relax[s]}}
796 %    \end{macrocode}
797 % \end{macro}
799 % \begin{macro}{\@iiparbox}
800 % Optional argument handling.
801 %    \begin{macrocode}
802 \def\@iiparbox#1[#2]{%
803   \@ifnextchar[%]
804     {\@iiiparbox{#1}{#2}}%
805     {\@iiiparbox{#1}{#2}[#1]}}
806 %    \end{macrocode}
807 % \end{macro}
809 % \begin{macro}{\@iiiparbox}
810 % \begin{macro}{\@parboxto}
811 % \changes{v1.0j}{1994/10/18}
812 %         {Macro added to remove misuse of \cs{@empty}}
813 % \changes{v0.1b}{1993/12/08}
814 %    {\cs{endgraf} added due to extra group in \cs{@begin@tempboxa}}
815 % \changes{v1.0y}{1996/06/10}
816 %         {(DPC) Changed \cs{endgraf} to \cs{@@par}}
817 % \changes{v1.1f}{1999/04/27}
818 %         {(CAR) Changed \cs{@empty} to \cs{relax} as flag for natural
819 %          width: pr/2975}
820 % \changes{v1.1g}{2006/05/18}
821 %         {Ensure \cs{@parboxto} holds the value of \cs{@tempdimb} not the
822 %          register itself (pr/3867)}
823 % The internal version of |\parbox|.
824 %    \begin{macrocode}
825 \let\@parboxto\@empty
826 \long\def\@iiiparbox#1#2[#3]#4#5{%
827   \leavevmode
828   \@pboxswfalse
829   \setlength\@tempdima{#4}%
830   \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
831     \ifx\relax#2\else
832       \setlength\@tempdimb{#2}%
833       \edef\@parboxto{to\the\@tempdimb}%
834     \fi
835     \if#1b\vbox
836     \else\if #1t\vtop
837     \else\ifmmode\vcenter
838     \else\@pboxswtrue $\vcenter
839     \fi\fi\fi
840     \@parboxto{\let\hss\vss\let\unhbox\unvbox
841        \csname bm@#3\endcsname}%
842     \if@pboxsw \m@th$\fi
843   \@end@tempboxa}
844 %    \end{macrocode}
845 % \end{macro}
846 % \end{macro}
848 % \changes{v1.0c}{1994/04/12}
849 %         {Remove \cs{@acci}, now defined in ltplain.dtx}
850 % \changes{v1.0c}{1994/04/12}
851 %         {Remove \cs{@dischyph}, now defined in ltinit.dtx}
853 % \begin{macro}{\@arrayparboxrestore}
854 % Restore various paragraph parameters.
856 % The rational for allowing two normally global flags to be set
857 % locally here was stated originally by
858 % Donald Arsenau and extended by Chris Rowley.
859 % It is because these flags are only set globally to
860 % true by section commands, and these should never appear within
861 % boxes or, indeed, in any group; and they are only ever
862 % set globally to false when they are definitely true.
864 % If anyone is unhappy with this argument then both flags should be
865 % treated as in |\set@nobreak|; otherwise this command will be
866 % redundant.
867 % \changes{v1.1a}{1996/10/24}{Added local settings of flags: dangerous!!}
868 %    \begin{macrocode}
869 \def\@arrayparboxrestore{%
870   \let\if@nobreak\iffalse
871   \let\if@noskipsec\iffalse
872   \let\par\@@par
873   \let\-\@dischyph
874 %    \end{macrocode}
875 % Redefined accents to allow changes in font encoding
876 % \changes{v1.0h}{1994/05/13}
877 %     {New accent system, use \cs{let} not \cs{def}}
878 %    \begin{macrocode}
879   \let\'\@acci\let\`\@accii\let\=\@acciii
880   \parindent\z@ \parskip\z@skip
881   \everypar{}%
882   \linewidth\hsize
883   \@totalleftmargin\z@
884   \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
885   \parfillskip\@flushglue \lineskip\normallineskip
886   \baselineskip\normalbaselineskip
887   \sloppy}
888 %    \end{macrocode}
889 % \end{macro}
891 % \begin{macro}{\parboxrestore}
892 % Restore various paragraph parameters, and also |\\|.
893 %    \begin{macrocode}
894 \def\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr}
895 %    \end{macrocode}
896 % \end{macro}
898 % \begin{macro}{\if@minipage}
899 % Switch that is true at the start of a minipage.
900 % \changes{v1.0z}{1996/07/26}{put \cs{global} into definition}
901 %    \begin{macrocode}
902 \def\@minipagefalse{\global\let\if@minipage\iffalse}
903 \def\@minipagetrue {\global\let\if@minipage\iftrue}
904 \@minipagefalse
905 %    \end{macrocode}
906 % \end{macro}
908 % \begin{macro}{\minipage}
909 % \changes{v0.1a}{1993/12/03}
910 %         {Redefined to support extra optional arguments}
911 % \changes{v0.1d}{1993/12/15}
912 %         {extra space removed.}
913 % \changes{v0.1d}{1993/12/15}
914 %         {Changed default from `c' to `s'}
915 % Essentially an environment form of |\parbox|.
916 %    \begin{macrocode}
917 \def\minipage{%
918   \@ifnextchar[%]
919     \@iminipage
920     {\@iiiminipage c\relax[s]}}
921 %    \end{macrocode}
922 % \end{macro}
924 % \begin{macro}{\@iminipage}
925 % \changes{v0.1d}{1993/12/15}
926 %         {Changed default from `c' to `s'}
927 % Optional argument handling.
928 %    \begin{macrocode}
929 \def\@iminipage[#1]{%
930   \@ifnextchar[%]
931     {\@iiminipage{#1}}%
932     {\@iiiminipage{#1}\relax[s]}}
933 %    \end{macrocode}
934 % \end{macro}
936 % \begin{macro}{\@iiminipage}
937 % Optional argument handling.
938 %    \begin{macrocode}
939 \def\@iiminipage#1[#2]{%
940   \@ifnextchar[%]
941     {\@iiiminipage{#1}{#2}}%
942     {\@iiiminipage{#1}{#2}[#1]}}
943 %    \end{macrocode}
944 % \end{macro}
946 % \begin{macro}{\@iiiminipage}
947 % \changes{v1.0e}{1994/04/21}
948 %     {Extra \cs{bgroup} for colour}
949 % \changes{v1.0f}{1994/05/11}
950 %         {Use new \cs{color@setgroup} concept.}
951 % Internal form of |minipage|.
952 % \changes{v1.1a}{1996/10/24}{Use it or lose it (@setminpage): Frank
953 %                             will want to lose it}
954 %    \begin{macrocode}
955 \def\@iiiminipage#1#2[#3]#4{%
956   \leavevmode
957   \@pboxswfalse
958   \setlength\@tempdima{#4}%
959   \def\@mpargs{{#1}{#2}[#3]{#4}}%
960   \setbox\@tempboxa\vbox\bgroup
961     \color@begingroup
962       \hsize\@tempdima
963       \textwidth\hsize \columnwidth\hsize
964       \@parboxrestore
965       \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
966       \let\@footnotetext\@mpfootnotetext
967       \let\@listdepth\@mplistdepth \@mplistdepth\z@
968       \@minipagerestore
969       \@setminipage}
970 %    \end{macrocode}
971 % \end{macro}
973 % \begin{macro}{\@minipagerestore}
974 % Hook so that other styles can reset other commands in a minipage.
975 %    \begin{macrocode}
976  \let\@minipagerestore=\relax
977 %    \end{macrocode}
978 % \end{macro}
981 % \begin{macro}{\endminipage}
982 % \changes{LaTeX209}{1992/08/14}
983 %     {(RmS) replaced \cs{vskip}-\cs{lastskip} by \cs{unskip}
984 %       (proposed by FMi)}
985 % \changes{v1.0e}{1994/04/21}
986 %     {Extra \cs{egroup} for colour}
987 % \changes{v1.0f}{1994/05/11}
988 %         {Use new \cs{color@setgroup} concept.}
989 % \changes{v1.0n}{1994/11/05}
990 %     {Colour resetting for footnotes moved to here: as for main
991 %     page.}
992 %    \begin{macrocode}
993 \def\endminipage{%
994     \par
995     \unskip
996     \ifvoid\@mpfootins\else
997       \vskip\skip\@mpfootins
998       \normalcolor
999       \footnoterule
1000       \unvbox\@mpfootins
1001     \fi
1002     \@minipagefalse   %% added 24 May 89
1003   \color@endgroup
1004   \egroup
1005   \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}}
1006 %    \end{macrocode}
1007 % \end{macro}
1009 % \begin{macro}{\@mplistdepth}
1010 % \begin{macro}{\@mpfootins}
1011 % Versions of |\@listdepth| and |\footins| local to minipage.
1012 %    \begin{macrocode}
1013 \newcount\@mplistdepth
1014 \newinsert\@mpfootins
1015 %    \end{macrocode}
1016 % \end{macro}
1017 % \end{macro}
1019 % \begin{macro}{\@mpfootnotetext}
1020 % Minipage version of |\@footnotetext|.
1022 % Final |\strut| added 27 Mar 89, on suggestion by Don Hosek
1023 % \changes{LaTeX2.09}{1991/09/29}{(RmS) added \cs{reset@font}}
1024 % \changes{LaTeX2.09}{1992/11/26}{(RmS) added protection for \cs{edef}}
1025 % \changes{v0.1a}{1994/03/07}{Extra group for colour}
1026 % \changes{v1.0e}{1994/04/21}
1027 %     {Extra \cs{endgraf} for colour}
1028 % \changes{v1.0f}{1994/05/11}
1029 %         {Use new \cs{color@setgroup} concept.}
1030 % \changes{v1.0f}{1994/05/11}
1031 %         {Use new \cs{normalcolor} and \cs{@finalstrut}.}
1032 % \changes{v1.0m}{1994/11/04}
1033 %         {Added \cs{protected@edef}. ASAJ.}
1034 % \changes{v1.0n}{1994/11/05}
1035 %     {Colour resetting for footnotes moved to endminipage: as for main
1036 %     page.}
1037 % \changes{v1.0o}{1994/11/05}
1038 %     {Colour groups restored here.}
1039 %    \begin{macrocode}
1040 \long\def\@mpfootnotetext#1{%
1041   \global\setbox\@mpfootins\vbox{%
1042     \unvbox\@mpfootins
1043     \reset@font\footnotesize
1044     \hsize\columnwidth
1045     \@parboxrestore
1046     \protected@edef\@currentlabel
1047          {\csname p@mpfootnote\endcsname\@thefnmark}%
1048     \color@begingroup
1049       \@makefntext{%
1050         \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
1051     \color@endgroup}}
1052 %    \end{macrocode}
1053 % \end{macro}
1055 %    \begin{macrocode}
1056 \newif\if@pboxsw
1057 %    \end{macrocode}
1059 % \begin{macro}{\rule}
1060 % Draw a rule of the specified size.
1061 % \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
1062 %    \begin{macrocode}
1063 %</2ekernel>
1064 %<latexrelease>\IncludeInRelease{2015/01/01}%
1065 %<latexrelease>                 {\rule}{Make \rule robust}%
1066 %<*2ekernel|latexrelease>
1067 \DeclareRobustCommand\rule{\@ifnextchar[\@rule{\@rule[\z@]}}%
1068 %</2ekernel|latexrelease>
1069 %<latexrelease>\EndIncludeInRelease
1070 %<latexrelease>\IncludeInRelease{0000/00/00}%
1071 %<latexrelease>                 {\rule}{Make \rule robust}%
1072 %<latexrelease>\def\rule{\@ifnextchar[\@rule{\@rule[\z@]}}%
1073 %<latexrelease>\expandafter\let\csname rule \endcsname\@undefined
1074 %<latexrelease>\EndIncludeInRelease
1075 %<*2ekernel>
1076 %    \end{macrocode}
1077 % \end{macro}
1079 % \begin{macro}{\@rule}
1080 % Internal form of |\rule|.
1081 % \changes{v1.1c}{1998/06/04}{Support calc-expressions}
1082 %    \begin{macrocode}
1083  \def\@rule[#1]#2#3{%
1084    \leavevmode
1085    \hbox{%
1086      \setlength\@tempdima{#1}%
1087      \setlength\@tempdimb{#2}%
1088      \setlength\@tempdimc{#3}%
1089      \advance\@tempdimc\@tempdima
1090      \vrule\@width\@tempdimb\@height\@tempdimc\@depth-\@tempdima}}
1091 %    \end{macrocode}
1092 % \end{macro}
1094 % \begin{macro}{\@@underline}
1095 % Saved primitive |\underline|.
1096 %    \begin{macrocode}
1097 \let\@@underline\underline
1098 %    \end{macrocode}
1099 % \end{macro}
1101 % \begin{macro}{\underline}
1102 % \LaTeX\ version works outside math.
1103 % \task{???}{why the second `relax in `underline ?}
1104 %    \begin{macrocode}
1105 \def\underline#1{%
1106   \relax
1107   \ifmmode\@@underline{#1}%
1108   \else $\@@underline{\hbox{#1}}\m@th$\relax\fi}
1109 %    \end{macrocode}
1110 % \end{macro}
1112 % \begin{macro}{\raisebox}
1113 % \changes{v0.1a}{1993/12/03}
1114 %         {redefined to support \cs{height}}
1115 % \changes{v1.0s}{1995/04/27}
1116 %         {Move \cs{leavevmode} for graphics/1512}
1117 % Raise a box, and change its vertical dimensions.
1118 % \changes{v1.1h}{2015/01/08}{Make Robust (latexrelease)}
1119 %    \begin{macrocode}
1120 %</2ekernel>
1121 %<latexrelease>\IncludeInRelease{2015/01/01}%
1122 %<latexrelease>                 {\raisebox}{Make \raisebox robust}%
1123 %<*2ekernel|latexrelease>
1124 \DeclareRobustCommand\raisebox[1]{%
1125   \leavevmode
1126   \@ifnextchar[{\@rsbox{#1}}{\@irsbox{#1}[]}}
1127 %</2ekernel|latexrelease>
1128 %<latexrelease>\EndIncludeInRelease
1129 %<latexrelease>\IncludeInRelease{0000/00/00}%
1130 %<latexrelease>                 {\raisebox}{Make \raisebox robust}%
1131 %<latexrelease>\def\raisebox#1{%
1132 %<latexrelease>  \leavevmode
1133 %<latexrelease>  \@ifnextchar[{\@rsbox{#1}}{\@irsbox{#1}[]}}
1134 %<latexrelease>\expandafter\let\csname raisebox \endcsname\@undefined
1135 %<latexrelease>\EndIncludeInRelease
1136 %<*2ekernel>
1137 %    \end{macrocode}
1138 % \end{macro}
1140 % \begin{macro}{\@rsbox}
1141 % Optional argument handling.
1142 %    \begin{macrocode}
1143 \def\@rsbox#1[#2]{%
1144   \@ifnextchar[{\@iirsbox{#1}[#2]}{\@irsbox{#1}[#2]}}
1145 %    \end{macrocode}
1146 % \end{macro}
1148 % \begin{macro}{\@argrsbox}
1149 % \changes{v0.1a}{1993/12/03}
1150 %         {macro removed}
1151 % ...
1152 % \end{macro}
1154 % \begin{macro}{\@irsbox}
1155 % \changes{v0.1a}{1993/12/03}
1156 %         {redefined to support \cs{height}}
1157 % \changes{v0.1b}{1993/12/08}
1158 %         {fix typo}
1159 % \changes{v0.1c}{1993/12/09}
1160 %         {fix another typo}
1161 % \changes{v0.1f}{1994/03/03}
1162 %         {Replaced a missing \cs{else}}
1163 % \changes{v1.0s}{1995/04/27}
1164 %         {Move \cs{leavevmode} for graphics/1512}
1165 % \changes{v1.0u}{1995/05/17}
1166 %         {Removed surplus braces}
1167 % Internal version of |\raisebox| (less than two optional args).
1168 %    \begin{macrocode}
1169 \long\def\@irsbox#1[#2]#3{%
1170   \@begin@tempboxa\hbox{#3}%
1171     \setlength\@tempdima{#1}%
1172     \ifx\\#2\\\else\setlength\@tempdimb{#2}\fi
1173     \setbox\@tempboxa\hbox{\raise\@tempdima\box\@tempboxa}%
1174     \ifx\\#2\\\else\ht\@tempboxa\@tempdimb\fi
1175     \box\@tempboxa
1176   \@end@tempboxa}
1177 %    \end{macrocode}
1178 % \end{macro}
1180 % \begin{macro}{\@iirsbox}
1181 % \changes{v0.1a}{1993/12/03}
1182 %         {redefined to support \cs{height}}
1183 % \changes{v1.0s}{1995/04/27}
1184 %         {Move \cs{leavevmode} for graphics/1512}
1185 % Internal version of |\raisebox| (two optional args).
1186 %    \begin{macrocode}
1187 \long\def\@iirsbox#1[#2][#3]#4{%
1188   \@begin@tempboxa\hbox{#4}%
1189     \setlength\@tempdima{#1}%
1190     \setlength\@tempdimb{#2}%
1191     \setlength\dimen@{#3}%
1192     \setbox\@tempboxa\hbox{\raise\@tempdima\box\@tempboxa}%
1193     \ht\@tempboxa\@tempdimb
1194     \dp\@tempboxa\dimen@
1195     \box\@tempboxa
1196   \@end@tempboxa}
1197 %    \end{macrocode}
1198 % \end{macro}
1200 %  \begin{macro}{\@finalstrut}
1201 % This macro adds a special strut the \emph{depth} of the box given as
1202 % |#1|, and height and width 0pt. It is used for ensuring that the
1203 % last line of a paragraph has the correct depth in `p' columns of
1204 % tables and in footnotes. In vertical mode nothing is done, as adding
1205 % the strut (as done in 2.09) would start a new paragraph. It would be
1206 % possible to inspect |\prevdepth| to check the depth of the
1207 % just-completed paragraph, but we do not do that here.
1208 % \changes{v1.0g}{1994/05/12}
1209 %         {macro added}
1210 % Actually we do even less now, skip the vmode test as it broke tabular
1211 % `p' columns.
1212 % \changes{v1.0p}{1994/11/09}
1213 %         {Revert \cs{finalstrut} to 2.09 equivalent (from ltpatch)}.
1214 % \changes{v1.0x}{1995/10/31}
1215 %         {Add \cs{nobreak} in horiz mode to allow hyphenation.
1216 %                   internal/1931}
1218 % The |\nobreak| was added (1995/10/31) to allow hyphenation of the
1219 % final word of the paragraph.
1220 %    \begin{macrocode}
1221 \def\@finalstrut#1{%
1222   \unskip\ifhmode\nobreak\fi\vrule\@width\z@\@height\z@\@depth\dp#1}
1223 %    \end{macrocode}
1224 %  \end{macro}
1227 % \subsection{Some low-level constructs}
1229 % The following commands are basically inherited from plain \TeX.
1231 %  \begin{macro}{\leftline}
1232 %  \begin{macro}{\rightline}
1233 %  \begin{macro}{\centerline}
1234 %  \begin{macro}{\@@line}
1235 %    These macros place text on a full line either centred or left or
1236 %    right adjusted.
1237 %    \begin{macrocode}
1238 \def\@@line{\hb@xt@\hsize}
1239 \def\leftline#1{\@@line{#1\hss}}
1240 \def\rightline#1{\@@line{\hss#1}}
1241 \def\centerline#1{\@@line{\hss#1\hss}}
1242 %    \end{macrocode}
1243 %  \end{macro}
1244 %  \end{macro}
1245 %  \end{macro}
1246 %  \end{macro}
1249 %  \begin{macro}{\rlap}
1250 %  \begin{macro}{\llap}
1251 %    These macros place text to the left or right of the current
1252 %    reference point without taking up space.
1253 %  \end{macro}
1254 %    \begin{macrocode}
1255 \def\rlap#1{\hb@xt@\z@{#1\hss}}
1256 \def\llap#1{\hb@xt@\z@{\hss#1}}
1257 %    \end{macrocode}
1258 %  \end{macro}
1260 %    \begin{macrocode}
1261 %</2ekernel>
1262 %    \end{macrocode}
1264 % \Finale
1265 \endinput
1267 % \Finale