On Friday, 1 May 2026 23:34:34 BST Sebastien Peterson-Boudreau wrote:
> > If you put .LP at the start of your document the error is resolved. Now
> > for
> > the technical reason why you get an infinite loop!
> > 
> > When ms starts up most of its macros are aliased to LP, (to prevent using
> > them before the first real LP). So your aliasing/renaming actually points
> > FOO to LP. The first call to LP eventually results in NH being aliased to
> > @NH (the real guts of what NH does) and LP being aliased to @LP, but your
> > alias occurs before that has happened. This confuses ms as much as it
> > confuses me! But the result is that a loop is formed with FOO/LP calling
> > itself.
> > 
> > The moral of the story is to always use one of the macros initially
> > aliased to LP (or LP itself) first (after using the macros for the cover
> > - if any).
> Thanks! That makes sense.
> 
> I'm wondering if there is any way to reconcile this with the need to
> call RP first (if used).  Say I'm writing a tmac file that I want to
> source at the start of the document, before I call any macros, and
> within this file I want to rename NH; I cannot call any ms macros
> within this file, because it will be sourced at the start of the
> document, before the RP call. Is there any resolution?
> 
> Thanks!

You might try:-

.als FOO @NH

I.e. what NH becomes after ms has initialised itself, at least it won't cause 
a loop. Of course you can't actually use FOO until ms has initialised, but at 
least you can do the alias early and start the document:-

.FOO 1
Foontastic

to get a level 1 heading. (not tested).

Cheers

Deri
 




  • ... Sebastien Peterson-Boudreau
    • ... Deri via discussion of the GNU roff typesetting system and related software
      • ... Sebastien Peterson-Boudreau
        • ... Deri via discussion of the GNU roff typesetting system and related software

Reply via email to