groff
[Top][All Lists]
Advanced

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

[Groff] tbl - extended format specification


From: Heinz-Jürgen Oertel
Subject: [Groff] tbl - extended format specification
Date: Sat, 14 Jun 2003 18:17:15 +0200
User-agent: KMail/1.5.1

Am Samstag, 14. Juni 2003 13:41 schrieb Werner LEMBERG:
> > Or may be better, the possibility to call a user defined macro at
> > the begining of each table entry?
>
> Do you want to implement it?
>

OK, it seems to be easy to implement. Looks like this addition to tbl(1)

Extending the gnu-tbl format specifcation
(added to the column key letters)

m,M 
 Either of these specifiers may be followed by a macro name 
 (either one or two characters long), or long name in parentheses
 (the last form is a GNU tbl extension).
 A one-letter macro name must be separated by one or more blanks
 from whatever follows.
 The macro which name can be specifies here must be defined before 
 creating the table and is called just before the tables cell text is 
 output. 
 As implemented now, this macro is only called when block input is used,
 that is text between T{ and T}.
 The macro should contain only simple troff requests to change the text block
 formatting, like text adjustment, hyphenation, size or font.
 The macro is called _after_ other cell modifications like b,f or v
 are output. Thus the macro can overwrite other modifiaction
 specifiers.


and used like shown here:
.de ML1
.tm macro left 1
.ad l
..
.de MR1
.tm macro right 1
.ps +4
.vs +2
.nh
.ad r
..
.TS
lm(ML1) rm(MR1).
T{
Alles nicht so schlimm,
wird relativ einfach zu implementieren sein.
Gib die Hoffnung nicht auf.
T}      T{
Rechte Seite.

Ist
auch nur
ein bischen Text.
Macht die Implementierung
nicht gerade einfacher.
T}
_
.TE




with best regards / mit freundlichen Grüßen

   Heinz
+===================================================================
| Heinz-Jürgen Oertel  port GmbH  http://www.port.de
+===================================================================


reply via email to

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