It’s common to want to use grammatical characters like the curly apostrophe in "It’s" in R help files.
Using a regular single quote '
) is not a great solution as '
is used in roxygen line openings (#'
) and to quote strings (which leads syntax-highlighting in text editors to break (not in the .Rd file).
What doesn't work
- You can't just paste in unicode.
- CRAN doesn't allow any non-ascii characters in packages for portability.
- You can't use encoded unicode, e.g. \u2019
- This renders as raw string.
- You can't use &-escaped html codes.
’
renders as raw code in the help :-(
So: Are there solutions to including an apostrophe in Rd files?