macros - where to define them?

Oliver Bandel <[email protected]> Sun, 24 Apr 2016 13:14:59 +0200
Newsgroups gmane.comp.type-setting.lout
Message-ID <20160424131459.Horde.HLcKLq3rvF9phMp-GK4iC1F@webmail.in-berlin.de>
Hello,

have tried around a bit on when and where to define certain macros.

Some things need to be defined, before the document-Includes
are include,
it seems, other things must be there before...

... some definitons, used in own include-files
(mydefs or changed document-styles, "doc" for example)
don't know some symbols, so I can't use @R for example, or @CurveBox.

Is the export-keyword the way out?

Where to use it, I'm not sure, how to make things working easily.


One example of problems:

If have
macro @REAL { @Outline @R R }
inside mydefs, I get the err-msg:

==================================================================================
lout lina-01.lout > lina-01.ps
lout file "mydefs" (from "linadoc" line 30, from "lina-01.lout" line 15):
    19,24: symbol @R unknown or misspelt
lout file "linadoc" (from "lina-01.lout" line 15):
     42,1: fatal error: exiting now (error in definitions)
Makefile:19: recipe for target 'ps' failed
==================================================================================

When commenting out, the err-msg is gone.

When using { @Outline @R R } directly inside the document,
it does work.

Whats the problem here, how can it be fixed?


Ciao,
    Oliver