[Rd] UTF8 markdown vignette

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Wed Dec 10 09:32:20 CET 2014


Dear Yihui and Duncan,

Using \%SweaveUTF8 does not solve the problem. The nice thing about it, it that it no longer requires \usepackage[utf8]{} to make R CMD check --as-cran happy.

To Yihui: here is the sessionInfo().

> library(rmarkdown)
> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=Dutch_Belgium.1252  LC_CTYPE=Dutch_Belgium.1252    LC_MONETARY=Dutch_Belgium.1252 LC_NUMERIC=C
[5] LC_TIME=Dutch_Belgium.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] rmarkdown_0.3.11

loaded via a namespace (and not attached):
[1] digest_0.6.4    fortunes_1.5-2  htmltools_0.2.6 tools_3.1.2

Best regards,

Thierry

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
+ 32 2 525 02 51
+ 32 54 43 61 85
Thierry.Onkelinx at inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more than asking him to perform a post-mortem examination: he may be able to say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: xieyihui at gmail.com [mailto:xieyihui at gmail.com] Namens Yihui Xie
Verzonden: woensdag 10 december 2014 4:37
Aan: Duncan Murdoch
CC: ONKELINX, Thierry; r-devel at r-project.org; Kurt Hornik
Onderwerp: Re: [Rd] UTF8 markdown vignette

I took a look at the R source and I realized that the encoding was actually never passed to the vignette engine:
https://github.com/wch/r-source/blob/e721ef5f4/src/library/tools/R/Vignettes.R#L507
Apparently only the file and quiet arguments are passed to the vignette engine. Did I miss anything?

To Thierry: I explicitly asked for library(rmarkdown);sessionInfo(), but you only told me the version of rmarkdown, which is not the only thing I was asking for. It is extremely important in this case to know the versions of other packages as well as your system locale information.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Web: http://yihui.name


On Tue, Dec 9, 2014 at 3:42 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> On 09/12/2014, 4:38 PM, ONKELINX, Thierry wrote:
>> Dear Yihui,
>>
>> I have created a reproducible example at
>> https://github.com/ThierryO/utf8vignette
>>
>> The \usepackage{} line is needed, otherwise R CMD check --as-cran will give a warning.
>> %\VignetteEncoding{UTF-8} did not solve the problem.
>
> I've just taken a look at the sources, and that's only in R-devel, it
> never got backported to R-patched so it isn't in the release R.  You
> would need to use
>
> %\SweaveUTF8
>
> instead.  (It was introduced in 3.1.0, and should be kept until at
> least 3.2.0, but \VignetteEncoding will be preferred in the long run.
> It should make it into 3.1.3 unless we drop the ball again.)
>
> Duncan Murdoch
>
>>
>> I use rmarkdown_0.3.11
>>
>> HTML vignette is not an option as the vignette demonstrates the use of a custom beamer output format.
>>
>> Best regards,
>>
>> Thierry
>> ________________________________________
>> Van: xieyihui at gmail.com [xieyihui at gmail.com] namens Yihui Xie
>> [xie at yihui.name]
>> Verzonden: dinsdag 9 december 2014 17:13
>> Aan: ONKELINX, Thierry
>> CC: r-devel at r-project.org; Duncan Murdoch; Kurt Hornik
>> Onderwerp: Re: [Rd] UTF8 markdown vignette
>>
>>
>> Lastly, the most important piece of information is missing in this
>> post: library(rmarkdown); sessionInfo(). There is not a minimal
>> reproducible example, either. Without these information, I can only
>> guess blindly.
Disclaimer Bezoek onze website / Visit our website<https://drupal.inbo.be/nl/disclaimer-mailberichten-van-het-inbo>


More information about the R-devel mailing list