Article View: comp.text
Article #6090Re: LaTeX list environment
From: williamssi
Date: Fri, 31 Mar 1989 18:24
Date: Fri, 31 Mar 1989 18:24
49 lines
1929 bytes
1929 bytes
In response to my query about a LaTeX list environment that indents
the body of an item by the length of the longest item label I received
the following from Terry L. Anderson. Since he cannot easily post and
there might be others interested I'm posting it for him.
----------------------------enclosed message-------------------------
The following is a list style I use which I
think does what you want. It is called as
\begin{labeled}{1in}
\item[label 1] ...
\item[label 2] ...
\end{labeled}
You specify the desired indent as the parameter.
%
% new list style called labeled -- similar to itemize but the label is
% set left justified in the label region and it takes the leftmargin
% as a parameter. For example:
%
% label The item. If it is continued onto a second line, the
% continuation is indented as the first to leftmargin.
%
\def\labeledlabel#1{#1\hfil}
\def\labeled#1{\list{}{\leftmargin#1
\labelwidth\leftmargin\advance\labelwidth-\labelsep
\let\makelabel\labeledlabel}}
\let\endlabeled=\endlist
-- Terry L Anderson
AT&T Bell Laboratories -- Liberty Corners
UUCP: ...!att!mozart!tla
NET: tla%mozart@RESEARCH.ATT.COM
ATTMAIL: mozart!tla
TeleMail: Terry.Anderson
(201) 580-4428
-------------------------end of enclosure---------------------------
Thanks to those who responded.
Cheers,
Simon Williams {utai, uunet!ubc-cs}!calgary!williamssi
Technical Details
Message-ID:
<1000@cs-spool.calgary.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!rutgers!att!alberta!calgary!.UCalgary.CA!williamssiShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!rutgers!att!alberta!calgary!.UCalgary.CA!williamssi From: williamssi@.UCalgary.CA Newsgroups: comp.text Subject: Re: LaTeX list environment Message-ID: <1000@cs-spool.calgary.UUCP> Date: 31 Mar 89 18:24:15 GMT Sender: news@calgary.UUCP Reply-To: williamssi@.UCalgary.CA () Organization: U. of Calgary, Calgary, Alberta, Canada Lines: 49