groff
[Top][All Lists]
Advanced

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

Re: [Groff] Fancy tbl tricks


From: Roger Leigh
Subject: Re: [Groff] Fancy tbl tricks
Date: Sun, 15 Feb 2004 14:34:38 +0000
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

MJ Ray <address@hidden> writes:

> On 2004-02-10 20:29:31 +0000 Roger Leigh
> <address@hidden> wrote:
>
>> I'd like to write a database "report writer" that outputs troff -ms
>> code.
>
> I suggest looking at GRG http://www.gnu.org/software/grg/grg.html and
> seeing whether you can use it as a base.

I've taken a look, and it seems very good compared with the other Free
equivalents out there.  However, it doesn't solve my specific
concerns.

Suppose for example I want to generate an invoice for a customer
(boring example).  The main part will be a list of items being
invoiced, like this:

+------+-------------+----------+-------+-------+
| Code | Description | Quantity | Price | Total |
+------+-------------+----------+-------+-------+
| ...  |     ...     |   ...    |  ...  |  ...  |
+------+-------------+----------+-------+-------+
|                         Grand Total   |  ...  |
+---------------------------------------+-------+

If it runs over more than one page, I want a "Balance carried forward"
at the bottom of the page and "Balance brought forward" at the top of
the next page.  If I'm using GURGLE or Perl, I can fix the table
length to say 30 lines/page and do this manually, but it would be
great if this logic could go in the typesetter rather than the
reporting language (since the reporting language has no knowledge of
the page length, font size etc.).  i.e. I'd like groff to handle
splitting of tables and associated formatting rather than having to
do it "manually".


I've attached an initial spec for how I'd like it doing, as posted to
c.o.l.d.apps.  There's a thread in comp.os.linux.development.apps on
this topic.  The spec is outdated--I no longer think m4 is sufficient,
but equally I think Perl and other scripting languages are too
powerful.  Ideally, I'd like to delegate as much formatting and
processing as possible to the typesetter/postprocessor, but I'm not
yet sure to what extent this is possible.


Regards,
Roger

-- 
Roger Leigh

                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.

Attachment: REPORTS
Description: Report Generator specification (initial draft)


reply via email to

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