Can LaTeX escapes for accents be used in Rd
files? I tried the standard \'e
and many variants (\'{e}
, {\'e}
, \\'e
, \\'{e}
, {\\'e}
, etc.), but none is rendered as an accented character in the PDF or HTML output.
I want my References section (i.e. \references{}
) to be rendered with accented characters, but I do not want to type non-ASCII characters in my Rd
files. Is there good/recommended practice? Should I simply replace non-ASCII characters with their ASCII equivalents (é → e, ø → o)?
To be clear, I know it is possible to type accented characters (e.g., é
) directly in UTF-8-encoded files, but I would prefer to keep ASCII-encoded files.
This question is not about:
- how to type special/accented letters in LaTeX
- how to use UTF-8 in LaTeX
- accents/special characters in R Markdown
or variants.
Minimal test package
Package structure:
test
test/man
test/man/one.Rd
test/R
test/R/one.R
test/DESCRIPTION
test/man/one.Rd
:
\name{one}
\alias{one}
\title{Get One}
\description{Accents are not rendered: \'e \'{e} {\'e} \\'e \\'{e} {\\'e}}
\usage{
one()
}
test/R/one.R
:
one <- function() 1
test/DESCRIPTION
:
Package: test
Version: 0.1
Title: Test
Author: Nobody
Maintainer: Nobody <no@body.org>
Description: Test.
License: GPL-3
Build, check, and install with:
$ R CMD build test
$ R CMD check test_0.1.tar.gz
$ R CMD INSTALL test_0.1.tar.gz