[R-pkg-devel] CRAN note about \href{https://doi.org/...}{label} in Rd files

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Tue Mar 30 18:36:33 CEST 2021


On 30/03/2021 10:39 a.m., Floris Vanderhaeghe wrote:
>>> I just tried \doi{10.5281/zenodo.2611233} and it worked.
> 
> Sure, but what about making a hyperlink to
> https://doi.org/10.5281/zenodo.2611233 while showing "text" in the
> documentation, as in \href{wwwaddress}{text}. I assume the CRAN note
> appears because it wants literal DOI strings in the documentation to be
> specified with \doi{}. However with \href{} the DOI string remains hidden.
> 
> href{\doi{10.5281/zenodo.2611233}}{text} is a non-functional link while
> \href{https://doi.org/10.5281/zenodo.2611233}{text} is functional.
> 

No, I don't think there's currently any way to do that.  Your choices 
are probably to link to whatever the DOI links to, e.g. 
\href{https://zenodo.org/record/2682323}{text} and live with the fact 
that the URL might change tomorrow, or show the DOI.

Duncan Murdoch



More information about the R-package-devel mailing list