[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Re: new grotty format
From: |
Colin Watson |
Subject: |
Re: [Groff] Re: new grotty format |
Date: |
Wed, 19 Jun 2002 17:07:59 +0100 |
User-agent: |
Mutt/1.3.28i |
On Wed, Jun 19, 2002 at 03:22:58PM +0200, Werner LEMBERG wrote:
> > I put together a patch to grotty to allow the device control command
> > \X'sgr:0' to disable SGR output, which would allow this to be
> > controlled on a system-wide basis by man.local and mdoc.local.
>
> I think my new .color request is easier to use.
You're right, and I like it. Unfortunately it doesn't have any effect on
the way grotty renders bold, underline, etc., since that isn't
controlled by troff's colour commands. Would you consider this patch?
Index: tty.cc
===================================================================
RCS file: /var/cvs/groff/src/devices/grotty/tty.cc,v
retrieving revision 1.11
diff -p -u -r1.11 tty.cc
--- tty.cc 13 Feb 2002 23:50:43 -0000 1.11
+++ tty.cc 19 Jun 2002 16:04:32 -0000
@@ -357,6 +357,14 @@ void tty_printer::special(char *arg, con
{
if (type == 'u')
add_char(*arg - '0', env->hpos, env->vpos, env->col, env->fill, CU_MODE);
+ else if (type == 'p' && arg != 0) {
+ if (strncmp(arg, "sgr:", 4) == 0) {
+ if (arg[4] == '0')
+ old_drawing_scheme = 1;
+ else
+ old_drawing_scheme = 0;
+ }
+ }
}
void tty_printer::change_color(const environment *env)
I've tested this with:
.color 0
\!x X sgr:0
in man.local, and it has exactly the desired effect.
> > Unfortunately, putting \X'sgr:0'\c in man.local appears to cause an
> > extra couple of line breaks just after the first page header, which
> > is quite noticeable; I haven't been able to find a piece of troff
> > that will just embed 'x X sgr:0' into the ditroff output without any
> > surrounding motions.
>
> For such situations I've recently added the `output' request:
>
> .output x X sgr:0
Thanks, that was exactly the hint I needed. My attempts had been getting
far too convoluted ...
--
Colin Watson address@hidden
- Re: [Groff] Re: new grotty format, Colin Watson, 2002/06/17
- Re: [Groff] Re: new grotty format, Werner LEMBERG, 2002/06/18
- Re: [Groff] Re: new grotty format, Colin Watson, 2002/06/18
- Re: [Groff] Re: new grotty format, Werner LEMBERG, 2002/06/19
- Re: [Groff] Re: new grotty format, Colin Watson, 2002/06/19
- Re: [Groff] Re: new grotty format, Colin Watson, 2002/06/19
- Re: [Groff] Re: new grotty format, Werner LEMBERG, 2002/06/19
- Re: [Groff] Re: new grotty format,
Colin Watson <=
- Re: [Groff] Re: new grotty format, Werner LEMBERG, 2002/06/20
- Re: [Groff] Re: new grotty format, Colin Watson, 2002/06/20
- Re: [Groff] Re: new grotty format, Bernd Warken, 2002/06/21
- Re: [Groff] Re: new grotty format, Werner LEMBERG, 2002/06/21
- Re: [Groff] Re: new grotty format, Werner LEMBERG, 2002/06/19
Re: [Groff] Re: new grotty format, Larry Kollar, 2002/06/18
Re: [Groff] Re: new grotty format, Robert D. Goulding, 2002/06/19