On 2024-07-20 G. Branden Robinson wrote: > There are limits to any heuristic tool's inferential power when presented with > very small inputs as we might see with minimal bug reproducers. It's hard to > accurately guess which macro package, if any, the input uses when there hardly > *is* any input. > > But, I'd like to think something can be done in this case.
[ I couldn't submit this via Savannah's clunky interface, it was rejected .. ] Just a shot from the hip: In a shell, I believe the following idea basically solves the problem: grep -E -n "\.TH|\.TS|\.TE" groff-tbl.troff | head -1 This would return 3:.TS H from the table file that demonstrated the problem. Since it is a ".TS" macro, the document is not a -man document. In other words, one can just check if the first macro returned is a ".TH" macro and then it is a -man document, otherwise not. If you could apply the finishing touches and convert to perl, wouldn't that be a good solution? Regards, Morten