[comp.text] Is there a non-icky way of doing this?

joe@athena.mit.edu (Joseph C Wang) (01/11/90)

I'd like to do the following in TeX:

left_text1 .......... [hbox] ................ right_text1
other_left_text ..... [hbox] ................ right_text2

What I want is for the hbox in the middle to be centered between the
right and left margins.  Left text of various lengths to be flush left
with the left margin, right text of several lengths to be flush right
with the right margin, and leaders linking the text and the hbox.

Any ideas?
-------------------------------------------------------------------------------
Joseph Wang (joe@athena.mit.edu)           Wake Up! Wake Up!
450 Memorial Drive C-111                   All who wish not to be slaves.
Cambridge, MA 02139

dhosek@jarthur.Claremont.EDU (dhosek) (01/11/90)

In article <1990Jan11.013500.16948@athena.mit.edu> joe@athena.mit.edu (Joseph C Wang) writes:
>I'd like to do the following in TeX:

>left_text1 .......... [hbox] ................ right_text1
>other_left_text ..... [hbox] ................ right_text2

>What I want is for the hbox in the middle to be centered between the
>right and left margins.  Left text of various lengths to be flush left
>with the left margin, right text of several lengths to be flush right
>with the right margin, and leaders linking the text and the hbox.

\def\tripleline#1#2#3{\setbox0=\hbox{#2} \dimen0=-\wd0 
         \advance\dimen0 by\hsize
         \divide\dimen0 by 2
         \line{\hbox to \dimen0{#1\dotfill}\box0\hbox to \dimen0{\dotfill#3}}

I wonder if it will work.

-dh
-- 
"Odi et amo, quare id faciam, fortasse requiris?
   nescio, sed fieri sentio et excrucior"          -Catullus
D.A. Hosek.                        UUCP: uunet!jarthur!dhosek
                               Internet: dhosek@hmcvax.claremont.edu