[Rd] RFC: Ability to suppress 'locale' from sessionInfo
Martin Maechler
maechler at stat.math.ethz.ch
Wed Apr 22 10:50:12 CEST 2009
>>>>> "TobiasV" == Tobias Verbeke <tobias.verbeke at telenet.be>
>>>>> on Wed, 22 Apr 2009 09:57:30 +0200 writes:
TobiasV> Friedrich Leisch wrote:
>>>>>>> On Tue, 21 Apr 2009 21:16:59 -0500,
>>>>>>> Kevin W (KW) wrote:
>>
>> > The printing of the locale information from sessionInfo is not very tidy.
>> > Using toLatex(sessionInfo) pretty much guarantees "badness" from breaking
>> > the margin boundary (though my version of TeX no longer reports such
>> > errors). A random example is here:
>> > http://cran.r-project.org/web/packages/Matrix/vignettes/Design-issues.pdf
>>
>> > I find the locale information unnecessary and right now I hack this with
>> > si = sessionInfo()
>> > si$locale = "US"
>> > toLatex(si)
>>
>> > I would like to be able to do something a bit cleaner, for example
>> > sessionInfo(locale=FALSE)
>>
>> > For what it's worth, I don't think that early versions of sessionInfo
>> > printed information about the locale.
>>
>> It went in on 2006-05-26, so it's bben there for some time now.
>>
>>
>> > Discussion welcome.
>>
>> I agree that it doesn't look nice in latex documents, but it is very
>> handy in bug reports.
>>
>> Are there any objections if we add a locale argument to the toLatex()
>> method and let that default to FALSE?
TobiasV> No objection although I would not be against
TobiasV> letting it default to TRUE to preserve current behaviour.
I agree with setting the default to keep the current behavior.
As Fritz mentioned, there situations where the locale
(information) is of quite some importance. As we know that
Sweave is used in quite a few circumstances with automatic
report generation, of which in *some* cases the locale may also
matter (and is desired to be visible),
I think we should not change the default behavior lightly
(apart from the extra spaces, see below).
TobiasV> One improvement in the locale information that would make the LaTeX look
TobiasV> much nicer would be to add a space after the separator, i.e.
TobiasV> item1; item2; item3
TobiasV> instead of
TobiasV> item1;item2;item3
TobiasV> That is for me more important than having the
TobiasV> option to include locale info or not
I agree very much; and indeed, adding the space after ";" is
trivial to achieve in the next version of toLatex()'s
"sessionInfo" method, as well.
Martin
TobiasV> as without such a change I found no way to prevent the locale
TobiasV> information to run into the margin (and off the
TobiasV> page) of the resulting LaTeX document and that is
TobiasV> esthetically much more displeasing than the mere
TobiasV> presence of the locale information.
TobiasV> Best,
TobiasV> Tobias
More information about the R-devel
mailing list