From renaud.lancelot at gmail.com  Mon Oct  4 00:59:20 2010
From: renaud.lancelot at gmail.com (Renaud Lancelot)
Date: Mon, 4 Oct 2010 00:59:20 +0200
Subject: [Rd] Encoding problem in Rd file
In-Reply-To: <AANLkTinxdTL1NuZs-WjB+wE1Gbs3--FCsx5EGaXtRo+Z@mail.gmail.com>
References: <AANLkTim64+ZkrdnxwFQLtSr0zimDbt61a4L9afNGGwNO@mail.gmail.com>
	<4CA8B3F1.1080404@gmail.com>
	<AANLkTineG4qndYdykEZCzC49OpKt-5XGGACuQf71dkxe@mail.gmail.com>
	<4CA8BDFE.2070505@gmail.com>
	<AANLkTinxdTL1NuZs-WjB+wE1Gbs3--FCsx5EGaXtRo+Z@mail.gmail.com>
Message-ID: <AANLkTimM-Fq+_2ZSKdOe5DqO9WyD4f4fXFMCUUtSKR4t@mail.gmail.com>

I found the problem. It turned out that the coding system of the Rd
file (as defined under Emacs) was mistakenly set by me to a wrong
value. I had to define it as iso-latin-1, and then retype the
accentuated characters under this new system. Everything looks OK,
now. Sorry for bothering you.

