[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Book covers in Lout ?
From: |
Carl Glassberg |
Subject: |
Book covers in Lout ? |
Date: |
Fri, 15 Jul 2005 20:10:54 -0700 |
Hi, I am new to Lout.
I am having trouble designing a book cover.
I can get the back cover, the spine, and the front cover rectangular areas
drawn by using @Place but centering/orientation of text is proving difficult.
I can't help thinking I should use @Diag or something else instead to join
the smaller rectangles while allowing easy text placement. But what and how ?
The entire cover is represented by the largest rectangle and contained
within it are three non-overlapping side-by-side or stacked rectangles that
subdivide the cover into regions.
Text is not supposed to flow between these regions, at least for most covers.
I am including a stripped-down version of the commands that at least draw
the rectangles apparently correctly.
However, the remaining problems are:
1) No centering of text on the spine and on the front and back cover regions.
2) The lettering on the spine is not correct in orientation with respect to
the lettering on the two covers.
Also, I have hard-wired the measurements for the cover (bad), which here
are 3" wide x 5" high.
The spine is 1" thick and the front and back cover are 3" by 2" each.
3) Dimensions of the overall cover and the spine should really be
parameters, along with starting coordinate of one corner.
The numeric constants below are really related to one another since the
rectangles match in width and join.
If you start with a given coordinate of one corner of a rectangle, knowing
the width and height and spine thickness of the cover, the
dimensions/coordinates of all the smaller rectangles can be calculated.
I apologize for hard-wiring the values. I calculated them from equations,
but didn't know how to put the equations into the Lout commands.
I would appreciate any help or criticism.
Thanks
Carl
#
------------------------------------------------------------------------------------------------------------------------------
# Commands to draw three rectangular regions subdividing a larger
rectangle. ("book cover")
# Problems remaining are:
# 1) No centering of text on the spine and on the front and back cover regions.
# 2) The lettering on the spine is not correct in orientation with respect
to the lettering on the two covers.
# 3) Dimensions of cover and spine should be parameters and not hard-wired.
@SysInclude { diag }
@SysInclude { doc }
@Doc @Text @Begin
@Place
x { 4i }
y { 3i }
red @Colour
{
@Box margin { 0i } 3i @Wide 5i @High {}
}
# draw edges of outside rectangle using red lines
@Place
x { 4i }
y { 6i }
green @Colour
{
@Box margin { 0i } 3i @Wide 2i @High @Heading { Front Cover }
}
# draw a rectangle for the front cover and write some text there
@Place
x { 4i }
y { 5i }
black @Colour
{
@Box margin { 0i } 3i @Wide 1i @High @Heading { Spine Text }
}
# draw the spine rectangle and write some spine lettering
@Place
x { 4i }
y { 3i }
blue @Colour
{
@Box margin { 0i } 3i @Wide 2i @High @Heading { Back Cover }
}
# draw the back cover rect. and write some text there
@End @Text
- Book covers in Lout ?,
Carl Glassberg <=