These next three commands for making LR-boxes all existed in
LaTeX~2.09. They have been enhanced in two ways.
141 [<<#286#>width<#286#>>] [<<#287#>pos<#287#>>] {<<#288#>text<#288#>>}
142 [<<#289#>width<#289#>>] [<<#290#>pos<#290#>>] {<<#291#>text<#291#>>}
143 {<<#292#>cmd<#292#>>} [<<#293#>width<#293#>>] [<<#294#>pos<#294#>>] {<<#295#>text<#295#>>}
One small but far-reaching change for LaTeX2e\ is that, within the
<<#297#>width<#297#>> argument only, four special lengths can be used. These are
all dimensions of the box that would be produced by using simply
144{<<#298#>text<#298#>>}:
-
- 145its height above the baseline;
-
- 146its depth below the baseline;
-
- 147the sum of 148 and 149;
-
- 150its width.
Thus, to put `hello' in the centre of a box of twice its natural
width, you would use:
verbatim17
Or you could put <#301#>f<#301#> into a square box, like
this:
#tex2html_wrap984#
verbatim18
Note that it is the total width of the framed box, including the
frame, which is set to 151.
The other change is a new possibility for <<#303#>pos<#303#>>: 152 has been added
to 153 and 154. If <<#304#>pos<#304#>> is 155 then the text is stretched the full
length of the box, making use of any `rubber lengths' (including any
inter-word spaces) in the contents of the box. If no such `rubber
length' is present, an `underfull box' will probably be produced.
156 [<<#306#>pos<#306#>>] [<<#307#>height<#307#>>] [<<#308#>inner-pos<#308#>>] {<<#309#>width<#309#>>}
{<<#310#>text<#310#>>}
157
[<<#311#>pos<#311#>>] [<<#312#>height<#312#>>] [<<#313#>inner-pos<#313#>>] {<<#314#>width<#314#>>}
<<#315#>text<#315#>>
158
As for the box commands above, 159, 160, etc.~may be used
in the [<<#317#>height<#317#>>] argument to denote the natural dimensions of the
box.
The <<#318#>inner-pos<#318#>> argument is new in LaTeX2e. It is the vertical
equivalent to the <<#319#>pos<#319#>> argument for 161, etc, determining
the position of <<#320#>text<#320#>> within the box. The <<#321#>inner-pos<#321#>> may be any
one of 162, 163, 164, or 165, denoting top, bottom, centered, or
`stretched' alignment respectively. When the <<#322#>inner-pos<#322#>> argument
is not specified, LaTeX\ gives it same value as <<#323#>pos<#323#>> (this could be
the latter's default value).
166 {<<#325#>cmd<#325#>>}
<<#326#>text<#326#>>
167
This is an environment which does not directly print anything.
Its effect is to save the typeset <<#328#>text<#328#>> in the bin <<#329#>cmd<#329#>>. Thus
it is like 168 {<<#330#>cmd<#330#>>} {<<#331#>text<#331#>>}, except that any white space
before or after the contents <<#332#>text<#332#>> is ignored.
This is very useful as it enables both the 169 command and the
<#333#>verbatim<#333#> environment to be used within <<#334#>text<#334#>>.
It also makes it possible to define, for example, a `framed box'
environment. This is done by first using this environment to save
some text in a bin <<#335#>cmd<#335#>> and then calling
170<<#336#>cmd<#336#>>171.
The following example defines an environment, called 172, that is
a framed version of 173.
verbatim19