[Top][All Lists]

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

Re: bug in the display mechanism of the ms macros

From: Werner LEMBERG
Subject: Re: bug in the display mechanism of the ms macros
Date: Thu, 16 Dec 2004 15:05:31 +0100 (CET)

> It seems that the display mechanism is broken in the ms macro package.
> Any LP/IP within the display seems to terminate the display.
> So, if foo is the example above (without the horizontal lines),
> the result is:
> foo:4: macro error: automatically terminating display
> foo:8: macro error: DE without DS, ID, CD, LD or BD
> The example above works fine with the traditional ms macros.
> Not being able to use LP/IP within a display is a major problem.

Incidentally, this has been reported recently to me.  Here is my
previous answer.



[The question is whether .LP should be allowed in .DS/.DE or not; the
display is used to hold a grap image.]

> It turns out that, by changing ".LP" to ".br", I can get groff to
> stop complaining.  This is (a) a usable workaround and (b) an
> indication of the nature of the problem.

Well, the problem is that this:


causes an error.

>From groff_ms.man:

  Use displays to show text-based examples or figures (such as code
  listings).  Displays turn off filling, so lines of code can be
  displayed as-is without inserting `br' requests in between each
  line.  [...]

The original ms documentation says:

  To prepare displays of lines, such as tables, in which the lines
  should not be re-arranged, enclose them in the commands .DS and .DE

A grap figure isn't text-based, isn't it?  And using .LP actually does
rearrange lines into a paragraph shape...

What you should do instead is

  <grap figure together with caption>

Since the old UNIX ms macros accept .LS within .DS/.DE, I wonder
whether we shall emulate that by temporarily mapping all paragraph
commands to `.br', emitting a proper warning message...

reply via email to

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