[NTG-pdftex] non-pdf special ignored: <special>

Karl Berry karl at freefriends.org
Sat Jan 6 01:22:02 CET 2018

For ages now, I've been wishing that pdftex output the non-pdf special
it complains about finding. Often it's obvious, but sometimes it's not,
and why not report it?

Does anyone see a problem with this? All I can imagine is that scripts
trying to parse the output might be unhappy. So we can keep the original
error message unchanged, exclamation point and all, and just add the
special text.

As in something like the below (not tested). Probably better to truncate
the special text instead of printing the whole thing, as it could be
annoyingly long, but I'm wondering about the general idea.

Wdyt? --thanks, karl.

--- pdftex.web	(revision 791)
+++ pdftex.web	(working copy)
@@ -16257,8 +16257,12 @@
         if not (str_in_str(s, "PDF:", 0) or str_in_str(s, "pdf:", 0)) then begin
             if warn and not (str_in_str(s, "SRC:", 0)
                 or str_in_str(s, "src:", 0)
-                or (length(s) = 0)) then
+                or (length(s) = 0)) then begin
                     print_nl("Non-PDF special ignored!");
+                    print_nl("<special> ");
+                    slow_print(s);
+                    print_ln;
+            end;
         j := j + length("PDF:");

More information about the ntg-pdftex mailing list