On Apr 28, 2010, at 2:29 PM, Prof Brian Ripley wrote:

> Hmm, the construction of the PDF is done by pdlatex/hyperref, not by R.  What 
> latex setup is this, and (guessing it is some version of MiKTeX) does it have 
> a texi2dvi.exe?  If so, the conversion from our .tex file to PDF is managed 
> entirely by texi2dvi.exe, and my guess is that it has done too few passes.  
> You should be able to verify that by using Rd2pdf --no-clean and running 
> texi2dvi yourself on the saved .tex file.  Most likely running pdflatex on 
> the .tex one more time will resolve this, so if you want to check 
> texi2dvi.exe you would need to copy the .tex elsewhere.
> 
> (The less likely alternative is that this is managed by tools::texi2dvi and 
> it is doing too few passes.)
> 
> If you have not already done so it would be worth checking that your latex 
> setup is fully updated: latex package hyperref is involved and that is 
> updated very frequently (more than weekly).

I'm seeing the same issue with ISwR. It looks like a generic LaTeX issue where 
we need to wait with the makeindex step until the TOC is in place. An easy fix 
would be to hand-edit the Rd2dvi script to make an extra pass. E.g. replace

if test "${out_ext}" = pdf; then
  ${R_PDFLATEXCMD} ${R_TEXOPTS} Rd2 || status=1

with 

if test "${out_ext}" = pdf; then
  ${R_PDFLATEXCMD} ${R_TEXOPTS} Rd2 &&
  ${R_PDFLATEXCMD} ${R_TEXOPTS} Rd2 || status=1

and similarly for the non-pdf case, if you care.


> 
> On Thu, 29 Apr 2010, Murray Efford wrote:
> 
>> I construct a pdf package manual in Windows 7 using
>> R CMD Rd2dvi --pdf --no-preview [packagename]
>> Page numbers are listed correctly under 'R topics documented' at the front, 
>> but incorrectly (offset by -2 pages) in the Index at the back. Following the 
>> hyperlinked page numbers in the Index takes you to the wrong page. 2 pages 
>> happens to be the length of the package overview man page inserted (out of 
>> alphabetical order) after 'R topics documented'.
>> 
>> I'd be grateful for suggestions on what might be causing this and how I 
>> might fix it. I'm using R 2.10.1 and Rtools 2.10.1.
>> Murray Efford
>> ______________________________________________
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>> 
> 
> -- 
> Brian D. Ripley,                  rip...@stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> 
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to