groff
[Top][All Lists]
Advanced

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

[Groff] Comments affecting groff output?


From: Anton
Subject: [Groff] Comments affecting groff output?
Date: Thu, 14 Jul 2011 00:41:13 +0400

Hello all,

I  have come across a very strage situation in which
the behaviour of groff seems to depend on:

  a.  whether it happens in a diversion or not and
  b.  the presence of a comment.

In the example below it is  demonstrated  using  the
.tm request:
----------------------------------------------------
.de QS
.   nr oldVPos \\n[.d]
.   if (2=2) \{\ \"Remove this comment including the space in col. 17
'      nf
.   \}
.   nr ofs (u;\\n[oldVPos]-\\n[.d])
.   ie (\\n[ofs]=0) .tm \\n+[tn]. Test passed.
.   el              .tm \\n+[tn]. Test not passed: Offset = \\n[ofs]
.   di quot
..
.
.nr tn 0 1
.QS
.QS
.QS
.di
.di
.di
----------------------------------------------------
With  the  comment  in  line  4, I get the following
error output:

  1. Test not passed: Offset = -1
  2. Test not passed: Offset = -40
  3. Test not passed: Offset = -40

and, removing the comment so that the line 4  termi-
nates  in  '\', because even an empty space triggers
the problem:

  1. Test passed.
  2. Test passed.
  3. Test passed.

Why is this happening?

Thanks in advance,
Anton



reply via email to

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