[R] table of contents link style in R's PDF docs

Ista Zahn istazahn at gmail.com
Thu Sep 26 16:03:18 CEST 2013


Hi Ben,



On Wed, Sep 25, 2013 at 11:38 PM, Ben Harrison
<harb at student.unimelb.edu.au> wrote:
> Hello,
> I am mildly annoyed each time I use a PDF doc of an R package that the table
> of contents hyperlinks are *only* on the page numbers. To activate a
> hyperlink, one must carefully scan sideways from the text item wanted to the
> far right of the page and click on a tiny box. Multiply that mild annoyance
> by the large number of times I need to look up package help docs, and I find
> myself here writing this message.

I agree that it would be nicer to have the whole TOC entry
hyperlinked. But out of curiosity, why are you using the pdf
documentation? I find the html much nicer.

Best,
Ista

>
> From my understanding (albeit poor), all of the R docs for packages are to
> be written in Rd format. From that they are converted by the functions in
> the tools package as required (to latex and PDF, or HTML, etc). So the only
> thing that controls in the PDF docs the hyperlinks one way or another is the
> latex style file used - in this case I believe it is Rd.sty
> (/usr/share/R/share/texmf/tex/latex/Rd.sty on my system).
>
> Line 303 of that file contains the single setting of the \hypersetup{}
> command for whether or not the text in the table of contents is hyperlinked,
> or the page number:
>
>     linktocpage,%
>
> which causes it to implicitly be set to True. Setting it to false (or just
> commenting out that line I suppose as false is the default) would mean the
> *text* in the TOC is hyperlinked.
>
> So, is the desired behaviour intended to be that only the page numbers are
> hyperlinked (and therefore to annoy me), or has no-one really bothered
> themselves with it that much, or something else?
>
> Can I recreate all the documentation on my system after I make a change to
> Rd.sty?
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list