Filtering TeX tracing output to isolate specific package diagnostics
0 reputation · 30 Dec 2022, 16:27 UTC
TeX provides several primitives for diagnostic logging, such as \tracingcommands, \tracingmacros, and \tracingoutput. While these are essential for debugging macro expansions, enabling them globally often generates an overwhelming volume of log data, making it difficult to identify specific issues within a complex document.
The trace package allows for selective activation of tracing around specific blocks of code. However, there is no native mechanism to filter or suppress tracing output based on the originating package or a specific set of defined macros without manually toggling the trace state.
Assuming a standard pdfTeX or LuaTeX environment, what is the most efficient way to isolate diagnostic alerts for a single package while suppressing noise from the rest of the document? Does a method exist to programmatically filter tracing output by scope or identifier?