Update of bug #68435 (group groff):

                 Summary: Using eqn in a tbl - confusing warnings => confusing
warnings when formatting eqn(1) math in a tbl(1) table entry

    _______________________________________________________

Follow-up Comment #6:

[comment #0 original submission:]
> While checking current groff against the utp_book, a table in ch09.t throws
> up warnings which I don't uderstand. Attached is a minimal reproducer.


...
> troff:ch09.trf:44: warning: missing closing delimiter in width computation
> escape sequence; expected nonexistent special character or class 'EQ', got a
> newline [-w delim]
...
> troff:ch09.trf:46: warning: missing closing delimiter in width computation
> escape sequence; expected nonexistent special character or class 'EQ', got a
> newline [-w delim]


[comment #5 comment #5:]
> Shifting Status to "Invalid".  I didn't understand most of Bjarni's comments,
> but Deri seems to have withdrawn the report.

If the diagnostic quoted above is one of the bits that is tough to understand,
_that_ I can explain.

_Any_ special character escape sequence is valid as an escape sequence
delimiter.

_Even an undefined special character escape sequence_.

GNU _eqn_ and _tbl_ both use this trick.


$ git grep -n '\\(EQ' src/preproc/eqn/
src/preproc/eqn/pbox.h:76:#define DELIMITER_CHAR "\\(EQ"
$ git grep -n '\\\[tbl]' src/preproc/tbl
src/preproc/tbl/table.cpp:39:#define DELIMITER_CHAR "\\[tbl]"


These preprocessors never emit any code that _defines_ these special
characters.

So how come they don't produce warnings in category `char`?

Because they are used only ever as delimiters to delimited escape sequences,
_they are never formatted as text_.

So they don't even _need_ definitions.

It's monstrously clever.

But hmm...


eqn:"ch09.trf:18: error: unquoted escape


I see I have a couple more fish to fry for _groff_ 1.26.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68435>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to