groff
[Top][All Lists]
Advanced

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

[Groff] Trying to escape user input.


From: Mike Burns
Subject: [Groff] Trying to escape user input.
Date: Mon, 21 Apr 2008 19:05:24 -0500

I'm working on a document that will have certain sections replaced with user
input, and I'd like to make sure that the user input doesn't execute any
roff code.

I'm having trouble figuring out how to escape a "." after a newline.


Looking at the man pages I thought I could just change all "." after a
newline to "\.", and that would escape it, but this doesn't seem to work.  I
created a tiny 2-line roff input program to show my problem.

----------------foo.t--------------
There are many things I'd like to know about the way that roff works.
\.this is a line that starts with a <.>
-------------------------------------


I execute groff with

groff -ms -Tascii foo.t

and this gets written to stderr

foo.t:2: warning: macro `this' not defined

without the -ms package, the warning is not written to stderr, but the 2nd
line still doesn't show up in the output stream.

I'm running groff version 1.19.2

Thanks for any advice you can give.

  mike


reply via email to

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