Subject: Re: [xml2rfc] #118: nroff output does not generate text that matches the text output

From: "xml2rfc issue tracker" <[email-masked]>
Date: Sun, 31 Mar 2013 17:52:16 -0000

#118: nroff output does not generate text that matches the text output

Comment (by [email-masked]):

 A couple of questions regarding this:

   1) What is the proper escape to use for lines which start with "."?  I
 first just
      did a \. escape, but some reading of a troff/nroff manual seemed to
 indicate that
      \&. was needed.  Are there other characters which need to be escaped
 at the start
      of a line, besides "." and "'" ?

   2) What is the right nroff output?  Should I just do .sp N, with no
 following blank
      line (where N is the blankLines count given in the <vspace/>
 command)?

-- 
----------------------------------+-------------------
  Reporter:  [email-masked]      |      Owner:
      Type:  defect               |     Status:  new
  Priority:  medium               |  Milestone:
 Component:  Version 2 cli nroff  |    Version:  2.4.x
Resolution:                       |   Keywords:
----------------------------------+-------------------

Ticket URL: <http://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/118#comment:2>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Sun, 31 Mar 2013 17:59:38 -0000

From [833]:

 Updated tests, see issue #118.

Ticket URL: </ticket/118#comment:3>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Sun, 31 Mar 2013 18:00:32 -0000

From [834]:

 Changed start-of-line nroff escape handling, see issue #118.

Ticket URL: </ticket/118#comment:4>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "xml2rfc issue tracker" <[email-masked]>
Date: Sun, 31 Mar 2013 18:55:07 -0000

From [835]:

 Updated tests, see issue #118, part 2.

Ticket URL: </ticket/118#comment:5>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>

---

From: "John Levine" <[email-masked]>
Date: 31 Mar 2013 23:25:20 -0000

> first just did a \. escape, but some reading of a troff/nroff manual seemed to
> indicate that \&. was needed.  Are there other characters which need to be escaped
> at the start of a line, besides "." and "'" ?

 \&. and \&' are correct

They are the only magic characters at the beginning of a line.

> following blank line (where N is the blankLines count given in the <vspace/>
> command)?

I don't think you can do any better than .sp N.  The exact output depends on
the macros and traps defined at the time, but in general they honor space
commands, perhaps truncating them at the end of a page.

If you want to force that amount of white space, even if it has to be on the next
page, it's

  .ne N
  .sp N