lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

@Diag question


From: Joerg van den Hoff
Subject: @Diag question
Date: Wed, 27 Aug 2008 13:26:15 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

hello,

I've learned of Lout's existence only a few days ago and I'm only starting
to come to terms with it. what I've seen up to now sure looks great.
I'm a bit embarrassed, that I've missed it completely up to now :-)

otherwise I'm a long time (and rather content) troff/groff user,
although for book size documents it leaves a lot to be desired in terms
of predefined macros.
TeX on the other hand simply is too large a beast for my taste 
(and too dogmatic in it's "the formatter knows best" approach).

so maybe Lout is the solution...

my first Lout problem concerns troff/`pic' like diagrams for which @Diag
seems the closest analogue. 

problem 1:
----------
For a starter I want to get the following
`pic' diagram (if someone out there knows `pic'...):

.PS
B0: box "A"
move
B1: box "B"
A1: arrow  right at .25<B0.ne,B0.se> "K1" above
A2: arrow  left  at .75<B1.nw,B1.sw> "k2" below
.PE

this is a diagram of two equal size boxes horizontally aligned and one
boxwidth apart. they are connected by two horizontal arrows which are 25% and 
75%
along the way between the corner anchor points along the facing sides
of both boxes (these anchors also are defined in Lout, as I have seen in the 
manual).

using @Diag to get two boxes connected by arrows between two
predefined anchor points is easy enough (but for the above I would need
anchor points at "ENE" etc. which are missing, right?).

I was not able to find out how to freely position start and end point of
links on the object boundary in @Diag. 
question: how to do this? and can I define new anchor points
easily?

problem 2:
----------
while trying to find a solution for no. 1 (and to get clean control over
positioning of objects), I tried verbatim the example
on page 209 of the manual, which I used in a simple doc like this:

@SysInclude { doc }
@SysInclude { diag }
@Doc @Text @Begin
@Diag { 
@Box margin { 0c } 4c @Wide 5c @High 
// 
A:: @Square 
      translate { CTR to 0.5, 0.67 } 
    { @I A } 
B:: @Circle 
      translate { CTR to 0.8, 0.25 } 
    { @I B } 
} 
@End @Text

this does _not_ produce the diagram as in the manual. rather, vertical
positions are as expected, but horizontal positions are calculated
aparently using the current line widths, i.e. the (4 x 5)c box appears
left adjusted on the page in the expected size, 
but the "A" and "B" boxes are appearing
outside of this box at rel. horizontal positions of .5 and .8 of the
current line width, _not_ of the specified @Wide value.

what am I missing?

any help appreciated,

joerg

PS: lout version 3.36, MacOSX 10.4.11


reply via email to

[Prev in Thread] Current Thread [Next in Thread]