# [tex-k] exit code and --interaction

Joachim Schrod jschrod at acm.org
Sat Nov 1 10:57:34 CET 2008

Jonathan Kew writes:
> On 31 Oct 2008, at 23:07, Karl Berry wrote:
>
> >    You can't pipe complete documents into TeX when using batchmode;
> >
> > I'm surprised.  Have you ever looked into it?
>
> I don't think it's surprising, given how TeX operates. Piping to stdin
> is a way of providing text to the "terminal input" in TeX. But in
> \batchmode, it doesn't read from the terminal, it just processes the
> given filename or "first line" from the command-line; if it doesn't
> reach an \end, it halts with an error rather than attempting to read
> from term_in.

Jonathan beat me to an answer. :-)

At that time, I pondered if one could introduce a special file name
for stdin (e.g., "-") that would also process stdin as normal' file
and not as term_in. Then the input would not be echoed to the log file
either, which would make log file parsing for errors and warnings
easier as well. But I never made it to look into the source code how
much effort this change would take. :-(

Best,
Joachim

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Joachim Schrod				Email: jschrod at acm.org
Roedermark, Germany
`