Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!csrd.uiuc.edu!s41.csrd.uiuc.edu!eijkhout From: eijkhout@s41.csrd.uiuc.edu (Victor Eijkhout) Newsgroups: comp.text.tex Subject: Re: an interesting problem Message-ID: <1990Dec6.173014.1116@csrd.uiuc.edu> Date: 6 Dec 90 17:30:14 GMT References: <90Dec5.204808est.6898@neat.cs.toronto.edu> Sender: news@csrd.uiuc.edu (news) Organization: UIUC Center for Supercomputing Research and Development Lines: 53 djmcclur@cs.toronto.edu ("David J. McClurkin") writes: >1) I need to create a macro that will display text as follows: > |<----- preceeding text goes from here to here -------------->| > Both of these boxes contain The right boundary > flush left text. of this box (i.e. the right >The problem seems to be that one cannot create a vbox or parbox whose >width is simply that of the longest line inside (its "natural" width). I fail to see what the problem and the above statement have to do with each other. What is the `preceding text'? If that is the last line of a paragraph I agree that you have a small problem. Otherwise, it is something that you put there, so you know how big it is. Give me some more info. >2) I want to use headings that look like: > 4.1 This is the Heading. This is the following text of the section... You are using LaTeX? Macros \section, \subsection, et cetera are implemented in the style files in terms of a primitive \@startsection that is specified as follows: % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} % optional * [ALTHEADING]{HEADING} % Generic command to start a section. % NAME : e.g., 'subsection' % LEVEL : a number, denoting depth of section -- e.g., chapter=1, % section = 2, etc. % INDENT : Indentation of heading from left margin % BEFORESKIP : Absolute value = skip to leave above the heading. % If negative, then paragraph indent of text following % heading is suppressed. % AFTERSKIP : if positive, then skip to leave below heading, else % negative of skip to leave to right of run-in heading. % STYLE : commands to set style You see that reversing the skip given as AFTERSKIP will give you the effect you are after. Dig around in the style files a bit. >I'm hoping that the answers to both questions are trivial. 'Fraid not. >Thanks in advance for helping me. You're welcome. >Dave McClurkin Victor.