Re: [Rd] UTF-8 characters in Rd files

2020-12-17 Thread Prof Brian Ripley

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,  rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Unicode characters in ISO8859-15 locale

2020-12-17 Thread Jeroen Ooms
The hunspell package uses the code below to replace curly quotes (aka
fancyquotes) with a regular ascii quotes that are needed for check
spelling:

chartr("\u2019", "'", input)

As of last week this stopped working on CRAN in the Linux server that
runs in ISO8859-15 locale. From the error message, it seems that R no
longer parses the escaped unique string, which gets turned into
"".

Is this expected?

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel