lout-users
[Top][All Lists]
Advanced

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

Table Weirdness


From: Steven R. Baker
Subject: Table Weirdness
Date: 28 Dec 2000 02:17:48 -0500
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

I had some *major* weirdness with tables last night.  This message
contains my Lout code that I came up with, and an explanation of what
I was trying to do.  I desperately need some help with this...  :P

I own a business, and am writing business management software (to
function like QuickBooks, only better).  All of the outputted
information will be done using Lout (yay!).  Naturally, the Lout
output has to be generated by a computer program which I'm writing.
I'm having some trouble generating my bills, because there are
inconsistencies.

At the end of this message is the table portion of my Lout output that
I used to create a sample bill by hand.

The look is exactly what I want, but the inconsistencies make my code
look messy, and I was wondering if there was any way to clean it up.

Basically, i want to be able to put the head of the table, the items,
and then the end....  but that's the problem.

The lines in the center are all the same, except for the last one, the
last one has to be different because it has to draw the rules along
the bottom...  that's the exception that i want to get rid of.


Here's my code to generate my table.  I would appreciate it if someone
could make this more uniform (ie: easier to generate from a program)
and perhaps shorter.  Maybe I'm doing things the long way?

Anyways, thanks in advance for any help, I apologize for the size of
this message.

@CentredDisplay @Tbl
apaint { lightgrey }
aformat {
 @Cell rule { yes } rulebelow { no } indent { ctr } @B A |
 @Cell rule { yes } rulebelow { no } indent { ctr } @B B |
 @Cell rule { yes } rulebelow { no } indent { ctr } @B C |
 @Cell rule { yes } rulebelow { no } indent { ctr } @B D }
bformat {
 @Cell ruleleft { yes } ruleright { yes } indent { left } A |
 @Cell ruleleft { yes } ruleright { yes } indent { ctr } B |
 @Cell ruleleft { yes } ruleright { yes } indent { align } C |
 @Cell ruleleft { yes } ruleright { yes } indent { align } D }
cformat {
 @Cell rule { yes } ruleabove { no } indent { left } A |
 @Cell rule { yes } ruleabove { no } indent { left } B |
 @Cell rule { yes } ruleabove { no } indent { align } C |
 @Cell rule { yes } ruleabove { no } indent { align } D }
dformat {
 @Cell rule { no } A |
 @Cell rule { no } B |
 @Cell ruleleft { yes } ruleright { yes } paint { lightgray } C |
 @Cell ruleleft { yes } ruleright { yes } paint { lightgray } 
       indent { align } D }
eformat {
 @Cell rule { no } A |
 @Cell rule { no } B |
 @Cell rule { yes } ruleabove { no } paint { lightgray } 
       14p @Font @B C |
 @Cell rule { yes } ruleabove { no } paint { lightgray } 
       indent { align } 14p @Font @B D }
{
@Rowa
 A { Description }
 B { Qty }
 C { Rate }
 D { Amount }

@Rowb
 A { Labour }
 B { 2.5 }
 C { $25^.00"/"hr }
 D { $62^.50 }
@Rowb
 A { Microsoft{ address@hidden Mouse }
 B { 1 }
 C { US$54^.95 }
 D { $81^.33 }
@Rowb
 A { Corel WordPerfect{ address@hidden Office 2000 Deposit }
 B { 1 }
 C { $26^.94 }
 D { $26^.94 }
@Rowc
 A { Labour }
 B { 13.75 }
 C { $25^.00"/"hr }
 D { $343^.75 }

@Rowd
 A { }
 B { }
 C { Subtotal }
 D { $514^.52 }
@Rowd
 A { }
 B { }
 C { PST (8%) }
 D { $41^.16 }
@Rowd
 A { }
 B { }
 C { GST (7%) }
 D { $36^.02 }
@Rowe
 A { }
 B { }
 C { Total }
 D { $591^.70 }
}

@Place x { { { left + right } - xsize } / 2 } y { foot + ysize } {
@CurveBox paint { lightgrey } 8p @Font @I clines @Break { 

Please forward payment immediately to address listed above.  Bills not 
collected within 30 days of the issue date will be forwarded to a
collection agency and an additional collection fee of up to $150.00 may apply. 

} }






reply via email to

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