Received: by nummer-3.proteosys id <01C19443.4BC4A59C@nummer-3.proteosys>; Thu, 3 Jan 2002 11:42:09 +0100 In-Reply-To: Your message of Tue, 29 Oct 91 17:11:48 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C19443.4BC4A59C" Return-Path: <@vm.gmd.de:LATEX-L@DHDURZ1.BITNET> X-MimeOLE: Produced By Microsoft Exchange V6.5 x-vm-v5-data: ([nil nil nil nil nil nil nil nil nil][nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil]) x-to: LaTeX-L Mailing list Content-class: urn:content-classes:message Subject: Re: indented material Date: Wed, 30 Oct 1991 01:14:58 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Nelson H. F. Beebe" Sender: "LaTeX-L Mailing list" To: "Rainer M. Schoepf" Reply-To: "LaTeX-L Mailing list" Status: R X-Status: X-Keywords: X-UID: 429 This is a multi-part message in MIME format. ------_=_NextPart_001_01C19443.4BC4A59C Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Victor Eijkhout writes: >> ... >> >> The plain TeX \item macro works with \hangindent, implying for = instance >> that it will only work for one paragraph, so you have to say \item{} = if >> you want a second paragraph in a logical item. >> >> It would seem then that the LaTeX approach, which relies on shifting = the >> \leftskip is an improvement: indentation will stay the same, no = matter >> how many paragraphs you put in an item. >> >> However, there is an important difference: in the first case the = \hsize >> is decreased by the amount of the indentation; inthe second case the >> \hsize stays the same. The difference becomes apparent when you try = to >> include a \vbox somewhere in a list environment with the second >> approach. >> >> Not only will it be too wide, it will also have a shifted left = margin. >> ... LaTeX sets \textwidth =3D=3D \hsize at startup, then makes \linewidth track the current width in nested indented environments, or in multiple column printing. The correct approach to your example is to box things up to \linewidth instead of \textwidth. Here is an example from an upcoming TUGboat article, where I wanted to frame figures (which themselves contained verbatim text): % figbox draws a box around its contents, which % can even contain verbatim text! \newbox\thefigbox \newenvironment{figbox}{% \setbox\thefigbox\hbox\bgroup \advance\linewidth by -2\fboxsep %make outer box dimension =3D=3D = linewidth \advance\linewidth by -2\fboxrule \hss \begin{minipage}{\linewidth}% }{% \end{minipage}% \hss \egroup \fbox{\box\thefigbox} } Here is an example of its use: \begin{figure}[p] \begin{figbox} \begin{small} \begin{verbatim} LaTeX Mode: Major editing mode for LaTeX and SLiTeX, with tex-mode underneath. .. \end{small} \end{figbox} \caption{Online summary of \LaTeX{} mode.} \end{figure} =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Nelson H.F. Beebe Center for Scientific Computing Department of Mathematics 220 South Physics Building University of Utah Salt Lake City, UT 84112 USA Tel: (801) 581-5254 FAX: (801) 581-4148 Internet: beebe@math.utah.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ------_=_NextPart_001_01C19443.4BC4A59C Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: indented material

Victor Eijkhout = <eijkhout%CSRD.UIUC.EDU@uga.cc.uga.edu> writes:

>> ...
>>
>> The plain TeX \item macro works with = \hangindent, implying for instance
>> that it will only work for one paragraph, so = you have to say \item{} if
>> you want a second paragraph in a logical = item.
>>
>> It would seem then that the LaTeX approach, = which relies on shifting the
>> \leftskip is an improvement: indentation = will stay the same, no matter
>> how many paragraphs you put in an = item.
>>
>> However, there is an important difference: = in the first case the \hsize
>> is decreased by the amount of the = indentation; inthe second case the
>> \hsize stays the same. The difference = becomes apparent when you try to
>> include a \vbox somewhere in a list = environment with the second
>> approach.
>>
>> Not only will it be too wide, it will also = have a shifted left margin.
>> ...

LaTeX sets \textwidth =3D=3D \hsize at startup, then = makes \linewidth
track the current width in nested indented = environments, or in
multiple column printing.

The correct approach to your example is to box things = up to \linewidth
instead of \textwidth.  Here is an example from = an upcoming TUGboat
article, where I wanted to frame figures (which = themselves contained
verbatim text):

% figbox draws a box around its contents, which
% can even contain verbatim text!
\newbox\thefigbox
\newenvironment{figbox}{%
    = \setbox\thefigbox\hbox\bgroup
    \advance\linewidth by -2\fboxsep = %make outer box dimension =3D=3D linewidth
    \advance\linewidth by = -2\fboxrule
    \hss
    = \begin{minipage}{\linewidth}%
}{%
    \end{minipage}%
    \hss
    \egroup
    \fbox{\box\thefigbox}
}

Here is an example of its use:

  \begin{figure}[p]
  \begin{figbox}
    \begin{small}
\begin{verbatim}
LaTeX Mode: Major editing mode for LaTeX and
SLiTeX, with tex-mode underneath.
..
    \end{small}
  \end{figbox}
  \caption{Online summary of \LaTeX{} = mode.}
  \end{figure}


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
Nelson H.F. Beebe
Center for Scientific Computing
Department of Mathematics
220 South Physics Building
University of Utah
Salt Lake City, UT 84112
USA
 Tel: (801) 581-5254
 FAX: (801) 581-4148
 Internet: beebe@math.utah.edu
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

------_=_NextPart_001_01C19443.4BC4A59C--