[Rd] RFC: Ability to suppress 'locale' from sessionInfo

Tobias Verbeke tobias.verbeke at telenet.be
Wed Apr 22 09:57:30 CEST 2009


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?

No objection although I would not be against letting it default to TRUE
to preserve current behaviour.

One improvement in the locale information that would make the LaTeX look 
much nicer would be to add a space after the separator, i.e.

item1; item2; item3

instead of

item1;item2;item3

That is for me more important than having the option to include locale 
info or not as without such a change I found no way to prevent the 
locale information to run into the margin (and off the page) of the 
resulting LaTeX document and that is esthetically much more displeasing
than the mere presence of the locale information.

Best,
Tobias



More information about the R-devel mailing list