[R] A glitch (???) in tools::texi2pf.

Rolf Turner r@turner @end|ng |rom @uck|@nd@@c@nz
Sat Aug 28 11:38:55 CEST 2021


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
> > tools::texi2pdf().
> 
> 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.
> 
> Alternatives:
> 
> (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.
> 
> Best,
> Z

Thanks.  I guess you're saying that it's a feature, not a bug. :-)

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.)

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?

cheers,

Rolf

-- 
Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276



More information about the R-help mailing list