[Top][All Lists]

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

Re: Still searching...

From: Oliver Bandel
Subject: Re: Still searching...
Date: Thu, 20 Sep 2001 23:09:37 +0200 (MET DST)


On Thu, 20 Sep 2001, Raúl Núñez de Arenas Coronado wrote:

>     Hello all :)))
>     I'm still searching for a way to have a 'preprocessed' lout
> output. What I want is to have a lout document including basicsetup
> and the like, run lout, and have another lout document, not converted
> to PS, with all the macros expanded and no inclusions.

If I understand correctly what you mean, then you are looking for a
macro-preprocessor, like m4 is.

m4 expands macros/definitions - and that maybe is, what you want.

You may expand MY_FONTSIZE  with 6p or 8p or so...

So, you can put the string MY_FONTSIZE (separated by non-alphanumerics
in the document... and notice: an underscore ("_") is detected as
an alphanumeric in m4...) into your document and then call

m4 <your_filename> -D MY_FONTSIZE=6p

and this will print the document to stdout, where
the string "MY_FONTSIZE" is substituded by the string

If you have a lot of substitutions, then it maybe
is better to write the substitution-definitions into
a file: define(MY_FONTSIZE,6p) ....

...but the gory details you can find in the documentation
of the m4-macro-pre-processor.


P.S.: The m4 was first written by Mr. Kernighan and Mr. Ritchie
      and the original-documentation is from the year 1977.
      It's a cool tool, but not very widespread.
      But I think you should have a look at it.

reply via email to

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