[R] how to use # in a rd doc in url address

Patrick Giraudoux patrick.giraudoux at univ-fcomte.fr
Wed Nov 11 19:38:05 CET 2009


Duncan Murdoch a écrit :
> On 11/11/2009 12:15 PM, Patrick Giraudoux wrote:
>> I am writing a rd doc, and need to use "#" in a url adress. This 
>> would make:
>>
>> \url{http://www.xxxx.org/myfolder/#myanchor}
>
> That should work.
>
>> Of course, I suppose this will not work because # is a special 
>> character starting a comment line in the rd dialect. 
>
> That's not correct.  # is only special in R code, and with \url{} the 
> text is considered as verbatim text, i.e. only \, %, { and } are special.
>
>  I did not found a similar
>> example in "Writing R exentions". I am not sure bout using \dQuote{a 
>> quotation}), and use \sQuote and \dQuote correctly. Does anyone know 
>> how to get the thing right ?
>
> I don't understand this question.
>

You answered it above... There is no reason for using special 
"quotation" considering your reminder: "with \url{} the text is 
considered as verbatim text"

Thanks for the focus,

Best,

Patrick




More information about the R-help mailing list