[R-pkg-devel] Producing ß in help files --- very belated response.

Rolf Turner r.turner at auckland.ac.nz
Wed Jan 17 23:58:13 CET 2018


On 06/01/18 20:51, Uwe Ligges wrote:

> And just writing it with a declared encoding in the Rd file des not work?

Uh, yes.  It does indeed work just fine.  Thank you!  The point is that 
I had no idea of this possibility --- or even of the existence of 
"declared encoding".

For the record, what I did was:

* put "\encoding{UTF-8}" at the very beginning of the *.Rd file, just
   before the "\name{.}" command.
* wherever I referred to Prof. Weiß, use "\enc{Weiß}{Weiss}"

It's very easy once one has been told how to do this, impossible before 
that.  The discussion in WRE is opaque to me.

Many thanks, Uwe, for telling me how to do this, and to others who made 
similar suggestions.

My humblest apologies for taking so long to acknowledge the help that I 
was given.

cheers,

Rolf

> 
> Section 2.14 in WRE tells us that \encoding{} can declare anm encoding 
> and "For convenience, encoding names ‘latin1’ and ‘latin2’ are always 
> recognized: these and
> ‘UTF-8’ are likely to work fairly widely. However, this does not mean 
> that all characters in
> UTF-8 will be recognized, and the coverage of non-Latin characters10 is 
> fairly low. Using LATEX
> inputenx (see ?Rd2pdf in R) will give greater coverage of UTF-8.
> The \enc command (see Section 2.8 [Insertions], page 75) can be used to 
> provide transliterations
> which will be used in conversions that do not support the declared 
> encoding."
> 
> And Secion 2.8 tells us
> 
> Text which might need to be represented differently in different 
> encodings should be marked
> by \enc, e.g. \enc{Jöreskog}{Joreskog} (with no whitespace between the 
> braces) where the
> first argument will be used where encodings are allowed and the second 
> should be ASCII (and
> is used for e.g. the text conversion in locales that cannot represent 
> the encoded form). (This is
> intended to be used for individual words, not whole sentences or 
> paragraphs.)
> 
> 
> 
> Hence a preamble with, e.g.
> \encoding{latin1}
> or
> \encoding{UTF-8}
> and later writing \enc{Weiß}{Weiss} seems most appropriate here.
> 
> Best,
> Uwe Ligges
> 
> 
> 
> On 06.01.2018 04:41, Rolf Turner wrote:
>> On 06/01/18 16:19, Spencer Graves wrote:
>>>
>>>
>>> On 2018-01-05 20:52, Rolf Turner wrote:
>>>>
>>>> In a help file that I am writing I wish to cite an item by a bloke 
>>>> whose surname is Weiß.
>>>
>>>
>>>        Write it "Weiss".
>>>
>>>
>>>        See "https://en.wikipedia.org/wiki/%C3%9F".
>>>
>>>
>>>        That name is written "Weiss" in Switzerland and Liechtenstein 
>>> but "Weiß" in Germany and Austria.  German is the official language 
>>> of Liechtenstein and the primary of four official languages of 
>>> Switzerland.
>>>
>>>
>>>        Standard high German has several characters that are not used 
>>> in English but have standard transliterations using the English latin 
>>> alphabet.  These include "ß" = "ss", "ä" = "ae", "ö" = "oe" and "ü" = 
>>> "ue".
>>
>> <SNIP>
>>
>> I'm sure that you're correct, but I find it frustrating not to be able 
>> to produce a symbol (which is readily available elsewhere --- e.g. in 
>> LaTeX or from the keyboard using the "compose key") under the ".Rd" 
>> system.  I'd like to be *able to produce it*, even if I shouldn't! :-)
>>
>> cheers,
>>
>> Rolf
>>
>> P. S.  It also seems to me to be polite --- if that's the way the 
>> bloke writes his name, then  that's the way that I ought to write it 
>> when referring to him.
>>
>> R.



More information about the R-package-devel mailing list