Bug 14708 - \code{} creates new line in html files if used in a table
\code{} creates new line in html files if used in a table
Status: RESOLVED FIXED
Product: R
Classification: Unclassified
Component: Documentation
R 2.13.2
All Windows 64-bit
: P5 normal
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-18 21:00 UTC by Robert Hijmans
Modified: 2011-12-09 21:38 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Hijmans 2011-10-18 21:00:45 UTC
In R version 2.13.2, using \code{} in a table creates new line in windows html files. This worked before (up to 2.13.1). That can create a terrible mess. See e.g.: 

library(raster)
?rasterize 

Here is an excerpt of the offending code

\tabular{rll}{
\tab \code{field} \tab If \code{x} is a Spatial*DataFrame, the index (integer), or column name (character) of the variable to be transfered. If \code{field < 0}, all features get the attribute value 1, and if \code{field == 0}, the attribute index is used (i.e. numbers from 1 to the number of features). If the Spatial object has a data.frame, all values >= 1 will use the attribute index. In all cases you can also provide a vector with the same length as the number of spatial features, or a matrix where the number of rows matches the number of spatial features \cr



R version 2.13.2 (2011-09-30)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] raster_1.9-27 sp_0.9-88    

loaded via a namespace (and not attached):
[1] grid_2.13.2     lattice_0.19-33 tools_2.13.2
Comment 1 jhgove 2011-11-30 16:40:41 UTC
This problem is still unresolved in 2.14, and the formatting problem appears to be larger than simply the usage of \code{}. For example, punctuation (e.g., :) or a new line in the Rd text file within a table row will trigger the problem. Rd commands such as \dQuote and \ldots will also cause formatting problems. I have not exhaustively tried other commands. This appears to be a new bug as stated.

It is not just a problem on the windows platform as it is happening on Linux as well (Fedora 15). 

I hope this helps.
Comment 2 Duncan Murdoch 2011-12-09 15:44:29 UTC
Please attach an .Rd file that contains nothing but an illustration of this bug, and I'll take a look.  If I have to put it together myself, it's unlikely to rise in priority enough to get done before 2.14.1.
Comment 3 Duncan Murdoch 2011-12-09 21:38:14 UTC
I found some time to fix this.  Please test before our next release!