groff
[Top][All Lists]
Advanced

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

Re: [Groff] Included files are not preprocessed


From: Anton Shepelev
Subject: Re: [Groff] Included files are not preprocessed
Date: Sat, 21 Jul 2012 15:17:02 +0400

Tadziu Hoffmann:

> > Files  included  via .mso, .so, or -m, are never
> > run through preprocessors.
>
> That's why soelim was invented
>
>     http://tinyurl.com/d9yh2da
>     (link to the mailing list archive)
>
> (at least for .so, don't know about .mso or -m).

Thanks.  No, it doesn't work for either .mso or  -m,
and Werner explained why:

    Hmm.  Maybe you are right that some day peo-
    ple write a  standard  macro  package  <foo>
    which has to be preprocessed with, say, tbl.
    Nevertheless, I think  it  would  be  better
    then to store both a tmac.<foo>-raw file and
    a preprocessed tmac.<foo>.

Before asking this question I  too  had  thought  of
such  a  solution,  and had found it undesirable be-
cause it added an intermediate layer and the  burden
of  maintaining two copies of macro packages: origi-
nal and preprocessed.  It is similar to using a pre-
built  library  instead  of  a source file.  I don't
think it suits a script-based system like groff...

On the other hand, I already have  a  macro  package
which  I  use  to  maintain  more than one document.
Naturally, I want to keep it in the  tmac  directory
and call via the -m option, which I can't because it
has to be preprocessed with gpreconv on  account  of
its containing bits of Russian text...

    How  should  a  user know that a given macro
    package has to always be used with a certain
    preprocessor?

Good  question,  but  the alternative we now have is
that macro packages are never  preprocessed,  unless
used  in  an  inconvenient way -- via .so, which re-
quires system-specific setup like setting  up  paths
and symlinks for it to work.

I  don't have a better solution in mind, only a cou-
ple of suggestions:

  1.  Maybe a convention similar to  that  used  for
      man  pages -- list  required  preprocessors on
      the  first  line  of  the  source  in  a  com-
      ment -- would   be  better?   Of  course,  the
      source encoding will also have to be specified
      for gpreconv.

  2.  Have  an  option  to process all files: input,
      included via .so and .mso, and called  via  -m
      with  all  the preprocessors specified on com-
      mand line.  This would be a working,  although
      dirty, solution.

-- 
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments



reply via email to

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