Re: [Rd] (PR#13234) Problems with Sweave and pdf.options(encoding=ISOLatin7)
2008/11/19 Prof Brian Ripley [EMAIL PROTECTED]: I can't actually check what happens since the message has been garbled en route to me. Can you please send what you intended using \u escapes so it is portable. (What I have is what appears to be UTF-8 re-encoded in UTF-8, things like c3 84 3f.) And can you also confirm that the example works correctly directly in pdf()? OK, the modified R code is: plot(rnorm(100),main=\u0105\u010D\u0117\u0119\u012F\u0161\u016B\u0173\u017E) It does not work correctly with Sweave, as I wrote in my email, I rechecked. And yes it works if only pdf is used. On Fri, 31 Oct 2008, [EMAIL PROTECTED] wrote: Hi, Sweave for some reason does not respect encoding setting in pdf.options. Rather it uses its own setting. I think you need to set option pdf.encoding=ISOLatin7 on the Sweave call. Is it possible to do that? Sweave function in R, does not support that, and using SweaveHooks produced the same result. It would probably be better if Sweave() fetched the default for options$pdf.encoding from pdf.options(), and definitely that this was documented. I did not find any mention about encodings in ?Sweave, ?RweaveLatex and ?Rtangle, and Sweave manual and FAQ. I looked at the code of RweaveLatexSetup, and saw that pdf.encoding is defined explicitly, that is how I figured out, that probably eps files are probably ok. Sorry for the garbled message, next time I will send unicode portable code without relying on email encodings. Sincerely yours, Vaidotas Zemlys __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] (PR#13234) Problems with Sweave and pdf.options(encoding=ISOLatin7)
2008/11/19 Prof Brian Ripley [EMAIL PROTECTED]: On Wed, 19 Nov 2008, Vaidotas Zemlys wrote: OK, the modified R code is: plot(rnorm(100),main=\u0105\u010D\u0117\u0119\u012F\u0161\u016B\u0173\u017E) It does not work correctly with Sweave, as I wrote in my email, I rechecked. And yes it works if only pdf is used. It works for me in xpdf, but not Acroread 8.1.3. Yes, I checked only with evince, and assumed, that Acroread will be similar. Acrobat 9 (on windows) shows the letters, but they are bunched up together. Changing the default family to URWHelvetica did not help either. So that rules out using pdf for me. I did not find any mention about encodings in ?Sweave, ?RweaveLatex and ?Rtangle, and Sweave manual and FAQ. Yes, Sweave is supposedly frozen pending unbundling. Note that this does work (at least for me) in lt_LT.utf8: it is because you were in fr_FR.utf8 that you had a problem. So I think the solution is actually pretty simple: use the correct locale. I've changed R-patched to take the defaults from pdf.options(), but Sweave should still be able to set them. Aah, this does not occured to me. I thought that because locale is unicode it should not matter which unicode letters I use. That is a not correct assumption. Thank you for your answers, Vaidotas Zemlys __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] shared-mime-info (PR#8278)
Hi, On 04 Nov 2005 13:51:56 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: One further thought about this: On SUSE, rpm -qif /usr/share/mime/ points at http://www.freedesktop.org/wiki/Software_2fshared_2dmime_2dinfo So I guess that the proper tree to bark at is the upstreams maintainers of http://freedesktop.org/~jrb/shared-mime-info-*.tar.gz Instructions there say to submit new XML files to https://bugs.freedesktop.org/buglist.cgi?product=shared-mime-infobug_status=NEWbug_status=ASSIGNEDbug_status=REOPENED It would likely be a good idea to send them first to R-devel for review. I already barked at upstream. The upstream barked back. The result is here: https://bugs.freedesktop.org/show_bug.cgi?id=1782 There you can find xml file for R scripts. I've made it from some example. It is really only a proof of a concept. But it would not be very difficult to produce xml files for mimetypes of all R related files. We must only decide which R related files would benefit from having mimetypes. My proposal is 1. R source code, R scripts. Files with extensions .R, .r and others (.q?, .s?, .S?). Mimetypes text/x-R, text/x-Rsrc 2. R documentation files. File extension .Rd. Mimetype text/x-Rd 3. RData files. File extension .RData, files which at beginning have RDX2. Mimetype application/x-RData. 4. Rhistory files. File extension .Rhistory. Mimetype text/x-Rhistory 5. R transcript files from ESS/Emacs. File extension .Rt. Mimetype text/x-Rtranscript The relevant xml code could be pushed upstream to end up in freedesktop.org.xml, or it could be distributed with R linux package, and installed into relevant subdirectory of /usr/share/mime. With a bit more work the result could be, that people using for example Nautilus (graphical Gnome browser) could see R related files displayed with R logo, and clicking them could result in various appropriate actions. For example for .RData R process could be iinvoked and relevant .RData file could be loaded. I could write and test the xml code. But first we have to agree on which files benefit from having mimetypes and how the mimetypes should be named. Feel free to suggest. Vaidotas Zemlys -- Doctorate student, http://www.mif.vu.lt/katedros/eka/katedra/zemlys.php Vilnius University __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] shared-mime-info (PR#8278)
Hi, On 03 Nov 2005 12:41:53 +0100, Peter Dalgaard [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] writes: We do not usually put features in R which are specific to just some distributions of some OSes, and in this case to one editor on those. We do not for example include the ESS mode for the much-more-widely-used Emacs family of editors. This looks as if it might be appropriate to the Linux binary packages for R, so I suggest you contact their maintainers. But my understanding is that this is an issue for gedit and not for R. Indeed .R is just a convention (one of many choices, including .r and .q) for R itself. I do wonder why you concentrated on .R files and not .Rd files, where I find syntax highlighting more useful. Mime-types shouldn't be distribution-specific or even editor-specific, should they? The whole point is that they can be used for things like email attachments that pass from one OS to the other. It might be useful to have the mime-type definitions for R (and Rd) files centralized in R core, with the appropriate OS conventions systematized. But I think we need to know more. Who keeps track of mime-types? Can we just grab text/x-R (and text/x-Rd and application/x-Rdata)? To which extent the XML format a standard; is it only used by particular applications? As far as I know, at least in Debian, the mimetypes are tracked by shared-mime-info package. The upstream is freedesktop.org. I do not know about oficial standarts, but Gnome and KDE tries to adher to some of the freedesktop.org standarts. I can confirm that mimetypes provided by shared-mime-info are widely used in Gnome, for some time now. Vaidotas Zemlys -- Doctorate student, http://www.mif.vu.lt/katedros/eka/katedra/zemlys.php Vilnius University __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel