[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with a macro
From: |
esh |
Subject: |
Help with a macro |
Date: |
Tue, 02 May 95 16:40:54 -0700 |
What follows is a definition I use to create a title on documents. The
intent is something like
=============
This is Title
name
date
------
Where the top horizontal line is as long as the title text, the bottom is
half that. What I have lays things out properly, but does not adapt to
the width of the text.
Does anyone have any magic to make it do so? Or am I hoping for something
beyond the scope of Lout?
Here's the definition:
import @DocumentLayout
def @MakeTitle
named toplength { 3.55i }
named botlength { 1.85i }
named topthickness { 1.5 pt }
named botthickness { 0.75 pt }
named author { }
named date { @Date @Format { @Month @DayNum, @Year }}
right t
@Begin
@LeftDisplay lines @Break {
@Fig { @HLine linewidth { topthickness } {toplength @Wide {}}}
//0.5v t
//1.0v author
//0.25v date
//0.5v @Fig { @HLine linewidth { botthickness } { botlength @Wide {}}}
}
@End @MakeTitle
Another interesting variant on this would be to center everything line
by line even if the right parameter t requires more than one line. Again
the HLine lengths should be adaptable...
Thanks,
Ed
--------------------------------
Edward S. Hirgelt
Teknekron Software Systems
530 Lytton Avenue, Suite 301
Palo Alto, Ca 94301
address@hidden
415 833 2763
--------------------------------
- Help with a macro,
esh <=