groff
[Top][All Lists]
Advanced

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

Re: [Groff] Q: .B man macros and escape


From: Werner LEMBERG
Subject: Re: [Groff] Q: .B man macros and escape
Date: Thu, 04 Oct 2012 15:41:09 +0200 (CEST)

> As documented you can escape "\" by using "\\" or "\e\".

To which documentation are you referring?

> This went wrong in a man page. Please try the stripped down example:
> 
> .TH test 3 test
> .SH test
> .B "\en"
> .B "\\n"
> 
> with "man -l example.1" i see the \n only once.
> Bug of feature ?
> NTL i found no mention in groff_man.

If you say

  groff -Tutf8 -man -ww mantest.man

you get the following warning:

  mantest.man:4: a newline character is not allowed in an escape name

which you've probably missed.  Reason is that `"\\n"' doesn't survive
multiple expansions.  After the first expansion you have `\n', but
after the second expansion this tries to access a number register
which has the newline character as its name.

You have to say

  .B "\\\\n"

to make it work with backslashes only.


    Werner



reply via email to

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