UTF-8 characters in Rd files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

UTF-8 characters in Rd files

Gábor Csárdi
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.

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.

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().

Thanks,
Gabor

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: UTF-8 characters in Rd files

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,                  [hidden email]
Emeritus Professor of Applied Statistics, University of Oxford

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel