I pushed highlight 0.2-5 on CRAN. This release improves the latex renderer and the sweave driver so that multiple lines character strings are properly rendered.
This example vignette shows it:
\documentclass[a4paper]{report}
\begin{document}
<<echo=FALSE,results=hide>>=
old.op <- options( prompt = " ", continue = " " )
@
<<>>=
require( inline )
require( Rcpp )
convolve <- cxxfunction(
signature( a = "numeric", b = "numeric" ), '
NumericVector xa(a); int n_xa = xa.size() ;
NumericVector xb(b); int n_xb = xb.size() ;
NumericVector xab(n_xa + n_xb - 1,0.0);
Range r( 0, n_xb-1 );
for(int i=0; i<n_xa; i++, r++){
xab[ r ] += noNA(xa[i]) * noNA(xb) ;
}
return xab ;
', plugin = "Rcpp" )
convolve( 1:4, 1:5 )
@
<<echo=FALSE,results=hide>>=
options( old.op )
@
\end{document}
Once processed with Sweave, e.g. :
require( highlight ) driver <- HighlightWeaveLatex(boxes = TRUE) Sweave( 'test.Rnw', driver = driver ) texi2dvi( 'test.tex', pdf = TRUE )
we get this result, embedded below with google viewer:
See this question on stack overflow for the tip of using google documents to display pdf files