Hi Hugh,
I work on groff upstream.
At 2023-08-15T22:46:30+1000, Hugh McMaster wrote:
> groff-message an.tmac:<standard input>:66: warning: tbl preprocessor
> failed, or it or soelim was not run; table(s) likely not rendered (TE
> macro called with TW register undefined)
>
> It seems TW is not defined in the number register.
>
> While I can define TW by adding `.nr TW 0` before .TS, I don't know if
> that's the correct solution.
It is a bad idea. The purpose of the `TW` register is defined in the
tbl(1) man page.
The register TW stores the width of the table region in basic units;
it can’t be used within the region itself, but is defined before the
.TE token is output so that a groff macro named TE can make use of
it. [...]
This information is necessary for macro packages that want to center
tables, a common feature of packages _except_ those that render man
pages. Because forgetting to run the tbl preprocessor is a common
error, during groff 1.23.0 development it occurred to me that I could
use this register as an indicator.
> Any ideas on fixing this warning, or is it best to ignore it for now?
The diagnostic message is trying to warn you that you _probably_ forgot
to run tbl. But there are other causes.
1. tbl crashed or aborted.
2. The man(7) document embedded the beginning of table in a different
file that it "sourced" with the `so` request, but soelim(1) was not
run on the document. This is valid, but not considered portable man
page composition style.[1]
3. A `TE` macro call is in the man page with no `TS` preceding it.
This could arise due to clumsy editing, unfamiliarity with the
man(7) language, or bad luck combined with inexperience (an ordinary
text line happened to begin with `.TE` and the page author didn't
realize that *roff would attempt to interpret that as a macro call).
I tried to cover these bases in the diagnostic, but might have failed.
Can you tell me what part of the message was confusing?
Regards,
Branden
[1] Any *roff can handle this. So can mandoc(1)--I just found that out.
This fact raises some interesting possibilities, since everything
that was ever called "man2html", the original motive for
groff_man(7)'s Portability section[2] has long gone to the dustbin.
[2] In groff 1.23.0, this section is now in groff_man_style(7).
Attachment:
signature.asc
Description: PGP signature