[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Included files are not preprocessed
From: |
Tadziu Hoffmann |
Subject: |
Re: [Groff] Included files are not preprocessed |
Date: |
Thu, 26 Jul 2012 15:53:52 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
> Nevertheless, I think it would be better then to store both
> a tmac.<foo>-raw file and a preprocessed tmac.<foo>.
>From what I've read, the old Bell Labs [nt]roff had an option
to read macro files in a sort of "compiled" version (to reduce
startup time), so if one used this feature it would have been
useful to install the compiled version of the *preprocessed*
macro file. But this is probably irrelevant for groff.
> Maybe a convention similar to that used for man pages --
> list required preprocessors on the first line of the source
> in a comment -- would be better?
Interesting that you mention this, because that's exactly
what I usually do (inspired by man, of course). That is,
I have a shell script "myroff" [*] which reads the first
line of the input file, interprets it as options, and calls
groff accordingly (and also opens/refreshes the gv window
with the output). You could also use this shell script as
a replacement for the "driver" program groff and build your
own pipeline with it instead.
(It goes without saying that such a script is of course
permanently under construction.)
[*] which, by the way, is bound to <F1> in Vim via
au BufNewFile,BufRead *.ro map <buffer> <F1> :up<CR>:!myroff "%"<CR><CR>
in my .vimrc (my *roff files are recognized by a ".ro"
(for "runoff") extension).
myroff
Description: Text document