[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] indentation for eqn
From: |
Ralph Corderoy |
Subject: |
Re: [Groff] indentation for eqn |
Date: |
Tue, 23 Oct 2001 18:21:23 +0100 |
Hi Bernd,
> The following patch allows to indent the eqn commands .EQ and .EN.
I don't think that's a good idea. It's one thing to make an internal
troff request match all the others but .EQ is outside troff proper and
this therefore seems something new. Given that tbl, etc., will all
need to be changed too shouldn't there be some discussion first?
> + if (linebuf.length() >= 3 && linebuf[0] == '.') {
> + char c;
> + int i = 1;
> + int i1;
> + while ( (c = linebuf[i]) == ' ' || c == '\t' )
> + i++;
> + if (linebuf[i] == 'E') {
> + i++;
> + i1 = i + 1;
> + if (linebuf[i] == 'N'
> + && (linebuf.length() == i1 || linebuf[i1] == '\n'
> + || linebuf[i1] = ' ' || linebuf[i1] == '\t'
> + || compatible_flag))
> + break;
> + else if (linebuf[i] == 'Q'
> + && (linebuf.length() == i1 || linebuf[i1] == '\n'
> + || linebuf[i1] = ' ' || linebuf[i1] == '\t'
> + || compatible_flag))
> + fatal("nested .EQ");
This seems broken. If compatible_flag then I'd expect the whitespace
after `.' to be disallowed. Instead, this seems to allow it. Have I
misunderstood the use of compatible_flag?
.EQxxx originally allowed if compatible_flag
. EQxxx now also allowed if compatible_flag
Cheers,
Ralph.