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: Vincent Belaïche
Subject: Re: [bug #43122] texi2dvi does not compile enough times to get toc
Date: Fri, 04 Sep 2015 23:43:28 +0200

Answers below...

Le 04/09/2015 18:24, Gavin Smith a écrit :
> On 4 September 2015 at 14:04, Vincent Belaïche
> <address@hidden> wrote:
>> Ok, I had not understood the motivation. If generated_file_get is called
>> several times for the same tex run, then it is not only grepping that
>> is uselessly duplicated, but also sorting and uniqing.
>>

[...]

>>
>> Maybe rather than setting the flag in run_tex, generated_file_flag could
>> save the fls/log file timestamp in some variable generated_file_ts, and
>> use generated_file_cache when the file time stamp is equal to
>> $generated_file_flag.
>>
>> Well, anyway, this is another issue.
>
> Ok, we can worry about this later.
>
>>> From the point of view of the operating system, there's no problem,
>>> because these are two different files, in different directories.
>>
>> No ! With MikTeX I find the recorder file in the *SAME* directoy as the
>> the index file.
>
> All I can say is, are you sure?
>


[...]


I attached the a tar zip of dummy.t2d, and dummy.texi, and below is the
bash session.

What I see in dummy.t2d/pdf/build/dummy.flz, at lines 84 and 85 is that
dummy.fls is input from the build directoy, not from the bak directory !

Here is the session (with your latest patch):
======================================================================
$ rm -fr dummy.{aux,log,t2d,fl,fls}; texi2pdf -V --tidy dummy.texi
/local/bin/texi2dvi: Processing dummy.texi ...
/local/bin/texi2dvi: Checking TeX recorder support...
/local/bin/texi2dvi: /local/bin/texi2dvi: running pdfetex -recorder 
'\catcode126=12 \def\normaltilde{~}\catcode126=13 \let~\normaltilde ' '\input' 
openout.tex ...
/local/bin/texi2dvi: Checking TeX recorder support... yes
/local/bin/texi2dvi: 
BIBINPUTS='/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/.:'
/local/bin/texi2dvi: 
BSTINPUTS='/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/.:'
/local/bin/texi2dvi: 
DVIPSHEADERS='/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/.:'
/local/bin/texi2dvi: 
INDEXSTYLE='/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/.:'
/local/bin/texi2dvi: 
MFINPUTS='/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/.:'
/local/bin/texi2dvi: 
MPINPUTS='/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/.:'
/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/.:'
/local/bin/texi2dvi: 
TFMFONTS='/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/.:'
/local/bin/texi2dvi: texinfo.tex preloaded as `', version is `20150831' ...
/local/bin/texi2dvi: cd 
/c/Programmes/installation/texinfo-install/trunk/util/dummy.t2d/pdf/build
/local/bin/texi2dvi: Cycle 1 for ./dummy.texi
/local/bin/texi2dvi: /local/bin/texi2dvi: Running pdfetex -recorder '\input' 
'/c/Programmes/installation/texinfo-install/trunk/util/./dummy.texi' ...
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(c:/Programmes/installation/texinfo-install/trunk/util/dummy.texi
("C:\Programmes\MiKTeX 2.9\tex\texinfo\base\texinfo.tex"
Loading texinfo [version 2015-08-31.16]: pdf, fonts, markup, glyphs,
page headings, tables, conditionals, indexing, sectioning, toc, environments,
defuns, macros, cross references, insertions,
("C:\Programmes\MiKTeX 2.9\tex\generic\epsf\epsf.tex"
This is `epsf.tex' v2.7.4 <14 February 2011>
) localization, formatting, and turning on texinfo input format.) [1{C:/Users/V
incent/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] [2] [-1] [-2]
(Dummy node) Chapter 1 [1] Chapter 2 [2] Chapter 3 [3] [4] )<C:/Programmes/MiKT
eX 2.9/fonts/type1/public/amsfonts/cm/cmbx12.pfb><C:/Programmes/MiKTeX 2.9/font
s/type1/public/amsfonts/cm/cmr10.pfb><C:/Programmes/MiKTeX 2.9/fonts/type1/publ
ic/amsfonts/cm/cmr12.pfb><C:/Programmes/MiKTeX 2.9/fonts/type1/public/amsfonts/
cm/cmr9.pfb>
Output written on dummy.pdf (8 pages, 55586 bytes).
Transcript written on dummy.log.
/local/bin/texi2dvi: Moving dummy.pdf to 
/c/Programmes/installation/texinfo-install/trunk/util/dummy.pdf
/local/bin/texi2dvi: Running texindex dummy.fl
/local/bin/texi2dvi: Original xref files =
/local/bin/texi2dvi: New xref files      = dummy.aux
dummy.fl
dummy.fls
dummy.toc
/local/bin/texi2dvi: Cycle 2 for ./dummy.texi
/local/bin/texi2dvi: Backing up xref files: dummy.aux
dummy.fl
dummy.fls
dummy.toc
/local/bin/texi2dvi: /local/bin/texi2dvi: Running pdfetex -recorder '\input' 
'/c/Programmes/installation/texinfo-install/trunk/util/./dummy.texi' ...
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit)
entering extended mode
(c:/Programmes/installation/texinfo-install/trunk/util/dummy.texi
("C:\Programmes\MiKTeX 2.9\tex\texinfo\base\texinfo.tex"
Loading texinfo [version 2015-08-31.16]: pdf, fonts, markup, glyphs,
page headings, tables, conditionals, indexing, sectioning, toc, environments,
defuns, macros, cross references, insertions,
("C:\Programmes\MiKTeX 2.9\tex\generic\epsf\epsf.tex"
This is `epsf.tex' v2.7.4 <14 February 2011>
) localization, formatting, and turning on texinfo input format.)
(c:\Programmes\installation\texinfo-install\trunk\util\dummy.t2d\pdf\build\dumm
y.aux) [1{C:/Users/Vincent/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]
[2]
(c:\Programmes\installation\texinfo-install\trunk\util\dummy.t2d\pdf\build\dumm
y.toc) [-1]
(c:\Programmes\installation\texinfo-install\trunk\util\dummy.t2d\pdf\build\dumm
y.toc) [-2]
(c:\Programmes\installation\texinfo-install\trunk\util\dummy.t2d\pdf\build\dumm
y.toc)
(c:\Programmes\installation\texinfo-install\trunk\util\dummy.t2d\pdf\build\dumm
y.toc) (Dummy node) Chapter 1 [1] Chapter 2 [2] Chapter 3 [3]
(c:\Programmes\installation\texinfo-install\trunk\util\dummy.t2d\pdf\build\dumm
y.fls) [4] )<C:/Programmes/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmbx12.pfb
><C:/Programmes/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi12.pfb><C:/Progra
mmes/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmmi9.pfb><C:/Programmes/MiKTeX
2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb><C:/Programmes/MiKTeX 2.9/fonts/ty
pe1/public/amsfonts/cm/cmr12.pfb><C:/Programmes/MiKTeX 2.9/fonts/type1/public/a
msfonts/cm/cmr9.pfb>
Output written on dummy.pdf (8 pages, 77773 bytes).
Transcript written on dummy.log.
/local/bin/texi2dvi: Moving dummy.pdf to 
/c/Programmes/installation/texinfo-install/trunk/util/dummy.pdf
/local/bin/texi2dvi: Running texindex dummy.fl
/local/bin/texi2dvi: Original xref files = dummy.aux
dummy.fl
dummy.fls
dummy.toc
/local/bin/texi2dvi: New xref files      = dummy.aux
dummy.fl
dummy.fls
dummy.toc
/local/bin/texi2dvi: Comparing xref file dummy.aux ...
/local/bin/texi2dvi: Comparing xref file dummy.fl ...
/local/bin/texi2dvi: Comparing xref file dummy.fls ...
/local/bin/texi2dvi: Comparing xref file dummy.toc ...
/local/bin/texi2dvi: done.
======================================================================

So from the above, I think that with MikTeX, yes it is working, but this
is not because of your patch, but thanks to some MikTeX trick which I
don't know. This is why I am saying that your patch is not working, I am
meaning that it is not working *PER SE*.

Tell me where I am wrong...


There is another issue, dummy.texi is not run_tex'ed with the
catcode_special for ~, this is because the make_openout_test has caused
catcode_special to go to false.

On the other hand when openout.tex is run_tex'ed, there is some special
catcode for ~, which is useless.

In my first patch there was not this problem: catcode_special was set to
false instead of maybe at the beginning of the script, so that
openout.tex is compiled without this, but then it was set again to maybe
by resolve_use_recorder function. In my second patch, I did it
differently to take into account your remark about the -~ command line
option, so I just do the following in the make_openout_test function:

======================================================================
  save_catcode_special=$catcode_special
  catcode_special=false
  make_tex_cmd
  catcode_special=$save_catcode_special
======================================================================


I think that, if we want to keep your solution, we need to investigate
using -I dummy.t2d/pdf/bak on the command line to see if in this case
MikTeX will make the input from the bak dir, not from the build dir.

Anyway, I still prefer that we should solve it in texinfo.tex, because
that would allow using easily latexmk instead of texi2dvi to do the
job. I like texi2dvi, but I think that it makes texinfo more valuable to
people if we offer some diversity in tools.

VBR,
        Vincent



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
http://www.avast.com

Attachment: dummy.t2d.tgz
Description: Binary data

Attachment: dummy.texi
Description: application/texinfo


reply via email to

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