[R-gui] Tinn-R/Latex output

Mike Prager mike.prager at noaa.gov
Fri Sep 19 21:50:42 CEST 2008


"David Carslaw" <D.C.Carslaw at its.leeds.ac.uk> wrote:

> I find Tinn-R to be an excellent editor for R, but I have one question I
> have not been able to answer.
>  
> I wish to include some R code in Latex.  Using the Edit/Copy formatted
> (to export)/TeX does provide Latex-type output.  However, there are lots
> of commands such as \RAIdentifier and \RAOperator etc. that would appear
> to need either a Latex package to interpret or a list of new commands
> that describe font attributes etc.
> 
> My question is whether such a package exists, or is the user expected to
> define their own commands to interpret them?


David,

I also find Tinn-R an excellent editor for R.

When I include R code in Latex, I use the Latex "listings"
package. It has a wide variety of settings for pretty-printing R
code and can be customized by the user.  I think that would be
more satisfactory in the long run than inserting Latex codes (or
having an editor insert Latex codes) to mark R language
elements.

HTH

Mike P.

-- 
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.



More information about the R-SIG-GUI mailing list