[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Creating a table macro
From: |
Automation Department |
Subject: |
Re: [Groff] Creating a table macro |
Date: |
Thu, 19 May 2011 16:57:44 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I will look into HDtbl. Was hoping to stay within the boundaries of the
stock groff package if possible, but I'm not married to the idea.
Currently, it's a single pass but that can change if need be. The second
idea, an extension of Ted's idea, sounds like a definite possibility.
Thanks for your input!
Chad Roseburg
On 05/19/2011 02:09 PM, Tadziu Hoffmann wrote:
>
>> I see now, that for most purposes, macros involving
>> preprocessors should be avoided.
>
> For the most part, yes. There probably *are* some cool tricks
> you can do, but they would require a good idea of what happens
> internally.
>
>
>> I suppose one alternative would be to use special tags
>> within comments to be targeted with sed/perl/tt/m4 later.
>
> With regard to tables, you might also try the HDtbl package,
> a set of macros for typesetting tables which runs completely
> within groff, without using a preprocessor.
>
>
> Another idea you might pursue is to extend Ted's suggestion to a
> two-pass scheme (if you have forward cross-references in your
> text, you'll usually have a multi-pass scheme already): in the
> first pass, your table macros write out files, which are sourced
> in the second pass (but the source request should not be inside
> a macro, so soelim can pick it up, otherwise tbl won't see the
> table either), maybe like so:
>
> .so mytable1.tbl
> .mytable mytable1.tbl
> data data data
> ...
> .endmytable
>
> where "mytable" is a macro which writes a file which can be
> parsed by tbl (i.e., everything from .TS to .TE), and whose name
> is specified as an argument (in this example "mytable1.tbl").
> As an exercise for the experts, it might even be possible to
> (ugh!) redefine ".so" as the mytable macro, so you wouldn't
> have to give the filename twice...
>
>
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJN1a54AAoJEBi1nVMf5Zz5jdsH+wSLUuArtc8KA8kGit8LMJ4T
7AaMKxhp8Q+Tu0E3G5Qm/MaH7BQjIAHtjWluNKmKeWuIN9GXN7MCqa525B5Gr9Ic
J9d9H26FUEYPUMJBfBiYvaIjGBDfKvS4S5xKoSVstqN2iRVo+CdPGnATSCIVfNdv
IouK2W2tOFHrFfDSQnFCaHkHeNzXxFrB1XEF0qPuegFZT2Hl4XeF5VP5Lf6IXofF
Gp/PB+zFr6Bd3kdaFVWWsCRx5ORTjA6hjeSTR8S5VaGZhVDNsOpSUCdjTO3CQ8ws
+UjvhmpdbqxKytZMoEQ0WntnYbQbzkQYQfcngqt9UamnOsDVX+nZk1R1sqazCkM=
=Ld0G
-----END PGP SIGNATURE-----
- Re: [Groff] Creating a table macro, (continued)
- Re: [Groff] Creating a table macro, Ted Harding, 2011/05/18
- Re: [Groff] Creating a table macro, Automation Department, 2011/05/18
- Re: [Groff] Creating a table macro, Ted Harding, 2011/05/19
- Re: [Groff] Creating a table macro, Ted Harding, 2011/05/19
- Re: [Groff] Creating a table macro, Automation Department, 2011/05/19
- Re: [Groff] Creating a table macro, Tadziu Hoffmann, 2011/05/19
- Re: [Groff] Creating a table macro, Automation Department, 2011/05/19
- Re: [Groff] Creating a table macro, Tadziu Hoffmann, 2011/05/19
- Re: [Groff] Creating a table macro, Clarke Echols, 2011/05/19
- Re: [Groff] Creating a table macro, Automation Department, 2011/05/19
- Re: [Groff] Creating a table macro,
Automation Department <=
- Re: [Groff] Creating a table macro, Automation Department, 2011/05/19