groff
[Top][All Lists]
Advanced

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

Re: [Groff] Attaching a string to the beginning of each line?


From: Ted Harding
Subject: Re: [Groff] Attaching a string to the beginning of each line?
Date: Mon, 11 Nov 2002 21:48:59 -0000 (GMT)

On 11-Nov-02 Werner LEMBERG wrote:
> This is not possible currently (well, maybe it is, but a macro
> solution would be rather fragile I believe).  From troff's TODO list:
> 
>   A line prefix request to make e.g. French quotation possible:
> 
>     He said: >> blablablabla
>     >> blablabla blabla  bla
>     >> blabla blabla bla bla
>     >> bla bla bla blablabla
>     >> blabla. <<
> 
> Email quotations are the same from a typographical point of view.

The margin-character hack, though clumsy, will work.

However, for a variety of reasons (the email-prefix, Werner's
French-quotation issue, continuous _true_ underlining/strikeout, etc.)
what groff really needs is a "beginning-of-line" macro (default null)
which will be evoked at the moment troff starts to collect the material
to be formatted into the next output line (but it would have to "push
back" any left-over which didn't fit onto the previous line).

The nearest approximation that exists just now, and it is a very
special case, is the automatic line-numbering request ".nm".

The "beginning-of-line" macro for this case would simply emit ">> "
or whatever; this would then be followed by the text matter proper.

> Perhaps you can `abuse' margin characters to implement a hack (using
> properly defined margin characters `>',  `> >', `> > >', etc.).

It can be done (I've just managed a somewhat imperfect implementation),
but it seems to me that it is a bit complicated, especially handling the
shifting indent ...

Best wishes to all,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 11-Nov-02                                       Time: 21:48:59
------------------------------ XFMail ------------------------------

reply via email to

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