[cl-typesetting-devel] Hanging indent?

Peter Seibel peter at javamonkey.com
Fri Feb 27 23:15:17 UTC 2004


Peter Seibel <peter at javamonkey.com> writes:

> "Marc Battyani" <marc.battyani at fractalconcept.com> writes:
> 
> > "Peter Seibel" <peter at javamonkey.com> writes:
> > 
> > > I have a vague recollection I asked about this before but can't find
> > > it in my archive. Anyway, what's the easiest way to typeset a
> > > paragraph with a hanging indent. E.g.
> > >
> > >
> > >   1. The quick brown fox jumps over the lazy dog. Now is the time for
> > >      all good men to come to the aid of their party.
> > >
> > > As opposed to:
> > >
> > >   1. The quick brown fox jumps over the lazy dog. Now is the time for
> > >   all good men to come to the aid of their party.
> > >
> > 
> > The :first-line-indent argument of paragraph allows you to specify an offset
> > for the first line. Negative values are ok.
> > 
> > Something like:
> > (paragraph (:h-align :justified :left-margin 10 :first-line-indent -10) ...)
> 
> Yeah. I found that after I posted. But that doesn't quite do the
> trick unless the negative indentation happens to exactly match the
> width of the chars I want to stick out. Is there any way, while
> compiling the contents to find out things like how wide the "1. " is
> going to be?

Actually, I realized what I really want is a way to put a box after
the number that will take up the *remaining* space, i.e. like a tab
stop. That is, if my :first-line-indent is -10, I want a box of width
(- 10 (width-of "1. ")) so that all the text lines up appropriately.
Any easy way to do that?

-Peter

-- 
Peter Seibel                                      peter at javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp




More information about the cl-typesetting-devel mailing list