[Top][All Lists]

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

Re: [Groff] preserve ascii escape characters from input

From: Ted Harding
Subject: Re: [Groff] preserve ascii escape characters from input
Date: Thu, 25 Feb 2010 09:29:06 -0000 (GMT)

On 25-Feb-10 08:41:26, Ralph Corderoy wrote:
> Hi Ted,
>> I *think* what he is trying to do is find out how to create groff
>> input such that the character "\" is displayed in the output.
> I read it as he's trying to get real ESC characters, ASCII 27, to be
> written to the terminal by man in order that he can give a description
> of an ANSI escape sequence and then show it in action.
> That the man page may be being displayed on a terminal that doesn't
> support such control-sequences, or may be being rendered as PostScript
> for printing, suggests this isn't a good idea.  Perhaps better would be
> to give an example command that shows the effect, e.g. using printf(1)
>     printf 'before\x1b[1mbold\x1b[mafter\n'
> and have the user run that if they think their terminal supports it.
> Cheers,
> Ralph.

Hi Ralph!
Following your comment, and after re-reading Leonardo's original
posting, I think we may both be right!

  "It would be neat if I could provide examples of the
   sequences' output in the very manpage itself, but
   for that I'd need to preserve ASCII escape characters
   (\033, '') that I wrote in the input file.  Groff
  seems to eat them away.  Is there a way to prevent this,
  or some troff command I can use to output ASCII 033?"

I was prompted by "Groff seems to eat them away", hence my advice
about using "\e" in order to see "\" in the output. You seem to
have been prompted by his statements about output which do suggest
that he is interested in displaying their effects (though I think
he has written ambiguously). And, since he wrote both ...

So I think we need to await, as Werner suggests, explicit
clarification from Leonardo.


E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 25-Feb-10                                       Time: 09:28:52
------------------------------ XFMail ------------------------------

reply via email to

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