R-alpha: ISO Latin1 and Readline

Martin Maechler Martin Maechler <maechler@stat.math.ethz.ch>
Fri, 13 Jun 1997 14:43:50 +0200


One thing which is important is
to use the environment variable 

	LC_CTYPE=iso_8859_1

(This makes Emacs  automatically call (standard-display-european 1)

Here, the readline library is not of much importance, because

	1) We use US-american keyboards 
	   which makes programming / latex / Splus much easier.

	2) In Emacs, we use a nice package 
		(require 'iso-transl)
	   and
	        (iso-transl-set-language "German")

	   which makes C-x 8 and more imporantly
           'Alt' (the one besides "Meta" on a SPARC keyboard)
           behave as a prefix for accented characters.
	
	  So, the German Umlauts are produced using 
		Alt-a (ä), ....Alt-U (Ü), 
		and even the one we don't use in Switzerland, Alt-s (ß)
	  Also, Alt-m (=) µ ,   Alt-< (=) «;  

	  And for all accents: 
		Alt-accent-letter  -->  accented letter.

	   Alt-'-e  -> é
	   Alt-^-i  -> î

	 and so on -- this is much more powerful than any language specific
	 keyboard.

and then, we use  S-mode / R-mode / latex-mode / shell-mode   from within
Emacs. 

------------

Back to R:
	
I think most important are

1) string constants
2) Comments

and then

3)  text(.) and mtext(.)  of these constants.

4) Variable names might come natural to some users, 
   especially the ones that come from non-Unix worlds.

------------------------------
Remark to '3)'   and postscript(.).

In newer versions of S-plus (>= 3.1 I think),
there is the 

       ps.options (setfont = ps.setfont.latin1)

command which allows for  ISO-latin1 text.
The big drawback is that the default plotting character is DIFFERENT
and worse.

If you want to see what I mean, execute the following and compare the 2
postscript files:

#### Deal with 'bug' :
#### if       		ps.options (setfont = ps.setfont.latin1)
#### has been called,
#### the default plotting character, the 'bullet' is drawn much too small.

pso <- ps.options (reset = T)
ps.options (setfont = ps.setfont.latin1)
postscript("latin1-ex.ps")
plot(1:10, main ="© by «Martin Mächler»")
Txt <- paste("ps.options (reset = T)",
	     "ps.options (setfont = ps.setfont.latin1)",
	     "plot(1:10, main = \"© by «Martin Mächler»\")",
	     "text(1,9,\"««__all this text__»»\")",sep="\n")
text(1,9,Txt, adj=0)
dev.off()

pso <- ps.options (reset = T)
postscript("std-ex.ps")
plot(1:10, main ="© by «Martin Mächler»")
text(1,9,"ps.options (reset = T)\nplot(1:10, main = \"....\")",adj=0)
dev.off()
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-