groff
[Top][All Lists]
Advanced

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

[Groff] .als problem


From: Werner LEMBERG
Subject: [Groff] .als problem
Date: Sat, 04 Oct 2008 07:33:03 +0200 (CEST)

Folks,


look at this minimal example file `xxx':

  .de foo
  ..
  .als bar foo
  .de bar
  .  foo
  ..
  .bar

What do you expect?  Current reality is that troff bombs out with

  xxx:7: fatal error: input stack limit exceeded (probable infinite loop)

[It took me *hours* to discover this while trying to fix a bug which
currently prevents correct compilation of pic.html and
webpage.html...]

My expectation was that `.de' would be stronger than `.als', and my
first reaction was to fix this in the source accordingly.  However,
what should be done if you replace `.de bar' with `.am bar' (and a
non-recursive contents, of course)?

BTW, the documentation says

  -- Request: .als new old
      Create an alias named NEW for the request, string, macro, or
      diversion object named OLD.  The new name and the old name are
      exactly equivalent (it is similar to a hard rather than a soft
      link). [...]

I now tend to say that troff's behaviour is a feature.  If you insert

  .rm bar

right before the definition of `bar', the example works as expected.


    Werner




reply via email to

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