This space is, as far as I know, impossible to avoid between two separate \message
s. The solution would be to first combine all the contiguous material in one macro (adding material with \edef\foo{\foo <material>}
), and then doing \message{\foo}
.
To really know where the space comes from, look in tex.web
, documented source code of TeX. The relevant procedure seems to be procedure issue_message;
, which calls @<Print string |s| on the terminal@>
, defined as follows.
@ @<Print string |s| on the terminal@>=
begin if term_offset+length(s)>max_print_line-2 then print_ln
else if (term_offset>0)or(file_offset>0) then print_char(" ");
slow_print(s); update_terminal;
end
I think that print_char(" ")
is the culprit. A related question on \write
rather than \message
was answered by @TH. last January, and he introduced me to reading tex.web
.