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

Achim Zeileis Ach|m@Ze||e|@ @end|ng |rom u|bk@@c@@t
Sat Aug 28 09:47:03 CEST 2021


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

> I have constructed a minimal reproducible example which is contained
> in the attached file "mreprex.txt".
>
> This *.txt file should be split into two files, mreprex.tex and
> mreprex.bib.  (I wasn't sure whether *.tex and *.bib files would make
> it through to the list.)
>
> After doing the splitting, start R, execute
>
> tools::texi2pf("mreprex.tex")
>
> and view the resulting mreprex.pdf file.  Then edit mreprex.bib
> and change (e.g.) the version number from "0.0-21" to "0.0-22".
>
> Re-run tools::texi2pf("mreprex.tex") and view mreprex.pdf.  You will
> see that it hasn't changed; the version number cited is still given as
> 0.0-21.  Now remove mreprex.bbl, re-run tools::texi2pf("mreprex.tex")
> and view mreprex.pdf.  You will see that the version number is given as
> 0.0-22 as it should be.
>
> Should this be considered a bug?  If so, what is the appropriate way of
> drawing this to the attention of those who have the power to fix it?
>
> Thanks.
>
> cheers,
>
> Rolf Turner
>
> -- 
> Honorary Research Fellow
> Department of Statistics
> University of Auckland
> Phone: +64-9-373-7599 ext. 88276
>



More information about the R-help mailing list