groff
[Top][All Lists]
Advanced

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

Re: [Groff] nop request and .tm


From: Werner LEMBERG
Subject: Re: [Groff] nop request and .tm
Date: Wed, 13 Sep 2000 06:08:52 +0200 (CEST)

> > It's part of groff already!  For example, say
> 
> >   groff -mtrace -mm ...
> 
> We're using groff 1.15 here, so I downloaded the 1.16 package and
> extracted tmac.trace.  However, when I test it out, the "trace
> enter" message gets read as text input, whereas the "trace ext"
> message goes through to stderr.  Am I missing something?  Are there
> hooks in 1.16 that are needed to prevent this? I like the idea
> though.

Strange.  It's just using `.tm'...  Maybe you try 1.16.1?  But this
shouldn't be the reason at all.  If you still have problems, send an
example.  I'm currently rewriting tmac.doc, and it works as expected.

> This explains for me the interoperability (I guess that's what it
> can be called) of the request and string syntax.  But to be useable
> in this way (both inline and as a request on line by itself)
> everything contained in the definition must be inline code --
> strings or escape sequences.  From my testing, I can't put
> conditional statements, for example, in the definition; they are
> sent to the output as strings of text.

I don't see a problem.  For example, this works as expected:

----------------------------------------------------------------------
.de xxx
\c
.  ie t troff
.  el nroff
..

We are using \*[xxx].

We are using
.xxx
----------------------------------------------------------------------

The first line of the macro should be `\c', then it will behave
identically regardless of being called as `\*[xxx]' or `.xxx'.

Or do you mean something different?

> So I think another way of stating my question is: why does troff
> make a distinction between the excape syntax (e.g., "\*", or just
> plain "\") and the request syntax ("." or "'", i.e., the control
> character)?

Good question.  I think this is just for historical reasons --- the
late Joe Osanna has developed roff in this way.  TeX shows that a
single escape character is fully sufficient.

I believe that we should respect this, and I won't change groff's
paradigm.  If you want to do that, just use TeX (and a good dvi2tty
conversion program :-)


    Werner

reply via email to

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