2010/10/3 Renaud Lancelot <renaud.lancelot at gmail.com>:
> I see C:/R\R-2.11.1\share\texmf\Rd.sty which is my current R
> installation. By the way, there is no error during the compilation
> with
>
> ?R CMD Rd2dvi --no-clean dja.Rd
>
> So, it looks that the problem is located elsewhere...
>
> Thank you for your help.
>
> All the best,
>
> Renaud
>
> 2010/10/3 Duncan Murdoch <murdoch.duncan at gmail.com>:
>> On 03/10/2010 1:14 PM, Renaud Lancelot wrote:
>>>
>>> Thank you very much. My LaTeX installation is up to date (very
>>> recently updated with MIKTeK update facility).
>>> I have run R CMD Rd2dvi --no-clean dja.Rd and the result looks OK. I
>>> have put the resulting TeX file at
>>> http://filex.cirad.fr/get?k=K1cBpKr3UBUmdOJFMlx
>>>
>>> Do you have another suggestion?
>>
>> Not really, other than trying a LaTeX expert. ?When I run your file through
>> latex using
>>
>> R CMD latex Rd2.tex
>>
>> it compiles fine with no errors (only an "underfull hbox" warning).
>>
>> One thought: ?some people install copies of Rd.sty into their local tex
>> installation. ?If that version isn't compatible with the current macros
>> generated by R, you could have problems. ?You should see something like
>>
>> (F:/R/svn/r-devel/R/share/texmf/tex/latex\Rd.sty
>> Package: Rd
>>
>> in the Rd2.log file. ?If you see that it finds Rd.sty outside of the current
>> R version, delete the old file.
>>
>> Duncan Murdoch
>>
>>
>>>
>>> Renaud
>>>
>>> 2010/10/3 Duncan Murdoch <murdoch.duncan at gmail.com>:
>>>>
>>>> On 03/10/2010 12:23 PM, Renaud Lancelot wrote:
>>>>>
>>>>> Dear all,
>>>>>
>>>>> I have a problem with an Rd file containing French accentuated
>>>>> characters. I have uploaded the file at
>>>>> http://filex.cirad.fr/get?k=cjW7lImMaNC6Ci2vX0H
>>>>>
>>>>> I have declared
>>>>> Encoding: latin1
>>>>> in the package DESCRIPTION file
>>>>>
>>>>> and I have added
>>>>> \encoding{latin1}
>>>>> in the header of the Rd file.
>>>>>
>>>>> When I compile the package manual, I have LaTeX errors:
>>>>>
>>>>> ! Package inputenc Error: Unicode char \u8:?F not set up for use with
>>>>> LaTeX.
>>>>>
>>>>> See the inputenc package documentation for explanation.
>>>>> Type ?H <return> ?for immediate help.
>>>>> ?...
>>>>>
>>>>> l.579 ...ain. Aspects m??thodologiques.} Rev. ? ?F
>>>>> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? aug??re, O., Dock??s,
>>>>> A.-C...
>>>>
>>>> R converts everything to UTF-8 and declares it that way for LaTeX. It
>>>> looks
>>>> as though your LaTeX installation isn't prepared to handle that, or
>>>> something has gone wrong in the conversion on your system. ?The letter
>>>> following "Rev. " above is a capital E with an acute accent, which is
>>>> encoded as C3 89 in UTF-8. ?Interpreted as Latin1, that looks like "?",
>>>> because the 89 is unprintable, but it shouldn't come out as "?F".
>>>>
>>>> I'd suggest updating your LaTeX inputenc package. ?If that doesn't work,
>>>> you
>>>> can see if the problem is in the conversion, by running
>>>>
>>>> R CMD Rd2dvi --no-clean dja.Rd
>>>>
>>>> and look in the Rd2.tex file that was produced.
>>>>
>>>> Duncan Murdoch
>>>>
>>>>> Your command was ignored.
>>>>> Type ?I <command> <return> ?to replace it with another command,
>>>>> or ?<return> ?to continue without it.
>>>>>
>>>>>
>>>>> ! Package inputenc Error: Unicode char \u8:?F not set up for use with
>>>>> LaTeX.
>>>>>
>>>>> See the inputenc package documentation for explanation.
>>>>> Type ?H <return> ?for immediate help.
>>>>> ?...
>>>>>
>>>>> l.581 ? ?F
>>>>> ? ? ? ? aug??re, O., Tillard, E., Faug??re, B., 1992. \emph{Prophylaxie
>>>>> ch...
>>>>>
>>>>> Your command was ignored.
>>>>> Type ?I <command> <return> ?to replace it with another command,
>>>>> or ?<return> ?to continue without it.
>>>>>
>>>>>
>>>>> ! Package inputenc Error: Unicode char \u8:?\end not set up for use with
>>>>> LaTeX.
>>>>>
>>>>>
>>>>> See the inputenc package documentation for explanation.
>>>>> Type ?H <return> ?for immediate help.
>>>>> ?...
>>>>>
>>>>> l.587 \end
>>>>> ? ? ? ? {References}
>>>>> Your command was ignored.
>>>>> Type ?I <command> <return> ?to replace it with another command,
>>>>> or ?<return> ?to continue without it.
>>>>>
>>>>> ***********
>>>>> I can easily find the offending lines using
>>>>> showNonASCII(readLines(file)). However, I don't know what to do to
>>>>> solve the problem. The strange thing (to me!) is that the pdf is
>>>>> actually built with appropriate accentuated characters, at least when
>>>>> I look at it with my pdf viewer (Acrobat reader).
>>>>>
>>>>> My config is:
>>>>>
>>>>>> sessionInfo()
>>>>>
>>>>> R version 2.11.1 Patched (2010-09-30 r53117)
>>>>> Platform: i386-pc-mingw32 (32-bit)
>>>>>
>>>>> locale:
>>>>> [1] LC_COLLATE=French_France.1252 ?LC_CTYPE=French_France.1252
>>>>> [3] LC_MONETARY=French_France.1252 LC_NUMERIC=C
>>>>> [5] LC_TIME=French_France.1252
>>>>>
>>>>> attached base packages:
>>>>> [1] tools ? ? stats ? ? graphics ?grDevices utils ? ? datasets ?methods
>>>>> [8] base
>>>>>
>>>>> other attached packages:
>>>>> [1] fortunes_1.4-0
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>
>
> --
> Renaud Lancelot
> EDEN Project, coordinator
> http://www.eden-fp6project.net/
>
> UMR CIRAD-INRA "Contr?le des maladies animales exotiques et ?mergentes"
> Joint research unit "Control of emerging and exotic animal diseases"
>
> CIRAD, Campus International de Baillarguet TA A-DIR / B
> F34398 Montpellier
> http://umr-cmaee.cirad.fr/
>
> Tel.? +33 4 67 59 37 17? -? Fax? +33 4 67 59 37 95
> Secr. +33 4 67 59 37 37? - Cell. +33 6 77 52 08 69
>



-- 
Renaud Lancelot
EDEN Project, coordinator
http://www.eden-fp6project.net/

UMR CIRAD-INRA "Contr?le des maladies animales exotiques et ?mergentes"
Joint research unit "Control of emerging and exotic animal diseases"

CIRAD, Campus International de Baillarguet TA A-DIR / B
F34398 Montpellier
http://umr-cmaee.cirad.fr/

Tel.? +33 4 67 59 37 17? -? Fax? +33 4 67 59 37 95
Secr. +33 4 67 59 37 37? - Cell. +33 6 77 52 08 69



[Rd] Encoding problem in Rd file
Renaud Lancelot