[R] A glitch (???) in tools::texi2pf.
Ach|m@Ze||e|@ @end|ng |rom u|bk@@c@@t
Sat Aug 28 14:38:49 CEST 2021
On Sat, 28 Aug 2021, Rolf Turner wrote:
> On Sat, 28 Aug 2021 09:47:03 +0200
> Achim Zeileis <Achim.Zeileis using uibk.ac.at> wrote:
>> On Sat, 28 Aug 2021, Rolf Turner wrote:
>>> I have found that tools::texi2pf() ignores changes to the *.bib file
>>> unless the *.bbl file is removed prior to re-running
>> This is how texi2pdf (or actually texi2dvi) from texinfo behaves.
>> This is likely what tools::texi2pdf calles in your setup anyway. In
>> short, texi2dvi considers the .bbl as input files to the .tex and
>> does not remove them if they are available prior to calling texi2dvi.
>> (1) You can always re-run everything. Then simply start with a clean
>> directory and always use tools::texi2pdf(..., clean = TRUE). This
>> cleans up all the files it has produced (except the .pdf). But it
>> will preserve files left in the directory from previous runs.
>> (2) You can detect upstream changes, e.g., based on timestamps etc.
>> Then the traditional approach would be to use a Makefile.
> Thanks. I guess you're saying that it's a feature, not a bug. :-)
Also. But the main point is that it's a feature of texi2dvi from texinfo
which is called by tools::texi2dvi(). Hence, if you want to raise this
somewhere it would have to be with the texinfo maintainers.
> Well it's a feature that I intensely dislike, but that cuts no ice I'm
> sure, and I'll just have to cope with it. I can easily build a local
> function that will remove *.bbl before invoking tools::texi2pdf(),
> and use that, rather than calling tools::texi2pdf() directly.
> However I *really* believe that this is a bad feature, and is a Trap For
> Young Players. Hardly anyone knows what a *.bbl is or is for. Users
> would expect that changing the *.bib file would change the reference
> list in the output. (I.e. that texi2pdf() would re-run bibtex "under
> the bonnet", as the user would do if processing from the OS command line
> rather than applying texi2pdf() from R.)
The problem is that currently texi2dvi has no concept of judging whether
the .bib or .bbl were modified last.
> I wonder how many papers in the R Journal have errors in their
> reference lists due to the fact that authors corrected the *.bib file,
> reprocessed using texi2pdf() and did not notice that the error they
> corrected had *not* been corrected in the *.pdf output?
I don't know what the R Journal editors are doing but for JSS I'm cleaning
such files up (repeatedly actually) before compiling the final PDFs.
More information about the R-help