bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #43122] texi2dvi does not compile enough times to get toc


From: Gavin Smith
Subject: Re: [bug #43122] texi2dvi does not compile enough times to get toc
Date: Fri, 18 Sep 2015 14:30:25 +0100

On 18 September 2015 at 09:52, Gavin Smith <address@hidden> wrote:
>> I agree, but on the other hand I must now withdraw what I had previously
>> written: the current fix in fact does not work as expected for MikTeX. I
>> had thought that everything was fine because the compilation went
>> through without any halt due to an error. However, having a look at the
>> recorder log (.flz file) I realized that the sorted indexes are input
>> from the build directory, not from the bak directory.
>>
>> I have the following output when I verbose:
>>
>> /local/bin/texi2dvi: 
>> TEXINPUTS='/c/Programmes/installation/texinfo-install/trunk/util/dummy.t2d/pdf/bak:/c/Programmes/installation/texinfo-install/trunk/util:/c/Programmes/installation/texinfo-install/trunk/util/.:../bak'
>>
>> But in the recorder I have
>>
>> INPUT 
>> c:/Programmes/installation/texinfo-install/trunk/util/dummy.t2d/pdf/build/dummy.fls
>> INPUT 
>> c:/Programmes/installation/texinfo-install/trunk/util/dummy.t2d/pdf/build/dummy.cps
>>
>>
>> So, it seems that MikTeX is running with the build directory as current
>> directory, and that although the build directory is not in TEXINPUTS it
>> is implicitely searched before pathes in the TEXINPUTS envvar.
>
> This looks like a MikTeX bug.
>
> For clarification, this is a problem because MikTeX will have
> dummy.fls open for both writing as a recorder file and reading as an
> index file. (Mentioning because I forgot this, briefly.)
>
> Where there is a will, there is a way. This could be fixed by making
> all input files be read from a different directory from the current
> directory.

After mulling it over, I've come up with the following:

Index: texi2dvi
===================================================================
--- texi2dvi    (revision 6632)
+++ texi2dvi    (working copy)
@@ -1366,7 +1366,7 @@
 run_core_conversion ()
 {
   # Backup a sorted index file
-  test -f "$in_noext.fls" && cp "$in_noext.fls" "$in_noext.f0s"
+  test -f "$in_noext.fls" && mv "$in_noext.fls" "$in_noext.f0s"

   case $in_lang:$latex2html:`out_lang_tex` in
     *:dvi|*:pdf|latex:tex4ht:html)

====================

That is, force the *.fls file to be read from the backup directory
because no such file will exist in the current directory.

Of course, that relies on the recorder file not being created
immediately and identified for opening for reading. That's possible,
with what you found with MikTeX seemingly being able to read from a
file of one filename while writing out a recorder file with exactly
the same name at the same time. Alas, even if the format of the
recorder file is consistent across TeX derivatives, the exact timing
of files being opened and closed may not be.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]