[Rd] UTF-8 characters in Rd files

Prof Brian Ripley r|p|ey @end|ng |rom @t@t@@ox@@c@uk
Fri Dec 18 07:35:55 CET 2020


On 15/12/2020 23:57, Gábor Csárdi wrote:
> Dear list,
> 
> I am trying to see if there is a way to expand the set of UTF-8
> characters that we can use in Rd files. The main blocker is LaTeX when
> building the PDF manual.

You need to explain why this is desirable.

The other limiting factor is availability of the glyphs in fonts 
(especially for PDF and its viewers, and the man pages are rendered in 
PDF on CRAN).  Ten years ago that was a serious limitation and I am 
unaware of much change.

> It is possible to use the inputenx LaTeX package, instead of inputenc,
> which is an improvement, by setting the RD2PDF_INPUTENC env var before
> running R CMD Rd2pdf. However, I don't see a way to make this
> automatic for a package, so we cannot use it for CRAN packages, as far
> as I can tell.

Also, inputenx.sty is not part of basic TeX environments such example 
BasicTeX on macOS, so it cannot be made the default.

> Am I missing something? Would it make sense to have a way to specify
> RD2PDF_INPUTENC (and possibly other similar env vars) for packages?
> 
> As for the possible implementation, one way would be to have a file
> called `environ` or something similar in /man, that could define env
> vars, and Rd2pdf would just read it in with readRenviron().

-- 
Brian D. Ripley,                  ripley using stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford



More information about the R-devel mailing list