user2911296
user2911296

Reputation:

Rd2pdf - special (and German) characters

Yesterday I used Rd2pdf to convert the documentation of my R package to pdf and I discovered that special characters like '§' and the German umlauts (ä, ö, ü) were not displayed. I'm using Debian 7 and have a TexLive installation - so for Latex documents I use packages like 'ngerman' to display special German characters like ä, ö , ü and ß. So, as Rd2pdf uses the whole latex thing, my question is:

Is there a way to include these additional packages to enable Rd2pdf displaying these special characters?

Thanks in advance!

Upvotes: 2

Views: 468

Answers (1)

rcs
rcs

Reputation: 68849

The following works on my Ubuntu 14.04 system:

R CMD Rd2pdf --encoding=UTF-8 file.Rd

See the command-line help text

R CMD Rd2pdf --help

...

The Rd sources are assumed to be ASCII unless they contain \encoding declarations (which take priority) or --encoding is supplied or if using package sources, if the package DESCRIPTION file has an Encoding field. The output encoding defaults to the package encoding then to 'UTF-8'.

Upvotes: 4

Related Questions