[tex-live] Bug in TexLive 2005 and 2007? Non-writable aux-file

George N. White III gnwiii at gmail.com
Tue Mar 6 21:45:29 CET 2007


On 3/6/07, Philip & Le Khanh
<Philip-and-LeKhanh at royal-tunbridge-wells.org> wrote:

> I confess I was confused by the possible involvement
> of LaTeX, particularly as the log file shewed
> "\openout1 = `ex.tex'." which did not appear
> in the original.  However, I have now replicated
> the problem using Plain TeX :
>
>
>  > ALPHA6::Chaa006 : type ex.tex;3
>  > \newwrite \aux
>  > \immediate \openout \aux = ex.aux
>  > \immediate \write \aux {END}
>  > \immediate \closeout \aux
>  >
>  > \end
>  > ALPHA6::Chaa006 :
>
> and I can confirm that (under VMS), Ctrl-C followed
> by "X" has exactly the same effect as with the LaTeX
> example.  Thus it does indeed seem that it is TeX
> itself that is implicated, rather than LaTeX or Web2C.

It isn't just Ctrl-C that produces unexpected behaviour -- entering a
<CR> results in "END" being written to ex.tex, with log entry:

Please type another output file name:
\openout0 = `ex.tex'.

Entering Ctrl-D (on linux) gives "! Emergency stop." instead of "!
Interruption." and the input is preserved.

If the log file is not writable pdftex's behaviour is reasonable -- it
keeps asking for the filename until it either gets one it can use or
gets a <Ctrl-D> and quits:

>From tex.web:
  ------------------------------
@<Try to get a different log file name@>=
begin selector:=term_only;
prompt_file_name("transcript file name",".log");
end

pack_job_name(".log");
while not a_open_out(log_file) do @<Try to get a different log file name@>;
log_name:=a_make_name_string(log_file);
selector:=log_only; log_opened:=true;
  ------------------------------

For \write the difference is that ".tex" is supplied to prompt_file_name():

      while not a_open_out(write_file[j]) do
        prompt_file_name("output file name",".tex");
      write_open[j]:=true;

so the name defaults (e.g., for <Ctrl-C> or <CR> to
<original_name>.tex if the user doesn't supply a new name at the
prompt.  The problem doesn't arise if <original_name> isn't
the jobname, but also consider:

$ cp ex.tex exx.tex
$ tex exx
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
 %&-line parsing enabled.
entering extended mode
(./exx.tex
! I can't write on file `ex.aux'.
l.4 \immediate \openout \aux = ex.aux

Please type another output file name: exx
 )
No pages of output.
Transcript written on exx.log.
$ cat exx.tex
END






-- 
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia


More information about the tex-live mailing list