Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • @UlrichDiez Yes, but in the first case only one line of the input file is read, because of \endinput, and, indeed, the \bye in it is not seen. Commented Jul 24, 2020 at 8:51
  • @UlrichDiez Possibly so. I've mailed Karl about it. Commented Jul 24, 2020 at 10:35
  • 2
    Without the % The file name is complete and the input action begins before any end-of-line is encountered; the first EOL seen is in fileb. With the % TeX is still trying to read the file name when it encounters EOL and triggers the pending \endinput while still in filea, discarding the rest of filea (if there was any), and dropping to interactive mode. Pressing enter gives a space character to terminate the file name, at which point TeX inputs fileb normally. Commented Jul 28, 2020 at 10:17
  • @DonaldArseneau Which is somewhat unexpected, don't you agree? Commented Jul 28, 2020 at 10:47
  • 3
    @egreg I might phrase it as "unsurprising, after the initial shock wears off". I think the way \endinput is delayed until the end of line is very unexpected to anyone not thoroughly familiar with TeX. These behaviors add to that, but don't change the story much. I don't think people expect one \endinput to end input from two different files, once they think about it. Commented Jul 28, 2020 at 23:13